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__
22#define __GDK_DRAW_CONTEXT__
23
24#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
25#error "Only <gdk/gdk.h> can be included directly."
26#endif
27
28#include <gdk/gdkversionmacros.h>
29#include <gdk/gdktypes.h>
30
31G_BEGIN_DECLS
32
33#define GDK_TYPE_DRAW_CONTEXT (gdk_draw_context_get_type ())
34#define GDK_DRAW_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_DRAW_CONTEXT, GdkDrawContext))
35#define GDK_IS_DRAW_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_DRAW_CONTEXT))
36
37GDK_AVAILABLE_IN_ALL
38GType gdk_draw_context_get_type (void) G_GNUC_CONST;
39
40GDK_AVAILABLE_IN_ALL
41GdkDisplay * gdk_draw_context_get_display (GdkDrawContext *context);
42GDK_AVAILABLE_IN_ALL
43GdkSurface * gdk_draw_context_get_surface (GdkDrawContext *context);
44
45GDK_AVAILABLE_IN_ALL
46void gdk_draw_context_begin_frame (GdkDrawContext *context,
47 const cairo_region_t *region);
48GDK_AVAILABLE_IN_ALL
49void gdk_draw_context_end_frame (GdkDrawContext *context);
50GDK_AVAILABLE_IN_ALL
51gboolean gdk_draw_context_is_in_frame (GdkDrawContext *context);
52GDK_AVAILABLE_IN_ALL
53const cairo_region_t * gdk_draw_context_get_frame_region (GdkDrawContext *context);
54
55G_END_DECLS
56
57#endif /* __GDK_DRAW_CONTEXT__ */
58

source code of gtk/gdk/gdkdrawcontext.h