1 /** 2 * 3 * License: 4 * $(TABLE 5 * $(TR $(TD cairoD wrapper/bindings) 6 * $(TD $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0))) 7 * $(TR $(TD $(LINK2 http://cgit.freedesktop.org/cairo/tree/COPYING, _cairo)) 8 * $(TD $(LINK2 http://cgit.freedesktop.org/cairo/tree/COPYING-LGPL-2.1, LGPL 2.1) / 9 * $(LINK2 http://cgit.freedesktop.org/cairo/plain/COPYING-MPL-1.1, MPL 1.1))) 10 * ) 11 * Authors: 12 * $(TABLE 13 * $(TR $(TD Johannes Pfau) $(TD cairoD)) 14 * $(TR $(TD $(LINK2 http://cairographics.org, _cairo team)) $(TD _cairo)) 15 * ) 16 */ 17 /* 18 * Distributed under the Boost Software License, Version 1.0. 19 * (See accompanying file LICENSE_1_0.txt or copy at 20 * http://www.boost.org/LICENSE_1_0.txt) 21 */ 22 module cairo.c.xcb; 23 24 import cairo.c.cairo; 25 26 static if(CAIRO_HAS_XCB_SURFACE) 27 { 28 pragma(msg, "cairo.c.xcb: FIX: need proper xcb bindings"); 29 //import xcb.xcb; 30 //import xcb.render; 31 alias void xcb_connection_t; 32 alias void xcb_screen_t; 33 alias void xcb_visualtype_t; 34 alias void xcb_render_pictforminfo_t; 35 alias uint xcb_drawable_t; 36 alias uint xcb_pixmap_t; 37 38 extern (C): 39 /// 40 cairo_surface_t* 41 cairo_xcb_surface_create (xcb_connection_t* connection, 42 xcb_drawable_t drawable, 43 xcb_visualtype_t* visual, 44 int width, 45 int height); 46 /// 47 cairo_surface_t* 48 cairo_xcb_surface_create_for_bitmap (xcb_connection_t* connection, 49 xcb_screen_t* screen, 50 xcb_pixmap_t bitmap, 51 int width, 52 int height); 53 /// 54 cairo_surface_t* 55 cairo_xcb_surface_create_with_xrender_format (xcb_connection_t* connection, 56 xcb_screen_t* screen, 57 xcb_drawable_t drawable, 58 xcb_render_pictforminfo_t* format, 59 int width, 60 int height); 61 /// 62 void 63 cairo_xcb_surface_set_size (cairo_surface_t* surface, 64 int width, 65 int height); 66 67 /** debug interface */ 68 void 69 cairo_xcb_device_debug_cap_xshm_version (cairo_device_t *device, 70 int major_version, 71 int minor_version); 72 ///ditto 73 void 74 cairo_xcb_device_debug_cap_xrender_version (cairo_device_t *device, 75 int major_version, 76 int minor_version); 77 } 78 else 79 { 80 //static assert(false, "Cairo was not compiled with support for the xcb backend"); 81 }