1 /* GDK - The GIMP Drawing Kit 2 * 3 * gdkdrawcontext.h: base class for rendering system support 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_DRAW_CONTEXT_PRIVATE__ 22 #define __GDK_DRAW_CONTEXT_PRIVATE__ 23 24 #include "gdkdrawcontext.h" 25 26 G_BEGIN_DECLS 27 28 #define GDK_DRAW_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAW_CONTEXT, GdkDrawContextClass)) 29 #define GDK_IS_DRAW_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAW_CONTEXT)) 30 #define GDK_DRAW_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAW_CONTEXT, GdkDrawContextClass)) 31 32 typedef struct _GdkDrawContextClass GdkDrawContextClass; 33 34 struct _GdkDrawContext 35 { 36 GObject parent_instance; 37 }; 38 39 struct _GdkDrawContextClass 40 { 41 GObjectClass parent_class; 42 43 void (* begin_frame) (GdkDrawContext *context, 44 cairo_region_t *update_area); 45 void (* end_frame) (GdkDrawContext *context, 46 cairo_region_t *painted); 47 void (* surface_resized) (GdkDrawContext *context); 48 }; 49 50 void gdk_draw_context_surface_resized (GdkDrawContext *context); 51 52 G_END_DECLS 53 54 #endif /* __GDK__DRAW_CONTEXT_PRIVATE__ */ 55