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
.freetype2
;
24 alias gtk2
.freetype2 freetype2
;
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
);
51 // Clears the glyph cache for @fm.
52 // <fm>: a #CoglPangoFontMap
53 static void font_map_clear_glyph_cache()(FontMap
* fm
) {
54 cogl_pango_font_map_clear_glyph_cache(fm
);
59 // Creates a new #PangoContext from the passed font map.
60 // RETURNS: the newly created #PangoContext
61 // <fm>: a #CoglPangoFontMap
62 static Pango
.Context
* /*new*/ font_map_create_context()(FontMap
* fm
) {
63 return cogl_pango_font_map_create_context(fm
);
68 // Retrieves the #CoglPangoRenderer for the passed font map.
69 // RETURNS: a #PangoRenderer
70 // <fm>: a #CoglPangoFontMap
71 static Pango
.Renderer
* font_map_get_renderer()(FontMap
* fm
) {
72 return cogl_pango_font_map_get_renderer(fm
);
77 // Retrieves whether the #CoglPangoRenderer used by @fm will
78 // use mipmapping when rendering the glyphs.
79 // RETURNS: %TRUE if mipmapping is used, %FALSE otherwise.
80 // <fm>: a #CoglPangoFontMap
81 static int font_map_get_use_mipmapping()(FontMap
* fm
) {
82 return cogl_pango_font_map_get_use_mipmapping(fm
);
87 // Creates a new font map.
88 // RETURNS: the newly created #PangoFontMap
89 static Pango
.FontMap
* /*new*/ font_map_new()() {
90 return cogl_pango_font_map_new();
95 // Sets the resolution to be used by @font_map at @dpi.
96 // <font_map>: a #CoglPangoFontMap
98 static void font_map_set_resolution()(FontMap
* font_map
, double dpi
) {
99 cogl_pango_font_map_set_resolution(font_map
, dpi
);
104 // Sets whether the renderer for the passed font map should use
105 // mipmapping when rendering a #PangoLayout.
106 // <fm>: a #CoglPangoFontMap
107 // <value>: %TRUE to enable the use of mipmapping
108 static void font_map_set_use_mipmapping()(FontMap
* fm
, int value
) {
109 cogl_pango_font_map_set_use_mipmapping(fm
, value
);
115 // <layout>: a #PangoLayout
116 // <x>: X coordinate to render the layout at
117 // <y>: Y coordinate to render the layout at
118 // <color>: color to use when rendering the layout
119 // <flags>: flags to pass to the renderer
120 static void render_layout()(Pango
.Layout
* layout
, int x
, int y
, Cogl
.Color
* color
, int flags
) {
121 cogl_pango_render_layout(layout
, x
, y
, color
, flags
);
126 // Renders @line at the given coordinates using the given color.
127 // <line>: a #PangoLayoutLine
128 // <x>: X coordinate to render the line at
129 // <y>: Y coordinate to render the line at
130 // <color>: color to use when rendering the line
131 static void render_layout_line()(Pango
.LayoutLine
* line
, int x
, int y
, Cogl
.Color
* color
) {
132 cogl_pango_render_layout_line(line
, x
, y
, color
);
138 // <layout>: a #PangoLayout
141 // <color>: color to use when rendering the layout
142 // <flags>: flags to pass to the renderer
143 static void render_layout_subpixel()(Pango
.Layout
* layout
, int x
, int y
, Cogl
.Color
* color
, int flags
) {
144 cogl_pango_render_layout_subpixel(layout
, x
, y
, color
, flags
);
151 void cogl_pango_ensure_glyph_cache_for_layout(Pango
.Layout
* layout
);
152 void cogl_pango_font_map_clear_glyph_cache(FontMap
* fm
);
153 Pango
.Context
* /*new*/ cogl_pango_font_map_create_context(FontMap
* fm
);
154 Pango
.Renderer
* cogl_pango_font_map_get_renderer(FontMap
* fm
);
155 int cogl_pango_font_map_get_use_mipmapping(FontMap
* fm
);
156 Pango
.FontMap
* /*new*/ cogl_pango_font_map_new();
157 void cogl_pango_font_map_set_resolution(FontMap
* font_map
, double dpi
);
158 void cogl_pango_font_map_set_use_mipmapping(FontMap
* fm
, int value
);
159 void cogl_pango_render_layout(Pango
.Layout
* layout
, int x
, int y
, Cogl
.Color
* color
, int flags
);
160 void cogl_pango_render_layout_line(Pango
.LayoutLine
* line
, int x
, int y
, Cogl
.Color
* color
);
161 void cogl_pango_render_layout_subpixel(Pango
.Layout
* layout
, int x
, int y
, Cogl
.Color
* color
, int flags
);