root / trunk / pysoy / include / cairo.pxd

Revision 1191, 40.3 kB (checked in by ArcRiley, 7 months ago)

AGPLv3 Upgrade (cont)

The switch script missed one of the lines

  • Property svn:keywords set to Id
Line 
1# Cairo Declarations
2#
3# Copyright (C) 2006,2007,2008 PySoy Group
4#
5#  This program is free software; you can redistribute it and/or modify
6#  it under the terms of the GNU Affero General Public License as published
7#  by the Free Software Foundation, either version 3 of the License, or
8#  (at your option) any later version.
9#
10#  This program 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 Affero General Public License for more details.
14#
15#  You should have received a copy of the GNU Affero General Public License
16#  along with this program; if not, see http://www.gnu.org/licenses
17#
18# $Id$
19
20cdef extern from "cairo/cairo.h" :
21  cdef     int            cairo_version            ( )
22  cdef     char*          cairo_version_string     ( )
23  ctypedef int            cairo_bool_t
24  ctypedef struct         cairo_t :
25    void* none
26  ctypedef struct         cairo_surface_t :
27    void* none
28  ctypedef struct         cairo_matrix_t :
29    double xx
30    double yx
31    double xy
32    double yy
33    double x0
34    double y0
35  ctypedef struct         cairo_pattern_t :
36    void* none
37  ctypedef void           (*cairo_destroy_func_t)  ( void* )
38  ctypedef struct         cairo_user_data_key_t :
39    int unused
40  ctypedef enum           cairo_status_t :
41    CAIRO_STATUS_SUCCESS
42    CAIRO_STATUS_NO_MEMORY
43    CAIRO_STATUS_INVALID_RESTORE
44    CAIRO_STATUS_INVALID_POP_GROUP
45    CAIRO_STATUS_NO_CURRENT_POINT
46    CAIRO_STATUS_INVALID_MATRIX
47    CAIRO_STATUS_INVALID_STATUS
48    CAIRO_STATUS_NULL_POINTER
49    CAIRO_STATUS_INVALID_STRING
50    CAIRO_STATUS_INVALID_PATH_DATA
51    CAIRO_STATUS_READ_ERROR
52    CAIRO_STATUS_WRITE_ERROR
53    CAIRO_STATUS_SURFACE_FINISHED
54    CAIRO_STATUS_SURFACE_TYPE_MISMATCH
55    CAIRO_STATUS_PATTERN_TYPE_MISMATCH
56    CAIRO_STATUS_INVALID_CONTENT
57    CAIRO_STATUS_INVALID_FORMAT
58    CAIRO_STATUS_INVALID_VISUAL
59    CAIRO_STATUS_FILE_NOT_FOUND
60    CAIRO_STATUS_INVALID_DASH
61    CAIRO_STATUS_INVALID_DSC_COMMENT
62    CAIRO_STATUS_INVALID_INDEX
63    CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
64  ctypedef enum           cairo_content_t :
65    CAIRO_CONTENT_COLOR
66    CAIRO_CONTENT_ALPHA
67    CAIRO_CONTENT_COLOR_ALPHA
68  ctypedef cairo_status_t (*cairo_write_func_t)    ( void*, unsigned char*,
69                                                     unsigned int )
70  ctypedef cairo_status_t (*cairo_read_func_t)     ( void*, unsigned char*,
71                                                     unsigned int )
72  cdef     cairo_t*       cairo_create             ( cairo_surface_t* )
73  cdef     cairo_t*       cairo_reference          ( cairo_t* )
74  cdef     void           cairo_destroy            ( cairo_t* )
75  cdef     unsigned int   cairo_get_reference_count( cairo_t* )
76  cdef     void*          cairo_get_user_data      ( cairo_t*,
77                                                     cairo_user_data_key_t* )
78  cdef     cairo_status_t cairo_set_user_data      ( cairo_t*,
79                                                     cairo_user_data_key_t*,
80                                                     void*,
81                                                     cairo_destroy_func_t )
82  cdef     void           cairo_save               ( cairo_t* )
83  cdef     void           cairo_restore            ( cairo_t* )
84  cdef     void           cairo_push_group         ( cairo_t* )
85  cdef     void           cairo_push_group_with_content  \
86                                                   ( cairo_t*,
87                                                     cairo_content_t )
88  cdef   cairo_pattern_t* cairo_pop_group          ( cairo_t* )
89  cdef     void           cairo_pop_group_to_source( cairo_t* )
90  ctypedef enum           cairo_operator_t :
91    CAIRO_OPERATOR_CLEAR
92    CAIRO_OPERATOR_SOURCE
93    CAIRO_OPERATOR_OVER
94    CAIRO_OPERATOR_IN
95    CAIRO_OPERATOR_OUT
96    CAIRO_OPERATOR_ATOP
97    CAIRO_OPERATOR_DEST
98    CAIRO_OPERATOR_DEST_OVER
99    CAIRO_OPERATOR_DEST_IN
100    CAIRO_OPERATOR_DEST_OUT
101    CAIRO_OPERATOR_DEST_ATOP
102    CAIRO_OPERATOR_XOR
103    CAIRO_OPERATOR_ADD
104    CAIRO_OPERATOR_SATURATE
105  cdef     void           cairo_set_operator        ( cairo_t*,
106                                                      cairo_operator_t )
107  cdef     void           cairo_set_source          ( cairo_t*,
108                                                      cairo_pattern_t* )
109  cdef void               cairo_set_source_rgb      ( cairo_t*,
110                                                      double, double, double )
111
112  cdef void               cairo_set_source_rgba     ( cairo_t*,
113                                                                double, double, double,
114                                                              double )
115
116  cdef void               cairo_set_source_surface  ( cairo_t*,
117                                                      cairo_surface_t *,
118                                                                  double           x,
119                                                                  double           y )
120
121  cdef void               cairo_set_tolerance       ( cairo_t*,
122                                                      double )
123
124  #//cairo_antialias   
125  ctypedef enum   cairo_antialias_t :
126    CAIRO_ANTIALIAS_DEFAULT,
127    CAIRO_ANTIALIAS_NONE,
128    CAIRO_ANTIALIAS_GRAY,
129    CAIRO_ANTIALIAS_SUBPIXEL
130
131  cdef void                 cairo_set_antialias           ( cairo_t *,
132               
133                                                            cairo_antialias_t )
134
135  #//cairo_fill_rule
136  ctypedef enum   cairo_fill_rule_t :
137    CAIRO_FILL_RULE_WINDING,
138    CAIRO_FILL_RULE_EVEN_ODD
139
140  cdef void                 cairo_set_fill_rule           ( cairo_t*,
141                                                            cairo_fill_rule_t )
142  cdef void                 cairo_set_line_width          ( cairo_t*,
143                                                            double )
144
145  #//cairo_line_cap
146  ctypedef enum   cairo_line_cap_t :
147    CAIRO_LINE_CAP_BUTT,
148    CAIRO_LINE_CAP_ROUND,
149    CAIRO_LINE_CAP_SQUARE
150
151  cdef void                 cairo_set_line_cap            ( cairo_t*,
152                                                            cairo_line_cap_t )
153
154  #//cairo_line_join
155  ctypedef enum   cairo_line_join_t :
156    CAIRO_LINE_JOIN_MITER,
157    CAIRO_LINE_JOIN_ROUND,
158    CAIRO_LINE_JOIN_BEVEL
159
160  cdef void                 cairo_set_line_join           ( cairo_t*,
161                                                            cairo_line_join_t )
162  cdef void                 cairo_set_dash                ( cairo_t*,
163                                                                        double*,
164                                                                        int,
165                                                                        double )
166  cdef void                 cairo_set_miter_limit         ( cairo_t*, double )
167  cdef void                 cairo_translate               ( cairo_t*,
168                                                            double, double )
169  cdef void                 cairo_scale                   ( cairo_t*,
170                                                            double, double )
171  cdef void                 cairo_rotate                  ( cairo_t*, double )
172  cdef void                 cairo_transform               ( cairo_t*,
173                                                            cairo_matrix_t* )
174  cdef void                 cairo_set_matrix              ( cairo_t*,
175                                                                    cairo_matrix_t* )
176  cdef void                 cairo_identity_matrix         ( cairo_t* )
177  cdef void                 cairo_user_to_device          ( cairo_t*,
178                                                            double*, double* )
179  cdef void                 cairo_user_to_device_distance ( cairo_t*,
180                                                            double*, double* )
181  cdef void                 cairo_device_to_user          ( cairo_t*,
182                                                            double *, double * )
183
184  cdef void                 cairo_device_to_user_distance ( cairo_t*,
185                                                            double*, double* )
186  #// Path creation functions
187  cdef void                 cairo_new_path                ( cairo_t* )
188  cdef void                 cairo_move_to                 ( cairo_t*,
189                                                            double, double )
190  cdef void                 cairo_new_sub_path            ( cairo_t* )
191  cdef void                 cairo_line_to                 ( cairo_t*,
192                                                            double, double )
193  cdef void                 cairo_curve_to                ( cairo_t*,
194                                                            double, double,
195                                                                        double, double,
196                                                                        double, double )
197  cdef void                 cairo_arc                     ( cairo_t*,
198                                                                  double, double,
199                                                            double,
200                                                            double, double )
201  cdef void                 cairo_arc_negative            ( cairo_t*,
202                                                                    double, double,
203                                                                    double,
204                                                                    double, double )
205#/* XXX: NYI
206#  cdef void
207#cairo_arc_to (cairo_t *cr,
208#             double x1, double y1,
209#             double x2, double y2,
210#             double radius);
211#*/
212  cdef void                 cairo_rel_move_to             ( cairo_t*,
213                                                            double, double )
214  cdef void                 cairo_rel_line_to             ( cairo_t*,
215                                                            double, double )
216  cdef void                 cairo_rel_curve_to            ( cairo_t*,
217                                                                    double, double,
218                                                                    double, double,
219                                                                    double, double )
220  cdef void                 cairo_rectangle               ( cairo_t*,
221                                                            double, double,
222                                                            double, double )
223#/* XXX: NYI
224#  cdef void
225#cairo_stroke_to_path (cairo_t *cr);
226#*/
227  cdef void                 cairo_close_path              ( cairo_t* )
228
229  #// Painting functions
230  cdef void                 cairo_paint                   ( cairo_t* )
231  cdef void                 cairo_paint_with_alpha        ( cairo_t*,
232                                                            double )
233  cdef void                 cairo_mask                    ( cairo_t*,
234                                                            cairo_pattern_t* )
235  cdef void                 cairo_mask_surface            ( cairo_t* ,
236                                                            cairo_surface_t*,
237                                                                    double, double )
238  cdef void                 cairo_stroke                  ( cairo_t* )
239  cdef void                 cairo_stroke_preserve         ( cairo_t* )
240  cdef void                 cairo_fill                    ( cairo_t* )
241  cdef void                 cairo_fill_preserve           ( cairo_t* )
242  cdef void                 cairo_copy_page               ( cairo_t* )
243  cdef void                 cairo_show_page               ( cairo_t* )
244
245  #// Insideness testing
246  cdef cairo_bool_t         cairo_in_stroke               ( cairo_t*,
247                                                            double, double )
248  cdef cairo_bool_t         cairo_in_fill                 ( cairo_t*,
249                                                            double, double )
250
251  #// Rectangular extents
252  cdef void                 cairo_stroke_extents          ( cairo_t*,
253                                                                      double*, double*,
254                                                            double*, double* )
255  cdef void                 cairo_fill_extents            ( cairo_t*,
256                                                                    double*, double*,
257                                                            double*, double*)
258
259  #// Clipping
260  cdef void                 cairo_reset_clip              ( cairo_t* )
261  cdef void                 cairo_clip                    ( cairo_t* )
262  cdef void                 cairo_clip_preserve           ( cairo_t* )
263  cdef void                 cairo_clip_extents            ( cairo_t*,
264                                                                    double*, double*,
265                                                                    double*, double* )                                                           
266                                                                   
267  #// STRUCT CAIRO_RECTANGLE_T
268  ctypedef struct cairo_rectangle_t :
269    double x
270    double y
271    double width
272    double height
273
274
275  #// STRUCT CAIRO_RECTANGLE_LIST
276  ctypedef struct cairo_rectangle_list_t :
277    cairo_status_t     status
278    cairo_rectangle_t *rectangles
279    int                num_rectangles
280
281  cdef cairo_rectangle_list_t*    cairo_copy_clip_rectangle_list( cairo_t* )
282  cdef void                       cairo_rectangle_list_destroy \
283                                          ( cairo_rectangle_list_t* )
284
285 
286  ctypedef struct cairo_scaled_font_t :
287    void* none
288
289  ctypedef struct cairo_font_face_t :
290    void* none
291
292  ctypedef struct cairo_glyph_t :
293    unsigned long        index
294    double               x
295    double               y
296
297  ctypedef struct cairo_text_extents_t :
298    double x_bearing
299    double y_bearing
300    double width
301    double height
302    double x_advance
303    double y_advance
304
305  ctypedef struct cairo_font_extents_t :
306    double ascent
307    double descent
308    double height
309    double max_x_advance
310    double max_y_advance
311
312  ctypedef enum   cairo_font_slant_t :
313    CAIRO_FONT_SLANT_NORMAL,
314    CAIRO_FONT_SLANT_ITALIC,
315    CAIRO_FONT_SLANT_OBLIQUE
316
317  ctypedef enum   cairo_font_weight_t :
318    CAIRO_FONT_WEIGHT_NORMAL,
319    CAIRO_FONT_WEIGHT_BOLD
320
321  ctypedef enum   cairo_subpixel_order_t :
322    CAIRO_SUBPIXEL_ORDER_DEFAULT,
323    CAIRO_SUBPIXEL_ORDER_RGB,
324    CAIRO_SUBPIXEL_ORDER_BGR,
325    CAIRO_SUBPIXEL_ORDER_VRGB,
326    CAIRO_SUBPIXEL_ORDER_VBGR
327
328  ctypedef enum   cairo_hint_style_t :
329    CAIRO_HINT_STYLE_DEFAULT,
330    CAIRO_HINT_STYLE_NONE,
331    CAIRO_HINT_STYLE_SLIGHT,
332    CAIRO_HINT_STYLE_MEDIUM,
333    CAIRO_HINT_STYLE_FULL
334
335  ctypedef enum   cairo_hint_metrics_t :
336    CAIRO_HINT_METRICS_DEFAULT,
337    CAIRO_HINT_METRICS_OFF,
338    CAIRO_HINT_METRICS_ON
339
340
341  ctypedef struct cairo_font_options_t :
342    void* none
343
344  cdef cairo_font_options_t   *cairo_font_options_create  () #removed (void)
345  cdef cairo_font_options_t   *cairo_font_options_copy    \
346                                              ( cairo_font_options_t* )
347  cdef void                   cairo_font_options_destroy  \
348                                              ( cairo_font_options_t* )
349  cdef cairo_status_t         cairo_font_options_status   \
350                                              ( cairo_font_options_t* )
351  cdef void                   cairo_font_options_merge    \
352                                              ( cairo_font_options_t*,
353                                                cairo_font_options_t* )
354  cdef cairo_bool_t           cairo_font_options_equal    \
355                                              ( cairo_font_options_t*,
356                                                cairo_font_options_t* )
357  cdef unsigned long          cairo_font_options_hash     \
358                                              ( cairo_font_options_t* )
359  cdef void                   cairo_font_options_set_antialias  \
360                                              ( cairo_font_options_t*,
361                                                cairo_antialias_t )
362  cdef cairo_antialias_t      cairo_font_options_get_antialias  \
363                                              ( cairo_font_options_t* )
364  cdef void                   cairo_font_options_set_subpixel_order \
365                                              ( cairo_font_options_t*,
366                                                cairo_subpixel_order_t )
367  cdef cairo_subpixel_order_t cairo_font_options_get_subpixel_order \
368                                              ( cairo_font_options_t* )
369  cdef void                   cairo_font_options_set_hint_style \
370                                              ( cairo_font_options_t*,
371                                                cairo_hint_style_t )
372  cdef cairo_hint_style_t     cairo_font_options_get_hint_style \
373                                              ( cairo_font_options_t* )
374  cdef void                   cairo_font_options_set_hint_metrics \
375                                              ( cairo_font_options_t*,
376                                                cairo_hint_metrics_t )
377  cdef cairo_hint_metrics_t   cairo_font_options_get_hint_metrics \
378                                              ( cairo_font_options_t* )
379
380  #// This interface is for dealing with text as text, not caring about the
381  #// font object inside the the cairo_t. */
382
383  cdef void                   cairo_select_font_face      ( cairo_t*,
384                                                            char*,
385                                                                        cairo_font_slant_t,
386                                                                        cairo_font_weight_t)
387  cdef void                   cairo_set_font_size         ( cairo_t*,
388                                                            double )
389  cdef void                   cairo_set_font_matrix       ( cairo_t*,
390                                                            cairo_matrix_t* )
391  cdef void                   cairo_get_font_matrix       ( cairo_t*,
392                                                            cairo_matrix_t* )
393  cdef void                   cairo_set_font_options      \
394                                              ( cairo_t*,
395                                                cairo_font_options_t* )
396  cdef void                   cairo_get_font_options      \
397                                              ( cairo_t*,
398                                                cairo_font_options_t*)
399  cdef void                   cairo_set_font_face         ( cairo_t*,
400                                                            cairo_font_face_t* )
401  cdef cairo_font_face_t      *cairo_get_font_face        ( cairo_t* )
402  cdef void                   cairo_set_scaled_font       \
403                                              ( cairo_t*,
404                                                cairo_scaled_font_t* )
405  cdef cairo_scaled_font_t    *cairo_get_scaled_font      ( cairo_t* )
406  cdef void                   cairo_show_text             ( cairo_t*, char* )
407  cdef void                   cairo_show_glyphs           ( cairo_t*,
408                                                            cairo_glyph_t*,
409                                                            int )
410  cdef void                   cairo_text_path             ( cairo_t*,
411                                                            char* )
412  cdef void                   cairo_glyph_path            ( cairo_t*,
413                                                            cairo_glyph_t*,
414                                                            int )
415  cdef void                   cairo_text_extents          \
416                                              ( cairo_t*,
417                                                char*,
418                                                cairo_text_extents_t* )
419  cdef void                   cairo_glyph_extents(        \
420                                                cairo_t*,
421                                                cairo_glyph_t*,
422                                                int,
423                                                cairo_text_extents_t* )
424
425  cdef void               cairo_font_extents( cairo_t*, cairo_font_extents_t* )
426
427
428  #// Generic identifier for a font style
429  cdef cairo_font_face_t      *cairo_font_face_reference  \
430                                              ( cairo_font_face_t* )
431  cdef void                   cairo_font_face_destroy     \
432                                              ( cairo_font_face_t* )
433  cdef unsigned int           cairo_font_face_get_reference_count \
434                                              ( cairo_font_face_t* )
435  cdef cairo_status_t         cairo_font_face_status      \
436                                              ( cairo_font_face_t* )
437                                             
438  ctypedef enum   cairo_font_type_t :
439    CAIRO_FONT_TYPE_TOY,
440    CAIRO_FONT_TYPE_FT,
441    CAIRO_FONT_TYPE_WIN32,
442    CAIRO_FONT_TYPE_ATSUI
443
444  cdef cairo_font_type_t      cairo_font_face_get_type    \
445                                              ( cairo_font_face_t* )
446  cdef void                   *cairo_font_face_get_user_data  \
447                                              ( cairo_font_face_t*,
448                                                cairo_user_data_key_t* )
449  cdef cairo_status_t         cairo_font_face_set_user_data   \
450                                              ( cairo_font_face_t*,
451                                                cairo_user_data_key_t*,
452                                                void*,
453                                                cairo_destroy_func_t )
454
455  #// Portable interface to general font features.
456  cdef cairo_scaled_font_t    *cairo_scaled_font_create   \
457                                              ( cairo_font_face_t*,
458                                                cairo_matrix_t*,
459                                                cairo_matrix_t*,
460                                                cairo_font_options_t* )
461  cdef cairo_scaled_font_t    *cairo_scaled_font_reference\
462                                              ( cairo_scaled_font_t* )
463  cdef void                   cairo_scaled_font_destroy   \
464                                              ( cairo_scaled_font_t* )
465  cdef unsigned int           cairo_scaled_font_get_reference_count \
466                                              ( cairo_scaled_font_t* )
467  cdef cairo_status_t         cairo_scaled_font_status    \
468                                              ( cairo_scaled_font_t* )
469  cdef cairo_font_type_t      cairo_scaled_font_get_type  \
470                                              ( cairo_scaled_font_t* )
471  cdef void                   *cairo_scaled_font_get_user_data \
472                                              ( cairo_scaled_font_t*,
473                                                cairo_user_data_key_t* )
474  cdef cairo_status_t         cairo_scaled_font_set_user_data \
475                                              ( cairo_scaled_font_t*,
476                                                cairo_user_data_key_t*,
477                                                                        void*,
478                                                cairo_destroy_func_t )
479  cdef void                   cairo_scaled_font_extents       \
480                                              ( cairo_scaled_font_t*,
481                                                cairo_font_extents_t* )
482  cdef void                   cairo_scaled_font_text_extents  \
483                                              ( cairo_scaled_font_t*,
484                                                char*,
485                                                cairo_text_extents_t* )
486  cdef void                   cairo_scaled_font_glyph_extents \
487                                              ( cairo_scaled_font_t*,
488                                                cairo_glyph_t*,
489                                                      int,
490                                                      cairo_text_extents_t* )
491  cdef cairo_font_face_t      *cairo_scaled_font_get_font_face \
492                                              ( cairo_scaled_font_t* )
493  cdef void                   cairo_scaled_font_get_font_matrix \
494                                              ( cairo_scaled_font_t*,
495                                                cairo_matrix_t* )
496  cdef void                   cairo_scaled_font_get_ctm   \
497                                              ( cairo_scaled_font_t*,
498                                                cairo_matrix_t* )
499  cdef void                   cairo_scaled_font_get_font_options  \
500                                              ( cairo_scaled_font_t*,
501                                                cairo_font_options_t* )
502
503  #// Query functions
504  cdef cairo_operator_t       cairo_get_operator          ( cairo_t* )
505  cdef cairo_pattern_t        *cairo_get_source           ( cairo_t* )
506  cdef double                 cairo_get_tolerance         ( cairo_t* )
507  cdef cairo_antialias_t      cairo_get_antialias         ( cairo_t* )
508  cdef void                   cairo_get_current_point     ( cairo_t*,
509                                                            double*, double* )
510  cdef cairo_fill_rule_t      cairo_get_fill_rule         ( cairo_t* )
511  cdef double                 cairo_get_line_width        ( cairo_t* )
512  cdef cairo_line_cap_t       cairo_get_line_cap          ( cairo_t* )
513  cdef cairo_line_join_t      cairo_get_line_join         ( cairo_t* )
514  cdef double                 cairo_get_miter_limit       ( cairo_t* )
515  cdef int                    cairo_get_dash_count        ( cairo_t* )
516  cdef void                   cairo_get_dash              ( cairo_t*,
517                                                            double*, double * )
518  cdef void                   cairo_get_matrix            ( cairo_t*,
519                                                            cairo_matrix_t* )
520  cdef cairo_surface_t        *cairo_get_target           ( cairo_t* )
521  cdef cairo_surface_t        *cairo_get_group_target     ( cairo_t* )
522
523
524  ctypedef enum   cairo_path_data_type_t :
525    CAIRO_PATH_MOVE_TO,
526    CAIRO_PATH_LINE_TO,
527    CAIRO_PATH_CURVE_TO,
528    CAIRO_PATH_CLOSE_PATH
529#
530#typedef union _cairo_path_data_t cairo_path_data_t;
531#union _cairo_path_data_t {
532#    struct {
533#       cairo_path_data_type_t type;
534#       int length;
535#    } header;
536#    struct {
537#       double x, y;
538#    } point;
539#};
540#
541
542#dubl> maybe this is not needed
543#  ctypedef union cairo_path_data_t :
544#    void* none
545
546  cdef struct Header :
547    cairo_path_data_type_t  type
548    int                     length
549
550  cdef struct Point :
551    double x
552    double y
553
554#
555# dubl> maybe this will do.
556#
557  ctypedef union cairo_path_data_t :
558    Header  header
559    Point   point
560
561#
562# pressing on.
563#
564
565  ctypedef struct cairo_path_t :
566    cairo_status_t status
567    cairo_path_data_t *data
568    int num_data
569
570
571  cdef cairo_path_t             *cairo_copy_path          ( cairo_t* )
572  cdef cairo_path_t             *cairo_copy_path_flat     ( cairo_t* )
573  cdef void                     cairo_append_path         \
574                                          ( cairo_t*,
575                                            cairo_path_t* )
576  cdef void                     cairo_path_destroy        \
577                                          ( cairo_path_t* )
578
579  #//Error status queries
580  cdef cairo_status_t           cairo_status              ( cairo_t* )
581  cdef char                     *cairo_status_to_string   \
582                                          ( cairo_status_t status )
583  #// Surface manipulation
584
585  cdef cairo_surface_t          *cairo_surface_create_similar \
586                                          ( cairo_surface_t  *other,
587                                                              cairo_content_t   content,
588                                                              int, int )
589  cdef cairo_surface_t          *cairo_surface_reference  ( cairo_surface_t* )
590
591  cdef void                     cairo_surface_finish      ( cairo_surface_t* )
592  cdef void                     cairo_surface_destroy     ( cairo_surface_t* )
593  cdef unsigned int             cairo_surface_get_reference_count \
594                                                          ( cairo_surface_t* )
595  cdef cairo_status_t           cairo_surface_status      ( cairo_surface_t* )
596 
597
598  ctypedef enum cairo_surface_type_t :
599    CAIRO_SURFACE_TYPE_IMAGE,
600    CAIRO_SURFACE_TYPE_PDF,
601    CAIRO_SURFACE_TYPE_PS,
602    CAIRO_SURFACE_TYPE_XLIB,
603    CAIRO_SURFACE_TYPE_XCB,
604    CAIRO_SURFACE_TYPE_GLITZ,
605    CAIRO_SURFACE_TYPE_QUARTZ,
606    CAIRO_SURFACE_TYPE_WIN32,
607    CAIRO_SURFACE_TYPE_BEOS,
608    CAIRO_SURFACE_TYPE_DIRECTFB,
609    CAIRO_SURFACE_TYPE_SVG,
610    CAIRO_SURFACE_TYPE_OS2
611
612
613  cdef cairo_surface_type_t     cairo_surface_get_type    ( cairo_surface_t* )
614  cdef cairo_content_t          cairo_surface_get_content ( cairo_surface_t* )
615  #if CAIRO_HAS_PNG_FUNCTIONS   <signpost 1>
616  cdef cairo_status_t           cairo_surface_write_to_png( cairo_surface_t*,
617                                                            char* )
618  cdef cairo_status_t           cairo_surface_write_to_png_stream \
619                                                ( cairo_surface_t*,
620                                                  cairo_write_func_t,
621                                                  void* )
622  #endif                        <signpost 1>
623  cdef void                     *cairo_surface_get_user_data \
624                                                ( cairo_surface_t*,
625                                                  cairo_user_data_key_t* )
626  cdef cairo_status_t           cairo_surface_set_user_data \
627                                                ( cairo_surface_t*,
628                                                  cairo_user_data_key_t*,
629                                                  void*,
630                                                  cairo_destroy_func_t )
631  cdef void                     cairo_surface_get_font_options \
632                                                ( cairo_surface_t*,
633                                                  cairo_font_options_t* )
634  cdef void                     cairo_surface_flush \
635                                                ( cairo_surface_t* )
636  cdef void                     cairo_surface_mark_dirty \
637                                                ( cairo_surface_t* )
638  cdef void                     cairo_surface_mark_dirty_rectangle \
639                                                ( cairo_surface_t*,
640                                                                    int, int, int, int )
641
642  cdef void                     cairo_surface_set_device_offset \
643                                                ( cairo_surface_t*,
644                                                  double, double )
645  cdef void                     cairo_surface_get_device_offset \
646                                                ( cairo_surface_t*,
647                                                  double, double )
648  cdef void                     cairo_surface_set_fallback_resolution \
649                                                ( cairo_surface_t*,
650                                                  double, double )
651
652
653  #// END OF TOP
654  ctypedef enum   cairo_format_t :
655    CAIRO_FORMAT_ARGB32,
656    CAIRO_FORMAT_RGB24,
657    CAIRO_FORMAT_A8,
658    CAIRO_FORMAT_A1
659
660
661  cdef cairo_surface_t*    cairo_image_surface_create     ( cairo_format_t,
662                                                            int, int )
663  cdef cairo_surface_t*    cairo_image_surface_create_for_data \
664                                                          ( unsigned char*,
665                                                            cairo_format_t,
666                                                            int, int, int )
667  cdef cairo_format_t      cairo_image_surface_get_format ( cairo_surface_t* )
668  cdef int                 cairo_image_surface_get_width  ( cairo_surface_t* )
669  cdef int                 cairo_image_surface_get_height ( cairo_surface_t* )
670  cdef int                 cairo_image_surface_get_stride ( cairo_surface_t* )
671 
672  #if CAIRO_HAS_PNG_FUNCTIONS   <signpost 2>
673  cdef char               *cairo_image_surface_create_from_png \
674                                                          ( cairo_surface_t* )
675  cdef void               *cairo_image_surface_create_from_png_stream \
676                                                          ( cairo_read_func_t,
677                                                            void* )
678  #endif                        <signpost 2>
679
680  # Pattern creation functions
681  cdef unsigned char      *cairo_image_surface_get_data   ( cairo_surface_t* )
682  cdef cairo_pattern_t    *cairo_pattern_create_rgb       ( double, double,
683                                                            double )
684  cdef cairo_pattern_t    *cairo_pattern_create_rgba      ( double, double,
685                                                            double, double )
686  cdef cairo_pattern_t    *cairo_pattern_create_for_surface \
687                                                          ( cairo_surface_t* )
688  cdef cairo_pattern_t    *cairo_pattern_create_linear    ( double, double,
689                                                            double, double )
690  cdef cairo_pattern_t    *cairo_pattern_create_radial    ( double, double,
691                                                            double, double,
692                                                            double, double )
693
694
695
696  cdef cairo_pattern_t    *cairo_pattern_reference        ( cairo_pattern_t* )
697  cdef void                cairo_pattern_destroy          ( cairo_pattern_t* )
698  cdef unsigned int        cairo_pattern_get_reference_count \
699                                                          ( cairo_pattern_t* )
700  cdef cairo_status_t      cairo_pattern_status           ( cairo_pattern_t* )
701  cdef void               *cairo_pattern_get_user_data    ( cairo_pattern_t*,
702                                                      cairo_user_data_key_t* )
703  cdef cairo_status_t      cairo_pattern_set_user_data    ( cairo_pattern_t*,
704                                                      cairo_user_data_key_t*,
705                                                      void*,
706                                                      cairo_destroy_func_t )
707
708  # cairo_pattern_type_t
709  ctypedef enum    cairo_pattern_type_t :
710    CAIRO_PATTERN_TYPE_SOLID,
711    CAIRO_PATTERN_TYPE_SURFACE,
712    CAIRO_PATTERN_TYPE_LINEAR,
713    CAIRO_PATTERN_TYPE_RADIAL
714
715  cdef cairo_pattern_type_t   cairo_pattern_get_type      ( cairo_pattern_t* )
716   
717  cdef void                   cairo_pattern_add_color_stop_rgb \
718                                                          ( cairo_pattern_t*,
719                                                            double, double,
720                                                            double, double )
721  cdef void                   cairo_pattern_add_color_stop_rgba \
722                                                          ( cairo_pattern_t*,
723                                                            double, double,
724                                                            double, double,
725                                                            double )
726  cdef void                   cairo_pattern_set_matrix    ( cairo_pattern_t*,
727                                                            cairo_matrix_t * )
728  cdef void                   cairo_pattern_get_matrix    ( cairo_pattern_t*,
729                                                            cairo_matrix_t* )
730
731  # cairo_extend_t
732  ctypedef enum    cairo_extend_t :
733    CAIRO_EXTEND_NONE,
734    CAIRO_EXTEND_REPEAT,
735    CAIRO_EXTEND_REFLECT,
736    CAIRO_EXTEND_PAD
737
738  cdef void                   cairo_pattern_set_extend    ( cairo_pattern_t*,
739                                                            cairo_extend_t )
740  cdef cairo_extend_t         cairo_pattern_get_extend    ( cairo_pattern_t* )
741
742  ctypedef enum    cairo_filter_t :
743    CAIRO_FILTER_FAST,
744    CAIRO_FILTER_GOOD,
745    CAIRO_FILTER_BEST,
746    CAIRO_FILTER_NEAREST,
747    CAIRO_FILTER_BILINEAR,
748    CAIRO_FILTER_GAUSSIAN
749
750
751  cdef void                 cairo_pattern_set_filter      ( cairo_pattern_t*,
752                                                            cairo_filter_t )
753  cdef cairo_filter_t       cairo_pattern_get_filter      ( cairo_pattern_t* )
754  cdef cairo_status_t       cairo_pattern_get_rgba        ( cairo_pattern_t*,
755                                                            double*, double*,
756                                                            double*, double* )
757  cdef cairo_status_t       cairo_pattern_get_surface     ( cairo_pattern_t*,
758                                                            cairo_surface_t** )
759
760  cdef cairo_status_t       cairo_pattern_get_color_stop_rgba \
761                                                          ( cairo_pattern_t*,
762                                                            int, double*,
763                                                            double*, double*,
764                                                            double*, double* )
765  cdef cairo_status_t       cairo_pattern_get_color_stop_count \
766                                                          ( cairo_pattern_t*,
767                                                            int* )
768  cdef cairo_status_t       cairo_pattern_get_linear_points \
769                                                          ( cairo_pattern_t*,
770                                                            double*, double *,
771                                                            double*, double * )
772  cdef cairo_status_t       cairo_pattern_get_radial_circles \
773                                                          ( cairo_pattern_t*,
774                                                            double*, double*,
775                                                            double*, double*,
776                                                            double*, double* )
777
778  # Matrix functions
779  cdef void                 cairo_matrix_init             ( cairo_matrix_t*,
780                                                            double, double,
781                                                            double, double,
782                                                            double, double )
783  cdef void                 cairo_matrix_init_identity    ( cairo_matrix_t* )
784  cdef void                 cairo_matrix_init_translate   ( cairo_matrix_t*,
785                                                            double, double )
786  cdef void                 cairo_matrix_init_scale       ( cairo_matrix_t*,
787                                                            double, double )
788  cdef void                 cairo_matrix_init_rotate      ( cairo_matrix_t*,
789                                                            double )
790  cdef void                 cairo_matrix_translate        ( cairo_matrix_t*,
791                                                            double, double )
792  cdef void                 cairo_matrix_scale            ( cairo_matrix_t*,
793                                                            double, double )
794  cdef void                 cairo_matrix_rotate           ( cairo_matrix_t*,
795                                                            double )
796  cdef cairo_status_t       cairo_matrix_invert           ( cairo_matrix_t* )
797  cdef void                 cairo_matrix_multiply         ( cairo_matrix_t*,
798                                                            cairo_matrix_t*,
799                                                            cairo_matrix_t* )
800  cdef void                 cairo_matrix_transform_distance \
801                                                          ( cairo_matrix_t*,
802                                                            double*, double* )
803  cdef void                 cairo_matrix_transform_point  ( cairo_matrix_t*,
804                                                            double*, double* )
805
806  # Functions for debugging (not intended for use in production code)
807  # had to remove -> void <- from the argument list of the next line
808  cdef void                 cairo_debug_reset_static_data ( )
809
810
811cdef extern from "cairo/cairo-svg.h" :
812  ctypedef enum   cairo_svg_version_t:
813    CAIRO_SVG_VERSION_1_1,
814    CAIRO_SVG_VERSION_1_2
815
816  cdef cairo_surface_t      *cairo_svg_surface_create ( char*, double, double )
817  cdef cairo_surface_t      *cairo_svg_surface_create_for_stream \
818                                                      ( cairo_write_func_t,
819                                                                            void*,
820                                                                              double, double )
821
822  cdef void                 cairo_svg_surface_restrict_to_version \
823                                                      ( cairo_surface_t*,
824                                                        cairo_svg_version_t )
825  cdef void                 cairo_svg_get_versions    ( cairo_svg_version_t**,
826                                                        int* )
827  cdef char                 *cairo_svg_version_to_string \
828                                                      ( cairo_svg_version_t )
829
Note: See TracBrowser for help on using the browser.