1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 module cairo.c.types;
25 
26 
27 public import glib.c.types;
28 
29 //public import std.c.windows.windows;
30 private alias void* HDC;
31 public  alias void  cairo_path_data_t;
32 
33 alias ubyte uchar;
34 
35 /**
36  * typedef int cairo_bool_t;
37  * cairo_bool_t is used for boolean values. Returns of type
38  * cairo_bool_t will always be either 0 or 1, but testing against
39  * these values explicitly is not encouraged; just use the
40  * value as a boolean condition.
41  * $(DDOC_COMMENT example)
42  * Since 1.0
43  */
44 public alias int cairo_bool_t;
45 /**
46  * Specifies the type of antialiasing to do when rendering text or shapes.
47  * As it is not necessarily clear from the above what advantages a particular
48  * antialias method provides, since 1.12, there is also a set of hints:
49  * CAIRO_ANTIALIAS_FAST: Allow the backend to degrade raster quality for speed
50  * CAIRO_ANTIALIAS_GOOD: A balance between speed and quality
51  * CAIRO_ANTIALIAS_BEST: A high-fidelity, but potentially slow, raster mode
52  * These make no guarantee on how the backend will perform its rasterisation
53  * (if it even rasterises!), nor that they have any differing effect other
54  * than to enable some form of antialiasing. In the case of glyph rendering,
55  * CAIRO_ANTIALIAS_FAST and CAIRO_ANTIALIAS_GOOD will be mapped to
56  * CAIRO_ANTIALIAS_GRAY, with CAIRO_ANTALIAS_BEST being equivalent to
57  * CAIRO_ANTIALIAS_SUBPIXEL.
58  * The interpretation of CAIRO_ANTIALIAS_DEFAULT is left entirely up to
59  * the backend, typically this will be similar to CAIRO_ANTIALIAS_GOOD.
60  * CAIRO_ANTIALIAS_DEFAULT
61  * Use the default antialiasing for
62  *  the subsystem and target device, since 1.0
63  * CAIRO_ANTIALIAS_NONE
64  * Use a bilevel alpha mask, since 1.0
65  * CAIRO_ANTIALIAS_GRAY
66  * Perform single-color antialiasing (using
67  *  shades of gray for black text on a white background, for example), since 1.0
68  * CAIRO_ANTIALIAS_SUBPIXEL
69  * Perform antialiasing by taking
70  *  advantage of the order of subpixel elements on devices
71  *  such as LCD panels, since 1.0
72  * CAIRO_ANTIALIAS_FAST
73  * Hint that the backend should perform some
74  * antialiasing but prefer speed over quality, since 1.12
75  * CAIRO_ANTIALIAS_GOOD
76  * The backend should balance quality against
77  * performance, since 1.12
78  * CAIRO_ANTIALIAS_BEST
79  * Hint that the backend should render at the highest
80  * quality, sacrificing speed if necessary, since 1.12
81  * Since 1.0
82  */
83 public enum cairo_antialias_t
84 {
85 	DEFAULT,
86 	/+* method +/
87 	NONE,
88 	GRAY,
89 	SUBPIXEL,
90 	/+* hints +/
91 	FAST,
92 	GOOD,
93 	BEST
94 }
95 alias cairo_antialias_t CairoAntialias;
96 
97 /**
98  * cairo_fill_rule_t is used to select how paths are filled. For both
99  * fill rules, whether or not a point is included in the fill is
100  * determined by taking a ray from that point to infinity and looking
101  * at intersections with the path. The ray can be in any direction,
102  * as long as it doesn't pass through the end point of a segment
103  * or have a tricky intersection such as intersecting tangent to the path.
104  * (Note that filling is not actually implemented in this way. This
105  * is just a description of the rule that is applied.)
106  * The default fill rule is CAIRO_FILL_RULE_WINDING.
107  * New entries may be added in future versions.
108  * CAIRO_FILL_RULE_WINDING
109  * If the path crosses the ray from
110  * left-to-right, counts +1. If the path crosses the ray
111  * from right to left, counts -1. (Left and right are determined
112  * from the perspective of looking along the ray from the starting
113  * point.) If the total count is non-zero, the point will be filled. (Since 1.0)
114  * CAIRO_FILL_RULE_EVEN_ODD
115  * Counts the total number of
116  * intersections, without regard to the orientation of the contour. If
117  * the total number of intersections is odd, the point will be
118  * filled. (Since 1.0)
119  * Since 1.0
120  */
121 public enum cairo_fill_rule_t
122 {
123 	WINDING,
124 	EVEN_ODD
125 }
126 alias cairo_fill_rule_t CairoFillRule;
127 
128 /**
129  * Specifies how to render the endpoints of the path when stroking.
130  * The default line cap style is CAIRO_LINE_CAP_BUTT.
131  * CAIRO_LINE_CAP_BUTT
132  * start(stop) the line exactly at the start(end) point (Since 1.0)
133  * CAIRO_LINE_CAP_ROUND
134  * use a round ending, the center of the circle is the end point (Since 1.0)
135  * CAIRO_LINE_CAP_SQUARE
136  * use squared ending, the center of the square is the end point (Since 1.0)
137  * Since 1.0
138  */
139 public enum cairo_line_cap_t
140 {
141 	BUTT,
142 	ROUND,
143 	SQUARE
144 }
145 alias cairo_line_cap_t CairoLineCap;
146 
147 /**
148  * Specifies how to render the junction of two lines when stroking.
149  * The default line join style is CAIRO_LINE_JOIN_MITER.
150  * CAIRO_LINE_JOIN_MITER
151  * use a sharp (angled) corner, see
152  * cairo_set_miter_limit() (Since 1.0)
153  * CAIRO_LINE_JOIN_ROUND
154  * use a rounded join, the center of the circle is the
155  * joint point (Since 1.0)
156  * CAIRO_LINE_JOIN_BEVEL
157  * use a cut-off join, the join is cut off at half
158  * the line width from the joint point (Since 1.0)
159  * Since 1.0
160  */
161 public enum cairo_line_join_t
162 {
163 	MITER,
164 	ROUND,
165 	BEVEL
166 }
167 alias cairo_line_join_t CairoLineJoin;
168 
169 /**
170  * cairo_operator_t is used to set the compositing operator for all cairo
171  * drawing operations.
172  * The default operator is CAIRO_OPERATOR_OVER.
173  * The operators marked as unbounded modify their
174  * destination even outside of the mask layer (that is, their effect is not
175  * bound by the mask layer). However, their effect can still be limited by
176  * way of clipping.
177  * To keep things simple, the operator descriptions here
178  * document the behavior for when both source and destination are either fully
179  * transparent or fully opaque. The actual implementation works for
180  * translucent layers too.
181  * For a more detailed explanation of the effects of each operator, including
182  * the mathematical definitions, see
183  * http://cairographics.org/operators/.
184  * CAIRO_OPERATOR_CLEAR
185  * clear destination layer (bounded) (Since 1.0)
186  * CAIRO_OPERATOR_SOURCE
187  * replace destination layer (bounded) (Since 1.0)
188  * CAIRO_OPERATOR_OVER
189  * draw source layer on top of destination layer
190  * (bounded) (Since 1.0)
191  * CAIRO_OPERATOR_IN
192  * draw source where there was destination content
193  * (unbounded) (Since 1.0)
194  * CAIRO_OPERATOR_OUT
195  * draw source where there was no destination
196  * content (unbounded) (Since 1.0)
197  * CAIRO_OPERATOR_ATOP
198  * draw source on top of destination content and
199  * only there (Since 1.0)
200  * CAIRO_OPERATOR_DEST
201  * ignore the source (Since 1.0)
202  * CAIRO_OPERATOR_DEST_OVER
203  * draw destination on top of source (Since 1.0)
204  * CAIRO_OPERATOR_DEST_IN
205  * leave destination only where there was
206  * source content (unbounded) (Since 1.0)
207  * CAIRO_OPERATOR_DEST_OUT
208  * leave destination only where there was no
209  * source content (Since 1.0)
210  * CAIRO_OPERATOR_DEST_ATOP
211  * leave destination on top of source content
212  * and only there (unbounded) (Since 1.0)
213  * CAIRO_OPERATOR_XOR
214  * source and destination are shown where there is only
215  * one of them (Since 1.0)
216  * CAIRO_OPERATOR_ADD
217  * source and destination layers are accumulated (Since 1.0)
218  * CAIRO_OPERATOR_SATURATE
219  * like over, but assuming source and dest are
220  * disjoint geometries (Since 1.0)
221  * CAIRO_OPERATOR_MULTIPLY
222  * source and destination layers are multiplied.
223  * This causes the result to be at least as dark as the darker inputs. (Since 1.10)
224  * CAIRO_OPERATOR_SCREEN
225  * source and destination are complemented and
226  * multiplied. This causes the result to be at least as light as the lighter
227  * inputs. (Since 1.10)
228  * CAIRO_OPERATOR_OVERLAY
229  * multiplies or screens, depending on the
230  * lightness of the destination color. (Since 1.10)
231  * CAIRO_OPERATOR_DARKEN
232  * replaces the destination with the source if it
233  * is darker, otherwise keeps the source. (Since 1.10)
234  * CAIRO_OPERATOR_LIGHTEN
235  * replaces the destination with the source if it
236  * is lighter, otherwise keeps the source. (Since 1.10)
237  * CAIRO_OPERATOR_COLOR_DODGE
238  * brightens the destination color to reflect
239  * the source color. (Since 1.10)
240  * CAIRO_OPERATOR_COLOR_BURN
241  * darkens the destination color to reflect
242  * the source color. (Since 1.10)
243  * CAIRO_OPERATOR_HARD_LIGHT
244  * Multiplies or screens, dependent on source
245  * color. (Since 1.10)
246  * CAIRO_OPERATOR_SOFT_LIGHT
247  * Darkens or lightens, dependent on source
248  * color. (Since 1.10)
249  * CAIRO_OPERATOR_DIFFERENCE
250  * Takes the difference of the source and
251  * destination color. (Since 1.10)
252  * CAIRO_OPERATOR_EXCLUSION
253  * Produces an effect similar to difference, but
254  * with lower contrast. (Since 1.10)
255  * CAIRO_OPERATOR_HSL_HUE
256  * Creates a color with the hue of the source
257  * and the saturation and luminosity of the target. (Since 1.10)
258  * CAIRO_OPERATOR_HSL_SATURATION
259  * Creates a color with the saturation
260  * of the source and the hue and luminosity of the target. Painting with
261  * this mode onto a gray area produces no change. (Since 1.10)
262  * CAIRO_OPERATOR_HSL_COLOR
263  * Creates a color with the hue and saturation
264  * of the source and the luminosity of the target. This preserves the gray
265  * levels of the target and is useful for coloring monochrome images or
266  * tinting color images. (Since 1.10)
267  * CAIRO_OPERATOR_HSL_LUMINOSITY
268  * Creates a color with the luminosity of
269  * the source and the hue and saturation of the target. This produces an
270  * inverse effect to CAIRO_OPERATOR_HSL_COLOR. (Since 1.10)
271  * Since 1.0
272  */
273 public enum cairo_operator_t
274 {
275 	CLEAR,
276 	SOURCE,
277 	OVER,
278 	IN,
279 	OUT,
280 	ATOP,
281 	DEST,
282 	DEST_OVER,
283 	DEST_IN,
284 	DEST_OUT,
285 	DEST_ATOP,
286 	XOR,
287 	ADD,
288 	SATURATE,
289 	MULTIPLY,
290 	SCREEN,
291 	OVERLAY,
292 	DARKEN,
293 	LIGHTEN,
294 	COLOR_DODGE,
295 	COLOR_BURN,
296 	HARD_LIGHT,
297 	SOFT_LIGHT,
298 	DIFFERENCE,
299 	EXCLUSION,
300 	HSL_HUE,
301 	HSL_SATURATION,
302 	HSL_COLOR,
303 	HSL_LUMINOSITY
304 }
305 alias cairo_operator_t CairoOperator;
306 
307 /**
308  * cairo_path_data_t is used to describe the type of one portion
309  * of a path when represented as a cairo_path_t.
310  * See cairo_path_data_t for details.
311  * CAIRO_PATH_MOVE_TO
312  * A move-to operation, since 1.0
313  * CAIRO_PATH_LINE_TO
314  * A line-to operation, since 1.0
315  * CAIRO_PATH_CURVE_TO
316  * A curve-to operation, since 1.0
317  * CAIRO_PATH_CLOSE_PATH
318  * A close-path operation, since 1.0
319  * Since 1.0
320  */
321 public enum cairo_path_data_type_t
322 {
323 	MOVE_TO,
324 	LINE_TO,
325 	CURVE_TO,
326 	CLOSE_PATH
327 }
328 alias cairo_path_data_type_t CairoPathDataType;
329 
330 /**
331  * Specifies variants of a font face based on their slant.
332  * CAIRO_FONT_SLANT_NORMAL
333  * Upright font style, since 1.0
334  * CAIRO_FONT_SLANT_ITALIC
335  * Italic font style, since 1.0
336  * CAIRO_FONT_SLANT_OBLIQUE
337  * Oblique font style, since 1.0
338  * Since 1.0
339  */
340 public enum cairo_font_slant_t
341 {
342 	NORMAL,
343 	ITALIC,
344 	OBLIQUE
345 }
346 alias cairo_font_slant_t CairoFontSlant;
347 
348 /**
349  * Specifies variants of a font face based on their weight.
350  * CAIRO_FONT_WEIGHT_NORMAL
351  * Normal font weight, since 1.0
352  * CAIRO_FONT_WEIGHT_BOLD
353  * Bold font weight, since 1.0
354  * Since 1.0
355  */
356 public enum cairo_font_weight_t
357 {
358 	NORMAL,
359 	BOLD
360 }
361 alias cairo_font_weight_t CairoFontWeight;
362 
363 /**
364  * Specifies properties of a text cluster mapping.
365  * CAIRO_TEXT_CLUSTER_FLAG_BACKWARD
366  * The clusters in the cluster array
367  * map to glyphs in the glyph array from end to start. (Since 1.8)
368  * Since 1.8
369  */
370 public enum cairo_text_cluster_flags_t
371 {
372 	BACKWARD = 0x00000001
373 }
374 alias cairo_text_cluster_flags_t CairoTextClusterFlags;
375 
376 /**
377  * cairo_extend_t is used to describe how pattern color/alpha will be
378  * determined for areas "outside" the pattern's natural area, (for
379  * example, outside the surface bounds or outside the gradient
380  * geometry).
381  * Mesh patterns are not affected by the extend mode.
382  * The default extend mode is CAIRO_EXTEND_NONE for surface patterns
383  * and CAIRO_EXTEND_PAD for gradient patterns.
384  * New entries may be added in future versions.
385  * CAIRO_EXTEND_NONE
386  * pixels outside of the source pattern
387  *  are fully transparent (Since 1.0)
388  * CAIRO_EXTEND_REPEAT
389  * the pattern is tiled by repeating (Since 1.0)
390  * CAIRO_EXTEND_REFLECT
391  * the pattern is tiled by reflecting
392  *  at the edges (Since 1.0; but only implemented for surface patterns since 1.6)
393  * CAIRO_EXTEND_PAD
394  * pixels outside of the pattern copy
395  *  the closest pixel from the source (Since 1.2; but only
396  *  implemented for surface patterns since 1.6)
397  * Since 1.0
398  */
399 public enum cairo_extend_t
400 {
401 	NONE,
402 	REPEAT,
403 	REFLECT,
404 	PAD
405 }
406 alias cairo_extend_t CairoExtend;
407 
408 /**
409  * cairo_filter_t is used to indicate what filtering should be
410  * applied when reading pixel values from patterns. See
411  * cairo_pattern_set_filter() for indicating the desired filter to be
412  * used with a particular pattern.
413  * CAIRO_FILTER_FAST
414  * A high-performance filter, with quality similar
415  *  to CAIRO_FILTER_NEAREST (Since 1.0)
416  * CAIRO_FILTER_GOOD
417  * A reasonable-performance filter, with quality
418  *  similar to CAIRO_FILTER_BILINEAR (Since 1.0)
419  * CAIRO_FILTER_BEST
420  * The highest-quality available, performance may
421  *  not be suitable for interactive use. (Since 1.0)
422  * CAIRO_FILTER_NEAREST
423  * Nearest-neighbor filtering (Since 1.0)
424  * CAIRO_FILTER_BILINEAR
425  * Linear interpolation in two dimensions (Since 1.0)
426  * CAIRO_FILTER_GAUSSIAN
427  * This filter value is currently
428  *  unimplemented, and should not be used in current code. (Since 1.0)
429  * Since 1.0
430  */
431 public enum cairo_filter_t
432 {
433 	FAST,
434 	GOOD,
435 	BEST,
436 	NEAREST,
437 	BILINEAR,
438 	GAUSSIAN
439 }
440 alias cairo_filter_t CairoFilter;
441 
442 /**
443  * cairo_pattern_type_t is used to describe the type of a given pattern.
444  * The type of a pattern is determined by the function used to create
445  * it. The cairo_pattern_create_rgb() and cairo_pattern_create_rgba()
446  * functions create SOLID patterns. The remaining
447  * cairo_pattern_create functions map to pattern types in obvious
448  * ways.
449  * The pattern type can be queried with cairo_pattern_get_type()
450  * Most cairo_pattern_t functions can be called with a pattern of any
451  * type, (though trying to change the extend or filter for a solid
452  * pattern will have no effect). A notable exception is
453  * cairo_pattern_add_color_stop_rgb() and
454  * cairo_pattern_add_color_stop_rgba() which must only be called with
455  * gradient patterns (either LINEAR or RADIAL). Otherwise the pattern
456  * will be shutdown and put into an error state.
457  * New entries may be added in future versions.
458  * CAIRO_PATTERN_TYPE_SOLID
459  * The pattern is a solid (uniform)
460  * color. It may be opaque or translucent, since 1.2.
461  * CAIRO_PATTERN_TYPE_SURFACE
462  * The pattern is a based on a surface (an image), since 1.2.
463  * CAIRO_PATTERN_TYPE_LINEAR
464  * The pattern is a linear gradient, since 1.2.
465  * CAIRO_PATTERN_TYPE_RADIAL
466  * The pattern is a radial gradient, since 1.2.
467  * CAIRO_PATTERN_TYPE_MESH
468  * The pattern is a mesh, since 1.12.
469  * CAIRO_PATTERN_TYPE_RASTER_SOURCE
470  * The pattern is a user pattern providing raster data, since 1.12.
471  * Since 1.2
472  */
473 public enum cairo_pattern_type_t
474 {
475 	SOLID,
476 	SURFACE,
477 	LINEAR,
478 	RADIAL,
479 	MESH,
480 	RASTER_SOURCE
481 }
482 alias cairo_pattern_type_t CairoPatternType;
483 
484 /**
485  * Used as the return value for cairo_region_contains_rectangle().
486  * CAIRO_REGION_OVERLAP_IN
487  * The contents are entirely inside the region. (Since 1.10)
488  * CAIRO_REGION_OVERLAP_OUT
489  * The contents are entirely outside the region. (Since 1.10)
490  * CAIRO_REGION_OVERLAP_PART
491  * The contents are partially inside and
492  *  partially outside the region. (Since 1.10)
493  * Since 1.10
494  */
495 public enum cairo_region_overlap_t
496 {
497 	IN, /+* completely inside region +/
498 	OUT, /+* completely outside region +/
499 	PART /+* partly inside region +/
500 }
501 alias cairo_region_overlap_t CairoRegionOverlap;
502 
503 /**
504  * cairo_font_type_t is used to describe the type of a given font
505  * face or scaled font. The font types are also known as "font
506  * backends" within cairo.
507  * The type of a font face is determined by the function used to
508  * create it, which will generally be of the form
509  * cairo_type_font_face_create().
510  * The font face type can be queried with cairo_font_face_get_type()
511  * The various cairo_font_face_t functions can be used with a font face
512  * of any type.
513  * The type of a scaled font is determined by the type of the font
514  * face passed to cairo_scaled_font_create(). The scaled font type can
515  * be queried with cairo_scaled_font_get_type()
516  * The various cairo_scaled_font_t functions can be used with scaled
517  * fonts of any type, but some font backends also provide
518  * type-specific functions that must only be called with a scaled font
519  * of the appropriate type. These functions have names that begin with
520  * cairo_type_scaled_font()
521  * such as cairo_ft_scaled_font_lock_face().
522  * The behavior of calling a type-specific function with a scaled font
523  * of the wrong type is undefined.
524  * New entries may be added in future versions.
525  * CAIRO_FONT_TYPE_TOY
526  * The font was created using cairo's toy font api (Since: 1.2)
527  * CAIRO_FONT_TYPE_FT
528  * The font is of type FreeType (Since: 1.2)
529  * CAIRO_FONT_TYPE_WIN32
530  * The font is of type Win32 (Since: 1.2)
531  * CAIRO_FONT_TYPE_QUARTZ
532  * The font is of type Quartz (Since: 1.6, in 1.2 and
533  * 1.4 it was named CAIRO_FONT_TYPE_ATSUI)
534  * CAIRO_FONT_TYPE_USER
535  * The font was create using cairo's user font api (Since: 1.8)
536  * Since 1.2
537  */
538 public enum cairo_font_type_t
539 {
540 	TOY,
541 	FT,
542 	WIN32,
543 	QUARTZ,
544 	USER
545 }
546 alias cairo_font_type_t CairoFontType;
547 
548 /**
549  * The subpixel order specifies the order of color elements within
550  * each pixel on the display device when rendering with an
551  * antialiasing mode of CAIRO_ANTIALIAS_SUBPIXEL.
552  * CAIRO_SUBPIXEL_ORDER_DEFAULT
553  * Use the default subpixel order for
554  *  for the target device, since 1.0
555  * CAIRO_SUBPIXEL_ORDER_RGB
556  * Subpixel elements are arranged horizontally
557  *  with red at the left, since 1.0
558  * CAIRO_SUBPIXEL_ORDER_BGR
559  * Subpixel elements are arranged horizontally
560  *  with blue at the left, since 1.0
561  * CAIRO_SUBPIXEL_ORDER_VRGB
562  * Subpixel elements are arranged vertically
563  *  with red at the top, since 1.0
564  * CAIRO_SUBPIXEL_ORDER_VBGR
565  * Subpixel elements are arranged vertically
566  *  with blue at the top, since 1.0
567  * Since 1.0
568  */
569 public enum cairo_subpixel_order_t
570 {
571 	DEFAULT,
572 	RGB,
573 	BGR,
574 	VRGB,
575 	VBGR
576 }
577 alias cairo_subpixel_order_t CairoSubpixelOrder;
578 
579 /**
580  * Specifies the type of hinting to do on font outlines. Hinting
581  * is the process of fitting outlines to the pixel grid in order
582  * to improve the appearance of the result. Since hinting outlines
583  * involves distorting them, it also reduces the faithfulness
584  * to the original outline shapes. Not all of the outline hinting
585  * styles are supported by all font backends.
586  * New entries may be added in future versions.
587  * CAIRO_HINT_STYLE_DEFAULT
588  * Use the default hint style for
589  *  font backend and target device, since 1.0
590  * CAIRO_HINT_STYLE_NONE
591  * Do not hint outlines, since 1.0
592  * CAIRO_HINT_STYLE_SLIGHT
593  * Hint outlines slightly to improve
594  *  contrast while retaining good fidelity to the original
595  *  shapes, since 1.0
596  * CAIRO_HINT_STYLE_MEDIUM
597  * Hint outlines with medium strength
598  *  giving a compromise between fidelity to the original shapes
599  *  and contrast, since 1.0
600  * CAIRO_HINT_STYLE_FULL
601  * Hint outlines to maximize contrast, since 1.0
602  * Since 1.0
603  */
604 public enum cairo_hint_style_t
605 {
606 	DEFAULT,
607 	NONE,
608 	SLIGHT,
609 	MEDIUM,
610 	FULL
611 }
612 alias cairo_hint_style_t CairoHintStyle;
613 
614 /**
615  * Specifies whether to hint font metrics; hinting font metrics
616  * means quantizing them so that they are integer values in
617  * device space. Doing this improves the consistency of
618  * letter and line spacing, however it also means that text
619  * will be laid out differently at different zoom factors.
620  * CAIRO_HINT_METRICS_DEFAULT
621  * Hint metrics in the default
622  *  manner for the font backend and target device, since 1.0
623  * CAIRO_HINT_METRICS_OFF
624  * Do not hint font metrics, since 1.0
625  * CAIRO_HINT_METRICS_ON
626  * Hint font metrics, since 1.0
627  * Since 1.0
628  */
629 public enum cairo_hint_metrics_t
630 {
631 	DEFAULT,
632 	OFF,
633 	ON
634 }
635 alias cairo_hint_metrics_t CairoHintMetrics;
636 
637 /**
638  * cairo_device_type_t is used to describe the type of a given
639  * device. The devices types are also known as "backends" within cairo.
640  * The device type can be queried with cairo_device_get_type()
641  * The various cairo_device_t functions can be used with devices of
642  * any type, but some backends also provide type-specific functions
643  * that must only be called with a device of the appropriate
644  * type. These functions have names that begin with
645  * cairo_type_device such as
646  * cairo_xcb_device_debug_cap_xrender_version().
647  * The behavior of calling a type-specific function with a device of
648  * the wrong type is undefined.
649  * New entries may be added in future versions.
650  * CAIRO_DEVICE_TYPE_DRM
651  * The device is of type Direct Render Manager, since 1.10
652  * CAIRO_DEVICE_TYPE_GL
653  * The device is of type OpenGL, since 1.10
654  * CAIRO_DEVICE_TYPE_SCRIPT
655  * The device is of type script, since 1.10
656  * CAIRO_DEVICE_TYPE_XCB
657  * The device is of type xcb, since 1.10
658  * CAIRO_DEVICE_TYPE_XLIB
659  * The device is of type xlib, since 1.10
660  * CAIRO_DEVICE_TYPE_XML
661  * The device is of type XML, since 1.10
662  * CAIRO_DEVICE_TYPE_COGL
663  * The device is of type cogl, since 1.12
664  * CAIRO_DEVICE_TYPE_WIN32
665  * The device is of type win32, since 1.12
666  * CAIRO_DEVICE_TYPE_INVALID
667  * The device is invalid, since 1.10
668  * Since 1.10
669  */
670 public enum cairo_device_type_t
671 {
672 	DRM,
673 	GL,
674 	SCRIPT,
675 	XCB,
676 	XLIB,
677 	XML,
678 	COGL,
679 	WIN32,
680 	INVALID = -1
681 }
682 alias cairo_device_type_t CairoDeviceType;
683 
684 /**
685  * cairo_content_t is used to describe the content that a surface will
686  * contain, whether color information, alpha information (translucence
687  * vs. opacity), or both.
688  * Note: The large values here are designed to keep cairo_content_t
689  * values distinct from cairo_format_t values so that the
690  * implementation can detect the error if users confuse the two types.
691  * CAIRO_CONTENT_COLOR
692  * The surface will hold color content only. (Since 1.0)
693  * CAIRO_CONTENT_ALPHA
694  * The surface will hold alpha content only. (Since 1.0)
695  * CAIRO_CONTENT_COLOR_ALPHA
696  * The surface will hold color and alpha content. (Since 1.0)
697  * Since 1.0
698  */
699 public enum cairo_content_t
700 {
701 	COLOR = 0x1000,
702 	ALPHA = 0x2000,
703 	COLOR_ALPHA = 0x3000
704 }
705 alias cairo_content_t CairoContent;
706 
707 /**
708  * cairo_surface_type_t is used to describe the type of a given
709  * surface. The surface types are also known as "backends" or "surface
710  * backends" within cairo.
711  * The type of a surface is determined by the function used to create
712  * it, which will generally be of the form
713  * cairo_type_surface_create(),
714  * (though see cairo_surface_create_similar() as well).
715  * The surface type can be queried with cairo_surface_get_type()
716  * The various cairo_surface_t functions can be used with surfaces of
717  * any type, but some backends also provide type-specific functions
718  * that must only be called with a surface of the appropriate
719  * type. These functions have names that begin with
720  * cairo_type_surface such as cairo_image_surface_get_width().
721  * The behavior of calling a type-specific function with a surface of
722  * the wrong type is undefined.
723  * New entries may be added in future versions.
724  * CAIRO_SURFACE_TYPE_IMAGE
725  * The surface is of type image, since 1.2
726  * CAIRO_SURFACE_TYPE_PDF
727  * The surface is of type pdf, since 1.2
728  * CAIRO_SURFACE_TYPE_PS
729  * The surface is of type ps, since 1.2
730  * CAIRO_SURFACE_TYPE_XLIB
731  * The surface is of type xlib, since 1.2
732  * CAIRO_SURFACE_TYPE_XCB
733  * The surface is of type xcb, since 1.2
734  * CAIRO_SURFACE_TYPE_GLITZ
735  * The surface is of type glitz, since 1.2
736  * CAIRO_SURFACE_TYPE_QUARTZ
737  * The surface is of type quartz, since 1.2
738  * CAIRO_SURFACE_TYPE_WIN32
739  * The surface is of type win32, since 1.2
740  * CAIRO_SURFACE_TYPE_BEOS
741  * The surface is of type beos, since 1.2
742  * CAIRO_SURFACE_TYPE_DIRECTFB
743  * The surface is of type directfb, since 1.2
744  * CAIRO_SURFACE_TYPE_SVG
745  * The surface is of type svg, since 1.2
746  * CAIRO_SURFACE_TYPE_OS2
747  * The surface is of type os2, since 1.4
748  * CAIRO_SURFACE_TYPE_WIN32_PRINTING
749  * The surface is a win32 printing surface, since 1.6
750  * CAIRO_SURFACE_TYPE_QUARTZ_IMAGE
751  * The surface is of type quartz_image, since 1.6
752  * CAIRO_SURFACE_TYPE_SCRIPT
753  * The surface is of type script, since 1.10
754  * CAIRO_SURFACE_TYPE_QT
755  * The surface is of type Qt, since 1.10
756  * CAIRO_SURFACE_TYPE_RECORDING
757  * The surface is of type recording, since 1.10
758  * CAIRO_SURFACE_TYPE_VG
759  * The surface is a OpenVG surface, since 1.10
760  * CAIRO_SURFACE_TYPE_GL
761  * The surface is of type OpenGL, since 1.10
762  * CAIRO_SURFACE_TYPE_DRM
763  * The surface is of type Direct Render Manager, since 1.10
764  * CAIRO_SURFACE_TYPE_TEE
765  * The surface is of type 'tee' (a multiplexing surface), since 1.10
766  * CAIRO_SURFACE_TYPE_XML
767  * The surface is of type XML (for debugging), since 1.10
768  * CAIRO_SURFACE_TYPE_SKIA
769  * The surface is of type Skia, since 1.10
770  * CAIRO_SURFACE_TYPE_SUBSURFACE
771  * The surface is a subsurface created with
772  *  cairo_surface_create_for_rectangle(), since 1.10
773  * CAIRO_SURFACE_TYPE_COGL
774  * This surface is of type Cogl, since 1.12
775  * Since 1.2
776  */
777 public enum cairo_surface_type_t
778 {
779 	IMAGE,
780 	PDF,
781 	PS,
782 	XLIB,
783 	XCB,
784 	GLITZ,
785 	QUARTZ,
786 	WIN32,
787 	BEOS,
788 	DIRECTFB,
789 	SVG,
790 	OS2,
791 	WIN32_PRINTING,
792 	QUARTZ_IMAGE,
793 	SCRIPT,
794 	QT,
795 	RECORDING,
796 	VG,
797 	GL,
798 	DRM,
799 	TEE,
800 	XML,
801 	SKIA,
802 	SUBSURFACE,
803 	COGL
804 }
805 alias cairo_surface_type_t CairoSurfaceType;
806 
807 /**
808  * cairo_format_t is used to identify the memory format of
809  * image data.
810  * New entries may be added in future versions.
811  * CAIRO_FORMAT_INVALID
812  * no such format exists or is supported.
813  * CAIRO_FORMAT_ARGB32
814  * each pixel is a 32-bit quantity, with
815  *  alpha in the upper 8 bits, then red, then green, then blue.
816  *  The 32-bit quantities are stored native-endian. Pre-multiplied
817  *  alpha is used. (That is, 50% transparent red is 0x80800000,
818  *  not 0x80ff0000.) (Since 1.0)
819  * CAIRO_FORMAT_RGB24
820  * each pixel is a 32-bit quantity, with
821  *  the upper 8 bits unused. Red, Green, and Blue are stored
822  *  in the remaining 24 bits in that order. (Since 1.0)
823  * CAIRO_FORMAT_A8
824  * each pixel is a 8-bit quantity holding
825  *  an alpha value. (Since 1.0)
826  * CAIRO_FORMAT_A1
827  * each pixel is a 1-bit quantity holding
828  *  an alpha value. Pixels are packed together into 32-bit
829  *  quantities. The ordering of the bits matches the
830  *  endianess of the platform. On a big-endian machine, the
831  *  first pixel is in the uppermost bit, on a little-endian
832  *  machine the first pixel is in the least-significant bit. (Since 1.0)
833  * CAIRO_FORMAT_RGB16_565
834  * each pixel is a 16-bit quantity
835  *  with red in the upper 5 bits, then green in the middle
836  *  6 bits, and blue in the lower 5 bits. (Since 1.2)
837  * CAIRO_FORMAT_RGB30
838  * like RGB24 but with 10bpc. (Since 1.12)
839  * Since 1.0
840  */
841 public enum cairo_format_t
842 {
843 	INVALID = -1,
844 	ARGB32 = 0,
845 	RGB24 = 1,
846 	A8 = 2,
847 	A1 = 3,
848 	RGB16_565 = 4,
849 	RGB30 = 5
850 }
851 alias cairo_format_t CairoFormat;
852 
853 /**
854  * cairo_pdf_version_t is used to describe the version number of the PDF
855  * specification that a generated PDF file will conform to.
856  * CAIRO_PDF_VERSION_1_4
857  * The version 1.4 of the PDF specification. (Since 1.10)
858  * CAIRO_PDF_VERSION_1_5
859  * The version 1.5 of the PDF specification. (Since 1.10)
860  * Since 1.10
861  */
862 public enum cairo_pdf_version_t
863 {
864 	VERSION_1_4,
865 	VERSION_1_5
866 }
867 alias cairo_pdf_version_t CairoPdfVersion;
868 
869 /**
870  * cairo_ps_level_t is used to describe the language level of the
871  * PostScript Language Reference that a generated PostScript file will
872  * conform to.
873  * CAIRO_PS_LEVEL_2
874  * The language level 2 of the PostScript specification. (Since 1.6)
875  * CAIRO_PS_LEVEL_3
876  * The language level 3 of the PostScript specification. (Since 1.6)
877  * Since 1.6
878  */
879 public enum cairo_ps_level_t
880 {
881 	LEVEL_2,
882 	LEVEL_3
883 }
884 alias cairo_ps_level_t CairoPsLevel;
885 
886 /**
887  * cairo_svg_version_t is used to describe the version number of the SVG
888  * specification that a generated SVG file will conform to.
889  * CAIRO_SVG_VERSION_1_1
890  * The version 1.1 of the SVG specification. (Since 1.2)
891  * CAIRO_SVG_VERSION_1_2
892  * The version 1.2 of the SVG specification. (Since 1.2)
893  * Since 1.2
894  */
895 public enum cairo_svg_version_t
896 {
897 	VERSION_1_1,
898 	VERSION_1_2
899 }
900 alias cairo_svg_version_t CairoSvgVersion;
901 
902 /**
903  * A set of script output variants.
904  * CAIRO_SCRIPT_MODE_ASCII
905  * the output will be in readable text (default). (Since 1.12)
906  * CAIRO_SCRIPT_MODE_BINARY
907  * the output will use byte codes. (Since 1.12)
908  * Since 1.12
909  */
910 public enum cairo_script_mode_t
911 {
912 	ASCII,
913 	BINARY
914 }
915 alias cairo_script_mode_t CairoScriptMode;
916 
917 /**
918  * cairo_status_t is used to indicate errors that can occur when
919  * using Cairo. In some cases it is returned directly by functions.
920  * but when using cairo_t, the last error, if any, is stored in
921  * the context and can be retrieved with cairo_status().
922  * New entries may be added in future versions. Use cairo_status_to_string()
923  * to get a human-readable representation of an error message.
924  * CAIRO_STATUS_SUCCESS
925  * no error has occurred (Since 1.0)
926  * CAIRO_STATUS_NO_MEMORY
927  * out of memory (Since 1.0)
928  * CAIRO_STATUS_INVALID_RESTORE
929  * cairo_restore() called without matching cairo_save() (Since 1.0)
930  * CAIRO_STATUS_INVALID_POP_GROUP
931  * no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group() (Since 1.0)
932  * CAIRO_STATUS_NO_CURRENT_POINT
933  * no current point defined (Since 1.0)
934  * CAIRO_STATUS_INVALID_MATRIX
935  * invalid matrix (not invertible) (Since 1.0)
936  * CAIRO_STATUS_INVALID_STATUS
937  * invalid value for an input cairo_status_t (Since 1.0)
938  * CAIRO_STATUS_NULL_POINTER
939  * NULL pointer (Since 1.0)
940  * CAIRO_STATUS_INVALID_STRING
941  * input string not valid UTF-8 (Since 1.0)
942  * CAIRO_STATUS_INVALID_PATH_DATA
943  * input path data not valid (Since 1.0)
944  * CAIRO_STATUS_READ_ERROR
945  * error while reading from input stream (Since 1.0)
946  * CAIRO_STATUS_WRITE_ERROR
947  * error while writing to output stream (Since 1.0)
948  * CAIRO_STATUS_SURFACE_FINISHED
949  * target surface has been finished (Since 1.0)
950  * CAIRO_STATUS_SURFACE_TYPE_MISMATCH
951  * the surface type is not appropriate for the operation (Since 1.0)
952  * CAIRO_STATUS_PATTERN_TYPE_MISMATCH
953  * the pattern type is not appropriate for the operation (Since 1.0)
954  * CAIRO_STATUS_INVALID_CONTENT
955  * invalid value for an input cairo_content_t (Since 1.0)
956  * CAIRO_STATUS_INVALID_FORMAT
957  * invalid value for an input cairo_format_t (Since 1.0)
958  * CAIRO_STATUS_INVALID_VISUAL
959  * invalid value for an input Visual* (Since 1.0)
960  * CAIRO_STATUS_FILE_NOT_FOUND
961  * file not found (Since 1.0)
962  * CAIRO_STATUS_INVALID_DASH
963  * invalid value for a dash setting (Since 1.0)
964  * CAIRO_STATUS_INVALID_DSC_COMMENT
965  * invalid value for a DSC comment (Since 1.2)
966  * CAIRO_STATUS_INVALID_INDEX
967  * invalid index passed to getter (Since 1.4)
968  * CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
969  * clip region not representable in desired format (Since 1.4)
970  * CAIRO_STATUS_TEMP_FILE_ERROR
971  * error creating or writing to a temporary file (Since 1.6)
972  * CAIRO_STATUS_INVALID_STRIDE
973  * invalid value for stride (Since 1.6)
974  * CAIRO_STATUS_FONT_TYPE_MISMATCH
975  * the font type is not appropriate for the operation (Since 1.8)
976  * CAIRO_STATUS_USER_FONT_IMMUTABLE
977  * the user-font is immutable (Since 1.8)
978  * CAIRO_STATUS_USER_FONT_ERROR
979  * error occurred in a user-font callback function (Since 1.8)
980  * CAIRO_STATUS_NEGATIVE_COUNT
981  * negative number used where it is not allowed (Since 1.8)
982  * CAIRO_STATUS_INVALID_CLUSTERS
983  * input clusters do not represent the accompanying text and glyph array (Since 1.8)
984  * CAIRO_STATUS_INVALID_SLANT
985  * invalid value for an input cairo_font_slant_t (Since 1.8)
986  * CAIRO_STATUS_INVALID_WEIGHT
987  * invalid value for an input cairo_font_weight_t (Since 1.8)
988  * CAIRO_STATUS_INVALID_SIZE
989  * invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10)
990  * CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED
991  * user-font method not implemented (Since 1.10)
992  * CAIRO_STATUS_DEVICE_TYPE_MISMATCH
993  * the device type is not appropriate for the operation (Since 1.10)
994  * CAIRO_STATUS_DEVICE_ERROR
995  * an operation to the device caused an unspecified error (Since 1.10)
996  * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION
997  * a mesh pattern
998  *  construction operation was used outside of a
999  *  cairo_mesh_pattern_begin_patch()/cairo_mesh_pattern_end_patch()
1000  *  pair (Since 1.12)
1001  * CAIRO_STATUS_DEVICE_FINISHED
1002  * target device has been finished (Since 1.12)
1003  * CAIRO_STATUS_LAST_STATUS
1004  * this is a special value indicating the number of
1005  *  status values defined in this enumeration. When using this value, note
1006  *  that the version of cairo at run-time may have additional status values
1007  *  defined than the value of this symbol at compile-time. (Since 1.10)
1008  * Since 1.0
1009  */
1010 public enum cairo_status_t
1011 {
1012 	SUCCESS = 0,
1013 	NO_MEMORY,
1014 	INVALID_RESTORE,
1015 	INVALID_POP_GROUP,
1016 	NO_CURRENT_POINT,
1017 	INVALID_MATRIX,
1018 	INVALID_STATUS,
1019 	NULL_POINTER,
1020 	INVALID_STRING,
1021 	INVALID_PATH_DATA,
1022 	READ_ERROR,
1023 	WRITE_ERROR,
1024 	SURFACE_FINISHED,
1025 	SURFACE_TYPE_MISMATCH,
1026 	PATTERN_TYPE_MISMATCH,
1027 	INVALID_CONTENT,
1028 	INVALID_FORMAT,
1029 	INVALID_VISUAL,
1030 	FILE_NOT_FOUND,
1031 	INVALID_DASH,
1032 	INVALID_DSC_COMMENT,
1033 	INVALID_INDEX,
1034 	CLIP_NOT_REPRESENTABLE,
1035 	TEMP_FILE_ERROR,
1036 	INVALID_STRIDE,
1037 	FONT_TYPE_MISMATCH,
1038 	USER_FONT_IMMUTABLE,
1039 	USER_FONT_ERROR,
1040 	NEGATIVE_COUNT,
1041 	INVALID_CLUSTERS,
1042 	INVALID_SLANT,
1043 	INVALID_WEIGHT,
1044 	INVALID_SIZE,
1045 	USER_FONT_NOT_IMPLEMENTED,
1046 	DEVICE_TYPE_MISMATCH,
1047 	DEVICE_ERROR,
1048 	INVALID_MESH_CONSTRUCTION,
1049 	DEVICE_FINISHED,
1050 	LAST_STATUS
1051 }
1052 alias cairo_status_t CairoStatus;
1053 
1054 
1055 /**
1056  * Main Gtk struct.
1057  * A cairo_t contains the current state of the rendering device,
1058  * including coordinates of yet to be drawn shapes.
1059  * Cairo contexts, as cairo_t objects are named, are central to
1060  * cairo and all drawing with cairo is always done to a cairo_t
1061  * object.
1062  * Memory management of cairo_t is done with
1063  * cairo_reference() and cairo_destroy().
1064  * Since 1.0
1065  */
1066 public struct cairo_t{}
1067 
1068 
1069 /**
1070  * A data structure for holding a rectangle.
1071  * double x;
1072  * X coordinate of the left side of the rectangle
1073  * double y;
1074  * Y coordinate of the the top side of the rectangle
1075  * double width;
1076  * width of the rectangle
1077  * double height;
1078  * height of the rectangle
1079  * Since 1.4
1080  */
1081 public struct cairo_rectangle_t
1082 {
1083 	double x, y, width, height;
1084 }
1085 
1086 
1087 /**
1088  * A data structure for holding a dynamically allocated
1089  * array of rectangles.
1090  * cairo_status_t status;
1091  * Error status of the rectangle list
1092  * cairo_rectangle_t *rectangles;
1093  * Array containing the rectangles
1094  * int num_rectangles;
1095  * Number of rectangles in this list
1096  * Since 1.4
1097  */
1098 public struct cairo_rectangle_list_t
1099 {
1100 	cairo_status_t status;
1101 	cairo_rectangle_t *rectangles;
1102 	int numRectangles;
1103 }
1104 
1105 
1106 /**
1107  * A data structure for holding a path. This data structure serves as
1108  * the return value for cairo_copy_path() and
1109  * cairo_copy_path_flat() as well the input value for
1110  * cairo_append_path().
1111  * See cairo_path_data_t for hints on how to iterate over the
1112  * actual data within the path.
1113  * The num_data member gives the number of elements in the data
1114  * array. This number is larger than the number of independent path
1115  * portions (defined in cairo_path_data_type_t), since the data
1116  * includes both headers and coordinates for each portion.
1117  * cairo_status_t status;
1118  * the current error status
1119  * cairo_path_data_t *data;
1120  * the elements in the path
1121  * int num_data;
1122  * the number of elements in the data array
1123  * Since 1.0
1124  */
1125 public struct cairo_path_t
1126 {
1127 	cairo_status_t status;
1128 	cairo_path_data_t *data;
1129 	int numData;
1130 }
1131 
1132 
1133 /**
1134  * The cairo_glyph_t structure holds information about a single glyph
1135  * when drawing or measuring text. A font is (in simple terms) a
1136  * collection of shapes used to draw text. A glyph is one of these
1137  * shapes. There can be multiple glyphs for a single character
1138  * (alternates to be used in different contexts, for example), or a
1139  * glyph can be a ligature of multiple
1140  * characters. Cairo doesn't expose any way of converting input text
1141  * into glyphs, so in order to use the Cairo interfaces that take
1142  * arrays of glyphs, you must directly access the appropriate
1143  * underlying font system.
1144  * Note that the offsets given by x and y are not cumulative. When
1145  * drawing or measuring text, each glyph is individually positioned
1146  * with respect to the overall origin
1147  * unsigned long index;
1148  * glyph index in the font. The exact interpretation of the
1149  * glyph index depends on the font technology being used.
1150  * double x;
1151  * the offset in the X direction between the origin used for
1152  * drawing or measuring the string and the origin of this glyph.
1153  * double y;
1154  * the offset in the Y direction between the origin used for
1155  * drawing or measuring the string and the origin of this glyph.
1156  * Since 1.0
1157  */
1158 public struct cairo_glyph_t
1159 {
1160 	ulong index;
1161 	double x;
1162 	double y;
1163 }
1164 
1165 
1166 /**
1167  * The cairo_text_cluster_t structure holds information about a single
1168  * text cluster. A text cluster is a minimal
1169  * mapping of some glyphs corresponding to some UTF-8 text.
1170  * For a cluster to be valid, both num_bytes and num_glyphs should
1171  * be non-negative, and at least one should be non-zero.
1172  * Note that clusters with zero glyphs are not as well supported as
1173  * normal clusters. For example, PDF rendering applications typically
1174  * ignore those clusters when PDF text is being selected.
1175  * See cairo_show_text_glyphs() for how clusters are used in advanced
1176  * text operations.
1177  * int num_bytes;
1178  * the number of bytes of UTF-8 text covered by cluster
1179  * int num_glyphs;
1180  * the number of glyphs covered by cluster
1181  * Since 1.8
1182  */
1183 public struct cairo_text_cluster_t
1184 {
1185 	int numBytes;
1186 	int numGlyphs;
1187 }
1188 
1189 
1190 /**
1191  * Main Gtk struct.
1192  * A cairo_pattern_t represents a source when drawing onto a
1193  * surface. There are different subtypes of cairo_pattern_t,
1194  * for different types of sources; for example,
1195  * cairo_pattern_create_rgb() creates a pattern for a solid
1196  * opaque color.
1197  * Other than various
1198  * cairo_pattern_create_type()
1199  * functions, some of the pattern types can be implicitly created using various
1200  * cairo_set_source_type() functions;
1201  * for example cairo_set_source_rgb().
1202  * The type of a pattern can be queried with cairo_pattern_get_type().
1203  * Memory management of cairo_pattern_t is done with
1204  * cairo_pattern_reference() and cairo_pattern_destroy().
1205  * Since 1.0
1206  */
1207 public struct cairo_pattern_t{}
1208 
1209 
1210 /**
1211  * Main Gtk struct.
1212  * A cairo_region_t represents a set of integer-aligned rectangles.
1213  * It allows set-theoretical operations like cairo_region_union() and
1214  * cairo_region_intersect() to be performed on them.
1215  * Memory management of cairo_region_t is done with
1216  * cairo_region_reference() and cairo_region_destroy().
1217  * Since 1.10
1218  */
1219 public struct cairo_region_t{}
1220 
1221 
1222 /**
1223  * Main Gtk struct.
1224  * A cairo_font_face_t specifies all aspects of a font other
1225  * than the size or font matrix (a font matrix is used to distort
1226  * a font by sheering it or scaling it unequally in the two
1227  * directions) . A font face can be set on a cairo_t by using
1228  * cairo_set_font_face(); the size and font matrix are set with
1229  * cairo_set_font_size() and cairo_set_font_matrix().
1230  * There are various types of font faces, depending on the
1231  * font backend they use. The type of a
1232  * font face can be queried using cairo_font_face_get_type().
1233  * Memory management of cairo_font_face_t is done with
1234  * cairo_font_face_reference() and cairo_font_face_destroy().
1235  * Since 1.0
1236  */
1237 public struct cairo_font_face_t{}
1238 
1239 
1240 /**
1241  * Main Gtk struct.
1242  * A cairo_scaled_font_t is a font scaled to a particular size and device
1243  * resolution. A cairo_scaled_font_t is most useful for low-level font
1244  * usage where a library or application wants to cache a reference
1245  * to a scaled font to speed up the computation of metrics.
1246  * There are various types of scaled fonts, depending on the
1247  * font backend they use. The type of a
1248  * scaled font can be queried using cairo_scaled_font_get_type().
1249  * Memory management of cairo_scaled_font_t is done with
1250  * cairo_scaled_font_reference() and cairo_scaled_font_destroy().
1251  * Since 1.0
1252  */
1253 public struct cairo_scaled_font_t{}
1254 
1255 
1256 /**
1257  * The cairo_font_extents_t structure stores metric information for
1258  * a font. Values are given in the current user-space coordinate
1259  * system.
1260  * Because font metrics are in user-space coordinates, they are
1261  * mostly, but not entirely, independent of the current transformation
1262  * matrix. If you call cairo_scale(cr, 2.0, 2.0),
1263  * text will be drawn twice as big, but the reported text extents will
1264  * not be doubled. They will change slightly due to hinting (so you
1265  * can't assume that metrics are independent of the transformation
1266  * matrix), but otherwise will remain unchanged.
1267  * double ascent;
1268  * the distance that the font extends above the baseline.
1269  * Note that this is not always exactly equal to the maximum
1270  * of the extents of all the glyphs in the font, but rather
1271  * is picked to express the font designer's intent as to
1272  * how the font should align with elements above it.
1273  * double descent;
1274  * the distance that the font extends below the baseline.
1275  * This value is positive for typical fonts that include
1276  * portions below the baseline. Note that this is not always
1277  * exactly equal to the maximum of the extents of all the
1278  * glyphs in the font, but rather is picked to express the
1279  * font designer's intent as to how the font should
1280  * align with elements below it.
1281  * double height;
1282  * the recommended vertical distance between baselines when
1283  * setting consecutive lines of text with the font. This
1284  * is greater than ascent+descent by a
1285  * quantity known as the line spacing
1286  * or external leading. When space
1287  * is at a premium, most fonts can be set with only
1288  * a distance of ascent+descent between lines.
1289  * double max_x_advance;
1290  * the maximum distance in the X direction that
1291  * the origin is advanced for any glyph in the font.
1292  * double max_y_advance;
1293  * the maximum distance in the Y direction that
1294  * the origin is advanced for any glyph in the font.
1295  * This will be zero for normal fonts used for horizontal
1296  * writing. (The scripts of East Asia are sometimes written
1297  * vertically.)
1298  * Since 1.0
1299  */
1300 public struct cairo_font_extents_t
1301 {
1302 	double ascent;
1303 	double descent;
1304 	double height;
1305 	double maxXAdvance;
1306 	double maxYAdvance;
1307 }
1308 
1309 
1310 /**
1311  * The cairo_text_extents_t structure stores the extents of a single
1312  * glyph or a string of glyphs in user-space coordinates. Because text
1313  * extents are in user-space coordinates, they are mostly, but not
1314  * entirely, independent of the current transformation matrix. If you call
1315  * cairo_scale(cr, 2.0, 2.0), text will
1316  * be drawn twice as big, but the reported text extents will not be
1317  * doubled. They will change slightly due to hinting (so you can't
1318  * assume that metrics are independent of the transformation matrix),
1319  * but otherwise will remain unchanged.
1320  * double x_bearing;
1321  * the horizontal distance from the origin to the
1322  * leftmost part of the glyphs as drawn. Positive if the
1323  * glyphs lie entirely to the right of the origin.
1324  * double y_bearing;
1325  * the vertical distance from the origin to the
1326  * topmost part of the glyphs as drawn. Positive only if the
1327  * glyphs lie completely below the origin; will usually be
1328  * negative.
1329  * double width;
1330  * width of the glyphs as drawn
1331  * double height;
1332  * height of the glyphs as drawn
1333  * double x_advance;
1334  * distance to advance in the X direction
1335  * after drawing these glyphs
1336  * double y_advance;
1337  * distance to advance in the Y direction
1338  * after drawing these glyphs. Will typically be zero except
1339  * for vertical text layout as found in East-Asian languages.
1340  * Since 1.0
1341  */
1342 public struct cairo_text_extents_t
1343 {
1344 	double xBearing;
1345 	double yBearing;
1346 	double width;
1347 	double height;
1348 	double xAdvance;
1349 	double yAdvance;
1350 }
1351 
1352 
1353 /**
1354  * Main Gtk struct.
1355  * An opaque structure holding all options that are used when
1356  * rendering fonts.
1357  * Individual features of a cairo_font_options_t can be set or
1358  * accessed using functions named
1359  * cairo_font_options_set_feature_name() and
1360  * cairo_font_options_get_feature_name(), like
1361  * cairo_font_options_set_antialias() and
1362  * cairo_font_options_get_antialias().
1363  * New features may be added to a cairo_font_options_t in the
1364  * future. For this reason, cairo_font_options_copy(),
1365  * cairo_font_options_equal(), cairo_font_options_merge(), and
1366  * cairo_font_options_hash() should be used to copy, check
1367  * for equality, merge, or compute a hash value of
1368  * cairo_font_options_t objects.
1369  * Since 1.0
1370  */
1371 public struct cairo_font_options_t{}
1372 
1373 
1374 /**
1375  * Main Gtk struct.
1376  * A cairo_device_t represents the driver interface for drawing
1377  * operations to a cairo_surface_t. There are different subtypes of
1378  * cairo_device_t for different drawing backends; for example,
1379  * cairo_egl_device_create() creates a device that wraps an EGL display and
1380  * context.
1381  * The type of a device can be queried with cairo_device_get_type().
1382  * Memory management of cairo_device_t is done with
1383  * cairo_device_reference() and cairo_device_destroy().
1384  * Since 1.10
1385  */
1386 public struct cairo_device_t{}
1387 
1388 
1389 /**
1390  * Main Gtk struct.
1391  * A cairo_surface_t represents an image, either as the destination
1392  * of a drawing operation or as source when drawing onto another
1393  * surface. To draw to a cairo_surface_t, create a cairo context
1394  * with the surface as the target, using cairo_create().
1395  * There are different subtypes of cairo_surface_t for
1396  * different drawing backends; for example, cairo_image_surface_create()
1397  * creates a bitmap image in memory.
1398  * The type of a surface can be queried with cairo_surface_get_type().
1399  * The initial contents of a surface after creation depend upon the manner
1400  * of its creation. If cairo creates the surface and backing storage for
1401  * the user, it will be initially cleared; for example,
1402  * cairo_image_surface_create() and cairo_surface_create_similar().
1403  * Alternatively, if the user passes in a reference to some backing storage
1404  * and asks cairo to wrap that in a cairo_surface_t, then the contents are
1405  * not modified; for example, cairo_image_surface_create_for_data() and
1406  * cairo_xlib_surface_create().
1407  * Memory management of cairo_surface_t is done with
1408  * cairo_surface_reference() and cairo_surface_destroy().
1409  * Since 1.0
1410  */
1411 public struct cairo_surface_t{}
1412 
1413 
1414 /**
1415  * Main Gtk struct.
1416  * A cairo_matrix_t holds an affine transformation, such as a scale,
1417  * rotation, shear, or a combination of those. The transformation of
1418  * a point (x, y) is given by:
1419  */
1420 public struct cairo_matrix_t
1421 {
1422 	double xx; double yx;
1423 	double xy; double yy;
1424 	double x0; double y0;
1425 }
1426 
1427 
1428 /**
1429  * cairo_user_data_key_t is used for attaching user data to cairo
1430  * data structures. The actual contents of the struct is never used,
1431  * and there is no need to initialize the object; only the unique
1432  * address of a cairo_data_key_t object is used. Typically, you
1433  * would just use the address of a static cairo_data_key_t object.
1434  * int unused;
1435  * not used; ignore.
1436  * Since 1.0
1437  */
1438 public struct cairo_user_data_key_t
1439 {
1440 	int unused;
1441 }
1442 
1443 
1444 /**
1445  * A data structure for holding a rectangle with integer coordinates.
1446  * int x;
1447  * X coordinate of the left side of the rectangle
1448  * int y;
1449  * Y coordinate of the the top side of the rectangle
1450  * int width;
1451  * width of the rectangle
1452  * int height;
1453  * height of the rectangle
1454  * Since 1.10
1455  */
1456 public struct cairo_rectangle_int_t
1457 {
1458 	int x, y;
1459 	int width, height;
1460 }
1461 
1462 
1463 /*
1464  * This macro encodes the given cairo version into an integer. The numbers
1465  * returned by CAIRO_VERSION and cairo_version() are encoded using this macro.
1466  * Two encoded version numbers can be compared as integers. The encoding ensures
1467  * that later versions compare greater than earlier versions.
1468  * Returns: the encoded version.
1469  * major :
1470  * the major component of the version number
1471  * minor :
1472  * the minor component of the version number
1473  * micro :
1474  * the micro component of the version number
1475  */
1476 // TODO
1477 // #define CAIRO_VERSION_ENCODE(major, minor, micro)
1478 
1479 /*
1480  * This macro encodes the given cairo version into an string. The numbers
1481  * returned by CAIRO_VERSION_STRING and cairo_version_string() are encoded using this macro.
1482  * The parameters to this macro must expand to numerical literals.
1483  * Returns: a string literal containing the version.
1484  * Since: 1.8
1485  * major :
1486  * the major component of the version number
1487  * minor :
1488  * the minor component of the version number
1489  * micro :
1490  * the micro component of the version number
1491  */
1492 // TODO
1493 // #define CAIRO_VERSION_STRINGIZE(major, minor, micro)
1494 
1495 /*
1496  * cairo_raster_source_acquire_func_t is the type of function which is
1497  * called when a pattern is being rendered from. It should create a surface
1498  * that provides the pixel data for the region of interest as defined by
1499  * extents, though the surface itself does not have to be limited to that
1500  * area. For convenience the surface should probably be of image type,
1501  * created with cairo_surface_create_similar_image() for the target (which
1502  * enables the number of copies to be reduced during transfer to the
1503  * device). Another option, might be to return a similar surface to the
1504  * target for explicit handling by the application of a set of cached sources
1505  * on the device. The region of sample data provided should be defined using
1506  * cairo_surface_set_device_offset() to specify the top-left corner of the
1507  * sample data (along with width and height of the surface).
1508  * pattern :
1509  * the pattern being rendered from
1510  * callback_data :
1511  * the user data supplied during creation
1512  * target :
1513  * the rendering target surface
1514  * extents :
1515  * rectangular region of interest in pixels in sample space
1516  * Returns :
1517  * a cairo_surface_t
1518  * Since 1.12
1519  */
1520 // cairo_surface_t (*cairo_raster_source_acquire_func_t)  (cairo_pattern_t *pattern,  void *callback_data,  cairo_surface_t *target,  const cairo_rectangle_int_t *extents);
1521 public alias extern(C) cairo_surface_t function(cairo_pattern_t* pattern, void* callbackData, cairo_surface_t* target, cairo_rectangle_int_t* extents) cairo_raster_source_acquire_func_t;
1522 
1523 /*
1524  * cairo_raster_source_release_func_t is the type of function which is
1525  * called when the pixel data is no longer being access by the pattern
1526  * for the rendering operation. Typically this function will simply
1527  * destroy the surface created during acquire.
1528  * pattern :
1529  * the pattern being rendered from
1530  * callback_data :
1531  * the user data supplied during creation
1532  * surface :
1533  * the surface created during acquire
1534  * Since 1.12
1535  */
1536 // void (*cairo_raster_source_release_func_t)  (cairo_pattern_t *pattern,  void *callback_data,  cairo_surface_t *surface);
1537 public alias extern(C) void function(cairo_pattern_t* pattern, void* callbackData, cairo_surface_t* surface) cairo_raster_source_release_func_t;
1538 
1539 /*
1540  * cairo_raster_source_snapshot_func_t is the type of function which is
1541  * called when the pixel data needs to be preserved for later use
1542  * during printing. This pattern will be accessed again later, and it
1543  * is expected to provide the pixel data that was current at the time
1544  * of snapshotting.
1545  * pattern :
1546  * the pattern being rendered from
1547  * callback_data :
1548  * the user data supplied during creation
1549  * Returns :
1550  * CAIRO_STATUS_SUCCESS on success, or one of the
1551  * cairo_status_t error codes for failure.
1552  * Since 1.12
1553  */
1554 // cairo_status_t (*cairo_raster_source_snapshot_func_t)  (cairo_pattern_t *pattern,  void *callback_data);
1555 public alias extern(C) cairo_status_t function(cairo_pattern_t* pattern, void* callbackData) cairo_raster_source_snapshot_func_t;
1556 
1557 /*
1558  * cairo_raster_source_copy_func_t is the type of function which is
1559  * called when the pattern gets copied as a normal part of rendering.
1560  * pattern :
1561  * the cairo_pattern_t that was copied to
1562  * callback_data :
1563  * the user data supplied during creation
1564  * other :
1565  * the cairo_pattern_t being used as the source for the copy
1566  * Returns :
1567  * CAIRO_STATUS_SUCCESS on success, or one of the
1568  * cairo_status_t error codes for failure.
1569  * Since 1.12
1570  */
1571 // cairo_status_t (*cairo_raster_source_copy_func_t) (cairo_pattern_t *pattern,  void *callback_data,  const cairo_pattern_t *other);
1572 public alias extern(C) cairo_status_t function(cairo_pattern_t* pattern, void* callbackData, cairo_pattern_t* other) cairo_raster_source_copy_func_t;
1573 
1574 /*
1575  * cairo_raster_source_finish_func_t is the type of function which is
1576  * called when the pattern (or a copy thereof) is no longer required.
1577  * pattern :
1578  * the pattern being rendered from
1579  * callback_data :
1580  * the user data supplied during creation
1581  * Since 1.12
1582  * See Also
1583  * cairo_pattern_t
1584  */
1585 // void (*cairo_raster_source_finish_func_t)  (cairo_pattern_t *pattern,  void *callback_data);
1586 public alias extern(C) void function(cairo_pattern_t* pattern, void* callbackData) cairo_raster_source_finish_func_t;
1587 
1588 /*
1589  * cairo_user_scaled_font_init_func_t is the type of function which is
1590  * called when a scaled-font needs to be created for a user font-face.
1591  * The cairo context cr is not used by the caller, but is prepared in font
1592  * space, similar to what the cairo contexts passed to the render_glyph
1593  * method will look like. The callback can use this context for extents
1594  * computation for example. After the callback is called, cr is checked
1595  * for any error status.
1596  * The extents argument is where the user font sets the font extents for
1597  * scaled_font. It is in font space, which means that for most cases its
1598  * ascent and descent members should add to 1.0. extents is preset to
1599  * hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for
1600  * descent and max_y_advance members.
1601  * The callback is optional. If not set, default font extents as described
1602  * in the previous paragraph will be used.
1603  * Note that scaled_font is not fully initialized at this
1604  * point and trying to use it for text operations in the callback will result
1605  * in deadlock.
1606  * scaled_font :
1607  * the scaled-font being created
1608  * cr :
1609  * a cairo context, in font space
1610  * extents :
1611  * font extents to fill in, in font space
1612  * Returns :
1613  * CAIRO_STATUS_SUCCESS upon success, or an error status on error.
1614  * Since 1.8
1615  */
1616 // cairo_status_t (*cairo_user_scaled_font_init_func_t)  (cairo_scaled_font_t *scaled_font,  cairo_t *cr,  cairo_font_extents_t *extents);
1617 public alias extern(C) cairo_status_t function(cairo_scaled_font_t* scaledFont, cairo_t* cr, cairo_font_extents_t* extents) cairo_user_scaled_font_init_func_t;
1618 
1619 /*
1620  * cairo_user_scaled_font_render_glyph_func_t is the type of function which
1621  * is called when a user scaled-font needs to render a glyph.
1622  * The callback is mandatory, and expected to draw the glyph with code glyph to
1623  * the cairo context cr. cr is prepared such that the glyph drawing is done in
1624  * font space. That is, the matrix set on cr is the scale matrix of scaled_font,
1625  * The extents argument is where the user font sets the font extents for
1626  * scaled_font. However, if user prefers to draw in user space, they can
1627  * achieve that by changing the matrix on cr. All cairo rendering operations
1628  * to cr are permitted, however, the result is undefined if any source other
1629  * than the default source on cr is used. That means, glyph bitmaps should
1630  * be rendered using cairo_mask() instead of cairo_paint().
1631  * Other non-default settings on cr include a font size of 1.0 (given that
1632  * it is set up to be in font space), and font options corresponding to
1633  * scaled_font.
1634  * The extents argument is preset to have x_bearing,
1635  * width, and y_advance of zero,
1636  * y_bearing set to -font_extents.ascent,
1637  * height to font_extents.ascent+font_extents.descent,
1638  * and x_advance to font_extents.max_x_advance.
1639  * The only field user needs to set in majority of cases is
1640  * x_advance.
1641  * If the width field is zero upon the callback returning
1642  * (which is its preset value), the glyph extents are automatically computed
1643  * based on the drawings done to cr. This is in most cases exactly what the
1644  * desired behavior is. However, if for any reason the callback sets the
1645  * extents, it must be ink extents, and include the extents of all drawing
1646  * done to cr in the callback.
1647  * scaled_font :
1648  * user scaled-font
1649  * glyph :
1650  * glyph code to render
1651  * cr :
1652  * cairo context to draw to, in font space
1653  * extents :
1654  * glyph extents to fill in, in font space
1655  * Returns :
1656  * CAIRO_STATUS_SUCCESS upon success, or
1657  * CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
1658  * Since 1.8
1659  */
1660 // cairo_status_t (*cairo_user_scaled_font_render_glyph_func_t)  (cairo_scaled_font_t *scaled_font,  unsigned long  glyph,  cairo_t *cr,  cairo_text_extents_t *extents);
1661 public alias extern(C) cairo_status_t function(cairo_scaled_font_t* scaledFont, ulong glyph, cairo_t* cr, cairo_text_extents_t* extents) cairo_user_scaled_font_render_glyph_func_t;
1662 
1663 /*
1664  * cairo_user_scaled_font_text_to_glyphs_func_t is the type of function which
1665  * is called to convert input text to an array of glyphs. This is used by the
1666  * cairo_show_text() operation.
1667  * Using this callback the user-font has full control on glyphs and their
1668  * positions. That means, it allows for features like ligatures and kerning,
1669  * as well as complex shaping required for scripts like
1670  * Arabic and Indic.
1671  * The num_glyphs argument is preset to the number of glyph entries available
1672  * in the glyphs buffer. If the glyphs buffer is NULL, the value of
1673  * num_glyphs will be zero. If the provided glyph array is too short for
1674  * the conversion (or for convenience), a new glyph array may be allocated
1675  * using cairo_glyph_allocate() and placed in glyphs. Upon return,
1676  * num_glyphs should contain the number of generated glyphs. If the value
1677  * glyphs points at has changed after the call, the caller will free the
1678  * allocated glyph array using cairo_glyph_free(). The caller will also free
1679  * the original value of glyphs, so the callback shouldn't do so.
1680  * The callback should populate the glyph indices and positions (in font space)
1681  * assuming that the text is to be shown at the origin.
1682  * If clusters is not NULL, num_clusters and cluster_flags are also
1683  * non-NULL, and cluster mapping should be computed. The semantics of how
1684  * cluster array allocation works is similar to the glyph array. That is,
1685  * if clusters initially points to a non-NULL value, that array may be used
1686  * as a cluster buffer, and num_clusters points to the number of cluster
1687  * entries available there. If the provided cluster array is too short for
1688  * the conversion (or for convenience), a new cluster array may be allocated
1689  * using cairo_text_cluster_allocate() and placed in clusters. In this case,
1690  * the original value of clusters will still be freed by the caller. Upon
1691  * return, num_clusters should contain the number of generated clusters.
1692  * If the value clusters points at has changed after the call, the caller
1693  * will free the allocated cluster array using cairo_text_cluster_free().
1694  * The callback is optional. If num_glyphs is negative upon
1695  * the callback returning or if the return value
1696  * is CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, the unicode_to_glyph callback
1697  * is tried. See cairo_user_scaled_font_unicode_to_glyph_func_t.
1698  * Note: While cairo does not impose any limitation on glyph indices,
1699  * some applications may assume that a glyph index fits in a 16-bit
1700  * unsigned integer. As such, it is advised that user-fonts keep their
1701  * glyphs in the 0 to 65535 range. Furthermore, some applications may
1702  * assume that glyph 0 is a special glyph-not-found glyph. User-fonts
1703  * are advised to use glyph 0 for such purposes and do not use that
1704  * glyph value for other purposes.
1705  * scaled_font :
1706  * the scaled-font being created
1707  * utf8 :
1708  * a string of text encoded in UTF-8
1709  * utf8_len :
1710  * length of utf8 in bytes
1711  * glyphs :
1712  * pointer to array of glyphs to fill, in font space
1713  * num_glyphs :
1714  * pointer to number of glyphs
1715  * clusters :
1716  * pointer to array of cluster mapping information to fill, or NULL
1717  * num_clusters :
1718  * pointer to number of clusters
1719  * cluster_flags :
1720  * pointer to location to store cluster flags corresponding to the
1721  * output clusters
1722  * Returns :
1723  * CAIRO_STATUS_SUCCESS upon success,
1724  * CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried,
1725  * or CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
1726  * Since 1.8
1727  */
1728 // cairo_status_t (*cairo_user_scaled_font_text_to_glyphs_func_t)  (cairo_scaled_font_t *scaled_font,  const char *utf8,  int utf8_len,  cairo_glyph_t **glyphs,  int *num_glyphs,  cairo_text_cluster_t **clusters,  int *num_clusters,  cairo_text_cluster_flags_t *cluster_flags);
1729 public alias extern(C) cairo_status_t function(cairo_scaled_font_t* scaledFont, char* utf8, int utf8_Len, cairo_glyph_t** glyphs, int* numGlyphs, cairo_text_cluster_t** clusters, int* numClusters, cairo_text_cluster_flags_t* clusterFlags) cairo_user_scaled_font_text_to_glyphs_func_t;
1730 
1731 /*
1732  * cairo_user_scaled_font_unicode_to_glyph_func_t is the type of function which
1733  * is called to convert an input Unicode character to a single glyph.
1734  * This is used by the cairo_show_text() operation.
1735  * This callback is used to provide the same functionality as the
1736  * text_to_glyphs callback does (see cairo_user_scaled_font_text_to_glyphs_func_t)
1737  * but has much less control on the output,
1738  * in exchange for increased ease of use. The inherent assumption to using
1739  * this callback is that each character maps to one glyph, and that the
1740  * mapping is context independent. It also assumes that glyphs are positioned
1741  * according to their advance width. These mean no ligatures, kerning, or
1742  * complex scripts can be implemented using this callback.
1743  * The callback is optional, and only used if text_to_glyphs callback is not
1744  * set or fails to return glyphs. If this callback is not set or if it returns
1745  * CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, an identity mapping from Unicode
1746  * code-points to glyph indices is assumed.
1747  * Note: While cairo does not impose any limitation on glyph indices,
1748  * some applications may assume that a glyph index fits in a 16-bit
1749  * unsigned integer. As such, it is advised that user-fonts keep their
1750  * glyphs in the 0 to 65535 range. Furthermore, some applications may
1751  * assume that glyph 0 is a special glyph-not-found glyph. User-fonts
1752  * are advised to use glyph 0 for such purposes and do not use that
1753  * glyph value for other purposes.
1754  * scaled_font :
1755  * the scaled-font being created
1756  * unicode :
1757  * input unicode character code-point
1758  * glyph_index :
1759  * output glyph index
1760  * Returns :
1761  * CAIRO_STATUS_SUCCESS upon success,
1762  * CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried,
1763  * or CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
1764  * Since 1.8
1765  */
1766 // cairo_status_t (*cairo_user_scaled_font_unicode_to_glyph_func_t)  (cairo_scaled_font_t *scaled_font,  unsigned long  unicode,  unsigned long *glyph_index);
1767 public alias extern(C) cairo_status_t function(cairo_scaled_font_t* scaledFont, ulong unicode, ulong* glyphIndex) cairo_user_scaled_font_unicode_to_glyph_func_t;
1768 
1769 /*
1770  * cairo_read_func_t is the type of function which is called when a
1771  * backend needs to read data from an input stream. It is passed the
1772  * closure which was specified by the user at the time the read
1773  * function was registered, the buffer to read the data into and the
1774  * length of the data in bytes. The read function should return
1775  * CAIRO_STATUS_SUCCESS if all the data was successfully read,
1776  * CAIRO_STATUS_READ_ERROR otherwise.
1777  * closure :
1778  * the input closure
1779  * data :
1780  * the buffer into which to read the data
1781  * length :
1782  * the amount of data to read
1783  * Returns :
1784  * the status code of the read operation
1785  * Since 1.0
1786  */
1787 // cairo_status_t (*cairo_read_func_t) (void *closure,  unsigned char *data,  unsigned int length);
1788 public alias extern(C) cairo_status_t function(void* closure, uchar* data, uint length) cairo_read_func_t;
1789 
1790 /*
1791  * cairo_write_func_t is the type of function which is called when a
1792  * backend needs to write data to an output stream. It is passed the
1793  * closure which was specified by the user at the time the write
1794  * function was registered, the data to write and the length of the
1795  * data in bytes. The write function should return
1796  * CAIRO_STATUS_SUCCESS if all the data was successfully written,
1797  * CAIRO_STATUS_WRITE_ERROR otherwise.
1798  * closure :
1799  * the output closure
1800  * data :
1801  * the buffer containing the data to write
1802  * length :
1803  * the amount of data to write
1804  * Returns :
1805  * the status code of the write operation
1806  * Since 1.0
1807  */
1808 // cairo_status_t (*cairo_write_func_t) (void *closure,  const unsigned char *data,  unsigned int length);
1809 public alias extern(C) cairo_status_t function(void* closure, uchar* data, uint length) cairo_write_func_t;
1810 
1811 /*
1812  * cairo_destroy_func_t the type of function which is called when a
1813  * data element is destroyed. It is passed the pointer to the data
1814  * element and should free any memory and resources allocated for it.
1815  * data :
1816  * The data element being destroyed.
1817  * Since 1.0
1818  */
1819 // void (*cairo_destroy_func_t) (void *data);
1820 public alias extern(C) void function(void* data) cairo_destroy_func_t;
1821 
1822 // skipped union cairo_path_data_t
1823