summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2000-06-22 15:36:12 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-06-22 15:36:12 +0000
commit3a422541e314126987c24fc1752f94962fad78d5 (patch)
tree9692c443f5df4063c64c4b72cc9482cb1b342a4b /gdk-pixbuf/gdk-pixbuf.h
parent7b6c38f544dd6d55123b1a21d6a45da957ee6396 (diff)
downloadgtk+-3a422541e314126987c24fc1752f94962fad78d5.tar.gz
Convert GdkPixbuf to GObject, leaving it opaque (i.e. derivation is not
2000-06-21 Havoc Pennington <hp@pobox.com> * gdk-pixbuf.c: Convert GdkPixbuf to GObject, leaving it opaque (i.e. derivation is not allowed, and there are no virtual methods anyway). (gdk_pixbuf_preinit): Call g_type_init() here. (gdk_pixbuf_init): Add a user-friendly init function, for users of standalone gdk-pixbuf * gdk-pixbuf-animation.c: Convert to GObject, in the same way GdkPixbufAnimation was done. * gdk-pixbuf.h: Remove gdk_pixbuf_set_unref_handler() and gdk_pixbuf_finalize() from API, since these are broken and don't make sense with new GObject stuff. 2000-06-21 Havoc Pennington <hp@pobox.com> * gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): Fix bug where we didn't check window->bg_pixmap != GDK_NO_BG. * gtk/gdk-pixbuf-loader.c: Change to reflect GObject-ification of gdk-pixbuf
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf.h')
-rw-r--r--gdk-pixbuf/gdk-pixbuf.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf.h b/gdk-pixbuf/gdk-pixbuf.h
index 08087ccce6..04756b5b81 100644
--- a/gdk-pixbuf/gdk-pixbuf.h
+++ b/gdk-pixbuf/gdk-pixbuf.h
@@ -32,6 +32,7 @@ extern "C" {
#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf-features.h>
+#include <gobject/gobject.h>
@@ -42,28 +43,30 @@ typedef enum {
/* All of these are opaque structures */
typedef struct _GdkPixbuf GdkPixbuf;
-typedef struct _GdkPixbufFrame GdkPixbufFrame;
typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
+typedef struct _GdkPixbufFrame GdkPixbufFrame;
+
+#define GDK_TYPE_PIXBUF (gdk_pixbuf_get_type ())
+#define GDK_PIXBUF(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF, GdkPixbuf))
+#define GDK_IS_PIXBUF(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF))
+
+#define GDK_TYPE_PIXBUF_ANIMATION (gdk_pixbuf_animation_get_type ())
+#define GDK_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimation))
+#define GDK_IS_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION))
+
/* Handler that must free the pixel array */
typedef void (* GdkPixbufDestroyNotify) (guchar *pixels, gpointer data);
-/* Handler for the last unref operation */
-typedef void (* GdkPixbufLastUnref) (GdkPixbuf *pixbuf, gpointer data);
-
+GType gdk_pixbuf_get_type (void);
+
/* Reference counting */
GdkPixbuf *gdk_pixbuf_ref (GdkPixbuf *pixbuf);
void gdk_pixbuf_unref (GdkPixbuf *pixbuf);
-void gdk_pixbuf_set_last_unref_handler (GdkPixbuf *pixbuf,
- GdkPixbufLastUnref last_unref_fn,
- gpointer last_unref_fn_data);
-
-void gdk_pixbuf_finalize (GdkPixbuf *pixbuf);
-
/* GdkPixbuf accessors */
GdkColorspace gdk_pixbuf_get_colorspace (const GdkPixbuf *pixbuf);
@@ -192,6 +195,8 @@ typedef enum {
GDK_PIXBUF_FRAME_REVERT
} GdkPixbufFrameAction;
+GType gdk_pixbuf_animation_get_type (void);
+
GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename);
GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation);
@@ -214,6 +219,8 @@ GdkPixbufFrameAction gdk_pixbuf_frame_get_action (GdkPixbufFrame *frame);
/* General (presently empty) initialization hooks, primarily for gnome-libs */
void gdk_pixbuf_preinit (gpointer app, gpointer modinfo);
void gdk_pixbuf_postinit (gpointer app, gpointer modinfo);
+/* A more user-friendly init function */
+void gdk_pixbuf_init (void);