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
26G_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
32typedef struct _GdkDrawContextClass GdkDrawContextClass;
33
34struct _GdkDrawContext
35{
36 GObject parent_instance;
37};
38
39struct _GdkDrawContextClass
40{
41 GObjectClass parent_class;
42
43 void (* begin_frame) (GdkDrawContext *context,
44 gboolean prefers_high_depth,
45 cairo_region_t *update_area);
46 void (* end_frame) (GdkDrawContext *context,
47 cairo_region_t *painted);
48 void (* surface_resized) (GdkDrawContext *context);
49};
50
51void gdk_draw_context_surface_resized (GdkDrawContext *context);
52
53void gdk_draw_context_begin_frame_full (GdkDrawContext *context,
54 gboolean prefers_high_depth,
55 const cairo_region_t *region);
56G_END_DECLS
57
58#endif /* __GDK__DRAW_CONTEXT_PRIVATE__ */
59

source code of gtk/gdk/gdkdrawcontextprivate.h