1 /* GDK - The GIMP Drawing Kit 2 * 3 * gdkcairocontext-x11.h: X11 specific Cairo wrappers 4 * 5 * Copyright © 2016 Benjamin Otte 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public 18 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __GDK_X11_CAIRO_CONTEXT__ 22 #define __GDK_X11_CAIRO_CONTEXT__ 23 24 #include "gdkconfig.h" 25 26 #include "gdkcairocontextprivate.h" 27 28 G_BEGIN_DECLS 29 30 #define GDK_TYPE_X11_CAIRO_CONTEXT (gdk_x11_cairo_context_get_type ()) 31 #define GDK_X11_CAIRO_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_X11_CAIRO_CONTEXT, GdkX11CairoContext)) 32 #define GDK_IS_X11_CAIRO_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_X11_CAIRO_CONTEXT)) 33 #define GDK_X11_CAIRO_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_X11_CAIRO_CONTEXT, GdkX11CairoContextClass)) 34 #define GDK_IS_X11_CAIRO_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_X11_CAIRO_CONTEXT)) 35 #define GDK_X11_CAIRO_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_X11_CAIRO_CONTEXT, GdkX11CairoContextClass)) 36 37 typedef struct _GdkX11CairoContext GdkX11CairoContext; 38 typedef struct _GdkX11CairoContextClass GdkX11CairoContextClass; 39 40 struct _GdkX11CairoContext 41 { 42 GdkCairoContext parent_instance; 43 44 cairo_surface_t *window_surface; 45 cairo_surface_t *paint_surface; 46 }; 47 48 struct _GdkX11CairoContextClass 49 { 50 GdkCairoContextClass parent_class; 51 }; 52 53 GDK_AVAILABLE_IN_ALL 54 GType gdk_x11_cairo_context_get_type (void) G_GNUC_CONST; 55 56 G_END_DECLS 57 58 #endif /* __GDK_X11_CAIRO_CONTEXT__ */ 59