1<?xml version="1.0"?>
2<!-- This file was automatically generated from C sources - DO NOT EDIT!
3To affect the contents of this file, edit the original C definitions,
4and/or use gtk-doc annotations. -->
5<repository version="1.2"
6 xmlns="http://www.gtk.org/introspection/core/1.0"
7 xmlns:c="http://www.gtk.org/introspection/c/1.0"
8 xmlns:doc="http://www.gtk.org/introspection/doc/1.0"
9 xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
10 <include name="GObject" version="2.0"/>
11 <include name="Pango" version="1.0"/>
12 <include name="cairo" version="1.0"/>
13 <package name="pangocairo"/>
14 <c:include name="pango/pangocairo.h"/>
15 <doc:format name="gi-docgen"/>
16 <namespace name="PangoCairo"
17 version="1.0"
18 shared-library="libpangocairo-1.0.so.0"
19 c:identifier-prefixes="PangoCairo"
20 c:symbol-prefixes="pango_cairo">
21 <function-macro name="FONT"
22 c:identifier="PANGO_CAIRO_FONT"
23 introspectable="0">
24 <source-position filename="pango/pangocairo.h" line="49"/>
25 <parameters>
26 <parameter name="obj">
27 </parameter>
28 </parameters>
29 </function-macro>
30 <function-macro name="FONT_MAP"
31 c:identifier="PANGO_CAIRO_FONT_MAP"
32 introspectable="0">
33 <source-position filename="pango/pangocairo.h" line="72"/>
34 <parameters>
35 <parameter name="obj">
36 </parameter>
37 </parameters>
38 </function-macro>
39 <interface name="Font"
40 c:symbol-prefix="font"
41 c:type="PangoCairoFont"
42 version="1.18"
43 glib:type-name="PangoCairoFont"
44 glib:get-type="pango_cairo_font_get_type">
45 <doc xml:space="preserve"
46 filename="pango/pangocairo.h"
47 line="30">`PangoCairoFont` is an interface exported by fonts for
48use with Cairo.
49
50The actual type of the font will depend on the particular
51font technology Cairo was compiled to use.</doc>
52 <prerequisite name="Pango.Font"/>
53 <method name="get_scaled_font"
54 c:identifier="pango_cairo_font_get_scaled_font"
55 version="1.18">
56 <doc xml:space="preserve"
57 filename="pango/pangocairo-font.c"
58 line="138">Gets the `cairo_scaled_font_t` used by @font.
59The scaled font can be referenced and kept using
60cairo_scaled_font_reference().</doc>
61 <source-position filename="pango/pangocairo.h" line="133"/>
62 <return-value transfer-ownership="none" nullable="1">
63 <doc xml:space="preserve"
64 filename="pango/pangocairo-font.c"
65 line="146">the `cairo_scaled_font_t`
66 used by @font</doc>
67 <type name="cairo.ScaledFont" c:type="cairo_scaled_font_t*"/>
68 </return-value>
69 <parameters>
70 <instance-parameter name="font"
71 transfer-ownership="none"
72 nullable="1"
73 allow-none="1">
74 <doc xml:space="preserve"
75 filename="pango/pangocairo-font.c"
76 line="140">a `PangoFont` from a `PangoCairoFontMap`</doc>
77 <type name="Font" c:type="PangoCairoFont*"/>
78 </instance-parameter>
79 </parameters>
80 </method>
81 </interface>
82 <interface name="FontMap"
83 c:symbol-prefix="font_map"
84 c:type="PangoCairoFontMap"
85 version="1.10"
86 glib:type-name="PangoCairoFontMap"
87 glib:get-type="pango_cairo_font_map_get_type">
88 <doc xml:space="preserve"
89 filename="pango/pangocairo.h"
90 line="57">`PangoCairoFontMap` is an interface exported by font maps for
91use with Cairo.
92
93The actual type of the font map will depend on the particular
94font technology Cairo was compiled to use.</doc>
95 <prerequisite name="Pango.FontMap"/>
96 <function name="get_default"
97 c:identifier="pango_cairo_font_map_get_default"
98 version="1.10">
99 <doc xml:space="preserve"
100 filename="pango/pangocairo-fontmap.c"
101 line="151">Gets a default `PangoCairoFontMap` to use with Cairo.
102
103Note that the type of the returned object will depend on the
104particular font backend Cairo was compiled to use; you generally
105should only use the `PangoFontMap` and `PangoCairoFontMap`
106interfaces on the returned object.
107
108The default Cairo fontmap can be changed by using
109[method@PangoCairo.FontMap.set_default]. This can be used to
110change the Cairo font backend that the default fontmap uses
111for example.
112
113Note that since Pango 1.32.6, the default fontmap is per-thread.
114Each thread gets its own default fontmap. In this way, PangoCairo
115can be used safely from multiple threads.</doc>
116 <source-position filename="pango/pangocairo.h" line="110"/>
117 <return-value transfer-ownership="none">
118 <doc xml:space="preserve"
119 filename="pango/pangocairo-fontmap.c"
120 line="170">the default PangoCairo fontmap
121 for the current thread. This object is owned by Pango and must
122 not be freed.</doc>
123 <type name="Pango.FontMap" c:type="PangoFontMap*"/>
124 </return-value>
125 </function>
126 <function name="new"
127 c:identifier="pango_cairo_font_map_new"
128 version="1.10">
129 <doc xml:space="preserve"
130 filename="pango/pangocairo-fontmap.c"
131 line="47">Creates a new `PangoCairoFontMap` object.
132
133A fontmap is used to cache information about available fonts,
134and holds certain global parameters such as the resolution.
135In most cases, you can use `func@PangoCairo.font_map_get_default]
136instead.
137
138Note that the type of the returned object will depend
139on the particular font backend Cairo was compiled to use;
140You generally should only use the `PangoFontMap` and
141`PangoCairoFontMap` interfaces on the returned object.
142
143You can override the type of backend returned by using an
144environment variable %PANGOCAIRO_BACKEND. Supported types,
145based on your build, are fc (fontconfig), win32, and coretext.
146If requested type is not available, NULL is returned. Ie.
147this is only useful for testing, when at least two backends
148are compiled in.</doc>
149 <source-position filename="pango/pangocairo.h" line="106"/>
150 <return-value transfer-ownership="full">
151 <doc xml:space="preserve"
152 filename="pango/pangocairo-fontmap.c"
153 line="69">the newly allocated `PangoFontMap`,
154 which should be freed with g_object_unref().</doc>
155 <type name="Pango.FontMap" c:type="PangoFontMap*"/>
156 </return-value>
157 </function>
158 <function name="new_for_font_type"
159 c:identifier="pango_cairo_font_map_new_for_font_type"
160 version="1.18">
161 <doc xml:space="preserve"
162 filename="pango/pangocairo-fontmap.c"
163 line="110">Creates a new `PangoCairoFontMap` object of the type suitable
164to be used with cairo font backend of type @fonttype.
165
166In most cases one should simply use [func@PangoCairo.FontMap.new], or
167in fact in most of those cases, just use [func@PangoCairo.FontMap.get_default].</doc>
168 <source-position filename="pango/pangocairo.h" line="108"/>
169 <return-value transfer-ownership="full" nullable="1">
170 <doc xml:space="preserve"
171 filename="pango/pangocairo-fontmap.c"
172 line="120">the newly allocated
173 `PangoFontMap` of suitable type which should be freed with
174 g_object_unref(), or %NULL if the requested cairo font backend
175 is not supported / compiled in.</doc>
176 <type name="Pango.FontMap" c:type="PangoFontMap*"/>
177 </return-value>
178 <parameters>
179 <parameter name="fonttype" transfer-ownership="none">
180 <doc xml:space="preserve"
181 filename="pango/pangocairo-fontmap.c"
182 line="112">desired #cairo_font_type_t</doc>
183 <type name="cairo.FontType" c:type="cairo_font_type_t"/>
184 </parameter>
185 </parameters>
186 </function>
187 <method name="create_context"
188 c:identifier="pango_cairo_font_map_create_context"
189 version="1.10"
190 introspectable="0"
191 deprecated="1"
192 deprecated-version="1.22">
193 <doc xml:space="preserve"
194 filename="pango/pangocairo-fontmap.c"
195 line="267">Create a `PangoContext` for the given fontmap.</doc>
196 <doc-deprecated xml:space="preserve">Use pango_font_map_create_context() instead.</doc-deprecated>
197 <source-position filename="pango/pangocairo.h" line="123"/>
198 <return-value>
199 <doc xml:space="preserve"
200 filename="pango/pangocairo-fontmap.c"
201 line="273">the newly created context; free with g_object_unref().</doc>
202 <type name="Pango.Context" c:type="PangoContext*"/>
203 </return-value>
204 <parameters>
205 <instance-parameter name="fontmap" transfer-ownership="none">
206 <doc xml:space="preserve"
207 filename="pango/pangocairo-fontmap.c"
208 line="269">a `PangoCairoFontMap`</doc>
209 <type name="FontMap" c:type="PangoCairoFontMap*"/>
210 </instance-parameter>
211 </parameters>
212 </method>
213 <method name="get_font_type"
214 c:identifier="pango_cairo_font_map_get_font_type"
215 version="1.18">
216 <doc xml:space="preserve"
217 filename="pango/pangocairo-fontmap.c"
218 line="287">Gets the type of Cairo font backend that @fontmap uses.</doc>
219 <source-position filename="pango/pangocairo.h" line="114"/>
220 <return-value transfer-ownership="none">
221 <doc xml:space="preserve"
222 filename="pango/pangocairo-fontmap.c"
223 line="293">the `cairo_font_type_t` cairo font backend type</doc>
224 <type name="cairo.FontType" c:type="cairo_font_type_t"/>
225 </return-value>
226 <parameters>
227 <instance-parameter name="fontmap" transfer-ownership="none">
228 <doc xml:space="preserve"
229 filename="pango/pangocairo-fontmap.c"
230 line="289">a `PangoCairoFontMap`</doc>
231 <type name="FontMap" c:type="PangoCairoFontMap*"/>
232 </instance-parameter>
233 </parameters>
234 </method>
235 <method name="get_resolution"
236 c:identifier="pango_cairo_font_map_get_resolution"
237 version="1.10">
238 <doc xml:space="preserve"
239 filename="pango/pangocairo-fontmap.c"
240 line="247">Gets the resolution for the fontmap.
241
242See [method@PangoCairo.FontMap.set_resolution].</doc>
243 <source-position filename="pango/pangocairo.h" line="120"/>
244 <return-value transfer-ownership="none">
245 <doc xml:space="preserve"
246 filename="pango/pangocairo-fontmap.c"
247 line="255">the resolution in "dots per inch"</doc>
248 <type name="gdouble" c:type="double"/>
249 </return-value>
250 <parameters>
251 <instance-parameter name="fontmap" transfer-ownership="none">
252 <doc xml:space="preserve"
253 filename="pango/pangocairo-fontmap.c"
254 line="249">a `PangoCairoFontMap`</doc>
255 <type name="FontMap" c:type="PangoCairoFontMap*"/>
256 </instance-parameter>
257 </parameters>
258 </method>
259 <method name="set_default"
260 c:identifier="pango_cairo_font_map_set_default"
261 version="1.22">
262 <doc xml:space="preserve"
263 filename="pango/pangocairo-fontmap.c"
264 line="190">Sets a default `PangoCairoFontMap` to use with Cairo.
265
266This can be used to change the Cairo font backend that the
267default fontmap uses for example. The old default font map
268is unreffed and the new font map referenced.
269
270Note that since Pango 1.32.6, the default fontmap is per-thread.
271This function only changes the default fontmap for
272the current thread. Default fontmaps of existing threads
273are not changed. Default fontmaps of any new threads will
274still be created using [func@PangoCairo.FontMap.new].
275
276A value of %NULL for @fontmap will cause the current default
277font map to be released and a new default font map to be created
278on demand, using [func@PangoCairo.FontMap.new].</doc>
279 <source-position filename="pango/pangocairo.h" line="112"/>
280 <return-value transfer-ownership="none">
281 <type name="none" c:type="void"/>
282 </return-value>
283 <parameters>
284 <instance-parameter name="fontmap"
285 transfer-ownership="none"
286 nullable="1"
287 allow-none="1">
288 <doc xml:space="preserve"
289 filename="pango/pangocairo-fontmap.c"
290 line="192">The new default font map</doc>
291 <type name="FontMap" c:type="PangoCairoFontMap*"/>
292 </instance-parameter>
293 </parameters>
294 </method>
295 <method name="set_resolution"
296 c:identifier="pango_cairo_font_map_set_resolution"
297 version="1.10">
298 <doc xml:space="preserve"
299 filename="pango/pangocairo-fontmap.c"
300 line="223">Sets the resolution for the fontmap.
301
302This is a scale factor between
303points specified in a `PangoFontDescription` and Cairo units. The
304default value is 96, meaning that a 10 point font will be 13
305units high. (10 * 96. / 72. = 13.3).</doc>
306 <source-position filename="pango/pangocairo.h" line="117"/>
307 <return-value transfer-ownership="none">
308 <type name="none" c:type="void"/>
309 </return-value>
310 <parameters>
311 <instance-parameter name="fontmap" transfer-ownership="none">
312 <doc xml:space="preserve"
313 filename="pango/pangocairo-fontmap.c"
314 line="225">a `PangoCairoFontMap`</doc>
315 <type name="FontMap" c:type="PangoCairoFontMap*"/>
316 </instance-parameter>
317 <parameter name="dpi" transfer-ownership="none">
318 <doc xml:space="preserve"
319 filename="pango/pangocairo-fontmap.c"
320 line="226">the resolution in "dots per inch". (Physical inches aren't actually
321 involved; the terminology is conventional.)</doc>
322 <type name="gdouble" c:type="double"/>
323 </parameter>
324 </parameters>
325 </method>
326 </interface>
327 <function-macro name="IS_FONT"
328 c:identifier="PANGO_CAIRO_IS_FONT"
329 introspectable="0">
330 <source-position filename="pango/pangocairo.h" line="50"/>
331 <parameters>
332 <parameter name="obj">
333 </parameter>
334 </parameters>
335 </function-macro>
336 <function-macro name="IS_FONT_MAP"
337 c:identifier="PANGO_CAIRO_IS_FONT_MAP"
338 introspectable="0">
339 <source-position filename="pango/pangocairo.h" line="73"/>
340 <parameters>
341 <parameter name="obj">
342 </parameter>
343 </parameters>
344 </function-macro>
345 <callback name="ShapeRendererFunc" c:type="PangoCairoShapeRendererFunc">
346 <doc xml:space="preserve"
347 filename="pango/pangocairo.h"
348 line="80">Function type for rendering attributes of type %PANGO_ATTR_SHAPE
349with Pango's Cairo renderer.</doc>
350 <source-position filename="pango/pangocairo.h" line="94"/>
351 <return-value transfer-ownership="none">
352 <type name="none" c:type="void"/>
353 </return-value>
354 <parameters>
355 <parameter name="cr" transfer-ownership="none">
356 <doc xml:space="preserve"
357 filename="pango/pangocairo.h"
358 line="82">a Cairo context with current point set to where the shape should
359be rendered</doc>
360 <type name="cairo.Context" c:type="cairo_t*"/>
361 </parameter>
362 <parameter name="attr" transfer-ownership="none">
363 <doc xml:space="preserve"
364 filename="pango/pangocairo.h"
365 line="84">the %PANGO_ATTR_SHAPE to render</doc>
366 <type name="Pango.AttrShape" c:type="PangoAttrShape*"/>
367 </parameter>
368 <parameter name="do_path" transfer-ownership="none">
369 <doc xml:space="preserve"
370 filename="pango/pangocairo.h"
371 line="85">whether only the shape path should be appended to current
372path of @cr and no filling/stroking done. This will be set
373to %TRUE when called from pango_cairo_layout_path() and
374pango_cairo_layout_line_path() rendering functions.</doc>
375 <type name="gboolean" c:type="gboolean"/>
376 </parameter>
377 <parameter name="data"
378 transfer-ownership="none"
379 nullable="1"
380 allow-none="1"
381 closure="3">
382 <doc xml:space="preserve"
383 filename="pango/pangocairo.h"
384 line="89">user data passed to pango_cairo_context_set_shape_renderer()</doc>
385 <type name="gpointer" c:type="gpointer"/>
386 </parameter>
387 </parameters>
388 </callback>
389 <function name="context_get_font_options"
390 c:identifier="pango_cairo_context_get_font_options"
391 version="1.10">
392 <doc xml:space="preserve"
393 filename="pango/pangocairo-context.c"
394 line="284">Retrieves any font rendering options previously set with
395[func@PangoCairo.context_set_font_options].
396
397This function does not report options that are derived from
398the target surface by [func@update_context].</doc>
399 <source-position filename="pango/pangocairo.h" line="145"/>
400 <return-value transfer-ownership="none" nullable="1">
401 <doc xml:space="preserve"
402 filename="pango/pangocairo-context.c"
403 line="294">the font options previously set on the
404 context, or %NULL if no options have been set. This value is
405 owned by the context and must not be modified or freed.</doc>
406 <type name="cairo.FontOptions" c:type="const cairo_font_options_t*"/>
407 </return-value>
408 <parameters>
409 <parameter name="context" transfer-ownership="none">
410 <doc xml:space="preserve"
411 filename="pango/pangocairo-context.c"
412 line="286">a `PangoContext`, from a pangocairo font map</doc>
413 <type name="Pango.Context" c:type="PangoContext*"/>
414 </parameter>
415 </parameters>
416 </function>
417 <function name="context_get_resolution"
418 c:identifier="pango_cairo_context_get_resolution"
419 version="1.10">
420 <doc xml:space="preserve"
421 filename="pango/pangocairo-context.c"
422 line="205">Gets the resolution for the context.
423
424See [func@PangoCairo.context_set_resolution]</doc>
425 <source-position filename="pango/pangocairo.h" line="151"/>
426 <return-value transfer-ownership="none">
427 <doc xml:space="preserve"
428 filename="pango/pangocairo-context.c"
429 line="213">the resolution in "dots per inch". A negative value will
430 be returned if no resolution has previously been set.</doc>
431 <type name="gdouble" c:type="double"/>
432 </return-value>
433 <parameters>
434 <parameter name="context" transfer-ownership="none">
435 <doc xml:space="preserve"
436 filename="pango/pangocairo-context.c"
437 line="207">a `PangoContext`, from a pangocairo font map</doc>
438 <type name="Pango.Context" c:type="PangoContext*"/>
439 </parameter>
440 </parameters>
441 </function>
442 <function name="context_get_shape_renderer"
443 c:identifier="pango_cairo_context_get_shape_renderer"
444 version="1.18"
445 introspectable="0">
446 <doc xml:space="preserve"
447 filename="pango/pangocairo-context.c"
448 line="380">Sets callback function for context to use for rendering attributes
449of type %PANGO_ATTR_SHAPE.
450
451See `PangoCairoShapeRendererFunc` for details.
452
453Retrieves callback function and associated user data for rendering
454attributes of type %PANGO_ATTR_SHAPE as set by
455[func@PangoCairo.context_set_shape_renderer], if any.</doc>
456 <source-position filename="pango/pangocairo.h" line="159"/>
457 <return-value transfer-ownership="none" nullable="1">
458 <doc xml:space="preserve"
459 filename="pango/pangocairo-context.c"
460 line="394">the shape rendering callback
461 previously set on the context, or %NULL if no shape rendering callback
462 have been set.</doc>
463 <type name="ShapeRendererFunc" c:type="PangoCairoShapeRendererFunc"/>
464 </return-value>
465 <parameters>
466 <parameter name="context" transfer-ownership="none">
467 <doc xml:space="preserve"
468 filename="pango/pangocairo-context.c"
469 line="382">a `PangoContext`, from a pangocairo font map</doc>
470 <type name="Pango.Context" c:type="PangoContext*"/>
471 </parameter>
472 <parameter name="data"
473 transfer-ownership="none"
474 nullable="1"
475 allow-none="1">
476 <doc xml:space="preserve"
477 filename="pango/pangocairo-context.c"
478 line="383">Pointer to `gpointer` to return user data</doc>
479 <type name="gpointer" c:type="gpointer*"/>
480 </parameter>
481 </parameters>
482 </function>
483 <function name="context_set_font_options"
484 c:identifier="pango_cairo_context_set_font_options"
485 version="1.10">
486 <doc xml:space="preserve"
487 filename="pango/pangocairo-context.c"
488 line="229">Sets the font options used when rendering text with this context.
489
490These options override any options that [func@update_context]
491derives from the target surface.</doc>
492 <source-position filename="pango/pangocairo.h" line="142"/>
493 <return-value transfer-ownership="none">
494 <type name="none" c:type="void"/>
495 </return-value>
496 <parameters>
497 <parameter name="context" transfer-ownership="none">
498 <doc xml:space="preserve"
499 filename="pango/pangocairo-context.c"
500 line="231">a `PangoContext`, from a pangocairo font map</doc>
501 <type name="Pango.Context" c:type="PangoContext*"/>
502 </parameter>
503 <parameter name="options"
504 transfer-ownership="none"
505 nullable="1"
506 allow-none="1">
507 <doc xml:space="preserve"
508 filename="pango/pangocairo-context.c"
509 line="232">a `cairo_font_options_t`, or %NULL to unset
510 any previously set options. A copy is made.</doc>
511 <type name="cairo.FontOptions" c:type="const cairo_font_options_t*"/>
512 </parameter>
513 </parameters>
514 </function>
515 <function name="context_set_resolution"
516 c:identifier="pango_cairo_context_set_resolution"
517 version="1.10">
518 <doc xml:space="preserve"
519 filename="pango/pangocairo-context.c"
520 line="182">Sets the resolution for the context.
521
522This is a scale factor between points specified in a `PangoFontDescription`
523and Cairo units. The default value is 96, meaning that a 10 point font will
524be 13 units high. (10 * 96. / 72. = 13.3).</doc>
525 <source-position filename="pango/pangocairo.h" line="148"/>
526 <return-value transfer-ownership="none">
527 <type name="none" c:type="void"/>
528 </return-value>
529 <parameters>
530 <parameter name="context" transfer-ownership="none">
531 <doc xml:space="preserve"
532 filename="pango/pangocairo-context.c"
533 line="184">a `PangoContext`, from a pangocairo font map</doc>
534 <type name="Pango.Context" c:type="PangoContext*"/>
535 </parameter>
536 <parameter name="dpi" transfer-ownership="none">
537 <doc xml:space="preserve"
538 filename="pango/pangocairo-context.c"
539 line="185">the resolution in "dots per inch". (Physical inches aren't actually
540 involved; the terminology is conventional.) A 0 or negative value
541 means to use the resolution from the font map.</doc>
542 <type name="gdouble" c:type="double"/>
543 </parameter>
544 </parameters>
545 </function>
546 <function name="context_set_shape_renderer"
547 c:identifier="pango_cairo_context_set_shape_renderer"
548 version="1.18">
549 <doc xml:space="preserve"
550 filename="pango/pangocairo-context.c"
551 line="344">Sets callback function for context to use for rendering attributes
552of type %PANGO_ATTR_SHAPE.
553
554See `PangoCairoShapeRendererFunc` for details.</doc>
555 <source-position filename="pango/pangocairo.h" line="154"/>
556 <return-value transfer-ownership="none">
557 <type name="none" c:type="void"/>
558 </return-value>
559 <parameters>
560 <parameter name="context" transfer-ownership="none">
561 <doc xml:space="preserve"
562 filename="pango/pangocairo-context.c"
563 line="346">a `PangoContext`, from a pangocairo font map</doc>
564 <type name="Pango.Context" c:type="PangoContext*"/>
565 </parameter>
566 <parameter name="func"
567 transfer-ownership="none"
568 nullable="1"
569 allow-none="1"
570 scope="notified"
571 closure="2"
572 destroy="3">
573 <doc xml:space="preserve"
574 filename="pango/pangocairo-context.c"
575 line="347">Callback function for rendering attributes of
576 type %PANGO_ATTR_SHAPE, or %NULL to disable shape rendering.</doc>
577 <type name="ShapeRendererFunc" c:type="PangoCairoShapeRendererFunc"/>
578 </parameter>
579 <parameter name="data"
580 transfer-ownership="none"
581 nullable="1"
582 allow-none="1">
583 <doc xml:space="preserve"
584 filename="pango/pangocairo-context.c"
585 line="349">User data that will be passed to @func.</doc>
586 <type name="gpointer" c:type="gpointer"/>
587 </parameter>
588 <parameter name="dnotify"
589 transfer-ownership="none"
590 nullable="1"
591 allow-none="1"
592 scope="async">
593 <doc xml:space="preserve"
594 filename="pango/pangocairo-context.c"
595 line="350">Callback that will be called when the
596 context is freed to release @data</doc>
597 <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
598 </parameter>
599 </parameters>
600 </function>
601 <function name="create_context"
602 c:identifier="pango_cairo_create_context"
603 version="1.22">
604 <doc xml:space="preserve"
605 filename="pango/pangocairo-context.c"
606 line="424">Creates a context object set up to match the current transformation
607and target surface of the Cairo context.
608
609This context can then be
610used to create a layout using [ctor@Pango.Layout.new].
611
612This function is a convenience function that creates a context using
613the default font map, then updates it to @cr. If you just need to
614create a layout for use with @cr and do not need to access `PangoContext`
615directly, you can use [func@create_layout] instead.</doc>
616 <source-position filename="pango/pangocairo.h" line="165"/>
617 <return-value transfer-ownership="full">
618 <doc xml:space="preserve"
619 filename="pango/pangocairo-context.c"
620 line="439">the newly created `PangoContext`</doc>
621 <type name="Pango.Context" c:type="PangoContext*"/>
622 </return-value>
623 <parameters>
624 <parameter name="cr" transfer-ownership="none">
625 <doc xml:space="preserve"
626 filename="pango/pangocairo-context.c"
627 line="426">a Cairo context</doc>
628 <type name="cairo.Context" c:type="cairo_t*"/>
629 </parameter>
630 </parameters>
631 </function>
632 <function name="create_layout"
633 c:identifier="pango_cairo_create_layout"
634 version="1.10">
635 <doc xml:space="preserve"
636 filename="pango/pangocairo-context.c"
637 line="458">Creates a layout object set up to match the current transformation
638and target surface of the Cairo context.
639
640This layout can then be used for text measurement with functions
641like [method@Pango.Layout.get_size] or drawing with functions like
642[func@show_layout]. If you change the transformation or target
643surface for @cr, you need to call [func@update_layout].
644
645This function is the most convenient way to use Cairo with Pango,
646however it is slightly inefficient since it creates a separate
647`PangoContext` object for each layout. This might matter in an
648application that was laying out large amounts of text.</doc>
649 <source-position filename="pango/pangocairo.h" line="167"/>
650 <return-value transfer-ownership="full">
651 <doc xml:space="preserve"
652 filename="pango/pangocairo-context.c"
653 line="475">the newly created `PangoLayout`</doc>
654 <type name="Pango.Layout" c:type="PangoLayout*"/>
655 </return-value>
656 <parameters>
657 <parameter name="cr" transfer-ownership="none">
658 <doc xml:space="preserve"
659 filename="pango/pangocairo-context.c"
660 line="460">a Cairo context</doc>
661 <type name="cairo.Context" c:type="cairo_t*"/>
662 </parameter>
663 </parameters>
664 </function>
665 <function name="error_underline_path"
666 c:identifier="pango_cairo_error_underline_path"
667 version="1.14">
668 <doc xml:space="preserve"
669 filename="pango/pangocairo-render.c"
670 line="1244">Add a squiggly line to the current path in the specified cairo context that
671approximately covers the given rectangle in the style of an underline used
672to indicate a spelling error.
673
674The width of the underline is rounded to an integer number of up/down
675segments and the resulting rectangle is centered in the original rectangle.</doc>
676 <source-position filename="pango/pangocairo.h" line="212"/>
677 <return-value transfer-ownership="none">
678 <type name="none" c:type="void"/>
679 </return-value>
680 <parameters>
681 <parameter name="cr" transfer-ownership="none">
682 <doc xml:space="preserve"
683 filename="pango/pangocairo-render.c"
684 line="1246">a Cairo context</doc>
685 <type name="cairo.Context" c:type="cairo_t*"/>
686 </parameter>
687 <parameter name="x" transfer-ownership="none">
688 <doc xml:space="preserve"
689 filename="pango/pangocairo-render.c"
690 line="1247">The X coordinate of one corner of the rectangle</doc>
691 <type name="gdouble" c:type="double"/>
692 </parameter>
693 <parameter name="y" transfer-ownership="none">
694 <doc xml:space="preserve"
695 filename="pango/pangocairo-render.c"
696 line="1248">The Y coordinate of one corner of the rectangle</doc>
697 <type name="gdouble" c:type="double"/>
698 </parameter>
699 <parameter name="width" transfer-ownership="none">
700 <doc xml:space="preserve"
701 filename="pango/pangocairo-render.c"
702 line="1249">Non-negative width of the rectangle</doc>
703 <type name="gdouble" c:type="double"/>
704 </parameter>
705 <parameter name="height" transfer-ownership="none">
706 <doc xml:space="preserve"
707 filename="pango/pangocairo-render.c"
708 line="1250">Non-negative height of the rectangle</doc>
709 <type name="gdouble" c:type="double"/>
710 </parameter>
711 </parameters>
712 </function>
713 <function name="font_map_get_default"
714 c:identifier="pango_cairo_font_map_get_default"
715 moved-to="FontMap.get_default"
716 version="1.10">
717 <doc xml:space="preserve"
718 filename="pango/pangocairo-fontmap.c"
719 line="151">Gets a default `PangoCairoFontMap` to use with Cairo.
720
721Note that the type of the returned object will depend on the
722particular font backend Cairo was compiled to use; you generally
723should only use the `PangoFontMap` and `PangoCairoFontMap`
724interfaces on the returned object.
725
726The default Cairo fontmap can be changed by using
727[method@PangoCairo.FontMap.set_default]. This can be used to
728change the Cairo font backend that the default fontmap uses
729for example.
730
731Note that since Pango 1.32.6, the default fontmap is per-thread.
732Each thread gets its own default fontmap. In this way, PangoCairo
733can be used safely from multiple threads.</doc>
734 <source-position filename="pango/pangocairo.h" line="110"/>
735 <return-value transfer-ownership="none">
736 <doc xml:space="preserve"
737 filename="pango/pangocairo-fontmap.c"
738 line="170">the default PangoCairo fontmap
739 for the current thread. This object is owned by Pango and must
740 not be freed.</doc>
741 <type name="Pango.FontMap" c:type="PangoFontMap*"/>
742 </return-value>
743 </function>
744 <function name="font_map_new"
745 c:identifier="pango_cairo_font_map_new"
746 moved-to="FontMap.new"
747 version="1.10">
748 <doc xml:space="preserve"
749 filename="pango/pangocairo-fontmap.c"
750 line="47">Creates a new `PangoCairoFontMap` object.
751
752A fontmap is used to cache information about available fonts,
753and holds certain global parameters such as the resolution.
754In most cases, you can use `func@PangoCairo.font_map_get_default]
755instead.
756
757Note that the type of the returned object will depend
758on the particular font backend Cairo was compiled to use;
759You generally should only use the `PangoFontMap` and
760`PangoCairoFontMap` interfaces on the returned object.
761
762You can override the type of backend returned by using an
763environment variable %PANGOCAIRO_BACKEND. Supported types,
764based on your build, are fc (fontconfig), win32, and coretext.
765If requested type is not available, NULL is returned. Ie.
766this is only useful for testing, when at least two backends
767are compiled in.</doc>
768 <source-position filename="pango/pangocairo.h" line="106"/>
769 <return-value transfer-ownership="full">
770 <doc xml:space="preserve"
771 filename="pango/pangocairo-fontmap.c"
772 line="69">the newly allocated `PangoFontMap`,
773 which should be freed with g_object_unref().</doc>
774 <type name="Pango.FontMap" c:type="PangoFontMap*"/>
775 </return-value>
776 </function>
777 <function name="font_map_new_for_font_type"
778 c:identifier="pango_cairo_font_map_new_for_font_type"
779 moved-to="FontMap.new_for_font_type"
780 version="1.18">
781 <doc xml:space="preserve"
782 filename="pango/pangocairo-fontmap.c"
783 line="110">Creates a new `PangoCairoFontMap` object of the type suitable
784to be used with cairo font backend of type @fonttype.
785
786In most cases one should simply use [func@PangoCairo.FontMap.new], or
787in fact in most of those cases, just use [func@PangoCairo.FontMap.get_default].</doc>
788 <source-position filename="pango/pangocairo.h" line="108"/>
789 <return-value transfer-ownership="full" nullable="1">
790 <doc xml:space="preserve"
791 filename="pango/pangocairo-fontmap.c"
792 line="120">the newly allocated
793 `PangoFontMap` of suitable type which should be freed with
794 g_object_unref(), or %NULL if the requested cairo font backend
795 is not supported / compiled in.</doc>
796 <type name="Pango.FontMap" c:type="PangoFontMap*"/>
797 </return-value>
798 <parameters>
799 <parameter name="fonttype" transfer-ownership="none">
800 <doc xml:space="preserve"
801 filename="pango/pangocairo-fontmap.c"
802 line="112">desired #cairo_font_type_t</doc>
803 <type name="cairo.FontType" c:type="cairo_font_type_t"/>
804 </parameter>
805 </parameters>
806 </function>
807 <function name="glyph_string_path"
808 c:identifier="pango_cairo_glyph_string_path"
809 version="1.10">
810 <doc xml:space="preserve"
811 filename="pango/pangocairo-render.c"
812 line="1173">Adds the glyphs in @glyphs to the current path in the specified
813cairo context.
814
815The origin of the glyphs (the left edge of the baseline)
816will be at the current point of the cairo context.</doc>
817 <source-position filename="pango/pangocairo.h" line="201"/>
818 <return-value transfer-ownership="none">
819 <type name="none" c:type="void"/>
820 </return-value>
821 <parameters>
822 <parameter name="cr" transfer-ownership="none">
823 <doc xml:space="preserve"
824 filename="pango/pangocairo-render.c"
825 line="1175">a Cairo context</doc>
826 <type name="cairo.Context" c:type="cairo_t*"/>
827 </parameter>
828 <parameter name="font" transfer-ownership="none">
829 <doc xml:space="preserve"
830 filename="pango/pangocairo-render.c"
831 line="1176">a `PangoFont` from a `PangoCairoFontMap`</doc>
832 <type name="Pango.Font" c:type="PangoFont*"/>
833 </parameter>
834 <parameter name="glyphs" transfer-ownership="none">
835 <doc xml:space="preserve"
836 filename="pango/pangocairo-render.c"
837 line="1177">a `PangoGlyphString`</doc>
838 <type name="Pango.GlyphString" c:type="PangoGlyphString*"/>
839 </parameter>
840 </parameters>
841 </function>
842 <function name="layout_line_path"
843 c:identifier="pango_cairo_layout_line_path"
844 version="1.10">
845 <doc xml:space="preserve"
846 filename="pango/pangocairo-render.c"
847 line="1198">Adds the text in `PangoLayoutLine` to the current path in the
848specified cairo context.
849
850The origin of the glyphs (the left edge of the line) will be
851at the current point of the cairo context.</doc>
852 <source-position filename="pango/pangocairo.h" line="205"/>
853 <return-value transfer-ownership="none">
854 <type name="none" c:type="void"/>
855 </return-value>
856 <parameters>
857 <parameter name="cr" transfer-ownership="none">
858 <doc xml:space="preserve"
859 filename="pango/pangocairo-render.c"
860 line="1200">a Cairo context</doc>
861 <type name="cairo.Context" c:type="cairo_t*"/>
862 </parameter>
863 <parameter name="line" transfer-ownership="none">
864 <doc xml:space="preserve"
865 filename="pango/pangocairo-render.c"
866 line="1201">a `PangoLayoutLine`</doc>
867 <type name="Pango.LayoutLine" c:type="PangoLayoutLine*"/>
868 </parameter>
869 </parameters>
870 </function>
871 <function name="layout_path"
872 c:identifier="pango_cairo_layout_path"
873 version="1.10">
874 <doc xml:space="preserve"
875 filename="pango/pangocairo-render.c"
876 line="1221">Adds the text in a `PangoLayout` to the current path in the
877specified cairo context.
878
879The top-left corner of the `PangoLayout` will be at the
880current point of the cairo context.</doc>
881 <source-position filename="pango/pangocairo.h" line="208"/>
882 <return-value transfer-ownership="none">
883 <type name="none" c:type="void"/>
884 </return-value>
885 <parameters>
886 <parameter name="cr" transfer-ownership="none">
887 <doc xml:space="preserve"
888 filename="pango/pangocairo-render.c"
889 line="1223">a Cairo context</doc>
890 <type name="cairo.Context" c:type="cairo_t*"/>
891 </parameter>
892 <parameter name="layout" transfer-ownership="none">
893 <doc xml:space="preserve"
894 filename="pango/pangocairo-render.c"
895 line="1224">a Pango layout</doc>
896 <type name="Pango.Layout" c:type="PangoLayout*"/>
897 </parameter>
898 </parameters>
899 </function>
900 <function name="show_error_underline"
901 c:identifier="pango_cairo_show_error_underline"
902 version="1.14">
903 <doc xml:space="preserve"
904 filename="pango/pangocairo-render.c"
905 line="1142">Draw a squiggly line in the specified cairo context that approximately
906covers the given rectangle in the style of an underline used to indicate a
907spelling error.
908
909The width of the underline is rounded to an integer
910number of up/down segments and the resulting rectangle is centered in the
911original rectangle.</doc>
912 <source-position filename="pango/pangocairo.h" line="191"/>
913 <return-value transfer-ownership="none">
914 <type name="none" c:type="void"/>
915 </return-value>
916 <parameters>
917 <parameter name="cr" transfer-ownership="none">
918 <doc xml:space="preserve"
919 filename="pango/pangocairo-render.c"
920 line="1144">a Cairo context</doc>
921 <type name="cairo.Context" c:type="cairo_t*"/>
922 </parameter>
923 <parameter name="x" transfer-ownership="none">
924 <doc xml:space="preserve"
925 filename="pango/pangocairo-render.c"
926 line="1145">The X coordinate of one corner of the rectangle</doc>
927 <type name="gdouble" c:type="double"/>
928 </parameter>
929 <parameter name="y" transfer-ownership="none">
930 <doc xml:space="preserve"
931 filename="pango/pangocairo-render.c"
932 line="1146">The Y coordinate of one corner of the rectangle</doc>
933 <type name="gdouble" c:type="double"/>
934 </parameter>
935 <parameter name="width" transfer-ownership="none">
936 <doc xml:space="preserve"
937 filename="pango/pangocairo-render.c"
938 line="1147">Non-negative width of the rectangle</doc>
939 <type name="gdouble" c:type="double"/>
940 </parameter>
941 <parameter name="height" transfer-ownership="none">
942 <doc xml:space="preserve"
943 filename="pango/pangocairo-render.c"
944 line="1148">Non-negative height of the rectangle</doc>
945 <type name="gdouble" c:type="double"/>
946 </parameter>
947 </parameters>
948 </function>
949 <function name="show_glyph_item"
950 c:identifier="pango_cairo_show_glyph_item"
951 version="1.22">
952 <doc xml:space="preserve"
953 filename="pango/pangocairo-render.c"
954 line="1066">Draws the glyphs in @glyph_item in the specified cairo context,
955
956embedding the text associated with the glyphs in the output if the
957output format supports it (PDF for example), otherwise it acts
958similar to [func@show_glyph_string].
959
960The origin of the glyphs (the left edge of the baseline) will
961be drawn at the current point of the cairo context.
962
963Note that @text is the start of the text for layout, which is then
964indexed by `glyph_item->item->offset`.</doc>
965 <source-position filename="pango/pangocairo.h" line="180"/>
966 <return-value transfer-ownership="none">
967 <type name="none" c:type="void"/>
968 </return-value>
969 <parameters>
970 <parameter name="cr" transfer-ownership="none">
971 <doc xml:space="preserve"
972 filename="pango/pangocairo-render.c"
973 line="1068">a Cairo context</doc>
974 <type name="cairo.Context" c:type="cairo_t*"/>
975 </parameter>
976 <parameter name="text" transfer-ownership="none">
977 <doc xml:space="preserve"
978 filename="pango/pangocairo-render.c"
979 line="1069">the UTF-8 text that @glyph_item refers to</doc>
980 <type name="utf8" c:type="const char*"/>
981 </parameter>
982 <parameter name="glyph_item" transfer-ownership="none">
983 <doc xml:space="preserve"
984 filename="pango/pangocairo-render.c"
985 line="1070">a `PangoGlyphItem`</doc>
986 <type name="Pango.GlyphItem" c:type="PangoGlyphItem*"/>
987 </parameter>
988 </parameters>
989 </function>
990 <function name="show_glyph_string"
991 c:identifier="pango_cairo_show_glyph_string"
992 version="1.10">
993 <doc xml:space="preserve"
994 filename="pango/pangocairo-render.c"
995 line="1041">Draws the glyphs in @glyphs in the specified cairo context.
996
997The origin of the glyphs (the left edge of the baseline) will
998be drawn at the current point of the cairo context.</doc>
999 <source-position filename="pango/pangocairo.h" line="176"/>
1000 <return-value transfer-ownership="none">
1001 <type name="none" c:type="void"/>
1002 </return-value>
1003 <parameters>
1004 <parameter name="cr" transfer-ownership="none">
1005 <doc xml:space="preserve"
1006 filename="pango/pangocairo-render.c"
1007 line="1043">a Cairo context</doc>
1008 <type name="cairo.Context" c:type="cairo_t*"/>
1009 </parameter>
1010 <parameter name="font" transfer-ownership="none">
1011 <doc xml:space="preserve"
1012 filename="pango/pangocairo-render.c"
1013 line="1044">a `PangoFont` from a `PangoCairoFontMap`</doc>
1014 <type name="Pango.Font" c:type="PangoFont*"/>
1015 </parameter>
1016 <parameter name="glyphs" transfer-ownership="none">
1017 <doc xml:space="preserve"
1018 filename="pango/pangocairo-render.c"
1019 line="1045">a `PangoGlyphString`</doc>
1020 <type name="Pango.GlyphString" c:type="PangoGlyphString*"/>
1021 </parameter>
1022 </parameters>
1023 </function>
1024 <function name="show_layout"
1025 c:identifier="pango_cairo_show_layout"
1026 version="1.10">
1027 <doc xml:space="preserve"
1028 filename="pango/pangocairo-render.c"
1029 line="1120">Draws a `PangoLayout` in the specified cairo context.
1030
1031The top-left corner of the `PangoLayout` will be drawn
1032at the current point of the cairo context.</doc>
1033 <source-position filename="pango/pangocairo.h" line="187"/>
1034 <return-value transfer-ownership="none">
1035 <type name="none" c:type="void"/>
1036 </return-value>
1037 <parameters>
1038 <parameter name="cr" transfer-ownership="none">
1039 <doc xml:space="preserve"
1040 filename="pango/pangocairo-render.c"
1041 line="1122">a Cairo context</doc>
1042 <type name="cairo.Context" c:type="cairo_t*"/>
1043 </parameter>
1044 <parameter name="layout" transfer-ownership="none">
1045 <doc xml:space="preserve"
1046 filename="pango/pangocairo-render.c"
1047 line="1123">a Pango layout</doc>
1048 <type name="Pango.Layout" c:type="PangoLayout*"/>
1049 </parameter>
1050 </parameters>
1051 </function>
1052 <function name="show_layout_line"
1053 c:identifier="pango_cairo_show_layout_line"
1054 version="1.10">
1055 <doc xml:space="preserve"
1056 filename="pango/pangocairo-render.c"
1057 line="1098">Draws a `PangoLayoutLine` in the specified cairo context.
1058
1059The origin of the glyphs (the left edge of the line) will
1060be drawn at the current point of the cairo context.</doc>
1061 <source-position filename="pango/pangocairo.h" line="184"/>
1062 <return-value transfer-ownership="none">
1063 <type name="none" c:type="void"/>
1064 </return-value>
1065 <parameters>
1066 <parameter name="cr" transfer-ownership="none">
1067 <doc xml:space="preserve"
1068 filename="pango/pangocairo-render.c"
1069 line="1100">a Cairo context</doc>
1070 <type name="cairo.Context" c:type="cairo_t*"/>
1071 </parameter>
1072 <parameter name="line" transfer-ownership="none">
1073 <doc xml:space="preserve"
1074 filename="pango/pangocairo-render.c"
1075 line="1101">a `PangoLayoutLine`</doc>
1076 <type name="Pango.LayoutLine" c:type="PangoLayoutLine*"/>
1077 </parameter>
1078 </parameters>
1079 </function>
1080 <function name="update_context"
1081 c:identifier="pango_cairo_update_context"
1082 version="1.10">
1083 <doc xml:space="preserve"
1084 filename="pango/pangocairo-context.c"
1085 line="158">Updates a `PangoContext` previously created for use with Cairo to
1086match the current transformation and target surface of a Cairo
1087context.
1088
1089If any layouts have been created for the context, it's necessary
1090to call [method@Pango.Layout.context_changed] on those layouts.</doc>
1091 <source-position filename="pango/pangocairo.h" line="138"/>
1092 <return-value transfer-ownership="none">
1093 <type name="none" c:type="void"/>
1094 </return-value>
1095 <parameters>
1096 <parameter name="cr" transfer-ownership="none">
1097 <doc xml:space="preserve"
1098 filename="pango/pangocairo-context.c"
1099 line="160">a Cairo context</doc>
1100 <type name="cairo.Context" c:type="cairo_t*"/>
1101 </parameter>
1102 <parameter name="context" transfer-ownership="none">
1103 <doc xml:space="preserve"
1104 filename="pango/pangocairo-context.c"
1105 line="161">a `PangoContext`, from a pangocairo font map</doc>
1106 <type name="Pango.Context" c:type="PangoContext*"/>
1107 </parameter>
1108 </parameters>
1109 </function>
1110 <function name="update_layout"
1111 c:identifier="pango_cairo_update_layout"
1112 version="1.10">
1113 <doc xml:space="preserve"
1114 filename="pango/pangocairo-context.c"
1115 line="494">Updates the private `PangoContext` of a `PangoLayout` created with
1116[func@create_layout] to match the current transformation and target
1117surface of a Cairo context.</doc>
1118 <source-position filename="pango/pangocairo.h" line="169"/>
1119 <return-value transfer-ownership="none">
1120 <type name="none" c:type="void"/>
1121 </return-value>
1122 <parameters>
1123 <parameter name="cr" transfer-ownership="none">
1124 <doc xml:space="preserve"
1125 filename="pango/pangocairo-context.c"
1126 line="496">a Cairo context</doc>
1127 <type name="cairo.Context" c:type="cairo_t*"/>
1128 </parameter>
1129 <parameter name="layout" transfer-ownership="none">
1130 <doc xml:space="preserve"
1131 filename="pango/pangocairo-context.c"
1132 line="497">a `PangoLayout`, from [func@create_layout]</doc>
1133 <type name="Pango.Layout" c:type="PangoLayout*"/>
1134 </parameter>
1135 </parameters>
1136 </function>
1137 </namespace>
1138</repository>