pango_cairo_sys/
lib.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
6#![allow(
7    clippy::approx_constant,
8    clippy::type_complexity,
9    clippy::unreadable_literal
10)]
11
12extern crate cairo_sys as cairo;
13extern crate glib_sys as glib;
14extern crate libc;
15extern crate pango_sys as pango;
16
17#[allow(unused_imports)]
18use libc::{
19    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
20    intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE,
21};
22
23#[allow(unused_imports)]
24use glib::{gboolean, gconstpointer, gpointer, GType};
25
26// Callbacks
27pub type PangoCairoShapeRendererFunc = Option<
28    unsafe extern "C" fn(*mut cairo::cairo_t, *mut pango::PangoAttrShape, gboolean, gpointer),
29>;
30
31// Interfaces
32#[repr(C)]
33pub struct PangoCairoFont(c_void);
34
35impl ::std::fmt::Debug for PangoCairoFont {
36    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
37        write!(f, "PangoCairoFont @ {:?}", self as *const _)
38    }
39}
40
41#[repr(C)]
42pub struct PangoCairoFontMap(c_void);
43
44impl ::std::fmt::Debug for PangoCairoFontMap {
45    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
46        write!(f, "PangoCairoFontMap @ {:?}", self as *const _)
47    }
48}
49
50extern "C" {
51
52    //=========================================================================
53    // PangoCairoFont
54    //=========================================================================
55    pub fn pango_cairo_font_get_type() -> GType;
56    pub fn pango_cairo_font_get_scaled_font(
57        font: *mut PangoCairoFont,
58    ) -> *mut cairo::cairo_scaled_font_t;
59
60    //=========================================================================
61    // PangoCairoFontMap
62    //=========================================================================
63    pub fn pango_cairo_font_map_get_type() -> GType;
64    pub fn pango_cairo_font_map_get_default() -> *mut pango::PangoFontMap;
65    pub fn pango_cairo_font_map_new() -> *mut pango::PangoFontMap;
66    pub fn pango_cairo_font_map_new_for_font_type(
67        fonttype: cairo::cairo_font_type_t,
68    ) -> *mut pango::PangoFontMap;
69    pub fn pango_cairo_font_map_create_context(
70        fontmap: *mut PangoCairoFontMap,
71    ) -> *mut pango::PangoContext;
72    pub fn pango_cairo_font_map_get_font_type(
73        fontmap: *mut PangoCairoFontMap,
74    ) -> cairo::cairo_font_type_t;
75    pub fn pango_cairo_font_map_get_resolution(fontmap: *mut PangoCairoFontMap) -> c_double;
76    pub fn pango_cairo_font_map_set_default(fontmap: *mut PangoCairoFontMap);
77    pub fn pango_cairo_font_map_set_resolution(fontmap: *mut PangoCairoFontMap, dpi: c_double);
78
79    //=========================================================================
80    // Other functions
81    //=========================================================================
82    pub fn pango_cairo_context_get_font_options(
83        context: *mut pango::PangoContext,
84    ) -> *const cairo::cairo_font_options_t;
85    pub fn pango_cairo_context_get_resolution(context: *mut pango::PangoContext) -> c_double;
86    pub fn pango_cairo_context_get_shape_renderer(
87        context: *mut pango::PangoContext,
88        data: *mut gpointer,
89    ) -> PangoCairoShapeRendererFunc;
90    pub fn pango_cairo_context_set_font_options(
91        context: *mut pango::PangoContext,
92        options: *const cairo::cairo_font_options_t,
93    );
94    pub fn pango_cairo_context_set_resolution(context: *mut pango::PangoContext, dpi: c_double);
95    pub fn pango_cairo_context_set_shape_renderer(
96        context: *mut pango::PangoContext,
97        func: PangoCairoShapeRendererFunc,
98        data: gpointer,
99        dnotify: glib::GDestroyNotify,
100    );
101    pub fn pango_cairo_create_context(cr: *mut cairo::cairo_t) -> *mut pango::PangoContext;
102    pub fn pango_cairo_create_layout(cr: *mut cairo::cairo_t) -> *mut pango::PangoLayout;
103    pub fn pango_cairo_error_underline_path(
104        cr: *mut cairo::cairo_t,
105        x: c_double,
106        y: c_double,
107        width: c_double,
108        height: c_double,
109    );
110    pub fn pango_cairo_glyph_string_path(
111        cr: *mut cairo::cairo_t,
112        font: *mut pango::PangoFont,
113        glyphs: *mut pango::PangoGlyphString,
114    );
115    pub fn pango_cairo_layout_line_path(cr: *mut cairo::cairo_t, line: *mut pango::PangoLayoutLine);
116    pub fn pango_cairo_layout_path(cr: *mut cairo::cairo_t, layout: *mut pango::PangoLayout);
117    pub fn pango_cairo_show_error_underline(
118        cr: *mut cairo::cairo_t,
119        x: c_double,
120        y: c_double,
121        width: c_double,
122        height: c_double,
123    );
124    pub fn pango_cairo_show_glyph_item(
125        cr: *mut cairo::cairo_t,
126        text: *const c_char,
127        glyph_item: *mut pango::PangoGlyphItem,
128    );
129    pub fn pango_cairo_show_glyph_string(
130        cr: *mut cairo::cairo_t,
131        font: *mut pango::PangoFont,
132        glyphs: *mut pango::PangoGlyphString,
133    );
134    pub fn pango_cairo_show_layout(cr: *mut cairo::cairo_t, layout: *mut pango::PangoLayout);
135    pub fn pango_cairo_show_layout_line(cr: *mut cairo::cairo_t, line: *mut pango::PangoLayoutLine);
136    pub fn pango_cairo_update_context(cr: *mut cairo::cairo_t, context: *mut pango::PangoContext);
137    pub fn pango_cairo_update_layout(cr: *mut cairo::cairo_t, layout: *mut pango::PangoLayout);
138
139}