]> gitweb.factorcode.org Git - factor.git/blob - basis/cairo/ffi/ffi.factor
factor: more top level forms.
[factor.git] / basis / cairo / ffi / ffi.factor
1 ! Copyright (C) 2007 Sampo Vuori.
2 ! Copyright (C) 2008 Matthew Willis.
3 ! Copyright (C) 2010 Anton Gorenko.
4 ! See http://factorcode.org/license.txt for BSD license.
5 USING: alien alien.c-types alien.destructors alien.libraries
6 alien.syntax classes.struct combinators system ;
7 IN: cairo.ffi
8
9 ! Adapted from cairo.h, version 1.8.10
10
11 LIBRARY-UNIX: cairo cdecl "libcairo.so"
12 LIBRARY-MACOSX: cairo cdecl "libcairo.dylib"
13 LIBRARY-WINDOWS: cairo cdecl "libcairo-2.dll"
14
15 LIBRARY: cairo
16
17 FUNCTION: int cairo_version ( )
18 FUNCTION: c-string cairo_version_string ( )
19
20 TYPEDEF: int cairo_bool_t
21
22 ! I am leaving these and other void* types as opaque structures
23 TYPEDEF: void* cairo_t
24 TYPEDEF: void* cairo_surface_t
25
26 STRUCT: cairo_matrix_t
27     { xx double }
28     { yx double }
29     { xy double }
30     { yy double }
31     { x0 double }
32     { y0 double } ;
33
34 TYPEDEF: void* cairo_pattern_t
35
36 CALLBACK: void
37 cairo_destroy_func_t ( void* data )
38
39 ! See cairo.h for details
40 STRUCT: cairo_user_data_key_t
41     { unused int } ;
42
43 ENUM: cairo_status_t
44     CAIRO_STATUS_SUCCESS
45     CAIRO_STATUS_NO_MEMORY
46     CAIRO_STATUS_INVALID_RESTORE
47     CAIRO_STATUS_INVALID_POP_GROUP
48     CAIRO_STATUS_NO_CURRENT_POINT
49     CAIRO_STATUS_INVALID_MATRIX
50     CAIRO_STATUS_INVALID_STATUS
51     CAIRO_STATUS_NULL_POINTER
52     CAIRO_STATUS_INVALID_STRING
53     CAIRO_STATUS_INVALID_PATH_DATA
54     CAIRO_STATUS_READ_ERROR
55     CAIRO_STATUS_WRITE_ERROR
56     CAIRO_STATUS_SURFACE_FINISHED
57     CAIRO_STATUS_SURFACE_TYPE_MISMATCH
58     CAIRO_STATUS_PATTERN_TYPE_MISMATCH
59     CAIRO_STATUS_INVALID_CONTENT
60     CAIRO_STATUS_INVALID_FORMAT
61     CAIRO_STATUS_INVALID_VISUAL
62     CAIRO_STATUS_FILE_NOT_FOUND
63     CAIRO_STATUS_INVALID_DASH
64     CAIRO_STATUS_INVALID_DSC_COMMENT
65     CAIRO_STATUS_INVALID_INDEX
66     CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
67     CAIRO_STATUS_TEMP_FILE_ERROR
68     CAIRO_STATUS_INVALID_STRIDE
69     CAIRO_STATUS_FONT_TYPE_MISMATCH
70     CAIRO_STATUS_USER_FONT_IMMUTABLE
71     CAIRO_STATUS_USER_FONT_ERROR
72     CAIRO_STATUS_NEGATIVE_COUNT
73     CAIRO_STATUS_INVALID_CLUSTERS
74     CAIRO_STATUS_INVALID_SLANT
75     CAIRO_STATUS_INVALID_WEIGHT ;
76
77 ENUM: cairo_content_t
78     { CAIRO_CONTENT_COLOR 0x1000 }
79     { CAIRO_CONTENT_ALPHA 0x2000 }
80     { CAIRO_CONTENT_COLOR_ALPHA 0x3000 } ;
81
82 CALLBACK: cairo_status_t
83 cairo_write_func_t ( void* closure, uchar* data, uint length )
84
85 CALLBACK: cairo_status_t
86 cairo_read_func_t ( void* closure, uchar* data, uint length )
87
88 ! Functions for manipulating state objects
89
90 FUNCTION: cairo_t*
91 cairo_create ( cairo_surface_t* target )
92
93 FUNCTION: cairo_t*
94 cairo_reference ( cairo_t* cr )
95
96 FUNCTION: void
97 cairo_destroy ( cairo_t* cr )
98
99 DESTRUCTOR: cairo_destroy
100
101 FUNCTION: uint
102 cairo_get_reference_count ( cairo_t* cr )
103
104 FUNCTION: void*
105 cairo_get_user_data ( cairo_t* cr, cairo_user_data_key_t* key )
106
107 FUNCTION: cairo_status_t
108 cairo_set_user_data ( cairo_t* cr, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy )
109
110 FUNCTION: void
111 cairo_save ( cairo_t* cr )
112
113 FUNCTION: void
114 cairo_restore ( cairo_t* cr )
115
116 FUNCTION: void
117 cairo_push_group ( cairo_t* cr )
118
119 FUNCTION: void
120 cairo_push_group_with_content ( cairo_t* cr, cairo_content_t content )
121
122 FUNCTION: cairo_pattern_t*
123 cairo_pop_group ( cairo_t* cr )
124
125 FUNCTION: void
126 cairo_pop_group_to_source ( cairo_t* cr )
127
128 ! Modify state
129
130 ENUM: cairo_operator_t
131     CAIRO_OPERATOR_CLEAR
132
133     CAIRO_OPERATOR_SOURCE
134     CAIRO_OPERATOR_OVER
135     CAIRO_OPERATOR_IN
136     CAIRO_OPERATOR_OUT
137     CAIRO_OPERATOR_ATOP
138
139     CAIRO_OPERATOR_DEST
140     CAIRO_OPERATOR_DEST_OVER
141     CAIRO_OPERATOR_DEST_IN
142     CAIRO_OPERATOR_DEST_OUT
143     CAIRO_OPERATOR_DEST_ATOP
144
145     CAIRO_OPERATOR_XOR
146     CAIRO_OPERATOR_ADD
147     CAIRO_OPERATOR_SATURATE ;
148
149 FUNCTION: void
150 cairo_set_operator ( cairo_t* cr, cairo_operator_t op )
151
152 FUNCTION: void
153 cairo_set_source ( cairo_t* cr, cairo_pattern_t* source )
154
155 FUNCTION: void
156 cairo_set_source_rgb ( cairo_t* cr, double red, double green, double blue )
157
158 FUNCTION: void
159 cairo_set_source_rgba ( cairo_t* cr, double red, double green, double blue, double alpha )
160
161 FUNCTION: void
162 cairo_set_source_surface ( cairo_t* cr, cairo_surface_t* surface, double x, double y )
163
164 FUNCTION: void
165 cairo_set_tolerance ( cairo_t* cr, double tolerance )
166
167 ENUM: cairo_antialias_t
168     CAIRO_ANTIALIAS_DEFAULT
169     CAIRO_ANTIALIAS_NONE
170     CAIRO_ANTIALIAS_GRAY
171     CAIRO_ANTIALIAS_SUBPIXEL ;
172
173 FUNCTION: void
174 cairo_set_antialias ( cairo_t* cr, cairo_antialias_t antialias )
175
176 ENUM: cairo_fill_rule_t
177     CAIRO_FILL_RULE_WINDING
178     CAIRO_FILL_RULE_EVEN_ODD ;
179
180 FUNCTION: void
181 cairo_set_fill_rule ( cairo_t* cr, cairo_fill_rule_t fill_rule )
182
183 FUNCTION: void
184 cairo_set_line_width ( cairo_t* cr, double width )
185
186 ENUM: cairo_line_cap_t
187     CAIRO_LINE_CAP_BUTT
188     CAIRO_LINE_CAP_ROUND
189     CAIRO_LINE_CAP_SQUARE ;
190
191 FUNCTION: void
192 cairo_set_line_cap ( cairo_t* cr, cairo_line_cap_t line_cap )
193
194 ENUM: cairo_line_join_t
195     CAIRO_LINE_JOIN_MITER
196     CAIRO_LINE_JOIN_ROUND
197     CAIRO_LINE_JOIN_BEVEL ;
198
199 FUNCTION: void
200 cairo_set_line_join ( cairo_t* cr, cairo_line_join_t line_join )
201
202 FUNCTION: void
203 cairo_set_dash ( cairo_t* cr, double* dashes, int num_dashes, double offset )
204
205 FUNCTION: void
206 cairo_set_miter_limit ( cairo_t* cr, double limit )
207
208 FUNCTION: void
209 cairo_translate ( cairo_t* cr, double tx, double ty )
210
211 FUNCTION: void
212 cairo_scale ( cairo_t* cr, double sx, double sy )
213
214 FUNCTION: void
215 cairo_rotate ( cairo_t* cr, double angle )
216
217 FUNCTION: void
218 cairo_transform ( cairo_t* cr, cairo_matrix_t* matrix )
219
220 FUNCTION: void
221 cairo_set_matrix ( cairo_t* cr, cairo_matrix_t* matrix )
222
223 FUNCTION: void
224 cairo_identity_matrix ( cairo_t* cr )
225
226 FUNCTION: void
227 cairo_user_to_device ( cairo_t* cr, double* x, double* y )
228
229 FUNCTION: void
230 cairo_user_to_device_distance ( cairo_t* cr, double* dx, double* dy )
231
232 FUNCTION: void
233 cairo_device_to_user ( cairo_t* cr, double* x, double* y )
234
235 FUNCTION: void
236 cairo_device_to_user_distance ( cairo_t* cr, double* dx, double* dy )
237
238 ! Path creation functions
239
240 FUNCTION: void
241 cairo_new_path ( cairo_t* cr )
242
243 FUNCTION: void
244 cairo_move_to ( cairo_t* cr, double x, double y )
245
246 FUNCTION: void
247 cairo_new_sub_path ( cairo_t* cr )
248
249 FUNCTION: void
250 cairo_line_to ( cairo_t* cr, double x, double y )
251
252 FUNCTION: void
253 cairo_curve_to ( cairo_t* cr, double x1, double y1, double x2, double y2, double x3, double y3 )
254
255 FUNCTION: void
256 cairo_arc ( cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2 )
257
258 FUNCTION: void
259 cairo_arc_negative ( cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2 )
260
261 FUNCTION: void
262 cairo_rel_move_to ( cairo_t* cr, double dx, double dy )
263
264 FUNCTION: void
265 cairo_rel_line_to ( cairo_t* cr, double dx, double dy )
266
267 FUNCTION: void
268 cairo_rel_curve_to ( cairo_t* cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3 )
269
270 FUNCTION: void
271 cairo_rectangle ( cairo_t* cr, double x, double y, double width, double height )
272
273 FUNCTION: void
274 cairo_close_path ( cairo_t* cr )
275
276 FUNCTION: void
277 cairo_path_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 )
278
279 ! Painting functions
280
281 FUNCTION: void
282 cairo_paint ( cairo_t* cr )
283
284 FUNCTION: void
285 cairo_paint_with_alpha ( cairo_t* cr, double alpha )
286
287 FUNCTION: void
288 cairo_mask ( cairo_t* cr, cairo_pattern_t* pattern )
289
290 FUNCTION: void
291 cairo_mask_surface ( cairo_t* cr, cairo_surface_t* surface, double surface_x, double surface_y )
292
293 FUNCTION: void
294 cairo_stroke ( cairo_t* cr )
295
296 FUNCTION: void
297 cairo_stroke_preserve ( cairo_t* cr )
298
299 FUNCTION: void
300 cairo_fill ( cairo_t* cr )
301
302 FUNCTION: void
303 cairo_fill_preserve ( cairo_t* cr )
304
305 FUNCTION: void
306 cairo_copy_page ( cairo_t* cr )
307
308 FUNCTION: void
309 cairo_show_page ( cairo_t* cr )
310
311 ! Insideness testing
312
313 FUNCTION: cairo_bool_t
314 cairo_in_stroke ( cairo_t* cr, double x, double y )
315
316 FUNCTION: cairo_bool_t
317 cairo_in_fill ( cairo_t* cr, double x, double y )
318
319 ! Rectangular extents
320
321 FUNCTION: void
322 cairo_stroke_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 )
323
324 FUNCTION: void
325 cairo_fill_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 )
326
327 ! Clipping
328
329 FUNCTION: void
330 cairo_reset_clip ( cairo_t* cr )
331
332 FUNCTION: void
333 cairo_clip ( cairo_t* cr )
334
335 FUNCTION: void
336 cairo_clip_preserve ( cairo_t* cr )
337
338 FUNCTION: void
339 cairo_clip_extents ( cairo_t* cr, double* x1, double* y1, double* x2, double* y2 )
340
341 STRUCT: cairo_rectangle_t
342     { x      double }
343     { y      double }
344     { width  double }
345     { height double } ;
346
347 STRUCT: cairo_rectangle_list_t
348     { status         cairo_status_t     }
349     { rectangles     cairo_rectangle_t* }
350     { num_rectangles int                } ;
351
352 FUNCTION: cairo_rectangle_list_t*
353 cairo_copy_clip_rectangle_list ( cairo_t* cr )
354
355 FUNCTION: void
356 cairo_rectangle_list_destroy ( cairo_rectangle_list_t* rectangle_list )
357
358 ! Font/Text functions
359
360 TYPEDEF: void* cairo_scaled_font_t
361
362 TYPEDEF: void* cairo_font_face_t
363
364 STRUCT: cairo_glyph_t
365     { index ulong  }
366     { x     double }
367     { y     double } ;
368
369 FUNCTION: cairo_glyph_t*
370 cairo_glyph_allocate ( int num_glyphs )
371
372 FUNCTION: void
373 cairo_glyph_free ( cairo_glyph_t* glyphs )
374
375 STRUCT: cairo_text_cluster_t
376     { num_bytes  int }
377     { num_glyphs int } ;
378
379 FUNCTION: cairo_text_cluster_t*
380 cairo_text_cluster_allocate ( int num_clusters )
381
382 FUNCTION: void
383 cairo_text_cluster_free ( cairo_text_cluster_t* clusters )
384
385 ENUM: cairo_text_cluster_flags_t
386     { CAIRO_TEXT_CLUSTER_FLAG_BACKWARD 0x00000001 } ;
387
388 STRUCT: cairo_text_extents_t
389     { x_bearing double }
390     { y_bearing double }
391     { width     double }
392     { height    double }
393     { x_advance double }
394     { y_advance double } ;
395
396 STRUCT: cairo_font_extents_t
397     { ascent double }
398     { descent double }
399     { height double }
400     { max_x_advance double }
401     { max_y_advance double } ;
402
403 ENUM: cairo_font_slant_t
404     CAIRO_FONT_SLANT_NORMAL
405     CAIRO_FONT_SLANT_ITALIC
406     CAIRO_FONT_SLANT_OBLIQUE ;
407
408 ENUM: cairo_font_weight_t
409     CAIRO_FONT_WEIGHT_NORMAL
410     CAIRO_FONT_WEIGHT_BOLD ;
411
412 ENUM: cairo_subpixel_order_t
413     CAIRO_SUBPIXEL_ORDER_DEFAULT
414     CAIRO_SUBPIXEL_ORDER_RGB
415     CAIRO_SUBPIXEL_ORDER_BGR
416     CAIRO_SUBPIXEL_ORDER_VRGB
417     CAIRO_SUBPIXEL_ORDER_VBGR ;
418
419 ENUM: cairo_hint_style_t
420     CAIRO_HINT_STYLE_DEFAULT
421     CAIRO_HINT_STYLE_NONE
422     CAIRO_HINT_STYLE_SLIGHT
423     CAIRO_HINT_STYLE_MEDIUM
424     CAIRO_HINT_STYLE_FULL ;
425
426 ENUM: cairo_hint_metrics_t
427     CAIRO_HINT_METRICS_DEFAULT
428     CAIRO_HINT_METRICS_OFF
429     CAIRO_HINT_METRICS_ON ;
430
431 TYPEDEF: void* cairo_font_options_t
432
433 FUNCTION: cairo_font_options_t*
434 cairo_font_options_create ( )
435
436 FUNCTION: cairo_font_options_t*
437 cairo_font_options_copy ( cairo_font_options_t* original )
438
439 FUNCTION: void
440 cairo_font_options_destroy ( cairo_font_options_t* options )
441
442 FUNCTION: cairo_status_t
443 cairo_font_options_status ( cairo_font_options_t* options )
444
445 FUNCTION: void
446 cairo_font_options_merge ( cairo_font_options_t* options, cairo_font_options_t* other )
447
448 FUNCTION: cairo_bool_t
449 cairo_font_options_equal ( cairo_font_options_t* options, cairo_font_options_t* other )
450
451 FUNCTION: ulong
452 cairo_font_options_hash ( cairo_font_options_t* options )
453
454 FUNCTION: void
455 cairo_font_options_set_antialias ( cairo_font_options_t* options, cairo_antialias_t antialias )
456
457 FUNCTION: cairo_antialias_t
458 cairo_font_options_get_antialias ( cairo_font_options_t* options )
459
460 FUNCTION: void
461 cairo_font_options_set_subpixel_order ( cairo_font_options_t* options, cairo_subpixel_order_t subpixel_order )
462
463 FUNCTION: cairo_subpixel_order_t
464 cairo_font_options_get_subpixel_order ( cairo_font_options_t* options )
465
466 FUNCTION: void
467 cairo_font_options_set_hint_style ( cairo_font_options_t* options, cairo_hint_style_t hint_style )
468
469 FUNCTION: cairo_hint_style_t
470 cairo_font_options_get_hint_style ( cairo_font_options_t* options )
471
472 FUNCTION: void
473 cairo_font_options_set_hint_metrics ( cairo_font_options_t* options, cairo_hint_metrics_t hint_metrics )
474
475 FUNCTION: cairo_hint_metrics_t
476 cairo_font_options_get_hint_metrics ( cairo_font_options_t* options )
477
478 ! This interface is for dealing with text as text, not caring about the
479 !  font object inside the the cairo_t.
480
481 FUNCTION: void
482 cairo_select_font_face ( cairo_t* cr, c-string family, cairo_font_slant_t slant, cairo_font_weight_t weight )
483
484 FUNCTION: void
485 cairo_set_font_size ( cairo_t* cr, double size )
486
487 FUNCTION: void
488 cairo_set_font_matrix ( cairo_t* cr, cairo_matrix_t* matrix )
489
490 FUNCTION: void
491 cairo_get_font_matrix ( cairo_t* cr, cairo_matrix_t* matrix )
492
493 FUNCTION: void
494 cairo_set_font_options ( cairo_t* cr, cairo_font_options_t* options )
495
496 FUNCTION: void
497 cairo_get_font_options ( cairo_t* cr, cairo_font_options_t* options )
498
499 FUNCTION: void
500 cairo_set_font_face ( cairo_t* cr, cairo_font_face_t* font_face )
501
502 FUNCTION: cairo_font_face_t*
503 cairo_get_font_face ( cairo_t* cr )
504
505 FUNCTION: void
506 cairo_set_scaled_font ( cairo_t* cr, cairo_scaled_font_t* scaled_font )
507
508 FUNCTION: cairo_scaled_font_t*
509 cairo_get_scaled_font ( cairo_t* cr )
510
511 FUNCTION: void
512 cairo_show_text ( cairo_t* cr, c-string utf8 )
513
514 FUNCTION: void
515 cairo_show_glyphs ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs )
516
517 FUNCTION: void
518 cairo_show_text_glyphs ( cairo_t* cr, c-string 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 )
519
520 FUNCTION: void
521 cairo_text_path ( cairo_t* cr, c-string utf8 )
522
523 FUNCTION: void
524 cairo_glyph_path ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs )
525
526 FUNCTION: void
527 cairo_text_extents ( cairo_t* cr, c-string utf8, cairo_text_extents_t* extents )
528
529 FUNCTION: void
530 cairo_glyph_extents ( cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs, cairo_text_extents_t* extents )
531
532 FUNCTION: void
533 cairo_font_extents ( cairo_t* cr, cairo_font_extents_t* extents )
534
535 ! Generic identifier for a font style
536
537 FUNCTION: cairo_font_face_t*
538 cairo_font_face_reference ( cairo_font_face_t* font_face )
539
540 FUNCTION: void
541 cairo_font_face_destroy ( cairo_font_face_t* font_face )
542
543 FUNCTION: uint
544 cairo_font_face_get_reference_count ( cairo_font_face_t* font_face )
545
546 FUNCTION: cairo_status_t
547 cairo_font_face_status ( cairo_font_face_t* font_face )
548
549 ENUM: cairo_font_type_t
550     CAIRO_FONT_TYPE_TOY
551     CAIRO_FONT_TYPE_FT
552     CAIRO_FONT_TYPE_WIN32
553     CAIRO_FONT_TYPE_QUARTZ
554     CAIRO_FONT_TYPE_USER ;
555
556 FUNCTION: cairo_font_type_t
557 cairo_font_face_get_type ( cairo_font_face_t* font_face )
558
559 FUNCTION: void*
560 cairo_font_face_get_user_data ( cairo_font_face_t* font_face, cairo_user_data_key_t* key )
561
562 FUNCTION: cairo_status_t
563 cairo_font_face_set_user_data ( cairo_font_face_t* font_face, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy )
564
565 ! Portable interface to general font features.
566
567 FUNCTION: cairo_scaled_font_t*
568 cairo_scaled_font_create ( cairo_font_face_t* font_face, cairo_matrix_t* font_matrix, cairo_matrix_t* ctm, cairo_font_options_t* options )
569
570 FUNCTION: cairo_scaled_font_t*
571 cairo_scaled_font_reference ( cairo_scaled_font_t* scaled_font )
572
573 FUNCTION: void
574 cairo_scaled_font_destroy ( cairo_scaled_font_t* scaled_font )
575
576 FUNCTION: uint
577 cairo_scaled_font_get_reference_count ( cairo_scaled_font_t* scaled_font )
578
579 FUNCTION: cairo_status_t
580 cairo_scaled_font_status ( cairo_scaled_font_t* scaled_font )
581
582 FUNCTION: cairo_font_type_t
583 cairo_scaled_font_get_type ( cairo_scaled_font_t* scaled_font )
584
585 FUNCTION: void*
586 cairo_scaled_font_get_user_data ( cairo_scaled_font_t* scaled_font, cairo_user_data_key_t* key )
587
588 FUNCTION: cairo_status_t
589 cairo_scaled_font_set_user_data ( cairo_scaled_font_t* scaled_font, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy )
590
591 FUNCTION: void
592 cairo_scaled_font_extents ( cairo_scaled_font_t* scaled_font, cairo_font_extents_t* extents )
593
594 FUNCTION: void
595 cairo_scaled_font_text_extents ( cairo_scaled_font_t* scaled_font, c-string utf8, cairo_text_extents_t* extents )
596
597 FUNCTION: void
598 cairo_scaled_font_glyph_extents ( cairo_scaled_font_t* scaled_font, cairo_glyph_t* glyphs, int num_glyphs, cairo_text_extents_t* extents )
599
600 FUNCTION: cairo_status_t
601 cairo_scaled_font_text_to_glyphs ( cairo_scaled_font_t* scaled_font, double x, double y, c-string 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 )
602
603 FUNCTION: cairo_font_face_t*
604 cairo_scaled_font_get_font_face ( cairo_scaled_font_t* scaled_font )
605
606 FUNCTION: void
607 cairo_scaled_font_get_font_matrix ( cairo_scaled_font_t* scaled_font, cairo_matrix_t* font_matrix )
608
609 FUNCTION: void
610 cairo_scaled_font_get_ctm ( cairo_scaled_font_t* scaled_font, cairo_matrix_t* ctm )
611
612 FUNCTION: void
613 cairo_scaled_font_get_scale_matrix ( cairo_scaled_font_t* scaled_font, cairo_matrix_t* scale_matrix )
614
615 FUNCTION: void
616 cairo_scaled_font_get_font_options ( cairo_scaled_font_t* scaled_font, cairo_font_options_t* options )
617
618 ! Toy fonts
619
620 FUNCTION: cairo_font_face_t*
621 cairo_toy_font_face_create ( c-string family, cairo_font_slant_t slant, cairo_font_weight_t weight )
622
623 FUNCTION: c-string
624 cairo_toy_font_face_get_family ( cairo_font_face_t* font_face )
625
626 FUNCTION: cairo_font_slant_t
627 cairo_toy_font_face_get_slant ( cairo_font_face_t* font_face )
628
629 FUNCTION: cairo_font_weight_t
630 cairo_toy_font_face_get_weight ( cairo_font_face_t* font_face )
631
632 ! User fonts
633
634 FUNCTION: cairo_font_face_t*
635 cairo_user_font_face_create ( )
636
637 ! User-font method signatures
638
639 CALLBACK: cairo_status_t
640 cairo_user_scaled_font_init_func_t ( cairo_scaled_font_t* scaled_font, cairo_t* cr, cairo_font_extents_t* extents )
641
642 CALLBACK: cairo_status_t
643 cairo_user_scaled_font_render_glyph_func_t ( cairo_scaled_font_t* scaled_font, ulong glyph, cairo_t* cr, cairo_text_extents_t* extents )
644
645 CALLBACK: cairo_status_t
646 cairo_user_scaled_font_text_to_glyphs_func_t ( cairo_scaled_font_t* scaled_font, 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 )
647
648 CALLBACK: cairo_status_t
649 cairo_user_scaled_font_unicode_to_glyph_func_t ( cairo_scaled_font_t* scaled_font, ulong unicode, ulong* glyph_index )
650
651 ! User-font method setters
652
653 FUNCTION: void
654 cairo_user_font_face_set_init_func ( cairo_font_face_t* font_face, cairo_user_scaled_font_init_func_t init_func )
655
656 FUNCTION: void
657 cairo_user_font_face_set_render_glyph_func ( cairo_font_face_t* font_face, cairo_user_scaled_font_render_glyph_func_t render_glyph_func )
658
659 FUNCTION: void
660 cairo_user_font_face_set_text_to_glyphs_func ( cairo_font_face_t* font_face, cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func )
661
662 FUNCTION: void
663 cairo_user_font_face_set_unicode_to_glyph_func ( cairo_font_face_t* font_face, cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func )
664
665 ! User-font method getters
666
667 FUNCTION: cairo_user_scaled_font_init_func_t
668 cairo_user_font_face_get_init_func ( cairo_font_face_t* font_face )
669
670 FUNCTION: cairo_user_scaled_font_render_glyph_func_t
671 cairo_user_font_face_get_render_glyph_func ( cairo_font_face_t* font_face )
672
673 FUNCTION: cairo_user_scaled_font_text_to_glyphs_func_t
674 cairo_user_font_face_get_text_to_glyphs_func ( cairo_font_face_t* font_face )
675
676 FUNCTION: cairo_user_scaled_font_unicode_to_glyph_func_t
677 cairo_user_font_face_get_unicode_to_glyph_func ( cairo_font_face_t* font_face )
678
679 ! Query functions
680
681 FUNCTION: cairo_operator_t
682 cairo_get_operator ( cairo_t* cr )
683
684 FUNCTION: cairo_pattern_t*
685 cairo_get_source ( cairo_t* cr )
686
687 FUNCTION: double
688 cairo_get_tolerance ( cairo_t* cr )
689
690 FUNCTION: cairo_antialias_t
691 cairo_get_antialias ( cairo_t* cr )
692
693 FUNCTION: cairo_bool_t
694 cairo_has_current_point ( cairo_t* cr )
695
696 FUNCTION: void
697 cairo_get_current_point ( cairo_t* cr, double* x, double* y )
698
699 FUNCTION: cairo_fill_rule_t
700 cairo_get_fill_rule ( cairo_t* cr )
701
702 FUNCTION: double
703 cairo_get_line_width ( cairo_t* cr )
704
705 FUNCTION: cairo_line_cap_t
706 cairo_get_line_cap ( cairo_t* cr )
707
708 FUNCTION: cairo_line_join_t
709 cairo_get_line_join ( cairo_t* cr )
710
711 FUNCTION: double
712 cairo_get_miter_limit ( cairo_t* cr )
713
714 FUNCTION: int
715 cairo_get_dash_count ( cairo_t* cr )
716
717 FUNCTION: void
718 cairo_get_dash ( cairo_t* cr, double* dashes, double* offset )
719
720 FUNCTION: void
721 cairo_get_matrix ( cairo_t* cr, cairo_matrix_t* matrix )
722
723 FUNCTION: cairo_surface_t*
724 cairo_get_target ( cairo_t* cr )
725
726 FUNCTION: cairo_surface_t*
727 cairo_get_group_target ( cairo_t* cr )
728
729 ENUM: cairo_path_data_type_t
730     CAIRO_PATH_MOVE_TO
731     CAIRO_PATH_LINE_TO
732     CAIRO_PATH_CURVE_TO
733     CAIRO_PATH_CLOSE_PATH ;
734
735 ! NEED TO DO UNION HERE
736 STRUCT: cairo_path_data_t-point
737     { x double }
738     { y double } ;
739
740 STRUCT: cairo_path_data_t-header
741     { type cairo_path_data_type_t }
742     { length int } ;
743
744 UNION-STRUCT: cairo_path_data_t
745     { point  cairo_path_data_t-point }
746     { header cairo_path_data_t-header } ;
747
748 STRUCT: cairo_path_t
749     { status   cairo_status_t     }
750     { data     cairo_path_data_t* }
751     { num_data int                } ;
752
753 FUNCTION: cairo_path_t*
754 cairo_copy_path ( cairo_t* cr )
755
756 FUNCTION: cairo_path_t*
757 cairo_copy_path_flat ( cairo_t* cr )
758
759 FUNCTION: void
760 cairo_append_path ( cairo_t* cr, cairo_path_t* path )
761
762 FUNCTION: void
763 cairo_path_destroy ( cairo_path_t* path )
764
765 ! Error status queries
766
767 FUNCTION: cairo_status_t
768 cairo_status ( cairo_t* cr )
769
770 FUNCTION: c-string
771 cairo_status_to_string ( cairo_status_t status )
772
773 ! Surface manipulation
774
775 FUNCTION: cairo_surface_t*
776 cairo_surface_create_similar ( cairo_surface_t* other, cairo_content_t content, int width, int height )
777
778 FUNCTION: cairo_surface_t*
779 cairo_surface_reference ( cairo_surface_t* surface )
780
781 FUNCTION: void
782 cairo_surface_finish ( cairo_surface_t* surface )
783
784 FUNCTION: void
785 cairo_surface_destroy ( cairo_surface_t* surface )
786
787 DESTRUCTOR: cairo_surface_destroy
788
789 FUNCTION: uint
790 cairo_surface_get_reference_count ( cairo_surface_t* surface )
791
792 FUNCTION: cairo_status_t
793 cairo_surface_status ( cairo_surface_t* surface )
794
795 ENUM: cairo_surface_type_t
796     CAIRO_SURFACE_TYPE_IMAGE
797     CAIRO_SURFACE_TYPE_PDF
798     CAIRO_SURFACE_TYPE_PS
799     CAIRO_SURFACE_TYPE_XLIB
800     CAIRO_SURFACE_TYPE_XCB
801     CAIRO_SURFACE_TYPE_GLITZ
802     CAIRO_SURFACE_TYPE_QUARTZ
803     CAIRO_SURFACE_TYPE_WIN32
804     CAIRO_SURFACE_TYPE_BEOS
805     CAIRO_SURFACE_TYPE_DIRECTFB
806     CAIRO_SURFACE_TYPE_SVG
807     CAIRO_SURFACE_TYPE_OS2
808     CAIRO_SURFACE_TYPE_WIN32_PRINTING
809     CAIRO_SURFACE_TYPE_QUARTZ_IMAGE ;
810
811 FUNCTION: cairo_surface_type_t
812 cairo_surface_get_type ( cairo_surface_t* surface )
813
814 FUNCTION: cairo_content_t
815 cairo_surface_get_content ( cairo_surface_t* surface )
816
817 FUNCTION: cairo_status_t
818 cairo_surface_write_to_png ( cairo_surface_t* surface, c-string filename )
819
820 FUNCTION: cairo_status_t
821 cairo_surface_write_to_png_stream ( cairo_surface_t* surface, cairo_write_func_t write_func, void* closure )
822
823 FUNCTION: void*
824 cairo_surface_get_user_data ( cairo_surface_t* surface, cairo_user_data_key_t* key )
825
826 FUNCTION: cairo_status_t
827 cairo_surface_set_user_data ( cairo_surface_t* surface, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy )
828
829 FUNCTION: void
830 cairo_surface_get_font_options ( cairo_surface_t* surface, cairo_font_options_t* options )
831
832 FUNCTION: void
833 cairo_surface_flush ( cairo_surface_t* surface )
834
835 FUNCTION: void
836 cairo_surface_mark_dirty ( cairo_surface_t* surface )
837
838 FUNCTION: void
839 cairo_surface_mark_dirty_rectangle ( cairo_surface_t* surface, int x, int y, int width, int height )
840
841 FUNCTION: void
842 cairo_surface_set_device_offset ( cairo_surface_t* surface, double x_offset, double y_offset )
843
844 FUNCTION: void
845 cairo_surface_get_device_offset ( cairo_surface_t* surface, double* x_offset, double* y_offset )
846
847 FUNCTION: void
848 cairo_surface_set_fallback_resolution ( cairo_surface_t* surface, double x_pixels_per_inch, double y_pixels_per_inch )
849
850 FUNCTION: void
851 cairo_surface_get_fallback_resolution ( cairo_surface_t* surface, double* x_pixels_per_inch, double* y_pixels_per_inch )
852
853 FUNCTION: void
854 cairo_surface_copy_page ( cairo_surface_t* surface )
855
856 FUNCTION: void
857 cairo_surface_show_page ( cairo_surface_t* surface )
858
859 FUNCTION: cairo_bool_t
860 cairo_surface_has_show_text_glyphs ( cairo_surface_t* surface )
861
862 ! Image-surface functions
863
864 ENUM: cairo_format_t
865     CAIRO_FORMAT_ARGB32
866     CAIRO_FORMAT_RGB24
867     CAIRO_FORMAT_A8
868     CAIRO_FORMAT_A1 ;
869
870 FUNCTION: cairo_surface_t*
871 cairo_image_surface_create ( cairo_format_t format, int width, int height )
872
873 FUNCTION: int
874 cairo_format_stride_for_width ( cairo_format_t format, int width )
875
876 FUNCTION: cairo_surface_t*
877 cairo_image_surface_create_for_data ( char* data, cairo_format_t format, int width, int height, int stride )
878
879 FUNCTION: uchar*
880 cairo_image_surface_get_data ( cairo_surface_t* surface )
881
882 FUNCTION: cairo_format_t
883 cairo_image_surface_get_format ( cairo_surface_t* surface )
884
885 FUNCTION: int
886 cairo_image_surface_get_width ( cairo_surface_t* surface )
887
888 FUNCTION: int
889 cairo_image_surface_get_height ( cairo_surface_t* surface )
890
891 FUNCTION: int
892 cairo_image_surface_get_stride ( cairo_surface_t* surface )
893
894 FUNCTION: cairo_surface_t*
895 cairo_image_surface_create_from_png ( c-string filename )
896
897 FUNCTION: cairo_surface_t*
898 cairo_image_surface_create_from_png_stream ( cairo_read_func_t read_func, void* closure )
899
900 ! Pattern creation functions
901
902 FUNCTION: cairo_pattern_t*
903 cairo_pattern_create_rgb ( double red, double green, double blue )
904
905 FUNCTION: cairo_pattern_t*
906 cairo_pattern_create_rgba ( double red, double green, double blue, double alpha )
907
908 FUNCTION: cairo_pattern_t*
909 cairo_pattern_create_for_surface ( cairo_surface_t* surface )
910
911 FUNCTION: cairo_pattern_t*
912 cairo_pattern_create_linear ( double x0, double y0, double x1, double y1 )
913
914 FUNCTION: cairo_pattern_t*
915 cairo_pattern_create_radial ( double cx0, double cy0, double radius0, double cx1, double cy1, double radius1 )
916
917 FUNCTION: cairo_pattern_t*
918 cairo_pattern_reference ( cairo_pattern_t* pattern )
919
920 FUNCTION: void
921 cairo_pattern_destroy ( cairo_pattern_t* pattern )
922
923 FUNCTION: uint
924 cairo_pattern_get_reference_count ( cairo_pattern_t* pattern )
925
926 FUNCTION: cairo_status_t
927 cairo_pattern_status ( cairo_pattern_t* pattern )
928
929 FUNCTION: void*
930 cairo_pattern_get_user_data ( cairo_pattern_t* pattern, cairo_user_data_key_t* key )
931
932 FUNCTION: cairo_status_t
933 cairo_pattern_set_user_data ( cairo_pattern_t* pattern, cairo_user_data_key_t* key, void* user_data, cairo_destroy_func_t destroy )
934
935 ENUM: cairo_pattern_type_t
936     CAIRO_PATTERN_TYPE_SOLID
937     CAIRO_PATTERN_TYPE_SURFACE
938     CAIRO_PATTERN_TYPE_LINEAR
939     CAIRO_PATTERN_TYPE_RADIAL ;
940
941 FUNCTION: cairo_pattern_type_t
942 cairo_pattern_get_type ( cairo_pattern_t* pattern )
943
944 FUNCTION: void
945 cairo_pattern_add_color_stop_rgb ( cairo_pattern_t* pattern, double offset, double red, double green, double blue )
946
947 FUNCTION: void
948 cairo_pattern_add_color_stop_rgba ( cairo_pattern_t* pattern, double offset, double red, double green, double blue, double alpha )
949
950 FUNCTION: void
951 cairo_pattern_set_matrix ( cairo_pattern_t* pattern, cairo_matrix_t* matrix )
952
953 FUNCTION: void
954 cairo_pattern_get_matrix ( cairo_pattern_t* pattern, cairo_matrix_t* matrix )
955
956 ENUM: cairo_extend_t
957     CAIRO_EXTEND_NONE
958     CAIRO_EXTEND_REPEAT
959     CAIRO_EXTEND_REFLECT
960     CAIRO_EXTEND_PAD ;
961
962 FUNCTION: void
963 cairo_pattern_set_extend ( cairo_pattern_t* pattern, cairo_extend_t extend )
964
965 FUNCTION: cairo_extend_t
966 cairo_pattern_get_extend ( cairo_pattern_t* pattern )
967
968 ENUM: cairo_filter_t
969     CAIRO_FILTER_FAST
970     CAIRO_FILTER_GOOD
971     CAIRO_FILTER_BEST
972     CAIRO_FILTER_NEAREST
973     CAIRO_FILTER_BILINEAR
974     CAIRO_FILTER_GAUSSIAN ;
975
976 FUNCTION: void
977 cairo_pattern_set_filter ( cairo_pattern_t* pattern, cairo_filter_t filter )
978
979 FUNCTION: cairo_filter_t
980 cairo_pattern_get_filter ( cairo_pattern_t* pattern )
981
982 FUNCTION: cairo_status_t
983 cairo_pattern_get_rgba ( cairo_pattern_t* pattern, double* red, double* green, double* blue, double* alpha )
984
985 FUNCTION: cairo_status_t
986 cairo_pattern_get_surface ( cairo_pattern_t* pattern, cairo_surface_t** surface )
987
988 FUNCTION: cairo_status_t
989 cairo_pattern_get_color_stop_rgba ( cairo_pattern_t* pattern, int index, double* offset, double* red, double* green, double* blue, double* alpha )
990
991 FUNCTION: cairo_status_t
992 cairo_pattern_get_color_stop_count ( cairo_pattern_t* pattern, int* count )
993
994 FUNCTION: cairo_status_t
995 cairo_pattern_get_linear_points ( cairo_pattern_t* pattern, double* x0, double* y0, double* x1, double* y1 )
996
997 FUNCTION: cairo_status_t
998 cairo_pattern_get_radial_circles ( cairo_pattern_t* pattern, double* x0, double* y0, double* r0, double* x1, double* y1, double* r1 )
999
1000 ! Matrix functions
1001
1002 FUNCTION: void
1003 cairo_matrix_init ( cairo_matrix_t* matrix, double xx, double yx, double xy, double yy, double x0, double y0 )
1004
1005 FUNCTION: void
1006 cairo_matrix_init_identity ( cairo_matrix_t* matrix )
1007
1008 FUNCTION: void
1009 cairo_matrix_init_translate ( cairo_matrix_t* matrix, double tx, double ty )
1010
1011 FUNCTION: void
1012 cairo_matrix_init_scale ( cairo_matrix_t* matrix, double sx, double sy )
1013
1014 FUNCTION: void
1015 cairo_matrix_init_rotate ( cairo_matrix_t* matrix, double radians )
1016
1017 FUNCTION: void
1018 cairo_matrix_translate ( cairo_matrix_t* matrix, double tx, double ty )
1019
1020 FUNCTION: void
1021 cairo_matrix_scale ( cairo_matrix_t* matrix, double sx, double sy )
1022
1023 FUNCTION: void
1024 cairo_matrix_rotate ( cairo_matrix_t* matrix, double radians )
1025
1026 FUNCTION: cairo_status_t
1027 cairo_matrix_invert ( cairo_matrix_t* matrix )
1028
1029 FUNCTION: void
1030 cairo_matrix_multiply ( cairo_matrix_t* result, cairo_matrix_t* a, cairo_matrix_t* b )
1031
1032 FUNCTION: void
1033 cairo_matrix_transform_distance ( cairo_matrix_t* matrix, double* dx, double* dy )
1034
1035 FUNCTION: void
1036 cairo_matrix_transform_point ( cairo_matrix_t* matrix, double* x, double* y )
1037
1038 ! Functions to be used while debugging (not intended for use in production code)
1039 FUNCTION: void
1040 cairo_debug_reset_static_data ( )