2 // Automatically generated from "/usr/share/gir-1.0/CoglPango-1.0.gir"
5 public import gtk2
.cogl
;
9 public import gtk2
.glib2
;
10 alias gtk2
.glib2 GLib2
;
11 public import gtk2
.gobject2
;
12 alias gtk2
.gobject2 GObject2
;
13 public import gtk2
.pango
;
14 alias gtk2
.pango Pango
;
15 public import gtk2
.pangocairo
;
16 alias gtk2
.pangocairo PangoCairo
;
17 public import gtk2
.pangoft2
;
18 alias gtk2
.pangoft2 PangoFT2
;
19 public import gtk2
.cairo
;
20 alias gtk2
.cairo cairo
;
21 public import gtk2
.fontconfig2
;
22 alias gtk2
.fontconfig2 fontconfig2
;
23 public import gtk2
.freetype22
;
24 alias gtk2
.freetype22 freetype22
;
26 // package: "cogl-pango-1.0";
27 // C header: "cogl-pango/cogl-pango.h";
29 // c:symbol-prefixes: ["cogl_pango"]
30 // c:identifier-prefixes: ["CoglPango"]
34 alias PangoCairo
.FontMap FontMap
;
35 struct Renderer
/* : Pango.Renderer */ {
36 alias method_parent
this;
37 alias method_parent super_
;
38 alias method_parent renderer
;
39 Pango
.Renderer method_parent
;
42 struct RendererClass
{
45 static void ensure_glyph_cache_for_layout(Pango
.Layout
* layout
) {
46 cogl_pango_ensure_glyph_cache_for_layout(layout
);
50 // Clears the glyph cache for @fm.
51 // <fm>: a #CoglPangoFontMap
52 static void font_map_clear_glyph_cache(FontMap
* fm
) {
53 cogl_pango_font_map_clear_glyph_cache(fm
);
57 // Creates a new #PangoContext from the passed font map.
58 // RETURNS: the newly created #PangoContext
59 // <fm>: a #CoglPangoFontMap
60 static Pango
.Context
* /*new*/ font_map_create_context(FontMap
* fm
) {
61 return cogl_pango_font_map_create_context(fm
);
65 // Retrieves the #CoglPangoRenderer for the passed font map.
66 // RETURNS: a #PangoRenderer
67 // <fm>: a #CoglPangoFontMap
68 static Pango
.Renderer
* font_map_get_renderer(FontMap
* fm
) {
69 return cogl_pango_font_map_get_renderer(fm
);
73 // Retrieves whether the #CoglPangoRenderer used by @fm will
74 // use mipmapping when rendering the glyphs.
75 // RETURNS: %TRUE if mipmapping is used, %FALSE otherwise.
76 // <fm>: a #CoglPangoFontMap
77 static int font_map_get_use_mipmapping(FontMap
* fm
) {
78 return cogl_pango_font_map_get_use_mipmapping(fm
);
82 // Creates a new font map.
83 // RETURNS: the newly created #PangoFontMap
84 static Pango
.FontMap
* /*new*/ font_map_new() {
85 return cogl_pango_font_map_new();
89 // Sets the resolution to be used by @font_map at @dpi.
90 // <font_map>: a #CoglPangoFontMap
92 static void font_map_set_resolution(FontMap
* font_map
, double dpi
) {
93 cogl_pango_font_map_set_resolution(font_map
, dpi
);
97 // Sets whether the renderer for the passed font map should use
98 // mipmapping when rendering a #PangoLayout.
99 // <fm>: a #CoglPangoFontMap
100 // <value>: %TRUE to enable the use of mipmapping
101 static void font_map_set_use_mipmapping(FontMap
* fm
, int value
) {
102 cogl_pango_font_map_set_use_mipmapping(fm
, value
);
107 // <layout>: a #PangoLayout
108 // <x>: X coordinate to render the layout at
109 // <y>: Y coordinate to render the layout at
110 // <color>: color to use when rendering the layout
111 // <flags>: flags to pass to the renderer
112 static void render_layout(Pango
.Layout
* layout
, int x
, int y
, Cogl
.Color
* color
, int flags
) {
113 cogl_pango_render_layout(layout
, x
, y
, color
, flags
);
117 // Renders @line at the given coordinates using the given color.
118 // <line>: a #PangoLayoutLine
119 // <x>: X coordinate to render the line at
120 // <y>: Y coordinate to render the line at
121 // <color>: color to use when rendering the line
122 static void render_layout_line(Pango
.LayoutLine
* line
, int x
, int y
, Cogl
.Color
* color
) {
123 cogl_pango_render_layout_line(line
, x
, y
, color
);
128 // <layout>: a #PangoLayout
131 // <color>: color to use when rendering the layout
132 // <flags>: flags to pass to the renderer
133 static void render_layout_subpixel(Pango
.Layout
* layout
, int x
, int y
, Cogl
.Color
* color
, int flags
) {
134 cogl_pango_render_layout_subpixel(layout
, x
, y
, color
, flags
);
141 void cogl_pango_ensure_glyph_cache_for_layout(Pango
.Layout
* layout
);
142 void cogl_pango_font_map_clear_glyph_cache(FontMap
* fm
);
143 Pango
.Context
* /*new*/ cogl_pango_font_map_create_context(FontMap
* fm
);
144 Pango
.Renderer
* cogl_pango_font_map_get_renderer(FontMap
* fm
);
145 int cogl_pango_font_map_get_use_mipmapping(FontMap
* fm
);
146 Pango
.FontMap
* /*new*/ cogl_pango_font_map_new();
147 void cogl_pango_font_map_set_resolution(FontMap
* font_map
, double dpi
);
148 void cogl_pango_font_map_set_use_mipmapping(FontMap
* fm
, int value
);
149 void cogl_pango_render_layout(Pango
.Layout
* layout
, int x
, int y
, Cogl
.Color
* color
, int flags
);
150 void cogl_pango_render_layout_line(Pango
.LayoutLine
* line
, int x
, int y
, Cogl
.Color
* color
);
151 void cogl_pango_render_layout_subpixel(Pango
.Layout
* layout
, int x
, int y
, Cogl
.Color
* color
, int flags
);