OLD | NEW |
| (Empty) |
1 /* Based on GTK code by the Chromium Authors. The original header for that code | |
2 * continues below */ | |
3 | |
4 /* GDK - The GIMP Drawing Kit | |
5 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald | |
6 * | |
7 * This library is free software; you can redistribute it and/or | |
8 * modify it under the terms of the GNU Lesser 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 * Lesser General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Lesser General Public | |
18 * License along with this library; if not, write to the | |
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 * Boston, MA 02111-1307, USA. | |
21 */ | |
22 | |
23 /* | |
24 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS | |
25 * file for a list of people on the GTK+ Team. See the ChangeLog | |
26 * files for a list of changes. These files are distributed with | |
27 * GTK+ at ftp://ftp.gtk.org/pub/gtk/. | |
28 */ | |
29 | |
30 #ifndef __GDK_SKIA_H__ | |
31 #define __GDK_SKIA_H__ | |
32 | |
33 #include <gdk/gdk.h> | |
34 #include <cairo/cairo.h> | |
35 | |
36 class SkCanvas; | |
37 | |
38 G_BEGIN_DECLS | |
39 | |
40 typedef struct _GdkSkiaObject GdkSkiaObject; | |
41 typedef struct _GdkSkiaObjectClass GdkSkiaObjectClass; | |
42 | |
43 typedef struct _GdkDrawable GdkSkia; | |
44 | |
45 #define GDK_TYPE_SKIA (gdk_skia_get_type ()) | |
46 #define GDK_SKIA(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TY
PE_SKIA, GdkSkia)) | |
47 #define GDK_SKIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_S
KIA, GdkSkiaObjectClass)) | |
48 #define GDK_IS_SKIA(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TY
PE_SKIA)) | |
49 #define GDK_IS_SKIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_S
KIA)) | |
50 #define GDK_SKIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_S
KIA, GdkSkiaObjectClass)) | |
51 #define GDK_SKIA_OBJECT(object) ((GdkSkiaObject *) GDK_SKIA (object)) | |
52 | |
53 struct _GdkSkiaObject | |
54 { | |
55 GdkDrawable parent_instance; | |
56 SkCanvas *canvas; | |
57 cairo_surface_t *surface; | |
58 }; | |
59 | |
60 struct _GdkSkiaObjectClass | |
61 { | |
62 GdkDrawableClass parent_class; | |
63 }; | |
64 | |
65 GType gdk_skia_get_type(); | |
66 | |
67 // ----------------------------------------------------------------------------- | |
68 // Return a new GdkSkia for the given canvas. | |
69 // ----------------------------------------------------------------------------- | |
70 GdkSkia* gdk_skia_new(SkCanvas* canvas); | |
71 | |
72 G_END_DECLS | |
73 | |
74 #endif /* __GDK_SKIA_H__ */ | |
OLD | NEW |