diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-18 19:21:33 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-03-18 19:21:33 +0100 |
commit | ea84e974e6eb8565554c8514cf18a326e5b256ed (patch) | |
tree | 8275f6c6df004361fa4e535ad2bb12bca4a37086 /gtk/gtksnapshot.h | |
parent | abc9b944f9153b5e770f0127589744c8b3f629c0 (diff) | |
download | gtk+-ea84e974e6eb8565554c8514cf18a326e5b256ed.tar.gz |
snapshot: Turn into GObject
This makes GdkSnapshot the base class for GtkSnapshot and hopefully
stops confusing bindings.
C code should see no difference to before.
Diffstat (limited to 'gtk/gtksnapshot.h')
-rw-r--r-- | gtk/gtksnapshot.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h index f908a3dcdf..e9852f8b96 100644 --- a/gtk/gtksnapshot.h +++ b/gtk/gtksnapshot.h @@ -36,13 +36,20 @@ G_BEGIN_DECLS +typedef GdkSnapshot GtkSnapshot; +typedef struct _GtkSnapshotClass GtkSnapshotClass; + +#define GTK_TYPE_SNAPSHOT (gtk_snapshot_get_type ()) + +#define GTK_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SNAPSHOT, GtkSnapshot)) +#define GTK_IS_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SNAPSHOT)) + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkSnapshot, g_object_unref) + + GDK_AVAILABLE_IN_ALL GType gtk_snapshot_get_type (void) G_GNUC_CONST; -GDK_AVAILABLE_IN_ALL -GtkSnapshot * gtk_snapshot_ref (GtkSnapshot *snapshot); -GDK_AVAILABLE_IN_ALL -void gtk_snapshot_unref (GtkSnapshot *snapshot); GDK_AVAILABLE_IN_ALL GtkSnapshot * gtk_snapshot_new (GskRenderer *renderer, |