From 81d0e430593407ea7d6a0a511777456df89cafd9 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Sun, 28 Jun 1998 08:01:38 +0000 Subject: [PATCH] return a GtkType value and initialize the GtkTypeInfo structure correctly. Sun Jun 28 08:32:20 1998 Tim Janik * app/layer.c (gimp_layer_mask_get_type): (gimp_layer_get_type): * app/drawable.c (gimp_drawable_get_type): * app/channel.c (gimp_channel_get_type): return a GtkType value and initialize the GtkTypeInfo structure correctly. * app/layer.h: * app/drawable.h: * app/channel.h: provide GIMP_TYPE_* and GIMP_IS_*_CLASS() macros. --- ChangeLog | 14 ++++++++++++++ app/channel.c | 9 +++++---- app/channel.h | 11 +++++++---- app/core/gimpchannel-combine.c | 9 +++++---- app/core/gimpchannel-combine.h | 11 +++++++---- app/core/gimpchannel.c | 9 +++++---- app/core/gimpchannel.h | 11 +++++++---- app/core/gimplayer.c | 18 ++++++++++-------- app/core/gimplayer.h | 20 ++++++++++++-------- app/drawable.c | 9 +++++---- app/drawable.h | 10 ++++++---- app/gimpchannel.c | 9 +++++---- app/gimpchannel.h | 11 +++++++---- app/gimplayer.c | 18 ++++++++++-------- app/gimplayer.h | 20 ++++++++++++-------- app/layer.c | 18 ++++++++++-------- app/layer.h | 20 ++++++++++++-------- 17 files changed, 139 insertions(+), 88 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3751582084..e113b31626 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Sun Jun 28 08:32:20 1998 Tim Janik + + * app/layer.c (gimp_layer_mask_get_type): + (gimp_layer_get_type): + * app/drawable.c (gimp_drawable_get_type): + * app/channel.c (gimp_channel_get_type): + return a GtkType value and initialize the GtkTypeInfo structure + correctly. + + * app/layer.h: + * app/drawable.h: + * app/channel.h: + provide GIMP_TYPE_* and GIMP_IS_*_CLASS() macros. + Sat Jun 27 23:28:26 PDT 1998 Manish Singh * app/interface.c: minor unused variable warning cleanup diff --git a/app/channel.c b/app/channel.c index bc995df6d9..856948407b 100644 --- a/app/channel.c +++ b/app/channel.c @@ -48,10 +48,10 @@ static gint channel_signals[LAST_SIGNAL] = { 0 }; static GimpDrawableClass *parent_class = NULL; -guint +GtkType gimp_channel_get_type () { - static guint channel_type = 0; + static GtkType channel_type = 0; if (!channel_type) { @@ -62,8 +62,9 @@ gimp_channel_get_type () sizeof (GimpChannelClass), (GtkClassInitFunc) gimp_channel_class_init, (GtkObjectInitFunc) gimp_channel_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; channel_type = gtk_type_unique (gimp_drawable_get_type (), &channel_info); diff --git a/app/channel.h b/app/channel.h index 48538758a4..eb1e3b07ed 100644 --- a/app/channel.h +++ b/app/channel.h @@ -36,16 +36,19 @@ /* structure declarations */ -#define GIMP_CHANNEL(obj) GTK_CHECK_CAST (obj, gimp_channel_get_type (), GimpChannel) -#define GIMP_CHANNEL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_channel_get_type(), GimpChannelClass) -#define GIMP_IS_CHANNEL(obj) GTK_CHECK_TYPE (obj, gimp_channel_get_type()) +#define GIMP_TYPE_CHANNEL (gimp_channel_get_type ()) +#define GIMP_CHANNEL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CHANNEL, GimpChannel)) +#define GIMP_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CHANNEL, GimpChannelClass)) +#define GIMP_IS_CHANNEL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CHANNEL)) +#define GIMP_IS_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CHANNEL)) + typedef struct _GimpChannel GimpChannel; typedef struct _GimpChannelClass GimpChannelClass; typedef GimpChannel Channel; /* convenience */ -guint gimp_channel_get_type (void); +GtkType gimp_channel_get_type (void); /* Special undo type */ typedef struct _channel_undo ChannelUndo; diff --git a/app/core/gimpchannel-combine.c b/app/core/gimpchannel-combine.c index bc995df6d9..856948407b 100644 --- a/app/core/gimpchannel-combine.c +++ b/app/core/gimpchannel-combine.c @@ -48,10 +48,10 @@ static gint channel_signals[LAST_SIGNAL] = { 0 }; static GimpDrawableClass *parent_class = NULL; -guint +GtkType gimp_channel_get_type () { - static guint channel_type = 0; + static GtkType channel_type = 0; if (!channel_type) { @@ -62,8 +62,9 @@ gimp_channel_get_type () sizeof (GimpChannelClass), (GtkClassInitFunc) gimp_channel_class_init, (GtkObjectInitFunc) gimp_channel_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; channel_type = gtk_type_unique (gimp_drawable_get_type (), &channel_info); diff --git a/app/core/gimpchannel-combine.h b/app/core/gimpchannel-combine.h index 48538758a4..eb1e3b07ed 100644 --- a/app/core/gimpchannel-combine.h +++ b/app/core/gimpchannel-combine.h @@ -36,16 +36,19 @@ /* structure declarations */ -#define GIMP_CHANNEL(obj) GTK_CHECK_CAST (obj, gimp_channel_get_type (), GimpChannel) -#define GIMP_CHANNEL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_channel_get_type(), GimpChannelClass) -#define GIMP_IS_CHANNEL(obj) GTK_CHECK_TYPE (obj, gimp_channel_get_type()) +#define GIMP_TYPE_CHANNEL (gimp_channel_get_type ()) +#define GIMP_CHANNEL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CHANNEL, GimpChannel)) +#define GIMP_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CHANNEL, GimpChannelClass)) +#define GIMP_IS_CHANNEL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CHANNEL)) +#define GIMP_IS_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CHANNEL)) + typedef struct _GimpChannel GimpChannel; typedef struct _GimpChannelClass GimpChannelClass; typedef GimpChannel Channel; /* convenience */ -guint gimp_channel_get_type (void); +GtkType gimp_channel_get_type (void); /* Special undo type */ typedef struct _channel_undo ChannelUndo; diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c index bc995df6d9..856948407b 100644 --- a/app/core/gimpchannel.c +++ b/app/core/gimpchannel.c @@ -48,10 +48,10 @@ static gint channel_signals[LAST_SIGNAL] = { 0 }; static GimpDrawableClass *parent_class = NULL; -guint +GtkType gimp_channel_get_type () { - static guint channel_type = 0; + static GtkType channel_type = 0; if (!channel_type) { @@ -62,8 +62,9 @@ gimp_channel_get_type () sizeof (GimpChannelClass), (GtkClassInitFunc) gimp_channel_class_init, (GtkObjectInitFunc) gimp_channel_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; channel_type = gtk_type_unique (gimp_drawable_get_type (), &channel_info); diff --git a/app/core/gimpchannel.h b/app/core/gimpchannel.h index 48538758a4..eb1e3b07ed 100644 --- a/app/core/gimpchannel.h +++ b/app/core/gimpchannel.h @@ -36,16 +36,19 @@ /* structure declarations */ -#define GIMP_CHANNEL(obj) GTK_CHECK_CAST (obj, gimp_channel_get_type (), GimpChannel) -#define GIMP_CHANNEL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_channel_get_type(), GimpChannelClass) -#define GIMP_IS_CHANNEL(obj) GTK_CHECK_TYPE (obj, gimp_channel_get_type()) +#define GIMP_TYPE_CHANNEL (gimp_channel_get_type ()) +#define GIMP_CHANNEL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CHANNEL, GimpChannel)) +#define GIMP_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CHANNEL, GimpChannelClass)) +#define GIMP_IS_CHANNEL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CHANNEL)) +#define GIMP_IS_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CHANNEL)) + typedef struct _GimpChannel GimpChannel; typedef struct _GimpChannelClass GimpChannelClass; typedef GimpChannel Channel; /* convenience */ -guint gimp_channel_get_type (void); +GtkType gimp_channel_get_type (void); /* Special undo type */ typedef struct _channel_undo ChannelUndo; diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c index c8dd152967..0eeddbbe82 100644 --- a/app/core/gimplayer.c +++ b/app/core/gimplayer.c @@ -60,10 +60,10 @@ static gint layer_mask_signals[LAST_SIGNAL] = { 0 }; static GimpDrawableClass *layer_parent_class = NULL; static GimpChannelClass *layer_mask_parent_class = NULL; -guint +GtkType gimp_layer_get_type () { - static guint layer_type = 0; + static GtkType layer_type = 0; if (!layer_type) { @@ -74,8 +74,9 @@ gimp_layer_get_type () sizeof (GimpLayerClass), (GtkClassInitFunc) gimp_layer_class_init, (GtkObjectInitFunc) gimp_layer_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; layer_type = gtk_type_unique (gimp_drawable_get_type (), &layer_info); @@ -108,10 +109,10 @@ gimp_layer_init (GimpLayer *layer) { } -guint +GtkType gimp_layer_mask_get_type () { - static guint layer_mask_type = 0; + static GtkType layer_mask_type = 0; if (!layer_mask_type) { @@ -122,8 +123,9 @@ gimp_layer_mask_get_type () sizeof (GimpLayerMaskClass), (GtkClassInitFunc) gimp_layer_mask_class_init, (GtkObjectInitFunc) gimp_layer_mask_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; layer_mask_type = gtk_type_unique (gimp_channel_get_type (), &layer_mask_info); diff --git a/app/core/gimplayer.h b/app/core/gimplayer.h index 0f4e311a4c..fc7c18884a 100644 --- a/app/core/gimplayer.h +++ b/app/core/gimplayer.h @@ -38,13 +38,17 @@ typedef enum /* structure declarations */ -#define GIMP_LAYER(obj) GTK_CHECK_CAST (obj, gimp_layer_get_type (), GimpLayer) -#define GIMP_LAYER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_layer_get_type(), GimpLayerClass) -#define GIMP_IS_LAYER(obj) GTK_CHECK_TYPE (obj, gimp_layer_get_type()) +#define GIMP_TYPE_LAYER (gimp_layer_get_type ()) +#define GIMP_LAYER(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LAYER, GimpLayer)) +#define GIMP_LAYER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER, GimpLayerClass)) +#define GIMP_IS_LAYER(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_LAYER)) +#define GIMP_IS_LAYER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_LAYER)) -#define GIMP_LAYER_MASK(obj) GTK_CHECK_CAST (obj, gimp_layer_mask_get_type (), GimpLayerMask) -#define GIMP_LAYER_MASK_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_layer_mask_get_type(), GimpLayerMaskClass) -#define GIMP_IS_LAYER_MASK(obj) GTK_CHECK_TYPE (obj, gimp_layer_mask_get_type()) +#define GIMP_TYPE_LAYER_MASK (gimp_layer_mask_get_type ()) +#define GIMP_LAYER_MASK(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LAYER_MASK, GimpLayerMask)) +#define GIMP_LAYER_MASK_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER_MASK, GimpLayerMaskClass)) +#define GIMP_IS_LAYER_MASK(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_LAYER_MASK)) +#define GIMP_IS_LAYER_MASK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_LAYER_MASK)) typedef struct _GimpLayer GimpLayer; typedef struct _GimpLayerClass GimpLayerClass; @@ -54,8 +58,8 @@ typedef struct _GimpLayerMaskClass GimpLayerMaskClass; typedef GimpLayer Layer; /* convenience */ typedef GimpLayerMask LayerMask; /* convenience */ -guint gimp_layer_get_type (void); -guint gimp_layer_mask_get_type (void); +GtkType gimp_layer_get_type (void); +GtkType gimp_layer_mask_get_type (void); /* Special undo types */ diff --git a/app/drawable.c b/app/drawable.c index fc6fd302ff..e95adbe8e1 100644 --- a/app/drawable.c +++ b/app/drawable.c @@ -48,10 +48,10 @@ static gint drawable_signals[LAST_SIGNAL] = { 0 }; static GimpDrawableClass *parent_class = NULL; -guint +GtkType gimp_drawable_get_type () { - static guint drawable_type = 0; + static GtkType drawable_type = 0; if (!drawable_type) { @@ -62,8 +62,9 @@ gimp_drawable_get_type () sizeof (GimpDrawableClass), (GtkClassInitFunc) gimp_drawable_class_init, (GtkObjectInitFunc) gimp_drawable_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; drawable_type = gtk_type_unique (gtk_data_get_type (), &drawable_info); diff --git a/app/drawable.h b/app/drawable.h index 6fab0d100c..0fd7bcf2e7 100644 --- a/app/drawable.h +++ b/app/drawable.h @@ -22,14 +22,16 @@ #include "tile_manager.h" #include "temp_buf.h" -#define GIMP_DRAWABLE(obj) GTK_CHECK_CAST (obj, gimp_drawable_get_type (), GimpDrawable) -#define GIMP_DRAWABLE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_drawable_get_type(), GimpDrawableClass) -#define GIMP_IS_DRAWABLE(obj) GTK_CHECK_TYPE (obj, gimp_drawable_get_type()) +#define GIMP_TYPE_DRAWABLE (gimp_drawable_get_type ()) +#define GIMP_DRAWABLE(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_DRAWABLE, GimpDrawable)) +#define GIMP_DRAWABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DRAWABLE, GimpDrawableClass)) +#define GIMP_IS_DRAWABLE(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_DRAWABLE)) +#define GIMP_IS_DRAWABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DRAWABLE)) typedef struct _GimpDrawable GimpDrawable; typedef struct _GimpDrawableClass GimpDrawableClass; -guint gimp_drawable_get_type (void); +GtkType gimp_drawable_get_type (void); /* drawable access functions */ int drawable_ID (GimpDrawable *); diff --git a/app/gimpchannel.c b/app/gimpchannel.c index bc995df6d9..856948407b 100644 --- a/app/gimpchannel.c +++ b/app/gimpchannel.c @@ -48,10 +48,10 @@ static gint channel_signals[LAST_SIGNAL] = { 0 }; static GimpDrawableClass *parent_class = NULL; -guint +GtkType gimp_channel_get_type () { - static guint channel_type = 0; + static GtkType channel_type = 0; if (!channel_type) { @@ -62,8 +62,9 @@ gimp_channel_get_type () sizeof (GimpChannelClass), (GtkClassInitFunc) gimp_channel_class_init, (GtkObjectInitFunc) gimp_channel_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; channel_type = gtk_type_unique (gimp_drawable_get_type (), &channel_info); diff --git a/app/gimpchannel.h b/app/gimpchannel.h index 48538758a4..eb1e3b07ed 100644 --- a/app/gimpchannel.h +++ b/app/gimpchannel.h @@ -36,16 +36,19 @@ /* structure declarations */ -#define GIMP_CHANNEL(obj) GTK_CHECK_CAST (obj, gimp_channel_get_type (), GimpChannel) -#define GIMP_CHANNEL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_channel_get_type(), GimpChannelClass) -#define GIMP_IS_CHANNEL(obj) GTK_CHECK_TYPE (obj, gimp_channel_get_type()) +#define GIMP_TYPE_CHANNEL (gimp_channel_get_type ()) +#define GIMP_CHANNEL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CHANNEL, GimpChannel)) +#define GIMP_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CHANNEL, GimpChannelClass)) +#define GIMP_IS_CHANNEL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CHANNEL)) +#define GIMP_IS_CHANNEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CHANNEL)) + typedef struct _GimpChannel GimpChannel; typedef struct _GimpChannelClass GimpChannelClass; typedef GimpChannel Channel; /* convenience */ -guint gimp_channel_get_type (void); +GtkType gimp_channel_get_type (void); /* Special undo type */ typedef struct _channel_undo ChannelUndo; diff --git a/app/gimplayer.c b/app/gimplayer.c index c8dd152967..0eeddbbe82 100644 --- a/app/gimplayer.c +++ b/app/gimplayer.c @@ -60,10 +60,10 @@ static gint layer_mask_signals[LAST_SIGNAL] = { 0 }; static GimpDrawableClass *layer_parent_class = NULL; static GimpChannelClass *layer_mask_parent_class = NULL; -guint +GtkType gimp_layer_get_type () { - static guint layer_type = 0; + static GtkType layer_type = 0; if (!layer_type) { @@ -74,8 +74,9 @@ gimp_layer_get_type () sizeof (GimpLayerClass), (GtkClassInitFunc) gimp_layer_class_init, (GtkObjectInitFunc) gimp_layer_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; layer_type = gtk_type_unique (gimp_drawable_get_type (), &layer_info); @@ -108,10 +109,10 @@ gimp_layer_init (GimpLayer *layer) { } -guint +GtkType gimp_layer_mask_get_type () { - static guint layer_mask_type = 0; + static GtkType layer_mask_type = 0; if (!layer_mask_type) { @@ -122,8 +123,9 @@ gimp_layer_mask_get_type () sizeof (GimpLayerMaskClass), (GtkClassInitFunc) gimp_layer_mask_class_init, (GtkObjectInitFunc) gimp_layer_mask_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; layer_mask_type = gtk_type_unique (gimp_channel_get_type (), &layer_mask_info); diff --git a/app/gimplayer.h b/app/gimplayer.h index 0f4e311a4c..fc7c18884a 100644 --- a/app/gimplayer.h +++ b/app/gimplayer.h @@ -38,13 +38,17 @@ typedef enum /* structure declarations */ -#define GIMP_LAYER(obj) GTK_CHECK_CAST (obj, gimp_layer_get_type (), GimpLayer) -#define GIMP_LAYER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_layer_get_type(), GimpLayerClass) -#define GIMP_IS_LAYER(obj) GTK_CHECK_TYPE (obj, gimp_layer_get_type()) +#define GIMP_TYPE_LAYER (gimp_layer_get_type ()) +#define GIMP_LAYER(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LAYER, GimpLayer)) +#define GIMP_LAYER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER, GimpLayerClass)) +#define GIMP_IS_LAYER(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_LAYER)) +#define GIMP_IS_LAYER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_LAYER)) -#define GIMP_LAYER_MASK(obj) GTK_CHECK_CAST (obj, gimp_layer_mask_get_type (), GimpLayerMask) -#define GIMP_LAYER_MASK_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_layer_mask_get_type(), GimpLayerMaskClass) -#define GIMP_IS_LAYER_MASK(obj) GTK_CHECK_TYPE (obj, gimp_layer_mask_get_type()) +#define GIMP_TYPE_LAYER_MASK (gimp_layer_mask_get_type ()) +#define GIMP_LAYER_MASK(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LAYER_MASK, GimpLayerMask)) +#define GIMP_LAYER_MASK_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER_MASK, GimpLayerMaskClass)) +#define GIMP_IS_LAYER_MASK(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_LAYER_MASK)) +#define GIMP_IS_LAYER_MASK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_LAYER_MASK)) typedef struct _GimpLayer GimpLayer; typedef struct _GimpLayerClass GimpLayerClass; @@ -54,8 +58,8 @@ typedef struct _GimpLayerMaskClass GimpLayerMaskClass; typedef GimpLayer Layer; /* convenience */ typedef GimpLayerMask LayerMask; /* convenience */ -guint gimp_layer_get_type (void); -guint gimp_layer_mask_get_type (void); +GtkType gimp_layer_get_type (void); +GtkType gimp_layer_mask_get_type (void); /* Special undo types */ diff --git a/app/layer.c b/app/layer.c index c8dd152967..0eeddbbe82 100644 --- a/app/layer.c +++ b/app/layer.c @@ -60,10 +60,10 @@ static gint layer_mask_signals[LAST_SIGNAL] = { 0 }; static GimpDrawableClass *layer_parent_class = NULL; static GimpChannelClass *layer_mask_parent_class = NULL; -guint +GtkType gimp_layer_get_type () { - static guint layer_type = 0; + static GtkType layer_type = 0; if (!layer_type) { @@ -74,8 +74,9 @@ gimp_layer_get_type () sizeof (GimpLayerClass), (GtkClassInitFunc) gimp_layer_class_init, (GtkObjectInitFunc) gimp_layer_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; layer_type = gtk_type_unique (gimp_drawable_get_type (), &layer_info); @@ -108,10 +109,10 @@ gimp_layer_init (GimpLayer *layer) { } -guint +GtkType gimp_layer_mask_get_type () { - static guint layer_mask_type = 0; + static GtkType layer_mask_type = 0; if (!layer_mask_type) { @@ -122,8 +123,9 @@ gimp_layer_mask_get_type () sizeof (GimpLayerMaskClass), (GtkClassInitFunc) gimp_layer_mask_class_init, (GtkObjectInitFunc) gimp_layer_mask_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reversed_1 */ NULL, + /* reversed_2 */ NULL, + (GtkClassInitFunc) NULL, }; layer_mask_type = gtk_type_unique (gimp_channel_get_type (), &layer_mask_info); diff --git a/app/layer.h b/app/layer.h index 0f4e311a4c..fc7c18884a 100644 --- a/app/layer.h +++ b/app/layer.h @@ -38,13 +38,17 @@ typedef enum /* structure declarations */ -#define GIMP_LAYER(obj) GTK_CHECK_CAST (obj, gimp_layer_get_type (), GimpLayer) -#define GIMP_LAYER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_layer_get_type(), GimpLayerClass) -#define GIMP_IS_LAYER(obj) GTK_CHECK_TYPE (obj, gimp_layer_get_type()) +#define GIMP_TYPE_LAYER (gimp_layer_get_type ()) +#define GIMP_LAYER(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LAYER, GimpLayer)) +#define GIMP_LAYER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER, GimpLayerClass)) +#define GIMP_IS_LAYER(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_LAYER)) +#define GIMP_IS_LAYER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_LAYER)) -#define GIMP_LAYER_MASK(obj) GTK_CHECK_CAST (obj, gimp_layer_mask_get_type (), GimpLayerMask) -#define GIMP_LAYER_MASK_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_layer_mask_get_type(), GimpLayerMaskClass) -#define GIMP_IS_LAYER_MASK(obj) GTK_CHECK_TYPE (obj, gimp_layer_mask_get_type()) +#define GIMP_TYPE_LAYER_MASK (gimp_layer_mask_get_type ()) +#define GIMP_LAYER_MASK(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LAYER_MASK, GimpLayerMask)) +#define GIMP_LAYER_MASK_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER_MASK, GimpLayerMaskClass)) +#define GIMP_IS_LAYER_MASK(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_LAYER_MASK)) +#define GIMP_IS_LAYER_MASK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_LAYER_MASK)) typedef struct _GimpLayer GimpLayer; typedef struct _GimpLayerClass GimpLayerClass; @@ -54,8 +58,8 @@ typedef struct _GimpLayerMaskClass GimpLayerMaskClass; typedef GimpLayer Layer; /* convenience */ typedef GimpLayerMask LayerMask; /* convenience */ -guint gimp_layer_get_type (void); -guint gimp_layer_mask_get_type (void); +GtkType gimp_layer_get_type (void); +GtkType gimp_layer_mask_get_type (void); /* Special undo types */