app: implement GObject::constructed() instead of ::constructor()

This commit is contained in:
Michael Natterer 2011-01-12 22:53:58 +01:00
parent 8d2d16ac25
commit 5e4eee4653
28 changed files with 419 additions and 649 deletions

View File

@ -47,9 +47,7 @@ enum
/* local function prototypes */
static GObject * gimp_brush_clipboard_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_brush_clipboard_constructed (GObject *object);
static void gimp_brush_clipboard_set_property (GObject *object,
guint property_id,
const GValue *value,
@ -79,7 +77,7 @@ gimp_brush_clipboard_class_init (GimpBrushClipboardClass *klass)
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
#endif
object_class->constructor = gimp_brush_clipboard_constructor;
object_class->constructed = gimp_brush_clipboard_constructed;
object_class->set_property = gimp_brush_clipboard_set_property;
object_class->get_property = gimp_brush_clipboard_get_property;
@ -100,17 +98,13 @@ gimp_brush_clipboard_init (GimpBrushClipboard *brush)
brush->gimp = NULL;
}
static GObject *
gimp_brush_clipboard_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_brush_clipboard_constructed (GObject *object)
{
GObject *object;
GimpBrushClipboard *brush;
GimpBrushClipboard *brush = GIMP_BRUSH_CLIPBOARD (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
brush = GIMP_BRUSH_CLIPBOARD (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (brush->gimp));
@ -119,8 +113,6 @@ gimp_brush_clipboard_constructor (GType type,
brush, 0);
gimp_brush_clipboard_buffer_changed (brush->gimp, GIMP_BRUSH (brush));
return object;
}
static void

View File

@ -28,13 +28,11 @@
#include "gimpchannelpropundo.h"
static GObject * gimp_channel_prop_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_channel_prop_undo_constructed (GObject *object);
static void gimp_channel_prop_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_channel_prop_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
G_DEFINE_TYPE (GimpChannelPropUndo, gimp_channel_prop_undo, GIMP_TYPE_ITEM_UNDO)
@ -48,7 +46,7 @@ gimp_channel_prop_undo_class_init (GimpChannelPropUndoClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_channel_prop_undo_constructor;
object_class->constructed = gimp_channel_prop_undo_constructed;
undo_class->pop = gimp_channel_prop_undo_pop;
}
@ -58,19 +56,15 @@ gimp_channel_prop_undo_init (GimpChannelPropUndo *undo)
{
}
static GObject *
gimp_channel_prop_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_channel_prop_undo_constructed (GObject *object)
{
GObject *object;
GimpChannelPropUndo *channel_prop_undo;
GimpChannelPropUndo *channel_prop_undo = GIMP_CHANNEL_PROP_UNDO (object);
GimpImage *image;
GimpChannel *channel;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
channel_prop_undo = GIMP_CHANNEL_PROP_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
@ -86,8 +80,6 @@ gimp_channel_prop_undo_constructor (GType type,
default:
g_assert_not_reached ();
}
return object;
}
static void

View File

@ -35,24 +35,22 @@ enum
};
static GObject * gimp_channel_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_channel_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_channel_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_channel_undo_constructed (GObject *object);
static void gimp_channel_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_channel_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_channel_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_channel_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_channel_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_channel_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
G_DEFINE_TYPE (GimpChannelUndo, gimp_channel_undo, GIMP_TYPE_ITEM_UNDO)
@ -67,7 +65,7 @@ gimp_channel_undo_class_init (GimpChannelUndoClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_channel_undo_constructor;
object_class->constructed = gimp_channel_undo_constructed;
object_class->set_property = gimp_channel_undo_set_property;
object_class->get_property = gimp_channel_undo_get_property;
@ -102,21 +100,13 @@ gimp_channel_undo_init (GimpChannelUndo *undo)
{
}
static GObject *
gimp_channel_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_channel_undo_constructed (GObject *object)
{
GObject *object;
GimpChannelUndo *channel_undo;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
channel_undo = GIMP_CHANNEL_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
return object;
}
static void

View File

@ -67,9 +67,7 @@ typedef void (* GimpContextCopyPropFunc) (GimpContext *src,
static void gimp_context_config_iface_init (GimpConfigInterface *iface);
static GObject * gimp_context_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_context_constructed (GObject *object);
static void gimp_context_dispose (GObject *object);
static void gimp_context_finalize (GObject *object);
static void gimp_context_set_property (GObject *object,
@ -553,7 +551,7 @@ gimp_context_class_init (GimpContextClass *klass)
G_TYPE_NONE, 1,
GIMP_TYPE_TEMPLATE);
object_class->constructor = gimp_context_constructor;
object_class->constructed = gimp_context_constructed;
object_class->set_property = gimp_context_set_property;
object_class->get_property = gimp_context_get_property;
object_class->dispose = gimp_context_dispose;
@ -769,16 +767,14 @@ gimp_context_config_iface_init (GimpConfigInterface *iface)
iface->deserialize_property = gimp_context_deserialize_property;
}
static GObject *
gimp_context_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_context_constructed (GObject *object)
{
GObject *object;
Gimp *gimp;
GimpContainer *container;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
gimp = GIMP_CONTEXT (object)->gimp;
@ -882,8 +878,6 @@ gimp_context_constructor (GType type,
g_signal_connect_object (gimp->templates, "thaw",
G_CALLBACK (gimp_context_template_list_thaw),
object, 0);
return object;
}
static void

View File

@ -88,38 +88,35 @@ struct _GimpDataPrivate
G_TYPE_INSTANCE_GET_PRIVATE (data, GIMP_TYPE_DATA, GimpDataPrivate)
static void gimp_data_class_init (GimpDataClass *klass);
static void gimp_data_tagged_iface_init (GimpTaggedInterface *iface);
static void gimp_data_class_init (GimpDataClass *klass);
static void gimp_data_tagged_iface_init (GimpTaggedInterface *iface);
static void gimp_data_init (GimpData *data,
GimpDataClass *data_class);
static void gimp_data_init (GimpData *data,
GimpDataClass *data_class);
static GObject * gimp_data_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_data_constructed (GObject *object);
static void gimp_data_finalize (GObject *object);
static void gimp_data_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_data_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_data_finalize (GObject *object);
static void gimp_data_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_data_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_data_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_data_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_data_real_dirty (GimpData *data);
static void gimp_data_real_dirty (GimpData *data);
static gboolean gimp_data_add_tag (GimpTagged *tagged,
GimpTag *tag);
static gboolean gimp_data_remove_tag (GimpTagged *tagged,
GimpTag *tag);
static GList * gimp_data_get_tags (GimpTagged *tagged);
static gchar * gimp_data_get_identifier (GimpTagged *tagged);
static gchar * gimp_data_get_checksum (GimpTagged *tagged);
static gboolean gimp_data_add_tag (GimpTagged *tagged,
GimpTag *tag);
static gboolean gimp_data_remove_tag (GimpTagged *tagged,
GimpTag *tag);
static GList * gimp_data_get_tags (GimpTagged *tagged);
static gchar * gimp_data_get_identifier (GimpTagged *tagged);
static gchar * gimp_data_get_checksum (GimpTagged *tagged);
static guint data_signals[LAST_SIGNAL] = { 0 };
@ -181,7 +178,7 @@ gimp_data_class_init (GimpDataClass *klass)
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
object_class->constructor = gimp_data_constructor;
object_class->constructed = gimp_data_constructed;
object_class->finalize = gimp_data_finalize;
object_class->set_property = gimp_data_set_property;
object_class->get_property = gimp_data_get_property;
@ -247,18 +244,13 @@ gimp_data_init (GimpData *data,
gimp_data_freeze (data);
}
static GObject *
gimp_data_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_data_constructed (GObject *object)
{
GObject *object;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_data_thaw (GIMP_DATA (object));
return object;
}
static void

View File

@ -35,27 +35,24 @@ enum
};
static GObject * gimp_drawable_mod_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_drawable_mod_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_drawable_mod_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_drawable_mod_undo_constructed (GObject *object);
static void gimp_drawable_mod_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_drawable_mod_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_drawable_mod_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_drawable_mod_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_drawable_mod_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_drawable_mod_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_drawable_mod_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_drawable_mod_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpDrawableModUndo, gimp_drawable_mod_undo, GIMP_TYPE_ITEM_UNDO)
@ -70,7 +67,7 @@ gimp_drawable_mod_undo_class_init (GimpDrawableModUndoClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_drawable_mod_undo_constructor;
object_class->constructed = gimp_drawable_mod_undo_constructed;
object_class->set_property = gimp_drawable_mod_undo_set_property;
object_class->get_property = gimp_drawable_mod_undo_get_property;
@ -91,19 +88,15 @@ gimp_drawable_mod_undo_init (GimpDrawableModUndo *undo)
{
}
static GObject *
gimp_drawable_mod_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_drawable_mod_undo_constructed (GObject *object)
{
GObject *object;
GimpDrawableModUndo *drawable_mod_undo;
GimpDrawableModUndo *drawable_mod_undo = GIMP_DRAWABLE_MOD_UNDO (object);
GimpItem *item;
GimpDrawable *drawable;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
drawable_mod_undo = GIMP_DRAWABLE_MOD_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
@ -126,8 +119,6 @@ gimp_drawable_mod_undo_constructor (GType type,
gimp_item_get_offset (item,
&drawable_mod_undo->offset_x,
&drawable_mod_undo->offset_y);
return object;
}
static void

View File

@ -38,37 +38,35 @@ enum
/* local function prototypes */
static GObject * gimp_drawable_stack_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_drawable_stack_finalize (GObject *object);
static void gimp_drawable_stack_constructed (GObject *object);
static void gimp_drawable_stack_finalize (GObject *object);
static void gimp_drawable_stack_add (GimpContainer *container,
GimpObject *object);
static void gimp_drawable_stack_remove (GimpContainer *container,
GimpObject *object);
static void gimp_drawable_stack_reorder (GimpContainer *container,
GimpObject *object,
gint new_index);
static void gimp_drawable_stack_add (GimpContainer *container,
GimpObject *object);
static void gimp_drawable_stack_remove (GimpContainer *container,
GimpObject *object);
static void gimp_drawable_stack_reorder (GimpContainer *container,
GimpObject *object,
gint new_index);
static void gimp_drawable_stack_add_node (GimpDrawableStack *stack,
GimpDrawable *drawable);
static void gimp_drawable_stack_remove_node (GimpDrawableStack *stack,
GimpDrawable *drawable);
static void gimp_drawable_stack_add_node (GimpDrawableStack *stack,
GimpDrawable *drawable);
static void gimp_drawable_stack_remove_node (GimpDrawableStack *stack,
GimpDrawable *drawable);
static void gimp_drawable_stack_update (GimpDrawableStack *stack,
gint x,
gint y,
gint width,
gint height);
static void gimp_drawable_stack_drawable_update (GimpItem *item,
gint x,
gint y,
gint width,
gint height,
GimpDrawableStack *stack);
static void gimp_drawable_stack_drawable_visible (GimpItem *item,
GimpDrawableStack *stack);
static void gimp_drawable_stack_update (GimpDrawableStack *stack,
gint x,
gint y,
gint width,
gint height);
static void gimp_drawable_stack_drawable_update (GimpItem *item,
gint x,
gint y,
gint width,
gint height,
GimpDrawableStack *stack);
static void gimp_drawable_stack_drawable_visible (GimpItem *item,
GimpDrawableStack *stack);
G_DEFINE_TYPE (GimpDrawableStack, gimp_drawable_stack, GIMP_TYPE_ITEM_STACK)
@ -97,7 +95,7 @@ gimp_drawable_stack_class_init (GimpDrawableStackClass *klass)
G_TYPE_INT,
G_TYPE_INT);
object_class->constructor = gimp_drawable_stack_constructor;
object_class->constructed = gimp_drawable_stack_constructed;
object_class->finalize = gimp_drawable_stack_finalize;
container_class->add = gimp_drawable_stack_add;
@ -110,17 +108,13 @@ gimp_drawable_stack_init (GimpDrawableStack *stack)
{
}
static GObject *
gimp_drawable_stack_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_drawable_stack_constructed (GObject *object)
{
GObject *object;
GimpContainer *container;
GimpContainer *container = GIMP_CONTAINER (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
container = GIMP_CONTAINER (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_DRAWABLE));
@ -131,8 +125,6 @@ gimp_drawable_stack_constructor (GType type,
gimp_container_add_handler (container, "visibility-changed",
G_CALLBACK (gimp_drawable_stack_drawable_visible),
container);
return object;
}
static void

View File

@ -42,26 +42,24 @@ enum
};
static GObject * gimp_drawable_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_drawable_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_drawable_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_drawable_undo_constructed (GObject *object);
static void gimp_drawable_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_drawable_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_drawable_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_drawable_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_drawable_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_drawable_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_drawable_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_drawable_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpDrawableUndo, gimp_drawable_undo, GIMP_TYPE_ITEM_UNDO)
@ -76,7 +74,7 @@ gimp_drawable_undo_class_init (GimpDrawableUndoClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_drawable_undo_constructor;
object_class->constructed = gimp_drawable_undo_constructed;
object_class->set_property = gimp_drawable_undo_set_property;
object_class->get_property = gimp_drawable_undo_get_property;
@ -127,22 +125,16 @@ gimp_drawable_undo_init (GimpDrawableUndo *undo)
{
}
static GObject *
gimp_drawable_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_drawable_undo_constructed (GObject *object)
{
GObject *object;
GimpDrawableUndo *drawable_undo;
GimpDrawableUndo *drawable_undo = GIMP_DRAWABLE_UNDO (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
drawable_undo = GIMP_DRAWABLE_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_DRAWABLE (GIMP_ITEM_UNDO (object)->item));
g_assert (drawable_undo->tiles != NULL);
return object;
}
static void

View File

@ -52,10 +52,7 @@ typedef struct _MatchParams
} MatchParams;
static GObject * gimp_filtered_container_constructor (GType type,
guint n_construct_params,
GObjectConstructParam *construct_params);
static void gimp_filtered_container_constructed (GObject *object);
static void gimp_filtered_container_dispose (GObject *object);
static void gimp_filtered_container_set_property (GObject *object,
guint property_id,
@ -111,7 +108,7 @@ gimp_filtered_container_class_init (GimpFilteredContainerClass *klass)
GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
g_object_class->constructor = gimp_filtered_container_constructor;
g_object_class->constructed = gimp_filtered_container_constructed;
g_object_class->dispose = gimp_filtered_container_dispose;
g_object_class->set_property = gimp_filtered_container_set_property;
g_object_class->get_property = gimp_filtered_container_get_property;
@ -147,19 +144,13 @@ gimp_filtered_container_init (GimpFilteredContainer *filtered_container)
filtered_container->tag_count = 0;
}
static GObject*
gimp_filtered_container_constructor (GType type,
guint n_construct_params,
GObjectConstructParam *construct_params)
static void
gimp_filtered_container_constructed (GObject *object)
{
GObject *object;
GimpFilteredContainer *filtered_container;
GimpFilteredContainer *filtered_container = GIMP_FILTERED_CONTAINER (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type,
n_construct_params,
construct_params);
filtered_container = GIMP_FILTERED_CONTAINER (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
filtered_container->tag_ref_counts =
g_hash_table_new ((GHashFunc) gimp_tag_get_hash,
@ -169,8 +160,6 @@ gimp_filtered_container_constructor (GType type,
(GFunc) gimp_filtered_container_tagged_item_added,
filtered_container);
gimp_filtered_container_filter (filtered_container);
return object;
}
static void

View File

@ -29,13 +29,11 @@
#include "gimplayer-floating-sel.h"
static GObject * gimp_floating_sel_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_floating_sel_undo_constructed (GObject *object);
static void gimp_floating_sel_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_floating_sel_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
G_DEFINE_TYPE (GimpFloatingSelUndo, gimp_floating_sel_undo, GIMP_TYPE_ITEM_UNDO)
@ -49,7 +47,7 @@ gimp_floating_sel_undo_class_init (GimpFloatingSelUndoClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_floating_sel_undo_constructor;
object_class->constructed = gimp_floating_sel_undo_constructed;
undo_class->pop = gimp_floating_sel_undo_pop;
}
@ -59,18 +57,14 @@ gimp_floating_sel_undo_init (GimpFloatingSelUndo *undo)
{
}
static GObject *
gimp_floating_sel_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_floating_sel_undo_constructed (GObject *object)
{
GObject *object;
GimpFloatingSelUndo *floating_sel_undo;
GimpFloatingSelUndo *floating_sel_undo = GIMP_FLOATING_SEL_UNDO (object);
GimpLayer *layer;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
floating_sel_undo = GIMP_FLOATING_SEL_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
@ -85,8 +79,6 @@ gimp_floating_sel_undo_constructor (GType type,
default:
g_assert_not_reached ();
}
return object;
}
static void

View File

@ -26,13 +26,11 @@
#include "gimpgrouplayerundo.h"
static GObject * gimp_group_layer_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_group_layer_undo_constructed (GObject *object);
static void gimp_group_layer_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_group_layer_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
G_DEFINE_TYPE (GimpGroupLayerUndo, gimp_group_layer_undo, GIMP_TYPE_ITEM_UNDO)
@ -46,7 +44,7 @@ gimp_group_layer_undo_class_init (GimpGroupLayerUndoClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_group_layer_undo_constructor;
object_class->constructed = gimp_group_layer_undo_constructed;
undo_class->pop = gimp_group_layer_undo_pop;
}
@ -56,18 +54,14 @@ gimp_group_layer_undo_init (GimpGroupLayerUndo *undo)
{
}
static GObject *
gimp_group_layer_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_group_layer_undo_constructed (GObject *object)
{
GObject *object;
GimpGroupLayerUndo *group_layer_undo;
GimpGroupLayerUndo *group_layer_undo = GIMP_GROUP_LAYER_UNDO (object);
GimpGroupLayer *group;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
group_layer_undo = GIMP_GROUP_LAYER_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GROUP_LAYER (GIMP_ITEM_UNDO (object)->item));
@ -86,8 +80,6 @@ gimp_group_layer_undo_constructor (GType type,
default:
g_assert_not_reached ();
}
return object;
}
static void

View File

@ -34,23 +34,21 @@ enum
};
static GObject * gimp_guide_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_guide_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_guide_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_guide_undo_constructed (GObject *object);
static void gimp_guide_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_guide_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_guide_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_guide_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_guide_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_guide_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpGuideUndo, gimp_guide_undo, GIMP_TYPE_UNDO)
@ -64,7 +62,7 @@ gimp_guide_undo_class_init (GimpGuideUndoClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_guide_undo_constructor;
object_class->constructed = gimp_guide_undo_constructed;
object_class->set_property = gimp_guide_undo_set_property;
object_class->get_property = gimp_guide_undo_get_property;
@ -83,24 +81,18 @@ gimp_guide_undo_init (GimpGuideUndo *undo)
{
}
static GObject *
gimp_guide_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_guide_undo_constructed (GObject *object)
{
GObject *object;
GimpGuideUndo *guide_undo;
GimpGuideUndo *guide_undo = GIMP_GUIDE_UNDO (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
guide_undo = GIMP_GUIDE_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GUIDE (guide_undo->guide));
guide_undo->orientation = gimp_guide_get_orientation (guide_undo->guide);
guide_undo->position = gimp_guide_get_position (guide_undo->guide);
return object;
}
static void

View File

@ -128,9 +128,7 @@ enum
static void gimp_color_managed_iface_init (GimpColorManagedInterface *iface);
static void gimp_projectable_iface_init (GimpProjectableInterface *iface);
static GObject *gimp_image_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_image_constructed (GObject *object);
static void gimp_image_set_property (GObject *object,
guint property_id,
const GValue *value,
@ -510,7 +508,7 @@ gimp_image_class_init (GimpImageClass *klass)
GIMP_TYPE_UNDO_EVENT,
GIMP_TYPE_UNDO);
object_class->constructor = gimp_image_constructor;
object_class->constructed = gimp_image_constructed;
object_class->set_property = gimp_image_set_property;
object_class->get_property = gimp_image_get_property;
object_class->dispose = gimp_image_dispose;
@ -730,20 +728,15 @@ gimp_image_init (GimpImage *image)
private->flush_accum.preview_invalidated = FALSE;
}
static GObject *
gimp_image_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_image_constructed (GObject *object)
{
GObject *object;
GimpImage *image;
GimpImagePrivate *private;
GimpImage *image = GIMP_IMAGE (object);
GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image);
GimpCoreConfig *config;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
image = GIMP_IMAGE (object);
private = GIMP_IMAGE_GET_PRIVATE (image);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (image->gimp));
@ -793,8 +786,6 @@ gimp_image_constructor (GType type,
image, G_CONNECT_SWAPPED);
gimp_container_add (image->gimp->images, GIMP_OBJECT (image));
return object;
}
static void

View File

@ -50,26 +50,24 @@ enum
};
static GObject * gimp_image_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_image_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_image_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_image_undo_constructed (GObject *object);
static void gimp_image_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_image_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_image_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_image_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_image_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_image_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_image_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_image_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpImageUndo, gimp_image_undo, GIMP_TYPE_UNDO)
@ -84,7 +82,7 @@ gimp_image_undo_class_init (GimpImageUndoClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_image_undo_constructor;
object_class->constructed = gimp_image_undo_constructed;
object_class->set_property = gimp_image_undo_set_property;
object_class->get_property = gimp_image_undo_get_property;
@ -144,18 +142,14 @@ gimp_image_undo_init (GimpImageUndo *undo)
{
}
static GObject *
gimp_image_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_image_undo_constructed (GObject *object)
{
GObject *object;
GimpImageUndo *image_undo;
GimpImageUndo *image_undo = GIMP_IMAGE_UNDO (object);
GimpImage *image;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
image_undo = GIMP_IMAGE_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
image = GIMP_UNDO (object)->image;
@ -198,8 +192,6 @@ gimp_image_undo_constructor (GType type,
default:
g_assert_not_reached ();
}
return object;
}
static void

View File

@ -37,26 +37,24 @@ enum
};
static GObject * gimp_item_prop_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_item_prop_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_item_prop_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_item_prop_undo_constructed (GObject *object);
static void gimp_item_prop_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_item_prop_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_item_prop_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_item_prop_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_item_prop_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_item_prop_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_item_prop_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_item_prop_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpItemPropUndo, gimp_item_prop_undo, GIMP_TYPE_ITEM_UNDO)
@ -71,7 +69,7 @@ gimp_item_prop_undo_class_init (GimpItemPropUndoClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_item_prop_undo_constructor;
object_class->constructed = gimp_item_prop_undo_constructed;
object_class->set_property = gimp_item_prop_undo_set_property;
object_class->get_property = gimp_item_prop_undo_get_property;
@ -93,18 +91,14 @@ gimp_item_prop_undo_init (GimpItemPropUndo *undo)
{
}
static GObject *
gimp_item_prop_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_item_prop_undo_constructed (GObject *object)
{
GObject *object;
GimpItemPropUndo *item_prop_undo;
GimpItemPropUndo *item_prop_undo = GIMP_ITEM_PROP_UNDO (object);
GimpItem *item;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
item_prop_undo = GIMP_ITEM_PROP_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
item = GIMP_ITEM_UNDO (object)->item;
@ -144,8 +138,6 @@ gimp_item_prop_undo_constructor (GType type,
default:
g_assert_not_reached ();
}
return object;
}
static void

View File

@ -32,14 +32,12 @@
/* local function prototypes */
static GObject * gimp_item_stack_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_item_stack_constructed (GObject *object);
static void gimp_item_stack_add (GimpContainer *container,
GimpObject *object);
static void gimp_item_stack_remove (GimpContainer *container,
GimpObject *object);
static void gimp_item_stack_add (GimpContainer *container,
GimpObject *object);
static void gimp_item_stack_remove (GimpContainer *container,
GimpObject *object);
G_DEFINE_TYPE (GimpItemStack, gimp_item_stack, GIMP_TYPE_LIST)
@ -53,7 +51,7 @@ gimp_item_stack_class_init (GimpItemStackClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpContainerClass *container_class = GIMP_CONTAINER_CLASS (klass);
object_class->constructor = gimp_item_stack_constructor;
object_class->constructed = gimp_item_stack_constructed;
container_class->add = gimp_item_stack_add;
container_class->remove = gimp_item_stack_remove;
@ -64,22 +62,16 @@ gimp_item_stack_init (GimpItemStack *stack)
{
}
static GObject *
gimp_item_stack_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_item_stack_constructed (GObject *object)
{
GObject *object;
GimpContainer *container;
GimpContainer *container = GIMP_CONTAINER (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
container = GIMP_CONTAINER (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (g_type_is_a (gimp_container_get_children_type (container),
GIMP_TYPE_ITEM));
return object;
}
static void

View File

@ -66,25 +66,23 @@ struct _GimpItemTreePrivate
/* local function prototypes */
static GObject * gimp_item_tree_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_item_tree_finalize (GObject *object);
static void gimp_item_tree_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_item_tree_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_item_tree_constructed (GObject *object);
static void gimp_item_tree_finalize (GObject *object);
static void gimp_item_tree_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_item_tree_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_item_tree_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_item_tree_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_item_tree_uniquefy_name (GimpItemTree *tree,
GimpItem *item,
const gchar *new_name);
static void gimp_item_tree_uniquefy_name (GimpItemTree *tree,
GimpItem *item,
const gchar *new_name);
G_DEFINE_TYPE (GimpItemTree, gimp_item_tree, GIMP_TYPE_OBJECT)
@ -98,7 +96,7 @@ gimp_item_tree_class_init (GimpItemTreeClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
object_class->constructor = gimp_item_tree_constructor;
object_class->constructed = gimp_item_tree_constructed;
object_class->finalize = gimp_item_tree_finalize;
object_class->set_property = gimp_item_tree_set_property;
object_class->get_property = gimp_item_tree_get_property;
@ -143,19 +141,14 @@ gimp_item_tree_init (GimpItemTree *tree)
private->name_hash = g_hash_table_new (g_str_hash, g_str_equal);
}
static GObject *
gimp_item_tree_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_item_tree_constructed (GObject *object)
{
GObject *object;
GimpItemTree *tree;
GimpItemTreePrivate *private;
GimpItemTree *tree = GIMP_ITEM_TREE (object);
GimpItemTreePrivate *private = GIMP_ITEM_TREE_GET_PRIVATE (tree);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
tree = GIMP_ITEM_TREE (object);
private = GIMP_ITEM_TREE_GET_PRIVATE (tree);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_IMAGE (private->image));
g_assert (g_type_is_a (private->container_type, GIMP_TYPE_ITEM_STACK));
@ -167,8 +160,6 @@ gimp_item_tree_constructor (GType type,
"children-type", private->item_type,
"policy", GIMP_CONTAINER_POLICY_STRONG,
NULL);
return object;
}
static void

View File

@ -33,20 +33,18 @@ enum
};
static GObject * gimp_item_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_item_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_item_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_item_undo_constructed (GObject *object);
static void gimp_item_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_item_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_item_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_item_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpItemUndo, gimp_item_undo, GIMP_TYPE_UNDO)
@ -60,7 +58,7 @@ gimp_item_undo_class_init (GimpItemUndoClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_item_undo_constructor;
object_class->constructed = gimp_item_undo_constructed;
object_class->set_property = gimp_item_undo_set_property;
object_class->get_property = gimp_item_undo_get_property;
@ -78,21 +76,15 @@ gimp_item_undo_init (GimpItemUndo *undo)
{
}
static GObject *
gimp_item_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_item_undo_constructed (GObject *object)
{
GObject *object;
GimpItemUndo *item_undo;
GimpItemUndo *item_undo = GIMP_ITEM_UNDO (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
item_undo = GIMP_ITEM_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_ITEM (item_undo->item));
return object;
}
static void

View File

@ -25,13 +25,11 @@
#include "gimplayermaskpropundo.h"
static GObject * gimp_layer_mask_prop_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_layer_mask_prop_undo_constructed (GObject *object);
static void gimp_layer_mask_prop_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_layer_mask_prop_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
G_DEFINE_TYPE (GimpLayerMaskPropUndo, gimp_layer_mask_prop_undo,
@ -46,7 +44,7 @@ gimp_layer_mask_prop_undo_class_init (GimpLayerMaskPropUndoClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_layer_mask_prop_undo_constructor;
object_class->constructed = gimp_layer_mask_prop_undo_constructed;
undo_class->pop = gimp_layer_mask_prop_undo_pop;
}
@ -56,19 +54,17 @@ gimp_layer_mask_prop_undo_init (GimpLayerMaskPropUndo *undo)
{
}
static GObject *
gimp_layer_mask_prop_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_layer_mask_prop_undo_constructed (GObject *object)
{
GObject *object;
GimpLayerMaskPropUndo *layer_mask_prop_undo;
GimpLayerMask *layer_mask;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
layer_mask_prop_undo = GIMP_LAYER_MASK_PROP_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_LAYER_MASK (GIMP_ITEM_UNDO (object)->item));
layer_mask = GIMP_LAYER_MASK (GIMP_ITEM_UNDO (object)->item);
@ -86,8 +82,6 @@ gimp_layer_mask_prop_undo_constructor (GType type,
default:
g_assert_not_reached ();
}
return object;
}
static void

View File

@ -34,26 +34,24 @@ enum
};
static GObject * gimp_layer_mask_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_layer_mask_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_layer_mask_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_layer_mask_undo_constructed (GObject *object);
static void gimp_layer_mask_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_layer_mask_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_layer_mask_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_layer_mask_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_layer_mask_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_layer_mask_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_layer_mask_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_layer_mask_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpLayerMaskUndo, gimp_layer_mask_undo, GIMP_TYPE_ITEM_UNDO)
@ -68,7 +66,7 @@ gimp_layer_mask_undo_class_init (GimpLayerMaskUndoClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_layer_mask_undo_constructor;
object_class->constructed = gimp_layer_mask_undo_constructed;
object_class->set_property = gimp_layer_mask_undo_set_property;
object_class->get_property = gimp_layer_mask_undo_get_property;
@ -89,22 +87,16 @@ gimp_layer_mask_undo_init (GimpLayerMaskUndo *undo)
{
}
static GObject *
gimp_layer_mask_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_layer_mask_undo_constructed (GObject *object)
{
GObject *object;
GimpLayerMaskUndo *layer_mask_undo;
GimpLayerMaskUndo *layer_mask_undo = GIMP_LAYER_MASK_UNDO (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
layer_mask_undo = GIMP_LAYER_MASK_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
g_assert (GIMP_IS_LAYER_MASK (layer_mask_undo->layer_mask));
return object;
}
static void

View File

@ -28,13 +28,11 @@
#include "gimplayerpropundo.h"
static GObject * gimp_layer_prop_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_layer_prop_undo_constructed (GObject *object);
static void gimp_layer_prop_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_layer_prop_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
G_DEFINE_TYPE (GimpLayerPropUndo, gimp_layer_prop_undo, GIMP_TYPE_ITEM_UNDO)
@ -48,7 +46,7 @@ gimp_layer_prop_undo_class_init (GimpLayerPropUndoClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_layer_prop_undo_constructor;
object_class->constructed = gimp_layer_prop_undo_constructed;
undo_class->pop = gimp_layer_prop_undo_pop;
}
@ -58,19 +56,15 @@ gimp_layer_prop_undo_init (GimpLayerPropUndo *undo)
{
}
static GObject *
gimp_layer_prop_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_layer_prop_undo_constructed (GObject *object)
{
GObject *object;
GimpLayerPropUndo *layer_prop_undo;
GimpLayerPropUndo *layer_prop_undo = GIMP_LAYER_PROP_UNDO (object);
GimpImage *image;
GimpLayer *layer;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
layer_prop_undo = GIMP_LAYER_PROP_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
@ -94,8 +88,6 @@ gimp_layer_prop_undo_constructor (GType type,
default:
g_assert_not_reached ();
}
return object;
}
static void

View File

@ -35,24 +35,22 @@ enum
};
static GObject * gimp_layer_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_layer_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_layer_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_layer_undo_constructed (GObject *object);
static void gimp_layer_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_layer_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_layer_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_layer_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_layer_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_layer_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
G_DEFINE_TYPE (GimpLayerUndo, gimp_layer_undo, GIMP_TYPE_ITEM_UNDO)
@ -67,7 +65,7 @@ gimp_layer_undo_class_init (GimpLayerUndoClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_layer_undo_constructor;
object_class->constructed = gimp_layer_undo_constructed;
object_class->set_property = gimp_layer_undo_set_property;
object_class->get_property = gimp_layer_undo_get_property;
@ -100,21 +98,13 @@ gimp_layer_undo_init (GimpLayerUndo *undo)
{
}
static GObject *
gimp_layer_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_layer_undo_constructed (GObject *object)
{
GObject *object;
GimpLayerUndo *layer_undo;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
layer_undo = GIMP_LAYER_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_LAYER (GIMP_ITEM_UNDO (object)->item));
return object;
}
static void

View File

@ -30,18 +30,16 @@
#include "gimpmaskundo.h"
static GObject * gimp_mask_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_mask_undo_constructed (GObject *object);
static gint64 gimp_mask_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_mask_undo_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_mask_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_mask_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_mask_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_mask_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpMaskUndo, gimp_mask_undo, GIMP_TYPE_ITEM_UNDO)
@ -56,7 +54,7 @@ gimp_mask_undo_class_init (GimpMaskUndoClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_mask_undo_constructor;
object_class->constructed = gimp_mask_undo_constructed;
gimp_object_class->get_memsize = gimp_mask_undo_get_memsize;
@ -69,19 +67,15 @@ gimp_mask_undo_init (GimpMaskUndo *undo)
{
}
static GObject *
gimp_mask_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_mask_undo_constructed (GObject *object)
{
GObject *object;
GimpMaskUndo *mask_undo;
GimpMaskUndo *mask_undo = GIMP_MASK_UNDO (object);
GimpChannel *channel;
gint x1, y1, x2, y2;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
mask_undo = GIMP_MASK_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_CHANNEL (GIMP_ITEM_UNDO (object)->item));
@ -104,8 +98,6 @@ gimp_mask_undo_constructor (GType type,
copy_region (&srcPR, &destPR);
}
return object;
}
static gint64

View File

@ -47,9 +47,7 @@ enum
/* local function prototypes */
static GObject * gimp_pattern_clipboard_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_pattern_clipboard_constructed (GObject *object);
static void gimp_pattern_clipboard_set_property (GObject *object,
guint property_id,
const GValue *value,
@ -79,7 +77,7 @@ gimp_pattern_clipboard_class_init (GimpPatternClipboardClass *klass)
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
#endif
object_class->constructor = gimp_pattern_clipboard_constructor;
object_class->constructed = gimp_pattern_clipboard_constructed;
object_class->set_property = gimp_pattern_clipboard_set_property;
object_class->get_property = gimp_pattern_clipboard_get_property;
@ -100,17 +98,13 @@ gimp_pattern_clipboard_init (GimpPatternClipboard *pattern)
pattern->gimp = NULL;
}
static GObject *
gimp_pattern_clipboard_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_pattern_clipboard_constructed (GObject *object)
{
GObject *object;
GimpPatternClipboard *pattern;
GimpPatternClipboard *pattern = GIMP_PATTERN_CLIPBOARD (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
pattern = GIMP_PATTERN_CLIPBOARD (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (pattern->gimp));
@ -119,8 +113,6 @@ gimp_pattern_clipboard_constructor (GType type,
pattern, 0);
gimp_pattern_clipboard_buffer_changed (pattern->gimp, GIMP_PATTERN (pattern));
return object;
}
static void

View File

@ -52,9 +52,7 @@ static void gimp_pdb_progress_init (GimpPdbProgress *progres
GimpPdbProgressClass *klass);
static void gimp_pdb_progress_progress_iface_init (GimpProgressInterface *iface);
static GObject * gimp_pdb_progress_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_pdb_progress_constructed (GObject *object);
static void gimp_pdb_progress_dispose (GObject *object);
static void gimp_pdb_progress_finalize (GObject *object);
static void gimp_pdb_progress_set_property (GObject *object,
@ -124,7 +122,7 @@ gimp_pdb_progress_class_init (GimpPdbProgressClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->constructor = gimp_pdb_progress_constructor;
object_class->constructed = gimp_pdb_progress_constructed;
object_class->dispose = gimp_pdb_progress_dispose;
object_class->finalize = gimp_pdb_progress_finalize;
object_class->set_property = gimp_pdb_progress_set_property;
@ -169,22 +167,16 @@ gimp_pdb_progress_progress_iface_init (GimpProgressInterface *iface)
iface->get_window = gimp_pdb_progress_progress_get_window;
}
static GObject *
gimp_pdb_progress_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_pdb_progress_constructed (GObject *object)
{
GObject *object;
GimpPdbProgress *progress;
GimpPdbProgress *progress = GIMP_PDB_PROGRESS (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
progress = GIMP_PDB_PROGRESS (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_PDB (progress->pdb));
g_assert (GIMP_IS_CONTEXT (progress->context));
return object;
}
static void

View File

@ -34,23 +34,21 @@ enum
};
static GObject * gimp_sample_point_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_sample_point_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_sample_point_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_sample_point_undo_constructed (GObject *object);
static void gimp_sample_point_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_sample_point_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_sample_point_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_sample_point_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_sample_point_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_sample_point_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpSamplePointUndo, gimp_sample_point_undo, GIMP_TYPE_UNDO)
@ -64,7 +62,7 @@ gimp_sample_point_undo_class_init (GimpSamplePointUndoClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_sample_point_undo_constructor;
object_class->constructed = gimp_sample_point_undo_constructed;
object_class->set_property = gimp_sample_point_undo_set_property;
object_class->get_property = gimp_sample_point_undo_get_property;
@ -83,24 +81,18 @@ gimp_sample_point_undo_init (GimpSamplePointUndo *undo)
{
}
static GObject *
gimp_sample_point_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_sample_point_undo_constructed (GObject *object)
{
GObject *object;
GimpSamplePointUndo *sample_point_undo;
GimpSamplePointUndo *sample_point_undo = GIMP_SAMPLE_POINT_UNDO (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
sample_point_undo = GIMP_SAMPLE_POINT_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (sample_point_undo->sample_point != NULL);
sample_point_undo->x = sample_point_undo->sample_point->x;
sample_point_undo->y = sample_point_undo->sample_point->y;
return object;
}
static void

View File

@ -60,9 +60,7 @@ enum
static void gimp_tool_preset_config_iface_init (GimpConfigInterface *iface);
static GObject * gimp_tool_preset_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_tool_preset_constructed (GObject *object);
static void gimp_tool_preset_finalize (GObject *object);
static void gimp_tool_preset_set_property (GObject *object,
guint property_id,
@ -100,7 +98,7 @@ gimp_tool_preset_class_init (GimpToolPresetClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
object_class->constructor = gimp_tool_preset_constructor;
object_class->constructed = gimp_tool_preset_constructed;
object_class->finalize = gimp_tool_preset_finalize;
object_class->set_property = gimp_tool_preset_set_property;
object_class->get_property = gimp_tool_preset_get_property;
@ -168,21 +166,15 @@ gimp_tool_preset_init (GimpToolPreset *tool_preset)
tool_preset->tool_options = NULL;
}
static GObject *
gimp_tool_preset_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_tool_preset_constructed (GObject *object)
{
GObject *object;
GimpToolPreset *preset;
GimpToolPreset *preset = GIMP_TOOL_PRESET (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
preset = GIMP_TOOL_PRESET (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_GIMP (preset->gimp));
return object;
}
static void

View File

@ -57,9 +57,7 @@ enum
};
static GObject * gimp_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_undo_constructed (GObject *object);
static void gimp_undo_finalize (GObject *object);
static void gimp_undo_set_property (GObject *object,
guint property_id,
@ -130,7 +128,7 @@ gimp_undo_class_init (GimpUndoClass *klass)
G_TYPE_NONE, 1,
GIMP_TYPE_UNDO_MODE);
object_class->constructor = gimp_undo_constructor;
object_class->constructed = gimp_undo_constructed;
object_class->finalize = gimp_undo_finalize;
object_class->set_property = gimp_undo_set_property;
object_class->get_property = gimp_undo_get_property;
@ -177,21 +175,15 @@ gimp_undo_init (GimpUndo *undo)
undo->time = time (NULL);
}
static GObject *
gimp_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_undo_constructed (GObject *object)
{
GObject *object;
GimpUndo *undo;
GimpUndo *undo = GIMP_UNDO (object);
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
undo = GIMP_UNDO (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_IMAGE (undo->image));
return object;
}
static void