2 // Cairo.cs - a simplistic binding of the Cairo API to C#.
4 // Authors: Duncan Mak (duncan@ximian.com)
5 // Hisham Mardam Bey (hisham.mardambey@gmail.com)
6 // John Luke (john.luke@gmail.com)
7 // Alp Toker (alp@atoker.com)
9 // (C) Ximian, Inc. 2003
10 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
11 // Copyright (C) 2005 John Luke
12 // Copyright (C) 2006 Alp Toker
14 // Permission is hereby granted, free of charge, to any person obtaining
15 // a copy of this software and associated documentation files (the
16 // "Software"), to deal in the Software without restriction, including
17 // without limitation the rights to use, copy, modify, merge, publish,
18 // distribute, sublicense, and/or sell copies of the Software, and to
19 // permit persons to whom the Software is furnished to do so, subject to
20 // the following conditions:
22 // The above copyright notice and this permission notice shall be
23 // included in all copies or substantial portions of the Software.
25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 using System
.Runtime
.InteropServices
;
39 // sort these so it is easier to find what is missing
40 // http://www.cairographics.org/manual/ix01.html
42 internal static class NativeMethods
45 const string cairo
= "__Internal";
47 const string cairo
= "libcairo-2.dll";
51 //internal static extern void cairo_append_path (IntPtr cr, Path path);
54 internal static extern void cairo_arc (IntPtr cr
, double xc
, double yc
, double radius
, double angle1
, double angle2
);
57 internal static extern void cairo_arc_negative (IntPtr cr
, double xc
, double yc
, double radius
, double angle1
, double angle2
);
60 internal static extern IntPtr
cairo_atsui_font_face_create_for_atsu_font_id (IntPtr font_id
);
63 internal static extern void cairo_clip (IntPtr cr
);
66 internal static extern void cairo_clip_preserve (IntPtr cr
);
69 internal static extern void cairo_clip_extents (IntPtr cr
, out double x1
, out double y1
, out double x2
, out double y2
);
72 internal static extern void cairo_close_path (IntPtr cr
);
75 internal static extern void cairo_copy_page (IntPtr cr
);
78 internal static extern IntPtr
cairo_copy_path (IntPtr cr
);
81 internal static extern IntPtr
cairo_copy_path_flat (IntPtr cr
);
84 internal static extern IntPtr
cairo_append_path (IntPtr cr
, IntPtr path
);
87 internal static extern IntPtr
cairo_create (IntPtr target
);
90 internal static extern uint cairo_get_reference_count (IntPtr surface
);
93 internal static extern void cairo_curve_to (IntPtr cr
, double x1
, double y1
, double x2
, double y2
, double x3
, double y3
);
96 internal static extern void cairo_debug_reset_static_data ();
99 internal static extern void cairo_destroy (IntPtr cr
);
102 internal static extern void cairo_device_to_user (IntPtr cr
, ref double x
, ref double y
);
105 internal static extern void cairo_device_to_user_distance (IntPtr cr
, ref double dx
, ref double dy
);
108 internal static extern void cairo_fill (IntPtr cr
);
111 internal static extern void cairo_fill_extents (IntPtr cr
, out double x1
, out double y1
, out double x2
, out double y2
);
114 internal static extern void cairo_fill_preserve (IntPtr cr
);
117 internal static extern void cairo_font_extents (IntPtr cr
, out FontExtents extents
);
121 internal static extern void cairo_font_face_destroy (IntPtr font_face
);
124 internal static extern FontType
cairo_font_face_get_type (IntPtr font_face
);
126 //[DllImport (cairo)]
127 //internal static extern void cairo_font_face_get_user_data (IntPtr font_face);
129 //[DllImport (cairo)]
130 //internal static extern void cairo_font_face_set_user_data (IntPtr font_face);
133 internal static extern IntPtr
cairo_font_face_reference (IntPtr font_face
);
136 internal static extern Status
cairo_font_face_status (IntPtr font_face
);
139 internal static extern uint cairo_font_face_get_reference_count (IntPtr surface
);
143 internal static extern IntPtr
cairo_font_options_copy (IntPtr original
);
146 internal static extern IntPtr
cairo_font_options_create ();
149 internal static extern void cairo_font_options_destroy (IntPtr options
);
152 [return: MarshalAs (UnmanagedType
.U1
)]
153 internal static extern bool cairo_font_options_equal (IntPtr options
, IntPtr other
);
156 internal static extern Antialias
cairo_font_options_get_antialias (IntPtr options
);
159 internal static extern HintMetrics
cairo_font_options_get_hint_metrics (IntPtr options
);
162 internal static extern HintStyle
cairo_font_options_get_hint_style (IntPtr options
);
165 internal static extern SubpixelOrder
cairo_font_options_get_subpixel_order (IntPtr options
);
168 internal static extern long cairo_font_options_hash (IntPtr options
);
171 internal static extern void cairo_font_options_merge (IntPtr options
, IntPtr other
);
174 internal static extern void cairo_font_options_set_antialias (IntPtr options
, Antialias aa
);
177 internal static extern void cairo_font_options_set_hint_metrics (IntPtr options
, HintMetrics metrics
);
180 internal static extern void cairo_font_options_set_hint_style (IntPtr options
, HintStyle style
);
183 internal static extern void cairo_font_options_set_subpixel_order (IntPtr options
, SubpixelOrder order
);
186 internal static extern Status
cairo_font_options_status (IntPtr options
);
188 // Freetype / FontConfig
190 internal static extern IntPtr
cairo_ft_font_face_create_for_ft_face (IntPtr face
, int load_flags
);
193 internal static extern IntPtr
cairo_ft_font_face_create_for_pattern (IntPtr fc_pattern
);
196 internal static extern void cairo_ft_font_options_substitute (FontOptions options
, IntPtr pattern
);
199 internal static extern IntPtr
cairo_ft_scaled_font_lock_face (IntPtr scaled_font
);
202 internal static extern void cairo_ft_scaled_font_unlock_face (IntPtr scaled_font
);
205 internal static extern Antialias
cairo_get_antialias (IntPtr cr
);
208 internal static extern void cairo_get_current_point (IntPtr cr
, out double x
, out double y
);
211 internal static extern FillRule
cairo_get_fill_rule (IntPtr cr
);
214 internal static extern IntPtr
cairo_get_font_face (IntPtr cr
);
217 internal static extern void cairo_get_font_matrix (IntPtr cr
, out Matrix matrix
);
220 internal static extern void cairo_get_font_options (IntPtr cr
, IntPtr options
);
223 internal static extern IntPtr
cairo_get_group_target (IntPtr cr
);
226 internal static extern LineCap
cairo_get_line_cap (IntPtr cr
);
229 internal static extern LineJoin
cairo_get_line_join (IntPtr cr
);
232 internal static extern double cairo_get_line_width (IntPtr cr
);
235 internal static extern void cairo_get_matrix (IntPtr cr
, Matrix matrix
);
238 internal static extern double cairo_get_miter_limit (IntPtr cr
);
241 internal static extern Operator
cairo_get_operator (IntPtr cr
);
244 internal static extern IntPtr
cairo_get_source (IntPtr cr
);
247 internal static extern IntPtr
cairo_get_target (IntPtr cr
);
250 internal static extern double cairo_get_tolerance (IntPtr cr
);
253 internal static extern IntPtr
cairo_glitz_surface_create (IntPtr surface
);
256 internal static extern void cairo_glyph_extents (IntPtr cr
, IntPtr glyphs
, int num_glyphs
, out TextExtents extents
);
259 internal static extern void cairo_glyph_path (IntPtr cr
, IntPtr glyphs
, int num_glyphs
);
262 internal static extern void cairo_identity_matrix (IntPtr cr
);
266 internal static extern IntPtr
cairo_image_surface_create (Cairo
.Format format
, int width
, int height
);
269 internal static extern IntPtr
cairo_image_surface_create_for_data (byte[] data
, Cairo
.Format format
, int width
, int height
, int stride
);
272 internal static extern IntPtr
cairo_image_surface_create_for_data (IntPtr data
, Cairo
.Format format
, int width
, int height
, int stride
);
275 internal static extern IntPtr
cairo_image_surface_create_from_png (string filename
);
277 //[DllImport (cairo)]
278 //internal static extern IntPtr cairo_image_surface_create_from_png_stream (string filename);
281 internal static extern IntPtr
cairo_image_surface_get_data (IntPtr surface
);
284 internal static extern Format
cairo_image_surface_get_format (IntPtr surface
);
287 internal static extern int cairo_image_surface_get_height (IntPtr surface
);
290 internal static extern int cairo_image_surface_get_stride (IntPtr surface
);
293 internal static extern int cairo_image_surface_get_width (IntPtr surface
);
296 internal static extern uint cairo_surface_get_reference_count (IntPtr surface
);
299 [return: MarshalAs (UnmanagedType
.U1
)]
300 internal static extern bool cairo_in_fill (IntPtr cr
, double x
, double y
);
303 [return: MarshalAs (UnmanagedType
.U1
)]
304 internal static extern bool cairo_in_stroke (IntPtr cr
, double x
, double y
);
307 internal static extern void cairo_line_to (IntPtr cr
, double x
, double y
);
310 internal static extern void cairo_mask (IntPtr cr
, IntPtr pattern
);
313 internal static extern void cairo_mask_surface (IntPtr cr
, IntPtr surface
, double x
, double y
);
317 internal static extern void cairo_matrix_init (Matrix matrix
, double xx
, double yx
, double xy
, double yy
, double x0
, double y0
);
320 internal static extern void cairo_matrix_init_identity (Matrix matrix
);
323 internal static extern void cairo_matrix_init_rotate (Matrix matrix
, double radians
);
326 internal static extern void cairo_matrix_init_scale (Matrix matrix
, double sx
, double sy
);
329 internal static extern void cairo_matrix_init_translate (Matrix matrix
, double tx
, double ty
);
332 internal static extern Status
cairo_matrix_invert (Matrix matrix
);
335 internal static extern void cairo_matrix_multiply (Matrix result
, Matrix a
, Matrix b
);
338 internal static extern void cairo_matrix_scale (Matrix matrix
, double sx
, double sy
);
341 internal static extern void cairo_matrix_rotate (Matrix matrix
, double radians
);
344 internal static extern void cairo_matrix_transform_distance (Matrix matrix
, ref double dx
, ref double dy
);
347 internal static extern void cairo_matrix_transform_point (Matrix matrix
, ref double x
, ref double y
);
350 internal static extern void cairo_matrix_translate (Matrix matrix
, double tx
, double ty
);
353 internal static extern void cairo_move_to (IntPtr cr
, double x
, double y
);
356 internal static extern void cairo_new_path (IntPtr cr
);
359 internal static extern void cairo_new_sub_path (IntPtr cr
);
362 internal static extern void cairo_paint (IntPtr cr
);
365 internal static extern void cairo_paint_with_alpha (IntPtr cr
, double alpha
);
368 internal static extern void cairo_path_destroy (IntPtr path
);
372 internal static extern void cairo_pattern_add_color_stop_rgb (IntPtr pattern
, double offset
, double red
, double green
, double blue
);
375 internal static extern void cairo_pattern_add_color_stop_rgba (IntPtr pattern
, double offset
, double red
, double green
, double blue
, double alpha
);
378 internal static extern Status
cairo_pattern_get_color_stop_count (IntPtr pattern
, out int count
);
380 internal static extern Status
cairo_pattern_get_color_stop_rgba (IntPtr pattern
, int index
, out double offset
, out double red
, out double green
, out double blue
, out double alpha
);
383 internal static extern IntPtr
cairo_pattern_create_for_surface (IntPtr surface
);
386 internal static extern Status
cairo_pattern_get_surface (IntPtr pattern
, out IntPtr surface
);
389 internal static extern IntPtr
cairo_pattern_create_linear (double x0
, double y0
, double x1
, double y1
);
392 internal static extern Status
cairo_pattern_get_linear_points (IntPtr pattern
, out double x0
, out double y0
, out double x1
, out double y1
);
395 internal static extern IntPtr
cairo_pattern_create_radial (double cx0
, double cy0
, double radius0
, double cx1
, double cy1
, double radius1
);
398 internal static extern Status
cairo_pattern_get_radial_circles (IntPtr pattern
, out double x0
, out double y0
, out double r0
, out double x1
, out double y1
, out double r1
);
401 internal static extern IntPtr
cairo_pattern_create_rgb (double r
, double g
, double b
);
404 internal static extern IntPtr
cairo_pattern_create_rgba (double r
, double g
, double b
, double a
);
407 internal static extern Status
cairo_pattern_get_rgba (IntPtr pattern
, out double red
, out double green
, out double blue
, out double alpha
);
410 internal static extern void cairo_pattern_destroy (IntPtr pattern
);
413 internal static extern Extend
cairo_pattern_get_extend (IntPtr pattern
);
416 internal static extern Filter
cairo_pattern_get_filter (IntPtr pattern
);
419 internal static extern void cairo_pattern_get_matrix (IntPtr pattern
, Matrix matrix
);
422 internal static extern PatternType
cairo_pattern_get_type (IntPtr pattern
);
425 internal static extern IntPtr
cairo_pattern_reference (IntPtr pattern
);
428 internal static extern void cairo_pattern_set_extend (IntPtr pattern
, Extend extend
);
431 internal static extern void cairo_pattern_set_filter (IntPtr pattern
, Filter filter
);
434 internal static extern void cairo_pattern_set_matrix (IntPtr pattern
, Matrix matrix
);
437 internal static extern Status
cairo_pattern_status (IntPtr pattern
);
441 internal static extern IntPtr
cairo_pdf_surface_create (string filename
, double width
, double height
);
443 //[DllImport (cairo)]
444 //internal static extern IntPtr cairo_pdf_surface_create_for_stream (string filename, double width, double height);
447 internal static extern void cairo_pdf_surface_set_size (IntPtr surface
, double x
, double y
);
451 internal static extern IntPtr
cairo_ps_surface_create (string filename
, double width
, double height
);
453 //[DllImport (cairo)]
454 //internal static extern IntPtr cairo_ps_surface_create_for_stream (string filename, double width, double height);
456 internal static extern void cairo_ps_surface_begin_page_setup (IntPtr surface
);
459 internal static extern void cairo_ps_surface_begin_setup (IntPtr surface
);
462 internal static extern void cairo_ps_surface_dsc_comment (IntPtr surface
, string comment
);
465 internal static extern void cairo_ps_surface_set_size (IntPtr surface
, double x
, double y
);
468 internal static extern IntPtr
cairo_pop_group (IntPtr cr
);
471 internal static extern void cairo_pop_group_to_source (IntPtr cr
);
474 internal static extern void cairo_push_group (IntPtr cr
);
477 internal static extern void cairo_push_group_with_content (IntPtr cr
, Content content
);
480 internal static extern IntPtr
cairo_quartz_surface_create (IntPtr context
, bool flipped
, int width
, int height
);
483 internal static extern void cairo_rectangle (IntPtr cr
, double x
, double y
, double width
, double height
);
486 internal static extern void cairo_reference (IntPtr cr
);
489 internal static extern void cairo_rel_curve_to (IntPtr cr
, double dx1
, double dy1
, double dx2
, double dy2
, double dx3
, double dy3
);
492 internal static extern void cairo_rel_line_to (IntPtr cr
, double dx
, double dy
);
495 internal static extern void cairo_rel_move_to (IntPtr cr
, double dx
, double dy
);
498 internal static extern void cairo_reset_clip (IntPtr cr
);
501 internal static extern void cairo_restore (IntPtr cr
);
504 internal static extern void cairo_rotate (IntPtr cr
, double angle
);
507 internal static extern void cairo_save (IntPtr cr
);
510 internal static extern void cairo_scale (IntPtr cr
, double sx
, double sy
);
514 internal static extern IntPtr
cairo_scaled_font_create (IntPtr fontFace
, Matrix matrix
, Matrix ctm
, IntPtr options
);
517 internal static extern IntPtr
cairo_scaled_font_destroy (IntPtr scaled_font
);
520 internal static extern void cairo_scaled_font_extents (IntPtr scaled_font
, out FontExtents extents
);
523 internal static extern void cairo_scaled_font_get_ctm (IntPtr scaled_font
, out Matrix matrix
);
526 internal static extern IntPtr
cairo_scaled_font_get_font_face (IntPtr scaled_font
);
529 internal static extern void cairo_scaled_font_get_font_matrix (IntPtr scaled_font
, out Matrix matrix
);
532 internal static extern IntPtr
cairo_scaled_font_get_font_options (IntPtr scaled_font
);
535 internal static extern FontType
cairo_scaled_font_get_type (IntPtr scaled_font
);
538 internal static extern void cairo_scaled_font_glyph_extents (IntPtr scaled_font
, IntPtr glyphs
, int num_glyphs
, out TextExtents extents
);
541 internal static extern IntPtr
cairo_scaled_font_reference (IntPtr scaled_font
);
544 internal static extern Status
cairo_scaled_font_status (IntPtr scaled_font
);
547 internal static extern void cairo_set_scaled_font (IntPtr cr
, IntPtr scaled_font
);
550 internal static extern IntPtr
cairo_get_scaled_font (IntPtr cr
);
553 internal static extern void cairo_scaled_font_text_extents (IntPtr scaled_font
, string utf8
, out TextExtents extents
);
556 internal static extern void cairo_select_font_face (IntPtr cr
, string family
, FontSlant slant
, FontWeight weight
);
559 internal static extern void cairo_set_antialias (IntPtr cr
, Antialias antialias
);
562 internal static extern void cairo_set_dash (IntPtr cr
, double [] dashes
, int ndash
, double offset
);
565 internal static extern void cairo_get_dash (IntPtr cr
, IntPtr dashes
, out double offset
);
568 internal static extern int cairo_get_dash_count (IntPtr cr
);
571 internal static extern void cairo_set_fill_rule (IntPtr cr
, Cairo
.FillRule fill_rule
);
574 internal static extern void cairo_set_font_face (IntPtr cr
, IntPtr fontFace
);
577 internal static extern void cairo_set_font_matrix (IntPtr cr
, Matrix matrix
);
580 internal static extern void cairo_set_font_options (IntPtr cr
, IntPtr options
);
583 internal static extern void cairo_set_font_size (IntPtr cr
, double size
);
586 internal static extern void cairo_set_line_cap (IntPtr cr
, LineCap line_cap
);
589 internal static extern void cairo_set_line_join (IntPtr cr
, LineJoin line_join
);
592 internal static extern void cairo_set_line_width (IntPtr cr
, double width
);
595 internal static extern void cairo_set_matrix (IntPtr cr
, Matrix matrix
);
598 internal static extern void cairo_set_miter_limit (IntPtr cr
, double limit
);
601 internal static extern void cairo_set_operator (IntPtr cr
, Cairo
.Operator op
);
604 internal static extern void cairo_set_source (IntPtr cr
, IntPtr pattern
);
607 internal static extern void cairo_set_source_rgb (IntPtr cr
, double red
, double green
, double blue
);
610 internal static extern void cairo_set_source_rgba (IntPtr cr
, double red
, double green
, double blue
, double alpha
);
613 internal static extern void cairo_set_source_surface (IntPtr cr
, IntPtr surface
, double x
, double y
);
616 internal static extern void cairo_set_tolerance (IntPtr cr
, double tolerance
);
619 internal static extern void cairo_show_glyphs (IntPtr ct
, IntPtr glyphs
, int num_glyphs
);
622 internal static extern void cairo_show_page (IntPtr cr
);
625 internal static extern void cairo_show_text (IntPtr cr
, string utf8
);
628 internal static extern Status
cairo_status (IntPtr cr
);
631 internal static extern IntPtr
cairo_status_to_string (Status status
);
634 internal static extern void cairo_stroke (IntPtr cr
);
637 internal static extern void cairo_stroke_extents (IntPtr cr
, out double x1
, out double y1
, out double x2
, out double y2
);
640 internal static extern void cairo_stroke_preserve (IntPtr cr
);
643 internal static extern void cairo_rectangle_list_destroy (IntPtr rectangle_list
);
646 internal static extern IntPtr
cairo_copy_clip_rectangle_list (IntPtr cr
);
650 internal static extern IntPtr
cairo_surface_create_similar (IntPtr surface
, Cairo
.Content content
, int width
, int height
);
653 internal static extern void cairo_surface_destroy (IntPtr surface
);
656 internal static extern void cairo_surface_finish (IntPtr surface
);
659 internal static extern void cairo_surface_flush (IntPtr surface
);
662 internal static extern Content
cairo_surface_get_content (IntPtr surface
);
665 internal static extern void cairo_surface_get_device_offset (IntPtr surface
, out double x
, out double y
);
668 internal static extern void cairo_surface_get_font_options (IntPtr surface
, IntPtr FontOptions
);
671 internal static extern SurfaceType
cairo_surface_get_type (IntPtr surface
);
674 internal static extern void cairo_surface_mark_dirty (IntPtr surface
);
677 internal static extern void cairo_surface_mark_dirty_rectangle (IntPtr surface
, int x
, int y
, int width
, int height
);
680 internal static extern IntPtr
cairo_surface_reference (IntPtr surface
);
683 internal static extern void cairo_surface_set_device_offset (IntPtr surface
, double x
, double y
);
686 internal static extern void cairo_surface_set_fallback_resolution (IntPtr surface
, double x
, double y
);
689 internal static extern Status
cairo_surface_status (IntPtr surface
);
692 internal static extern void cairo_surface_write_to_png (IntPtr surface
, string filename
);
694 //[DllImport (cairo)]
695 //internal static extern void cairo_surface_write_to_png_stream (IntPtr surface, WriteFunc writeFunc);
698 internal static extern IntPtr
cairo_svg_surface_create (string fileName
, double width
, double height
);
700 //[DllImport (cairo)]
701 //internal static extern IntPtr cairo_svg_surface_create_for_stream (double width, double height);
704 internal static extern IntPtr
cairo_svg_surface_restrict_to_version (IntPtr surface
, SvgVersion version
);
707 internal static extern void cairo_text_extents (IntPtr cr
, string utf8
, out TextExtents extents
);
710 internal static extern void cairo_text_path (IntPtr ct
, string utf8
);
713 internal static extern void cairo_transform (IntPtr cr
, Matrix matrix
);
716 internal static extern void cairo_translate (IntPtr cr
, double tx
, double ty
);
719 internal static extern void cairo_user_to_device (IntPtr cr
, ref double x
, ref double y
);
722 internal static extern void cairo_user_to_device_distance (IntPtr cr
, ref double dx
, ref double dy
);
725 internal static extern int cairo_version ();
728 internal static extern IntPtr
cairo_version_string ();
732 internal static extern IntPtr
cairo_directfb_surface_create (IntPtr dfb
, IntPtr surface
);
736 internal static extern IntPtr
cairo_win32_font_face_create_for_logfontw (IntPtr logfontw
);
739 internal static extern void cairo_win32_scaled_font_done_font (IntPtr scaled_font
);
742 internal static extern double cairo_win32_scaled_font_get_metrics_factor (IntPtr scaled_font
);
745 internal static extern Status
cairo_win32_scaled_font_select_font (IntPtr scaled_font
, IntPtr hdc
);
749 internal static extern IntPtr
cairo_win32_surface_create (IntPtr hdc
);
752 internal static extern IntPtr
cairo_win32_surface_create_with_ddb (IntPtr hdc
, Format format
, int width
, int height
);
756 internal static extern IntPtr
cairo_xcb_surface_create (IntPtr connection
, uint drawable
, IntPtr visual
, int width
, int height
);
759 internal static extern IntPtr
cairo_xcb_surface_create_for_bitmap (IntPtr connection
, uint bitmap
, IntPtr screen
, int width
, int height
);
762 internal static extern void cairo_xcb_surface_set_size (IntPtr surface
, int width
, int height
);
766 internal static extern IntPtr
cairo_xlib_surface_create (IntPtr display
, IntPtr drawable
, IntPtr visual
, int width
, int height
);
769 internal static extern IntPtr
cairo_xlib_surface_create_for_bitmap (IntPtr display
, IntPtr bitmap
, IntPtr screen
, int width
, int height
);
772 internal static extern int cairo_xlib_surface_get_depth (IntPtr surface
);
775 internal static extern IntPtr
cairo_xlib_surface_get_display (IntPtr surface
);
778 internal static extern IntPtr
cairo_xlib_surface_get_drawable (IntPtr surface
);
781 internal static extern int cairo_xlib_surface_get_height (IntPtr surface
);
784 internal static extern IntPtr
cairo_xlib_surface_get_screen (IntPtr surface
);
787 internal static extern IntPtr
cairo_xlib_surface_get_visual (IntPtr surface
);
790 internal static extern int cairo_xlib_surface_get_width (IntPtr surface
);
793 internal static extern void cairo_xlib_surface_set_drawable (IntPtr surface
, IntPtr drawable
, int width
, int height
);
796 internal static extern void cairo_xlib_surface_set_size (IntPtr surface
, int width
, int height
);