[gimp/gtk3-port: 319/386] libimp*: add private pointers to all instance structs
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 319/386] libimp*: add private pointers to all instance structs
- Date: Wed, 9 May 2018 09:49:08 +0000 (UTC)
commit f164704e746ecd35c2fc8a8a3dbd981ff0d3af98
Author: Michael Natterer <mitch gimp org>
Date: Thu May 3 12:51:36 2018 +0200
libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
libgimp/gimpaspectpreview.c | 25 ++++---
libgimp/gimpaspectpreview.h | 11 +++-
libgimp/gimpbrushselectbutton.c | 92 +++++++++--------------
libgimp/gimpbrushselectbutton.h | 9 ++-
libgimp/gimpdrawablepreview.c | 32 +++++----
libgimp/gimpdrawablepreview.h | 11 +++-
libgimp/gimpfontselectbutton.c | 74 ++++++++-----------
libgimp/gimpfontselectbutton.h | 11 +++-
libgimp/gimpgradientselectbutton.c | 88 +++++++++--------------
libgimp/gimpgradientselectbutton.h | 9 ++-
libgimp/gimpprocbrowserdialog.h | 12 +++-
libgimp/gimpselectbutton.c | 1 +
libgimp/gimpselectbutton.h | 7 ++-
libgimp/gimptilebackendplugin.h | 2 +-
libgimp/gimpzoompreview.c | 31 ++++----
libgimp/gimpzoompreview.h | 5 +-
libgimpbase/gimpmetadata.c | 2 +-
libgimpcolor/gimpcolorprofile.h | 6 ++-
libgimpcolor/gimpcolortransform.h | 6 ++-
libgimpconfig/gimpcolorconfig.c | 10 +--
libgimpconfig/gimpcolorconfig.h | 25 ++++---
libgimpmodule/gimpmodule.h | 12 +++-
libgimpmodule/gimpmoduledb.h | 12 +++-
libgimpthumb/gimpthumbnail.h | 14 +++-
libgimpwidgets/gimpbrowser.c | 14 ++--
libgimpwidgets/gimpbrowser.h | 11 +++-
libgimpwidgets/gimpbutton.c | 12 +--
libgimpwidgets/gimpbutton.h | 11 +++-
libgimpwidgets/gimpcellrenderercolor.c | 12 ++--
libgimpwidgets/gimpcellrenderercolor.h | 11 +++-
libgimpwidgets/gimpcellrenderertoggle.c | 10 +--
libgimpwidgets/gimpcellrenderertoggle.h | 11 +++-
libgimpwidgets/gimpcolorarea.c | 15 ++--
libgimpwidgets/gimpcolorarea.h | 11 +++-
libgimpwidgets/gimpcolorbutton.c | 14 ++--
libgimpwidgets/gimpcolorbutton.h | 11 +++-
libgimpwidgets/gimpcolordisplay.c | 12 +--
libgimpwidgets/gimpcolordisplay.h | 54 ++++++++------
libgimpwidgets/gimpcolordisplaystack.c | 12 +--
libgimpwidgets/gimpcolordisplaystack.h | 11 +++-
libgimpwidgets/gimpcolorhexentry.c | 14 ++--
libgimpwidgets/gimpcolorhexentry.h | 11 +++-
libgimpwidgets/gimpcolornotebook.h | 4 +
libgimpwidgets/gimpcolorprofilechooserdialog.h | 4 +
libgimpwidgets/gimpcolorprofilecombobox.c | 14 ++--
libgimpwidgets/gimpcolorprofilecombobox.h | 11 +++-
libgimpwidgets/gimpcolorprofilestore.c | 10 ++--
libgimpwidgets/gimpcolorprofilestore.h | 11 +++-
libgimpwidgets/gimpcolorprofileview.h | 4 +
libgimpwidgets/gimpcolorscale.c | 15 ++--
libgimpwidgets/gimpcolorscale.h | 11 +++-
libgimpwidgets/gimpcolorselection.c | 14 ++--
libgimpwidgets/gimpcolorselection.h | 11 +++-
libgimpwidgets/gimpcolorselector.c | 15 ++--
libgimpwidgets/gimpcolorselector.h | 7 ++-
libgimpwidgets/gimpcontroller.h | 16 +++-
libgimpwidgets/gimpdialog.c | 10 ++--
libgimpwidgets/gimpdialog.h | 11 +++-
libgimpwidgets/gimpenumcombobox.h | 11 +++-
libgimpwidgets/gimpenumlabel.c | 10 +--
libgimpwidgets/gimpenumlabel.h | 11 +++-
libgimpwidgets/gimpenumstore.h | 12 +++-
libgimpwidgets/gimpfileentry.h | 12 +++-
libgimpwidgets/gimpframe.h | 11 +++-
libgimpwidgets/gimpintcombobox.c | 25 +++----
libgimpwidgets/gimpintcombobox.h | 12 ++-
libgimpwidgets/gimpintstore.c | 20 +++---
libgimpwidgets/gimpintstore.h | 13 +++-
libgimpwidgets/gimpmemsizeentry.c | 17 +----
libgimpwidgets/gimpmemsizeentry.h | 9 ++-
libgimpwidgets/gimpnumberpairentry.c | 62 +++++++---------
libgimpwidgets/gimpnumberpairentry.h | 9 ++-
libgimpwidgets/gimpoffsetarea.c | 22 +++----
libgimpwidgets/gimpoffsetarea.h | 11 +++-
libgimpwidgets/gimppageselector.c | 47 ++++++------
libgimpwidgets/gimppageselector.h | 11 ++-
libgimpwidgets/gimppatheditor.h | 12 +++-
libgimpwidgets/gimppickbutton.h | 4 +
libgimpwidgets/gimppreview.c | 19 ++++--
libgimpwidgets/gimppreview.h | 21 ++++--
libgimpwidgets/gimppreviewarea.c | 18 ++----
libgimpwidgets/gimppreviewarea.h | 12 +++-
libgimpwidgets/gimpruler.c | 84 ++++++++++------------
libgimpwidgets/gimpruler.h | 9 ++-
libgimpwidgets/gimpscrolledpreview.c | 23 +++---
libgimpwidgets/gimpscrolledpreview.h | 16 +++--
libgimpwidgets/gimpsizeentry.h | 12 +++-
libgimpwidgets/gimpstringcombobox.c | 17 ++---
libgimpwidgets/gimpstringcombobox.h | 12 ++-
libgimpwidgets/gimpunitcombobox.h | 11 +++-
libgimpwidgets/gimpunitstore.c | 16 +++--
libgimpwidgets/gimpunitstore.h | 19 ++++--
libgimpwidgets/gimpzoommodel.c | 23 +++---
libgimpwidgets/gimpzoommodel.h | 12 ++-
94 files changed, 927 insertions(+), 670 deletions(-)
---
diff --git a/libgimp/gimpaspectpreview.c b/libgimp/gimpaspectpreview.c
index 61b0650..a449d4e 100644
--- a/libgimp/gimpaspectpreview.c
+++ b/libgimp/gimpaspectpreview.c
@@ -49,21 +49,18 @@ enum
PROP_DRAWABLE_ID
};
-typedef struct
+struct _GimpAspectPreviewPrivate
{
gint32 drawable_ID;
-} GimpAspectPreviewPrivate;
+};
typedef struct
{
gboolean update;
} PreviewSettings;
+#define GET_PRIVATE(obj) (((GimpAspectPreview *) (obj))->priv)
-#define GIMP_ASPECT_PREVIEW_GET_PRIVATE(obj) \
- G_TYPE_INSTANCE_GET_PRIVATE (preview, \
- GIMP_TYPE_ASPECT_PREVIEW, \
- GimpAspectPreviewPrivate)
static void gimp_aspect_preview_constructed (GObject *object);
static void gimp_aspect_preview_dispose (GObject *object);
@@ -144,6 +141,10 @@ gimp_aspect_preview_class_init (GimpAspectPreviewClass *klass)
static void
gimp_aspect_preview_init (GimpAspectPreview *preview)
{
+ preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview,
+ GIMP_TYPE_ASPECT_PREVIEW,
+ GimpAspectPreviewPrivate);
+
g_object_set (GIMP_PREVIEW (preview)->area,
"check-size", gimp_check_size (),
"check-type", gimp_check_type (),
@@ -197,7 +198,7 @@ gimp_aspect_preview_get_property (GObject *object,
GParamSpec *pspec)
{
GimpAspectPreview *preview = GIMP_ASPECT_PREVIEW (object);
- GimpAspectPreviewPrivate *priv = GIMP_ASPECT_PREVIEW_GET_PRIVATE (preview);
+ GimpAspectPreviewPrivate *priv = GET_PRIVATE (preview);
switch (property_id)
{
@@ -241,7 +242,7 @@ gimp_aspect_preview_style_updated (GtkWidget *widget)
if (preview->area)
{
- GimpAspectPreviewPrivate *priv = GIMP_ASPECT_PREVIEW_GET_PRIVATE (preview);
+ GimpAspectPreviewPrivate *priv = GET_PRIVATE (preview);
gint width;
gint height;
gint size;
@@ -286,7 +287,7 @@ gimp_aspect_preview_draw_buffer (GimpPreview *preview,
const guchar *buffer,
gint rowstride)
{
- GimpAspectPreviewPrivate *priv = GIMP_ASPECT_PREVIEW_GET_PRIVATE (preview);
+ GimpAspectPreviewPrivate *priv = GET_PRIVATE (preview);
gint32 image_ID;
image_ID = gimp_item_get_image (priv->drawable_ID);
@@ -337,7 +338,7 @@ gimp_aspect_preview_transform (GimpPreview *preview,
gint *dest_x,
gint *dest_y)
{
- GimpAspectPreviewPrivate *priv = GIMP_ASPECT_PREVIEW_GET_PRIVATE (preview);
+ GimpAspectPreviewPrivate *priv = GET_PRIVATE (preview);
*dest_x = (gdouble) src_x * preview->width / gimp_drawable_width (priv->drawable_ID);
*dest_y = (gdouble) src_y * preview->height / gimp_drawable_height (priv->drawable_ID);
@@ -350,7 +351,7 @@ gimp_aspect_preview_untransform (GimpPreview *preview,
gint *dest_x,
gint *dest_y)
{
- GimpAspectPreviewPrivate *priv = GIMP_ASPECT_PREVIEW_GET_PRIVATE (preview);
+ GimpAspectPreviewPrivate *priv = GET_PRIVATE (preview);
*dest_x = (gdouble) src_x * gimp_drawable_width (priv->drawable_ID) / preview->width;
*dest_y = (gdouble) src_y * gimp_drawable_height (priv->drawable_ID) / preview->height;
@@ -360,7 +361,7 @@ static void
gimp_aspect_preview_set_drawable_id (GimpAspectPreview *preview,
gint32 drawable_ID)
{
- GimpAspectPreviewPrivate *priv = GIMP_ASPECT_PREVIEW_GET_PRIVATE (preview);
+ GimpAspectPreviewPrivate *priv = GET_PRIVATE (preview);
gint d_width;
gint d_height;
gint width;
diff --git a/libgimp/gimpaspectpreview.h b/libgimp/gimpaspectpreview.h
index c697f05..4ee96cf 100644
--- a/libgimp/gimpaspectpreview.h
+++ b/libgimp/gimpaspectpreview.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_ASPECT_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_ASPECT_PREVIEW,
GimpAspectPreviewClass))
-typedef struct _GimpAspectPreviewClass GimpAspectPreviewClass;
+typedef struct _GimpAspectPreviewPrivate GimpAspectPreviewPrivate;
+typedef struct _GimpAspectPreviewClass GimpAspectPreviewClass;
struct _GimpAspectPreview
{
- GimpPreview parent_instance;
+ GimpPreview parent_instance;
+
+ GimpAspectPreviewPrivate *priv;
};
struct _GimpAspectPreviewClass
@@ -55,6 +58,10 @@ struct _GimpAspectPreviewClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimp/gimpbrushselectbutton.c b/libgimp/gimpbrushselectbutton.c
index 1628ccb..e481df3 100644
--- a/libgimp/gimpbrushselectbutton.c
+++ b/libgimp/gimpbrushselectbutton.c
@@ -47,9 +47,22 @@
#define CELL_SIZE 20
-#define GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),
GIMP_TYPE_BRUSH_SELECT_BUTTON, GimpBrushSelectButtonPrivate))
+enum
+{
+ BRUSH_SET,
+ LAST_SIGNAL
+};
+
+enum
+{
+ PROP_0,
+ PROP_TITLE,
+ PROP_BRUSH_NAME,
+ PROP_BRUSH_OPACITY,
+ PROP_BRUSH_SPACING,
+ PROP_BRUSH_PAINT_MODE
+};
-typedef struct _GimpBrushSelectButtonPrivate GimpBrushSelectButtonPrivate;
struct _GimpBrushSelectButtonPrivate
{
@@ -68,21 +81,7 @@ struct _GimpBrushSelectButtonPrivate
GtkWidget *popup;
};
-enum
-{
- BRUSH_SET,
- LAST_SIGNAL
-};
-
-enum
-{
- PROP_0,
- PROP_TITLE,
- PROP_BRUSH_NAME,
- PROP_BRUSH_OPACITY,
- PROP_BRUSH_SPACING,
- PROP_BRUSH_PAINT_MODE
-};
+#define GET_PRIVATE(obj) (((GimpBrushSelectButton *) (obj))->priv)
/* local function prototypes */
@@ -284,7 +283,12 @@ gimp_brush_select_button_init (GimpBrushSelectButton *button)
gint color_data_size;
guint8 *color_data;
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
+ button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
+ GIMP_TYPE_BRUSH_SELECT_BUTTON,
+ GimpBrushSelectButtonPrivate);
+
+
+ priv = GET_PRIVATE (button);
priv->brush_name = gimp_context_get_brush ();
gimp_brush_get_pixels (priv->brush_name,
@@ -374,7 +378,7 @@ gimp_brush_select_button_get_brush (GimpBrushSelectButton *button,
g_return_val_if_fail (GIMP_IS_BRUSH_SELECT_BUTTON (button), NULL);
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
+ priv = GET_PRIVATE (button);
if (opacity)
*opacity = priv->opacity;
@@ -476,9 +480,7 @@ gimp_brush_select_button_set_brush (GimpBrushSelectButton *button,
static void
gimp_brush_select_button_finalize (GObject *object)
{
- GimpBrushSelectButtonPrivate *priv;
-
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (object);
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (object);
g_free (priv->brush_name);
priv->brush_name = NULL;
@@ -499,13 +501,11 @@ gimp_brush_select_button_set_property (GObject *object,
GParamSpec *pspec)
{
GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (object);
- GimpBrushSelectButtonPrivate *priv;
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
gdouble opacity;
gint32 spacing;
gint32 paint_mode;
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
-
switch (property_id)
{
case PROP_TITLE:
@@ -544,9 +544,7 @@ gimp_brush_select_button_get_property (GObject *object,
GParamSpec *pspec)
{
GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (object);
- GimpBrushSelectButtonPrivate *priv;
-
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
switch (property_id)
{
@@ -582,14 +580,9 @@ gimp_brush_select_button_callback (const gchar *name,
gboolean dialog_closing,
gpointer data)
{
- GimpBrushSelectButton *button;
- GimpBrushSelectButtonPrivate *priv;
- GimpSelectButton *select_button;
-
- button = GIMP_BRUSH_SELECT_BUTTON (data);
-
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
- select_button = GIMP_SELECT_BUTTON (button);
+ GimpBrushSelectButton *button = GIMP_BRUSH_SELECT_BUTTON (data);
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
+ GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
g_free (priv->brush_name);
g_free (priv->mask_data);
@@ -617,11 +610,8 @@ gimp_brush_select_button_callback (const gchar *name,
static void
gimp_brush_select_button_clicked (GimpBrushSelectButton *button)
{
- GimpBrushSelectButtonPrivate *priv;
- GimpSelectButton *select_button;
-
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
- select_button = GIMP_SELECT_BUTTON (button);
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
+ GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
if (select_button->temp_callback)
{
@@ -645,9 +635,7 @@ gimp_brush_select_button_clicked (GimpBrushSelectButton *button)
static void
gimp_brush_select_preview_resize (GimpBrushSelectButton *button)
{
- GimpBrushSelectButtonPrivate *priv;
-
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
if (priv->width > 0 && priv->height > 0)
gimp_brush_select_preview_update (priv->preview,
@@ -661,11 +649,9 @@ gimp_brush_select_preview_events (GtkWidget *widget,
GdkEvent *event,
GimpBrushSelectButton *button)
{
- GimpBrushSelectButtonPrivate *priv;
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
GdkEventButton *bevent;
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
-
if (priv->mask_data)
{
switch (event->type)
@@ -773,7 +759,7 @@ gimp_brush_select_button_open_popup (GimpBrushSelectButton *button,
gint x,
gint y)
{
- GimpBrushSelectButtonPrivate *priv;
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
GtkWidget *frame;
GtkWidget *preview;
GdkMonitor *monitor;
@@ -781,8 +767,6 @@ gimp_brush_select_button_open_popup (GimpBrushSelectButton *button,
gint x_org;
gint y_org;
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
-
if (priv->popup)
gimp_brush_select_button_close_popup (button);
@@ -830,9 +814,7 @@ gimp_brush_select_button_open_popup (GimpBrushSelectButton *button,
static void
gimp_brush_select_button_close_popup (GimpBrushSelectButton *button)
{
- GimpBrushSelectButtonPrivate *priv;
-
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (button);
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (button);
if (priv->popup)
{
@@ -883,12 +865,10 @@ gimp_brush_select_drag_data_received (GimpBrushSelectButton *button,
static GtkWidget *
gimp_brush_select_button_create_inside (GimpBrushSelectButton *brush_button)
{
+ GimpBrushSelectButtonPrivate *priv = GET_PRIVATE (brush_button);
GtkWidget *hbox;
GtkWidget *frame;
GtkWidget *button;
- GimpBrushSelectButtonPrivate *priv;
-
- priv = GIMP_BRUSH_SELECT_BUTTON_GET_PRIVATE (brush_button);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
diff --git a/libgimp/gimpbrushselectbutton.h b/libgimp/gimpbrushselectbutton.h
index 1cad155..2b7286e 100644
--- a/libgimp/gimpbrushselectbutton.h
+++ b/libgimp/gimpbrushselectbutton.h
@@ -40,11 +40,14 @@ G_BEGIN_DECLS
#define GIMP_BRUSH_SELECT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_BRUSH_SELECT_BUTTON, GimpBrushSelectButtonClass))
+typedef struct _GimpBrushSelectButtonPrivate GimpBrushSelectButtonPrivate;
typedef struct _GimpBrushSelectButtonClass GimpBrushSelectButtonClass;
struct _GimpBrushSelectButton
{
- GimpSelectButton parent_instance;
+ GimpSelectButton parent_instance;
+
+ GimpBrushSelectButtonPrivate *priv;
};
struct _GimpBrushSelectButtonClass
@@ -67,6 +70,10 @@ struct _GimpBrushSelectButtonClass
void (*_gimp_reserved2) (void);
void (*_gimp_reserved3) (void);
void (*_gimp_reserved4) (void);
+ void (*_gimp_reserved5) (void);
+ void (*_gimp_reserved6) (void);
+ void (*_gimp_reserved7) (void);
+ void (*_gimp_reserved8) (void);
};
diff --git a/libgimp/gimpdrawablepreview.c b/libgimp/gimpdrawablepreview.c
index 467eced..6381491 100644
--- a/libgimp/gimpdrawablepreview.c
+++ b/libgimp/gimpdrawablepreview.c
@@ -51,21 +51,19 @@ enum
typedef struct
{
- gint32 drawable_ID;
-} GimpDrawablePreviewPrivate;
-
-typedef struct
-{
gint x;
gint y;
gboolean update;
} PreviewSettings;
-#define GIMP_DRAWABLE_PREVIEW_GET_PRIVATE(obj) \
- G_TYPE_INSTANCE_GET_PRIVATE (preview, \
- GIMP_TYPE_DRAWABLE_PREVIEW, \
- GimpDrawablePreviewPrivate)
+struct _GimpDrawablePreviewPrivate
+{
+ gint32 drawable_ID;
+};
+
+#define GET_PRIVATE(obj) (((GimpDrawablePreview *) (obj))->priv)
+
static void gimp_drawable_preview_constructed (GObject *object);
static void gimp_drawable_preview_dispose (GObject *object);
@@ -142,6 +140,10 @@ gimp_drawable_preview_class_init (GimpDrawablePreviewClass *klass)
static void
gimp_drawable_preview_init (GimpDrawablePreview *preview)
{
+ preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview,
+ GIMP_TYPE_DRAWABLE_PREVIEW,
+ GimpDrawablePreviewPrivate);
+
g_object_set (GIMP_PREVIEW (preview)->area,
"check-size", gimp_check_size (),
"check-type", gimp_check_type (),
@@ -259,7 +261,7 @@ gimp_drawable_preview_style_updated (GtkWidget *widget)
static void
gimp_drawable_preview_draw_original (GimpPreview *preview)
{
- GimpDrawablePreviewPrivate *priv = GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview);
+ GimpDrawablePreviewPrivate *priv = GET_PRIVATE (preview);
guchar *buffer;
gint width, height;
gint bpp;
@@ -304,7 +306,7 @@ gimp_drawable_preview_draw_thumb (GimpPreview *preview,
gint width,
gint height)
{
- GimpDrawablePreviewPrivate *priv = GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview);
+ GimpDrawablePreviewPrivate *priv = GET_PRIVATE (preview);
if (priv->drawable_ID > 0)
_gimp_drawable_preview_area_draw_thumb (area, priv->drawable_ID,
@@ -398,7 +400,7 @@ gimp_drawable_preview_draw_area (GimpDrawablePreview *preview,
const guchar *buf,
gint rowstride)
{
- GimpDrawablePreviewPrivate *priv = GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview);
+ GimpDrawablePreviewPrivate *priv = GET_PRIVATE (preview);
GimpPreview *gimp_preview = GIMP_PREVIEW (preview);
gint32 image_ID;
@@ -510,7 +512,7 @@ gimp_drawable_preview_set_drawable_id (GimpDrawablePreview *drawable_preview,
gint32 drawable_ID)
{
GimpPreview *preview = GIMP_PREVIEW (drawable_preview);
- GimpDrawablePreviewPrivate *priv = GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview);
+ GimpDrawablePreviewPrivate *priv = GET_PRIVATE (preview);
gint x1, y1, x2, y2;
g_return_if_fail (priv->drawable_ID < 1);
@@ -607,7 +609,7 @@ gimp_drawable_preview_get_drawable_id (GimpDrawablePreview *preview)
{
g_return_val_if_fail (GIMP_IS_DRAWABLE_PREVIEW (preview), -1);
- return GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview)->drawable_ID;
+ return GET_PRIVATE (preview)->drawable_ID;
}
/**
@@ -626,7 +628,7 @@ gimp_drawable_preview_draw_region (GimpDrawablePreview *preview,
g_return_if_fail (GIMP_IS_DRAWABLE_PREVIEW (preview));
g_return_if_fail (region != NULL);
- priv = GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview);
+ priv = GET_PRIVATE (preview);
g_return_if_fail (priv->drawable_ID > 0);
diff --git a/libgimp/gimpdrawablepreview.h b/libgimp/gimpdrawablepreview.h
index ad9c3b1..8a84411 100644
--- a/libgimp/gimpdrawablepreview.h
+++ b/libgimp/gimpdrawablepreview.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_DRAWABLE_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DRAWABLE_PREVIEW,
GimpDrawablePreviewClass))
-typedef struct _GimpDrawablePreviewClass GimpDrawablePreviewClass;
+typedef struct _GimpDrawablePreviewPrivate GimpDrawablePreviewPrivate;
+typedef struct _GimpDrawablePreviewClass GimpDrawablePreviewClass;
struct _GimpDrawablePreview
{
- GimpScrolledPreview parent_instance;
+ GimpScrolledPreview parent_instance;
+
+ GimpDrawablePreviewPrivate *priv;
};
struct _GimpDrawablePreviewClass
@@ -55,6 +58,10 @@ struct _GimpDrawablePreviewClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimp/gimpfontselectbutton.c b/libgimp/gimpfontselectbutton.c
index 2bb79f3..287efea 100644
--- a/libgimp/gimpfontselectbutton.c
+++ b/libgimp/gimpfontselectbutton.c
@@ -44,20 +44,6 @@
**/
-#define GIMP_FONT_SELECT_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),
GIMP_TYPE_FONT_SELECT_BUTTON, GimpFontSelectButtonPrivate))
-
-typedef struct _GimpFontSelectButtonPrivate GimpFontSelectButtonPrivate;
-
-struct _GimpFontSelectButtonPrivate
-{
- gchar *title;
-
- gchar *font_name; /* local copy */
-
- GtkWidget *inside;
- GtkWidget *label;
-};
-
enum
{
FONT_SET,
@@ -72,6 +58,19 @@ enum
};
+struct _GimpFontSelectButtonPrivate
+{
+ gchar *title;
+
+ gchar *font_name; /* local copy */
+
+ GtkWidget *inside;
+ GtkWidget *label;
+};
+
+#define GET_PRIVATE(obj) (((GimpFontSelectButton *) (obj))->priv)
+
+
/* local function prototypes */
static void gimp_font_select_button_finalize (GObject *object);
@@ -184,7 +183,11 @@ gimp_font_select_button_init (GimpFontSelectButton *button)
{
GimpFontSelectButtonPrivate *priv;
- priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (button);
+ button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
+ GIMP_TYPE_FONT_SELECT_BUTTON,
+ GimpFontSelectButtonPrivate);
+
+ priv = GET_PRIVATE (button);
priv->font_name = NULL;
@@ -237,12 +240,9 @@ gimp_font_select_button_new (const gchar *title,
const gchar *
gimp_font_select_button_get_font (GimpFontSelectButton *button)
{
- GimpFontSelectButtonPrivate *priv;
-
g_return_val_if_fail (GIMP_IS_FONT_SELECT_BUTTON (button), NULL);
- priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (button);
- return priv->font_name;
+ return GET_PRIVATE (button)->font_name;
}
/**
@@ -276,9 +276,7 @@ gimp_font_select_button_set_font (GimpFontSelectButton *button,
static void
gimp_font_select_button_finalize (GObject *object)
{
- GimpFontSelectButtonPrivate *priv;
-
- priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (object);
+ GimpFontSelectButtonPrivate *priv = GET_PRIVATE (object);
g_free (priv->font_name);
priv->font_name = NULL;
@@ -296,9 +294,7 @@ gimp_font_select_button_set_property (GObject *object,
GParamSpec *pspec)
{
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
- GimpFontSelectButtonPrivate *priv;
-
- priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (button);
+ GimpFontSelectButtonPrivate *priv = GET_PRIVATE (button);
switch (property_id)
{
@@ -309,6 +305,7 @@ gimp_font_select_button_set_property (GObject *object,
gimp_font_select_button_set_font (button,
g_value_get_string (value));
break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -322,9 +319,7 @@ gimp_font_select_button_get_property (GObject *object,
GParamSpec *pspec)
{
GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (object);
- GimpFontSelectButtonPrivate *priv;
-
- priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (button);
+ GimpFontSelectButtonPrivate *priv = GET_PRIVATE (button);
switch (property_id)
{
@@ -334,6 +329,7 @@ gimp_font_select_button_get_property (GObject *object,
case PROP_FONT_NAME:
g_value_set_string (value, priv->font_name);
break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -345,14 +341,9 @@ gimp_font_select_button_callback (const gchar *font_name,
gboolean dialog_closing,
gpointer user_data)
{
- GimpFontSelectButton *button;
- GimpFontSelectButtonPrivate *priv;
- GimpSelectButton *select_button;
-
- button = GIMP_FONT_SELECT_BUTTON (user_data);
-
- priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (button);
- select_button = GIMP_SELECT_BUTTON (button);
+ GimpFontSelectButton *button = GIMP_FONT_SELECT_BUTTON (user_data);
+ GimpFontSelectButtonPrivate *priv = GET_PRIVATE (button);
+ GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
g_free (priv->font_name);
priv->font_name = g_strdup (font_name);
@@ -370,11 +361,8 @@ gimp_font_select_button_callback (const gchar *font_name,
static void
gimp_font_select_button_clicked (GimpFontSelectButton *button)
{
- GimpFontSelectButtonPrivate *priv;
- GimpSelectButton *select_button;
-
- priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (button);
- select_button = GIMP_SELECT_BUTTON (button);
+ GimpFontSelectButtonPrivate *priv = GET_PRIVATE (button);
+ GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
if (select_button->temp_callback)
{
@@ -433,12 +421,10 @@ gimp_font_select_drag_data_received (GimpFontSelectButton *button,
static GtkWidget *
gimp_font_select_button_create_inside (GimpFontSelectButton *font_button)
{
+ GimpFontSelectButtonPrivate *priv = GET_PRIVATE (font_button);
GtkWidget *button;
GtkWidget *hbox;
GtkWidget *image;
- GimpFontSelectButtonPrivate *priv;
-
- priv = GIMP_FONT_SELECT_BUTTON_GET_PRIVATE (font_button);
button = gtk_button_new ();
diff --git a/libgimp/gimpfontselectbutton.h b/libgimp/gimpfontselectbutton.h
index f9dc241..9a700f7 100644
--- a/libgimp/gimpfontselectbutton.h
+++ b/libgimp/gimpfontselectbutton.h
@@ -40,11 +40,14 @@ G_BEGIN_DECLS
#define GIMP_FONT_SELECT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_FONT_SELECT_BUTTON, GimpFontSelectButtonClass))
-typedef struct _GimpFontSelectButtonClass GimpFontSelectButtonClass;
+typedef struct _GimpFontSelectButtonPrivate GimpFontSelectButtonPrivate;
+typedef struct _GimpFontSelectButtonClass GimpFontSelectButtonClass;
struct _GimpFontSelectButton
{
- GimpSelectButton parent_instance;
+ GimpSelectButton parent_instance;
+
+ GimpFontSelectButtonPrivate *priv;
};
struct _GimpFontSelectButtonClass
@@ -61,6 +64,10 @@ struct _GimpFontSelectButtonClass
void (*_gimp_reserved2) (void);
void (*_gimp_reserved3) (void);
void (*_gimp_reserved4) (void);
+ void (*_gimp_reserved5) (void);
+ void (*_gimp_reserved6) (void);
+ void (*_gimp_reserved7) (void);
+ void (*_gimp_reserved8) (void);
};
diff --git a/libgimp/gimpgradientselectbutton.c b/libgimp/gimpgradientselectbutton.c
index b00dad7..0b90886 100644
--- a/libgimp/gimpgradientselectbutton.c
+++ b/libgimp/gimpgradientselectbutton.c
@@ -47,10 +47,19 @@
#define CELL_HEIGHT 18
#define CELL_WIDTH 84
+enum
+{
+ GRADIENT_SET,
+ LAST_SIGNAL
+};
-#define GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),
GIMP_TYPE_GRADIENT_SELECT_BUTTON, GimpGradientSelectButtonPrivate))
+enum
+{
+ PROP_0,
+ PROP_TITLE,
+ PROP_GRADIENT_NAME
+};
-typedef struct _GimpGradientSelectButtonPrivate GimpGradientSelectButtonPrivate;
struct _GimpGradientSelectButtonPrivate
{
@@ -66,18 +75,7 @@ struct _GimpGradientSelectButtonPrivate
GtkWidget *preview;
};
-enum
-{
- GRADIENT_SET,
- LAST_SIGNAL
-};
-
-enum
-{
- PROP_0,
- PROP_TITLE,
- PROP_GRADIENT_NAME
-};
+#define GET_PRIVATE(obj) (((GimpGradientSelectButton *) (obj))->priv)
/* local function prototypes */
@@ -206,7 +204,11 @@ gimp_gradient_select_button_init (GimpGradientSelectButton *button)
{
GimpGradientSelectButtonPrivate *priv;
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (button);
+ button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
+ GIMP_TYPE_GRADIENT_SELECT_BUTTON,
+ GimpGradientSelectButtonPrivate);
+
+ priv = GET_PRIVATE (button);
priv->gradient_name = gimp_context_get_gradient ();
priv->sample_size = CELL_WIDTH;
@@ -261,12 +263,9 @@ gimp_gradient_select_button_new (const gchar *title,
const gchar *
gimp_gradient_select_button_get_gradient (GimpGradientSelectButton *button)
{
- GimpGradientSelectButtonPrivate *priv;
-
g_return_val_if_fail (GIMP_IS_GRADIENT_SELECT_BUTTON (button), NULL);
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (button);
- return priv->gradient_name;
+ return GET_PRIVATE (button)->gradient_name;
}
/**
@@ -287,7 +286,7 @@ gimp_gradient_select_button_set_gradient (GimpGradientSelectButton *button,
g_return_if_fail (GIMP_IS_GRADIENT_SELECT_BUTTON (button));
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (button);
+ priv = GET_PRIVATE (button);
select_button = GIMP_SELECT_BUTTON (button);
if (select_button->temp_callback)
@@ -328,9 +327,7 @@ gimp_gradient_select_button_set_gradient (GimpGradientSelectButton *button,
static void
gimp_gradient_select_button_finalize (GObject *object)
{
- GimpGradientSelectButtonPrivate *priv;
-
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (object);
+ GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (object);
g_free (priv->gradient_name);
priv->gradient_name = NULL;
@@ -350,11 +347,8 @@ gimp_gradient_select_button_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GimpGradientSelectButton *button;
- GimpGradientSelectButtonPrivate *priv;
-
- button = GIMP_GRADIENT_SELECT_BUTTON (object);
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (button);
+ GimpGradientSelectButton *button = GIMP_GRADIENT_SELECT_BUTTON (object);
+ GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
@@ -365,6 +359,7 @@ gimp_gradient_select_button_set_property (GObject *object,
gimp_gradient_select_button_set_gradient (button,
g_value_get_string (value));
break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -377,11 +372,7 @@ gimp_gradient_select_button_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GimpGradientSelectButton *button;
- GimpGradientSelectButtonPrivate *priv;
-
- button = GIMP_GRADIENT_SELECT_BUTTON (object);
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (button);
+ GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
@@ -391,6 +382,7 @@ gimp_gradient_select_button_get_property (GObject *object,
case PROP_GRADIENT_NAME:
g_value_set_string (value, priv->gradient_name);
break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -404,14 +396,9 @@ gimp_gradient_select_button_callback (const gchar *gradient_name,
gboolean dialog_closing,
gpointer user_data)
{
- GimpGradientSelectButton *button;
- GimpGradientSelectButtonPrivate *priv;
- GimpSelectButton *select_button;
-
- button = GIMP_GRADIENT_SELECT_BUTTON (user_data);
-
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (button);
- select_button = GIMP_SELECT_BUTTON (button);
+ GimpGradientSelectButton *button = user_data;
+ GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (button);
+ GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
g_free (priv->gradient_name);
g_free (priv->gradient_data);
@@ -433,11 +420,8 @@ gimp_gradient_select_button_callback (const gchar *gradient_name,
static void
gimp_gradient_select_button_clicked (GimpGradientSelectButton *button)
{
- GimpGradientSelectButtonPrivate *priv;
- GimpSelectButton *select_button;
-
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (button);
- select_button = GIMP_SELECT_BUTTON (button);
+ GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (button);
+ GimpSelectButton *select_button = GIMP_SELECT_BUTTON (button);
if (select_button->temp_callback)
{
@@ -460,11 +444,9 @@ gimp_gradient_select_preview_size_allocate (GtkWidget *widget,
GtkAllocation *allocation,
GimpGradientSelectButton *button)
{
+ GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (button);
gdouble *samples;
gint n_samples;
- GimpGradientSelectButtonPrivate *priv;
-
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (button);
if (gimp_gradient_get_uniform_samples (priv->gradient_name,
allocation->width,
@@ -485,7 +467,7 @@ gimp_gradient_select_preview_draw (GtkWidget *widget,
cairo_t *cr,
GimpGradientSelectButton *button)
{
- GimpGradientSelectButtonPrivate *priv;
+ GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (button);
GtkAllocation allocation;
cairo_pattern_t *pattern;
cairo_surface_t *surface;
@@ -494,8 +476,6 @@ gimp_gradient_select_preview_draw (GtkWidget *widget,
gint width;
gint x;
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (button);
-
src = priv->gradient_data;
if (! src)
return FALSE;
@@ -583,10 +563,8 @@ gimp_gradient_select_drag_data_received (GimpGradientSelectButton *button,
static GtkWidget *
gimp_gradient_select_button_create_inside (GimpGradientSelectButton *gradient_button)
{
+ GimpGradientSelectButtonPrivate *priv = GET_PRIVATE (gradient_button);
GtkWidget *button;
- GimpGradientSelectButtonPrivate *priv;
-
- priv = GIMP_GRADIENT_SELECT_BUTTON_GET_PRIVATE (gradient_button);
button = gtk_button_new ();
diff --git a/libgimp/gimpgradientselectbutton.h b/libgimp/gimpgradientselectbutton.h
index c268acc..dd8b9db 100644
--- a/libgimp/gimpgradientselectbutton.h
+++ b/libgimp/gimpgradientselectbutton.h
@@ -40,11 +40,14 @@ G_BEGIN_DECLS
#define GIMP_GRADIENT_SELECT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_GRADIENT_SELECT_BUTTON, GimpGradientSelectButtonClass))
+typedef struct _GimpGradientSelectButtonPrivate GimpGradientSelectButtonPrivate;
typedef struct _GimpGradientSelectButtonClass GimpGradientSelectButtonClass;
struct _GimpGradientSelectButton
{
- GimpSelectButton parent_instance;
+ GimpSelectButton parent_instance;
+
+ GimpGradientSelectButtonPrivate *priv;
};
struct _GimpGradientSelectButtonClass
@@ -63,6 +66,10 @@ struct _GimpGradientSelectButtonClass
void (*_gimp_reserved2) (void);
void (*_gimp_reserved3) (void);
void (*_gimp_reserved4) (void);
+ void (*_gimp_reserved5) (void);
+ void (*_gimp_reserved6) (void);
+ void (*_gimp_reserved7) (void);
+ void (*_gimp_reserved8) (void);
};
diff --git a/libgimp/gimpprocbrowserdialog.h b/libgimp/gimpprocbrowserdialog.h
index 508aefc..75d3a89 100644
--- a/libgimp/gimpprocbrowserdialog.h
+++ b/libgimp/gimpprocbrowserdialog.h
@@ -39,12 +39,16 @@ G_BEGIN_DECLS
#define GIMP_PROC_BROWSER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_PROC_BROWSER_DIALOG, GimpProcBrowserDialogClass))
-typedef struct _GimpProcBrowserDialogClass GimpProcBrowserDialogClass;
+typedef struct _GimpProcBrowserDialogPrivate GimpProcBrowserDialogPrivate;
+typedef struct _GimpProcBrowserDialogClass GimpProcBrowserDialogClass;
struct _GimpProcBrowserDialog
{
- GimpDialog parent_instance;
+ GimpDialog parent_instance;
+ GimpProcBrowserDialogPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
GtkWidget *browser;
GtkListStore *store;
@@ -63,6 +67,10 @@ struct _GimpProcBrowserDialogClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimp/gimpselectbutton.c b/libgimp/gimpselectbutton.c
index 72c83c5..dfc906b 100644
--- a/libgimp/gimpselectbutton.c
+++ b/libgimp/gimpselectbutton.c
@@ -46,6 +46,7 @@ static void gimp_select_button_dispose (GObject *object);
G_DEFINE_TYPE (GimpSelectButton, gimp_select_button, GTK_TYPE_BOX)
+
static void
gimp_select_button_class_init (GimpSelectButtonClass *klass)
{
diff --git a/libgimp/gimpselectbutton.h b/libgimp/gimpselectbutton.h
index 399f4b5..1ca4ab6 100644
--- a/libgimp/gimpselectbutton.h
+++ b/libgimp/gimpselectbutton.h
@@ -38,12 +38,16 @@ G_BEGIN_DECLS
#define GIMP_SELECT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_SELECT_BUTTON,
GimpSelectButtonClass))
+typedef struct _GimpSelectButtonPrivate GimpSelectButtonPrivate;
typedef struct _GimpSelectButtonClass GimpSelectButtonClass;
struct _GimpSelectButton
{
- GtkBox parent_instance;
+ GtkBox parent_instance;
+ GimpSelectButtonPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
const gchar *temp_callback;
};
@@ -63,6 +67,7 @@ struct _GimpSelectButtonClass
void (*_gimp_reserved5) (void);
void (*_gimp_reserved6) (void);
void (*_gimp_reserved7) (void);
+ void (*_gimp_reserved8) (void);
};
diff --git a/libgimp/gimptilebackendplugin.h b/libgimp/gimptilebackendplugin.h
index 98f1f27..8f7329f 100644
--- a/libgimp/gimptilebackendplugin.h
+++ b/libgimp/gimptilebackendplugin.h
@@ -39,7 +39,7 @@ typedef struct _GimpTileBackendPluginPrivate GimpTileBackendPluginPrivate;
struct _GimpTileBackendPlugin
{
- GeglTileBackend parent_instance;
+ GeglTileBackend parent_instance;
GimpTileBackendPluginPrivate *priv;
};
diff --git a/libgimp/gimpzoompreview.c b/libgimp/gimpzoompreview.c
index 8724334..02f7932 100644
--- a/libgimp/gimpzoompreview.c
+++ b/libgimp/gimpzoompreview.c
@@ -50,6 +50,11 @@ enum
PROP_MODEL
};
+typedef struct
+{
+ gboolean update;
+} PreviewSettings;
+
struct _GimpZoomPreviewPrivate
{
@@ -58,14 +63,8 @@ struct _GimpZoomPreviewPrivate
GdkRectangle extents;
};
-typedef struct
-{
- gboolean update;
-} PreviewSettings;
-
+#define GET_PRIVATE(obj) (((GimpZoomPreview *) (obj))->priv)
-#define GIMP_ZOOM_PREVIEW_GET_PRIVATE(obj) \
- ((GimpZoomPreviewPrivate *) ((GimpZoomPreview *) (obj))->priv)
static void gimp_zoom_preview_constructed (GObject *object);
static void gimp_zoom_preview_finalize (GObject *object);
@@ -209,7 +208,7 @@ gimp_zoom_preview_init (GimpZoomPreview *preview)
static void
gimp_zoom_preview_constructed (GObject *object)
{
- GimpZoomPreviewPrivate *priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (object);
+ GimpZoomPreviewPrivate *priv = GET_PRIVATE (object);
gchar *data_name;
PreviewSettings settings;
@@ -243,7 +242,7 @@ gimp_zoom_preview_constructed (GObject *object)
static void
gimp_zoom_preview_finalize (GObject *object)
{
- GimpZoomPreviewPrivate *priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (object);
+ GimpZoomPreviewPrivate *priv = GET_PRIVATE (object);
g_clear_object (&priv->model);
@@ -385,7 +384,7 @@ gimp_zoom_preview_style_updated (GtkWidget *widget)
if (preview->area)
{
- GimpZoomPreviewPrivate *priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview);
+ GimpZoomPreviewPrivate *priv = GET_PRIVATE (preview);
gint size;
gint width, height;
gint x1, y1;
@@ -428,7 +427,7 @@ gimp_zoom_preview_scroll_event (GtkWidget *widget,
{
if (event->state & GDK_CONTROL_MASK)
{
- GimpZoomPreviewPrivate *priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview);
+ GimpZoomPreviewPrivate *priv = GET_PRIVATE (preview);
gimp_scrolled_preview_freeze (GIMP_SCROLLED_PREVIEW (preview));
@@ -667,7 +666,7 @@ static void
gimp_zoom_preview_set_model (GimpZoomPreview *preview,
GimpZoomModel *model)
{
- GimpZoomPreviewPrivate *priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview);
+ GimpZoomPreviewPrivate *priv = GET_PRIVATE (preview);
GtkWidget *button_bar;
GtkWidget *button;
GtkWidget *box;
@@ -710,7 +709,7 @@ gimp_zoom_preview_get_source_area (GimpPreview *preview,
gint *w,
gint *h)
{
- GimpZoomPreviewPrivate *priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview);
+ GimpZoomPreviewPrivate *priv = GET_PRIVATE (preview);
gdouble zoom = gimp_zoom_model_get_factor (priv->model);
gimp_zoom_preview_untransform (preview, 0, 0, x, y);
@@ -789,7 +788,7 @@ gimp_zoom_preview_get_drawable_id (GimpZoomPreview *preview)
{
g_return_val_if_fail (GIMP_IS_ZOOM_PREVIEW (preview), -1);
- return GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview)->drawable_ID;
+ return GET_PRIVATE (preview)->drawable_ID;
}
/**
@@ -807,7 +806,7 @@ gimp_zoom_preview_get_model (GimpZoomPreview *preview)
{
g_return_val_if_fail (GIMP_IS_ZOOM_PREVIEW (preview), NULL);
- return GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview)->model;
+ return GET_PRIVATE (preview)->model;
}
/**
@@ -827,7 +826,7 @@ gimp_zoom_preview_get_factor (GimpZoomPreview *preview)
g_return_val_if_fail (GIMP_IS_ZOOM_PREVIEW (preview), 1.0);
- priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview);
+ priv = GET_PRIVATE (preview);
return priv->model ? gimp_zoom_model_get_factor (priv->model) : 1.0;
}
diff --git a/libgimp/gimpzoompreview.h b/libgimp/gimpzoompreview.h
index 89b91a3..3e6e1be 100644
--- a/libgimp/gimpzoompreview.h
+++ b/libgimp/gimpzoompreview.h
@@ -47,7 +47,6 @@ struct _GimpZoomPreview
{
GimpScrolledPreview parent_instance;
- /*< private >*/
GimpZoomPreviewPrivate *priv;
};
@@ -60,6 +59,10 @@ struct _GimpZoomPreviewClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpbase/gimpmetadata.c b/libgimpbase/gimpmetadata.c
index 88d7121..78fc313 100644
--- a/libgimpbase/gimpmetadata.c
+++ b/libgimpbase/gimpmetadata.c
@@ -38,8 +38,8 @@
#include "libgimp/libgimp-intl.h"
-typedef struct _GimpMetadataClass GimpMetadataClass;
typedef struct _GimpMetadataPrivate GimpMetadataPrivate;
+typedef struct _GimpMetadataClass GimpMetadataClass;
struct _GimpMetadata
{
diff --git a/libgimpcolor/gimpcolorprofile.h b/libgimpcolor/gimpcolorprofile.h
index d7f43f4..9619b57 100644
--- a/libgimpcolor/gimpcolorprofile.h
+++ b/libgimpcolor/gimpcolorprofile.h
@@ -40,8 +40,8 @@ G_BEGIN_DECLS
#define GIMP_COLOR_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_PROFILE,
GimpColorProfileClass))
-typedef struct _GimpColorProfileClass GimpColorProfileClass;
typedef struct _GimpColorProfilePrivate GimpColorProfilePrivate;
+typedef struct _GimpColorProfileClass GimpColorProfileClass;
struct _GimpColorProfile
{
@@ -59,6 +59,10 @@ struct _GimpColorProfileClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpcolor/gimpcolortransform.h b/libgimpcolor/gimpcolortransform.h
index 7906017..f52dc50 100644
--- a/libgimpcolor/gimpcolortransform.h
+++ b/libgimpcolor/gimpcolortransform.h
@@ -48,8 +48,8 @@ typedef enum
#define GIMP_COLOR_TRANSFORM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_TRANSFORM,
GimpColorTransformClass))
-typedef struct _GimpColorTransformClass GimpColorTransformClass;
typedef struct _GimpColorTransformPrivate GimpColorTransformPrivate;
+typedef struct _GimpColorTransformClass GimpColorTransformClass;
struct _GimpColorTransform
{
@@ -71,6 +71,10 @@ struct _GimpColorTransformClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpconfig/gimpcolorconfig.c b/libgimpconfig/gimpcolorconfig.c
index c9b7d9d..ef7ee63 100644
--- a/libgimpconfig/gimpcolorconfig.c
+++ b/libgimpconfig/gimpcolorconfig.c
@@ -132,18 +132,13 @@ enum
};
-typedef struct _GimpColorConfigPrivate GimpColorConfigPrivate;
-
struct _GimpColorConfigPrivate
{
gboolean display_optimize;
gboolean simulation_optimize;
};
-#define GET_PRIVATE(obj) \
- G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_COLOR_CONFIG, \
- GimpColorConfigPrivate)
+#define GET_PRIVATE(obj) (((GimpColorConfig *) (obj))->priv)
static void gimp_color_config_finalize (GObject *object);
@@ -308,6 +303,9 @@ gimp_color_config_class_init (GimpColorConfigClass *klass)
static void
gimp_color_config_init (GimpColorConfig *config)
{
+ config->priv = G_TYPE_INSTANCE_GET_PRIVATE (config,
+ GIMP_TYPE_COLOR_CONFIG,
+ GimpColorConfigPrivate);
}
static void
diff --git a/libgimpconfig/gimpcolorconfig.h b/libgimpconfig/gimpcolorconfig.h
index d716210..7ace403 100644
--- a/libgimpconfig/gimpcolorconfig.h
+++ b/libgimpconfig/gimpcolorconfig.h
@@ -34,13 +34,16 @@
#define GIMP_IS_COLOR_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_CONFIG))
-typedef struct _GimpColorConfigClass GimpColorConfigClass;
+typedef struct _GimpColorConfigPrivate GimpColorConfigPrivate;
+typedef struct _GimpColorConfigClass GimpColorConfigClass;
struct _GimpColorConfig
{
- GObject parent_instance;
+ GObject parent_instance;
- /*< public >*/
+ GimpColorConfigPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
GimpColorManagementMode mode;
gchar *rgb_profile;
gchar *cmyk_profile;
@@ -57,12 +60,15 @@ struct _GimpColorConfig
gboolean simulation_use_black_point_compensation;
gchar *gray_profile;
+};
+
+struct _GimpColorConfigClass
+{
+ GObjectClass parent_class;
- /*< private >*/
- /* Padding for future expansion */
-#if (GLIB_SIZEOF_VOID_P == 8)
+ void (* _gimp_reserved1) (void);
+ void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
-#endif
void (* _gimp_reserved4) (void);
void (* _gimp_reserved5) (void);
void (* _gimp_reserved6) (void);
@@ -70,11 +76,6 @@ struct _GimpColorConfig
void (* _gimp_reserved8) (void);
};
-struct _GimpColorConfigClass
-{
- GObjectClass parent_class;
-};
-
GType gimp_color_config_get_type (void) G_GNUC_CONST;
diff --git a/libgimpmodule/gimpmodule.h b/libgimpmodule/gimpmodule.h
index e2d97be..419c49e 100644
--- a/libgimpmodule/gimpmodule.h
+++ b/libgimpmodule/gimpmodule.h
@@ -151,7 +151,8 @@ G_MODULE_EXPORT gboolean gimp_module_register (GTypeModule *module
#define GIMP_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_MODULE, GimpModuleClass))
-typedef struct _GimpModuleClass GimpModuleClass;
+typedef struct _GimpModulePrivate GimpModulePrivate;
+typedef struct _GimpModuleClass GimpModuleClass;
/**
* GimpModule:
@@ -171,8 +172,11 @@ typedef struct _GimpModuleClass GimpModuleClass;
**/
struct _GimpModule
{
- GTypeModule parent_instance;
+ GTypeModule parent_instance;
+ GimpModulePrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
/*< public >*/
gchar *filename; /* path to the module */
gboolean verbose; /* verbose error reporting */
@@ -204,6 +208,10 @@ struct _GimpModuleClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpmodule/gimpmoduledb.h b/libgimpmodule/gimpmoduledb.h
index ac9dc8a..959427f 100644
--- a/libgimpmodule/gimpmoduledb.h
+++ b/libgimpmodule/gimpmoduledb.h
@@ -34,12 +34,16 @@ G_BEGIN_DECLS
#define GIMP_MODULE_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_MODULE_DB,
GimpModuleDBClass))
-typedef struct _GimpModuleDBClass GimpModuleDBClass;
+typedef struct _GimpModuleDBPrivate GimpModuleDBPrivate;
+typedef struct _GimpModuleDBClass GimpModuleDBClass;
struct _GimpModuleDB
{
- GObject parent_instance;
+ GObject parent_instance;
+ GimpModuleDBPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
/*< private >*/
GList *modules;
@@ -63,6 +67,10 @@ struct _GimpModuleDBClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpthumb/gimpthumbnail.h b/libgimpthumb/gimpthumbnail.h
index c3fecc0..67e9a65 100644
--- a/libgimpthumb/gimpthumbnail.h
+++ b/libgimpthumb/gimpthumbnail.h
@@ -40,7 +40,8 @@ G_BEGIN_DECLS
#define GIMP_THUMBNAIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_THUMBNAIL,
GimpThumbnailClass))
-typedef struct _GimpThumbnailClass GimpThumbnailClass;
+typedef struct _GimpThumbnailPrivate GimpThumbnailPrivate;
+typedef struct _GimpThumbnailClass GimpThumbnailClass;
/**
* GimpThumbnail:
@@ -50,8 +51,11 @@ typedef struct _GimpThumbnailClass GimpThumbnailClass;
**/
struct _GimpThumbnail
{
- GObject parent_instance;
+ GObject parent_instance;
+ GimpThumbnailPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
/*< private >*/
GimpThumbState image_state;
gchar *image_uri;
@@ -71,8 +75,6 @@ struct _GimpThumbnail
gint64 thumb_mtime;
gchar *image_mimetype;
-
- gpointer _reserved_2;
};
struct _GimpThumbnailClass
@@ -84,6 +86,10 @@ struct _GimpThumbnailClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpbrowser.c b/libgimpwidgets/gimpbrowser.c
index 352a40d..441385a 100644
--- a/libgimpwidgets/gimpbrowser.c
+++ b/libgimpwidgets/gimpbrowser.c
@@ -50,8 +50,6 @@ enum
};
-typedef struct _GimpBrowserPrivate GimpBrowserPrivate;
-
struct _GimpBrowserPrivate
{
GtkWidget *left_vbox;
@@ -68,9 +66,7 @@ struct _GimpBrowserPrivate
GtkWidget *right_widget;
};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_BROWSER, \
- GimpBrowserPrivate)
+#define GET_PRIVATE(obj) (((GimpBrowser *) (obj))->priv)
static void gimp_browser_dispose (GObject *object);
@@ -119,12 +115,18 @@ gimp_browser_class_init (GimpBrowserClass *klass)
static void
gimp_browser_init (GimpBrowser *browser)
{
- GimpBrowserPrivate *priv = GET_PRIVATE (browser);
+ GimpBrowserPrivate *priv;
GtkWidget *hbox;
GtkWidget *label;
GtkWidget *scrolled_window;
GtkWidget *viewport;
+ browser->priv = G_TYPE_INSTANCE_GET_PRIVATE (browser,
+ GIMP_TYPE_BROWSER,
+ GimpBrowserPrivate);
+
+ priv = GET_PRIVATE (browser);
+
gtk_orientable_set_orientation (GTK_ORIENTABLE (browser),
GTK_ORIENTATION_HORIZONTAL);
diff --git a/libgimpwidgets/gimpbrowser.h b/libgimpwidgets/gimpbrowser.h
index af8b60c..490c00d 100644
--- a/libgimpwidgets/gimpbrowser.h
+++ b/libgimpwidgets/gimpbrowser.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BROWSER, GimpBrowserClass))
-typedef struct _GimpBrowserClass GimpBrowserClass;
+typedef struct _GimpBrowserPrivate GimpBrowserPrivate;
+typedef struct _GimpBrowserClass GimpBrowserClass;
struct _GimpBrowser
{
- GtkPaned parent_instance;
+ GtkPaned parent_instance;
+
+ GimpBrowserPrivate *priv;
};
struct _GimpBrowserClass
@@ -59,6 +62,10 @@ struct _GimpBrowserClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpbutton.c b/libgimpwidgets/gimpbutton.c
index 43af4ae..acf565e 100644
--- a/libgimpwidgets/gimpbutton.c
+++ b/libgimpwidgets/gimpbutton.c
@@ -46,16 +46,12 @@ enum
};
-typedef struct _GimpButtonPrivate GimpButtonPrivate;
-
struct _GimpButtonPrivate
{
GdkModifierType press_state;
};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_BUTTON, \
- GimpButtonPrivate)
+#define GET_PRIVATE(obj) (((GimpButton *) (obj))->priv)
static gboolean gimp_button_button_press (GtkWidget *widget,
@@ -105,9 +101,9 @@ gimp_button_class_init (GimpButtonClass *klass)
static void
gimp_button_init (GimpButton *button)
{
- GimpButtonPrivate *private = GET_PRIVATE (button);
-
- private->press_state = 0;
+ button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
+ GIMP_TYPE_BUTTON,
+ GimpButtonPrivate);
}
/**
diff --git a/libgimpwidgets/gimpbutton.h b/libgimpwidgets/gimpbutton.h
index 7476ae4..32d4a6b 100644
--- a/libgimpwidgets/gimpbutton.h
+++ b/libgimpwidgets/gimpbutton.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BUTTON, GimpButtonClass))
-typedef struct _GimpButtonClass GimpButtonClass;
+typedef struct _GimpButtonPrivate GimpButtonPrivate;
+typedef struct _GimpButtonClass GimpButtonClass;
struct _GimpButton
{
- GtkButton parent_instance;
+ GtkButton parent_instance;
+
+ GimpButtonPrivate *priv;
};
struct _GimpButtonClass
@@ -58,6 +61,10 @@ struct _GimpButtonClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcellrenderercolor.c b/libgimpwidgets/gimpcellrenderercolor.c
index 0557c61..01321b6 100644
--- a/libgimpwidgets/gimpcellrenderercolor.c
+++ b/libgimpwidgets/gimpcellrenderercolor.c
@@ -54,8 +54,6 @@ enum
};
-typedef struct _GimpCellRendererColorPrivate GimpCellRendererColorPrivate;
-
struct _GimpCellRendererColorPrivate
{
GimpRGB color;
@@ -64,9 +62,7 @@ struct _GimpCellRendererColorPrivate
gint border;
};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_CELL_RENDERER_COLOR, \
- GimpCellRendererColorPrivate)
+#define GET_PRIVATE(obj) (((GimpCellRendererColor *) (obj))->priv)
static void gimp_cell_renderer_color_get_property (GObject *object,
@@ -141,9 +137,11 @@ gimp_cell_renderer_color_class_init (GimpCellRendererColorClass *klass)
static void
gimp_cell_renderer_color_init (GimpCellRendererColor *cell)
{
- GimpCellRendererColorPrivate *private = GET_PRIVATE (cell);
+ cell->priv = G_TYPE_INSTANCE_GET_PRIVATE (cell,
+ GIMP_TYPE_CELL_RENDERER_COLOR,
+ GimpCellRendererColorPrivate);
- gimp_rgba_set (&private->color, 0.0, 0.0, 0.0, 1.0);
+ gimp_rgba_set (&cell->priv->color, 0.0, 0.0, 0.0, 1.0);
}
static void
diff --git a/libgimpwidgets/gimpcellrenderercolor.h b/libgimpwidgets/gimpcellrenderercolor.h
index 3ab8276..80c35a6 100644
--- a/libgimpwidgets/gimpcellrenderercolor.h
+++ b/libgimpwidgets/gimpcellrenderercolor.h
@@ -37,11 +37,14 @@ G_BEGIN_DECLS
#define GIMP_CELL_RENDERER_COLOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_CELL_RENDERER_COLOR, GimpCellRendererColorClass))
-typedef struct _GimpCellRendererColorClass GimpCellRendererColorClass;
+typedef struct _GimpCellRendererColorPrivate GimpCellRendererColorPrivate;
+typedef struct _GimpCellRendererColorClass GimpCellRendererColorClass;
struct _GimpCellRendererColor
{
- GtkCellRenderer parent_instance;
+ GtkCellRenderer parent_instance;
+
+ GimpCellRendererColorPrivate *priv;
};
struct _GimpCellRendererColorClass
@@ -53,6 +56,10 @@ struct _GimpCellRendererColorClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcellrenderertoggle.c b/libgimpwidgets/gimpcellrenderertoggle.c
index f957395..854e6db 100644
--- a/libgimpwidgets/gimpcellrenderertoggle.c
+++ b/libgimpwidgets/gimpcellrenderertoggle.c
@@ -57,8 +57,6 @@ enum
};
-typedef struct _GimpCellRendererTogglePrivate GimpCellRendererTogglePrivate;
-
struct _GimpCellRendererTogglePrivate
{
gchar *icon_name;
@@ -68,10 +66,7 @@ struct _GimpCellRendererTogglePrivate
GdkPixbuf *pixbuf;
};
-#define GET_PRIVATE(obj) \
- G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_CELL_RENDERER_TOGGLE, \
- GimpCellRendererTogglePrivate)
+#define GET_PRIVATE(obj) (((GimpCellRendererToggle *) (obj))->priv)
static void gimp_cell_renderer_toggle_finalize (GObject *object);
@@ -171,6 +166,9 @@ gimp_cell_renderer_toggle_class_init (GimpCellRendererToggleClass *klass)
static void
gimp_cell_renderer_toggle_init (GimpCellRendererToggle *toggle)
{
+ toggle->priv = G_TYPE_INSTANCE_GET_PRIVATE (toggle,
+ GIMP_TYPE_CELL_RENDERER_TOGGLE,
+ GimpCellRendererTogglePrivate);
}
static void
diff --git a/libgimpwidgets/gimpcellrenderertoggle.h b/libgimpwidgets/gimpcellrenderertoggle.h
index f83a543..2a80a93 100644
--- a/libgimpwidgets/gimpcellrenderertoggle.h
+++ b/libgimpwidgets/gimpcellrenderertoggle.h
@@ -37,11 +37,14 @@ G_BEGIN_DECLS
#define GIMP_CELL_RENDERER_TOGGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_CELL_RENDERER_TOGGLE, GimpCellRendererToggleClass))
-typedef struct _GimpCellRendererToggleClass GimpCellRendererToggleClass;
+typedef struct _GimpCellRendererTogglePrivate GimpCellRendererTogglePrivate;
+typedef struct _GimpCellRendererToggleClass GimpCellRendererToggleClass;
struct _GimpCellRendererToggle
{
- GtkCellRendererToggle parent_instance;
+ GtkCellRendererToggle parent_instance;
+
+ GimpCellRendererTogglePrivate *priv;
};
struct _GimpCellRendererToggleClass
@@ -57,6 +60,10 @@ struct _GimpCellRendererToggleClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorarea.c b/libgimpwidgets/gimpcolorarea.c
index 7d8a4ff..d586c40 100644
--- a/libgimpwidgets/gimpcolorarea.c
+++ b/libgimpwidgets/gimpcolorarea.c
@@ -65,8 +65,6 @@ enum
};
-typedef struct _GimpColorAreaPrivate GimpColorAreaPrivate;
-
struct _GimpColorAreaPrivate
{
GimpColorConfig *config;
@@ -83,10 +81,7 @@ struct _GimpColorAreaPrivate
guint needs_render : 1;
};
-#define GET_PRIVATE(obj) \
- G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_COLOR_AREA, \
- GimpColorAreaPrivate)
+#define GET_PRIVATE(obj) (((GimpColorArea *) (obj))->priv)
static void gimp_color_area_dispose (GObject *object);
@@ -244,7 +239,13 @@ gimp_color_area_class_init (GimpColorAreaClass *klass)
static void
gimp_color_area_init (GimpColorArea *area)
{
- GimpColorAreaPrivate *priv = GET_PRIVATE (area);
+ GimpColorAreaPrivate *priv;
+
+ area->priv = G_TYPE_INSTANCE_GET_PRIVATE (area,
+ GIMP_TYPE_COLOR_AREA,
+ GimpColorAreaPrivate);
+
+ priv = GET_PRIVATE (area);
priv->buf = NULL;
priv->width = 0;
diff --git a/libgimpwidgets/gimpcolorarea.h b/libgimpwidgets/gimpcolorarea.h
index 94a9abe..5b0e898 100644
--- a/libgimpwidgets/gimpcolorarea.h
+++ b/libgimpwidgets/gimpcolorarea.h
@@ -42,11 +42,14 @@ G_BEGIN_DECLS
#define GIMP_COLOR_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_AREA,
GimpColorAreaClass))
-typedef struct _GimpColorAreaClass GimpColorAreaClass;
+typedef struct _GimpColorAreaPrivate GimpColorAreaPrivate;
+typedef struct _GimpColorAreaClass GimpColorAreaClass;
struct _GimpColorArea
{
- GtkDrawingArea parent_instance;
+ GtkDrawingArea parent_instance;
+
+ GimpColorAreaPrivate *priv;
};
struct _GimpColorAreaClass
@@ -60,6 +63,10 @@ struct _GimpColorAreaClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorbutton.c b/libgimpwidgets/gimpcolorbutton.c
index 67427a8..e71fa10 100644
--- a/libgimpwidgets/gimpcolorbutton.c
+++ b/libgimpwidgets/gimpcolorbutton.c
@@ -91,8 +91,6 @@ enum
};
-typedef struct _GimpColorButtonPrivate GimpColorButtonPrivate;
-
struct _GimpColorButtonPrivate
{
gchar *title;
@@ -107,9 +105,7 @@ struct _GimpColorButtonPrivate
GimpColorConfig *config;
};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_COLOR_BUTTON, \
- GimpColorButtonPrivate)
+#define GET_PRIVATE(obj) (((GimpColorButton *) (obj))->priv)
static void gimp_color_button_class_init (GimpColorButtonClass *klass);
@@ -346,10 +342,16 @@ static void
gimp_color_button_init (GimpColorButton *button,
GimpColorButtonClass *klass)
{
- GimpColorButtonPrivate *priv = GET_PRIVATE (button);
+ GimpColorButtonPrivate *priv;
GtkActionGroup *group;
gint i;
+ button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
+ GIMP_TYPE_COLOR_BUTTON,
+ GimpColorButtonPrivate);
+
+ priv = GET_PRIVATE (button);
+
priv->color_area = g_object_new (GIMP_TYPE_COLOR_AREA,
"drag-mask", GDK_BUTTON1_MASK,
NULL);
diff --git a/libgimpwidgets/gimpcolorbutton.h b/libgimpwidgets/gimpcolorbutton.h
index 4c4d0b5..d8572b4 100644
--- a/libgimpwidgets/gimpcolorbutton.h
+++ b/libgimpwidgets/gimpcolorbutton.h
@@ -45,11 +45,14 @@ G_BEGIN_DECLS
#define GIMP_COLOR_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_BUTTON,
GimpColorButtonClass))
-typedef struct _GimpColorButtonClass GimpColorButtonClass;
+typedef struct _GimpColorButtonPrivate GimpColorButtonPrivate;
+typedef struct _GimpColorButtonClass GimpColorButtonClass;
struct _GimpColorButton
{
- GimpButton parent_instance;
+ GimpButton parent_instance;
+
+ GimpColorButtonPrivate *priv;
};
struct _GimpColorButtonClass
@@ -67,6 +70,10 @@ struct _GimpColorButtonClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolordisplay.c b/libgimpwidgets/gimpcolordisplay.c
index 9cf180e..e3a98de 100644
--- a/libgimpwidgets/gimpcolordisplay.c
+++ b/libgimpwidgets/gimpcolordisplay.c
@@ -62,8 +62,6 @@ enum
};
-typedef struct _GimpColorDisplayPrivate GimpColorDisplayPrivate;
-
struct _GimpColorDisplayPrivate
{
gboolean enabled;
@@ -71,9 +69,7 @@ struct _GimpColorDisplayPrivate
GimpColorManaged *managed;
};
-#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
- GIMP_TYPE_COLOR_DISPLAY, \
- GimpColorDisplayPrivate))
+#define GET_PRIVATE(obj) (((GimpColorDisplay *) (obj))->priv)
@@ -160,9 +156,9 @@ gimp_color_display_class_init (GimpColorDisplayClass *klass)
static void
gimp_color_display_init (GimpColorDisplay *display)
{
- GimpColorDisplayPrivate *private = GET_PRIVATE (display);
-
- private->enabled = FALSE;
+ display->priv = G_TYPE_INSTANCE_GET_PRIVATE (display,
+ GIMP_TYPE_COLOR_DISPLAY,
+ GimpColorDisplayPrivate);
}
static void
diff --git a/libgimpwidgets/gimpcolordisplay.h b/libgimpwidgets/gimpcolordisplay.h
index 8620256..c165eec 100644
--- a/libgimpwidgets/gimpcolordisplay.h
+++ b/libgimpwidgets/gimpcolordisplay.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_COLOR_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_DISPLAY,
GimpColorDisplayClass))
-typedef struct _GimpColorDisplayClass GimpColorDisplayClass;
+typedef struct _GimpColorDisplayPrivate GimpColorDisplayPrivate;
+typedef struct _GimpColorDisplayClass GimpColorDisplayClass;
struct _GimpColorDisplay
{
- GObject parent_instance;
+ GObject parent_instance;
+
+ GimpColorDisplayPrivate *priv;
};
struct _GimpColorDisplayClass
@@ -55,44 +58,47 @@ struct _GimpColorDisplayClass
const gchar *icon_name;
/* virtual functions */
-
- void (* convert_buffer) (GimpColorDisplay *display,
- GeglBuffer *buffer,
- GeglRectangle *area);
- GtkWidget * (* configure) (GimpColorDisplay *display);
+ void (* convert_buffer) (GimpColorDisplay *display,
+ GeglBuffer *buffer,
+ GeglRectangle *area);
+ GtkWidget * (* configure) (GimpColorDisplay *display);
/* signals */
- void (* changed) (GimpColorDisplay *display);
+ void (* changed) (GimpColorDisplay *display);
/* Padding for future expansion */
void (* _gimp_reserved1) (void);
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
-GType gimp_color_display_get_type (void) G_GNUC_CONST;
+GType gimp_color_display_get_type (void) G_GNUC_CONST;
-GimpColorDisplay * gimp_color_display_clone (GimpColorDisplay *display);
+GimpColorDisplay * gimp_color_display_clone (GimpColorDisplay *display);
-void gimp_color_display_convert_buffer (GimpColorDisplay *display,
- GeglBuffer *buffer,
- GeglRectangle *area);
-void gimp_color_display_load_state (GimpColorDisplay *display,
- GimpParasite *state);
-GimpParasite * gimp_color_display_save_state (GimpColorDisplay *display);
-GtkWidget * gimp_color_display_configure (GimpColorDisplay *display);
-void gimp_color_display_configure_reset (GimpColorDisplay *display);
+void gimp_color_display_convert_buffer (GimpColorDisplay *display,
+ GeglBuffer *buffer,
+ GeglRectangle *area);
+void gimp_color_display_load_state (GimpColorDisplay *display,
+ GimpParasite *state);
+GimpParasite * gimp_color_display_save_state (GimpColorDisplay *display);
+GtkWidget * gimp_color_display_configure (GimpColorDisplay *display);
+void gimp_color_display_configure_reset (GimpColorDisplay *display);
-void gimp_color_display_changed (GimpColorDisplay *display);
+void gimp_color_display_changed (GimpColorDisplay *display);
-void gimp_color_display_set_enabled (GimpColorDisplay *display,
- gboolean enabled);
-gboolean gimp_color_display_get_enabled (GimpColorDisplay *display);
+void gimp_color_display_set_enabled (GimpColorDisplay *display,
+ gboolean enabled);
+gboolean gimp_color_display_get_enabled (GimpColorDisplay *display);
-GimpColorConfig * gimp_color_display_get_config (GimpColorDisplay *display);
-GimpColorManaged * gimp_color_display_get_managed (GimpColorDisplay *display);
+GimpColorConfig * gimp_color_display_get_config (GimpColorDisplay *display);
+GimpColorManaged * gimp_color_display_get_managed (GimpColorDisplay *display);
G_END_DECLS
diff --git a/libgimpwidgets/gimpcolordisplaystack.c b/libgimpwidgets/gimpcolordisplaystack.c
index 7a095b3..989c359 100644
--- a/libgimpwidgets/gimpcolordisplaystack.c
+++ b/libgimpwidgets/gimpcolordisplaystack.c
@@ -53,16 +53,12 @@ enum
};
-typedef struct _GimpColorDisplayStackPrivate GimpColorDisplayStackPrivate;
-
struct _GimpColorDisplayStackPrivate
{
GList *filters;
};
-#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
- GIMP_TYPE_COLOR_DISPLAY_STACK, \
- GimpColorDisplayStackPrivate))
+#define GET_PRIVATE(obj) (((GimpColorDisplayStack *) (obj))->priv)
static void gimp_color_display_stack_dispose (GObject *object);
@@ -142,9 +138,9 @@ gimp_color_display_stack_class_init (GimpColorDisplayStackClass *klass)
static void
gimp_color_display_stack_init (GimpColorDisplayStack *stack)
{
- GimpColorDisplayStackPrivate *private = GET_PRIVATE (stack);
-
- private->filters = NULL;
+ stack->priv = G_TYPE_INSTANCE_GET_PRIVATE (stack,
+ GIMP_TYPE_COLOR_DISPLAY_STACK,
+ GimpColorDisplayStackPrivate);
}
static void
diff --git a/libgimpwidgets/gimpcolordisplaystack.h b/libgimpwidgets/gimpcolordisplaystack.h
index 1a5642a..6254f44 100644
--- a/libgimpwidgets/gimpcolordisplaystack.h
+++ b/libgimpwidgets/gimpcolordisplaystack.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_COLOR_DISPLAY_STACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_COLOR_DISPLAY_STACK, GimpColorDisplayStackClass))
-typedef struct _GimpColorDisplayStackClass GimpColorDisplayStackClass;
+typedef struct _GimpColorDisplayStackPrivate GimpColorDisplayStackPrivate;
+typedef struct _GimpColorDisplayStackClass GimpColorDisplayStackClass;
struct _GimpColorDisplayStack
{
- GObject parent_instance;
+ GObject parent_instance;
+
+ GimpColorDisplayStackPrivate *priv;
};
struct _GimpColorDisplayStackClass
@@ -66,6 +69,10 @@ struct _GimpColorDisplayStackClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorhexentry.c b/libgimpwidgets/gimpcolorhexentry.c
index 42b4485..25a8ffb 100644
--- a/libgimpwidgets/gimpcolorhexentry.c
+++ b/libgimpwidgets/gimpcolorhexentry.c
@@ -58,16 +58,12 @@ enum
};
-typedef struct _GimpColorHexEntryPrivate GimpColorHexEntryPrivate;
-
struct _GimpColorHexEntryPrivate
{
GimpRGB color;
};
-#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
- GIMP_TYPE_COLOR_HEX_ENTRY, \
- GimpColorHexEntryPrivate))
+#define GET_PRIVATE(obj) (((GimpColorHexEntry *) (obj))->priv)
static void gimp_color_hex_entry_constructed (GObject *object);
@@ -115,7 +111,7 @@ gimp_color_hex_entry_class_init (GimpColorHexEntryClass *klass)
static void
gimp_color_hex_entry_init (GimpColorHexEntry *entry)
{
- GimpColorHexEntryPrivate *private = GET_PRIVATE (entry);
+ GimpColorHexEntryPrivate *private;
GtkEntryCompletion *completion;
GtkCellRenderer *cell;
GtkListStore *store;
@@ -124,6 +120,12 @@ gimp_color_hex_entry_init (GimpColorHexEntry *entry)
gint num_colors;
gint i;
+ entry->priv = G_TYPE_INSTANCE_GET_PRIVATE (entry,
+ GIMP_TYPE_COLOR_HEX_ENTRY,
+ GimpColorHexEntryPrivate);
+
+ private = GET_PRIVATE (entry);
+
/* GtkEntry's minimum size is way too large, set a reasonable one
* for our use case
*/
diff --git a/libgimpwidgets/gimpcolorhexentry.h b/libgimpwidgets/gimpcolorhexentry.h
index 2585f5e..9cdf8a6 100644
--- a/libgimpwidgets/gimpcolorhexentry.h
+++ b/libgimpwidgets/gimpcolorhexentry.h
@@ -37,11 +37,14 @@ G_BEGIN_DECLS
#define GIMP_COLOR_HEX_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_HEX_AREA,
GimpColorHexEntryClass))
-typedef struct _GimpColorHexEntryClass GimpColorHexEntryClass;
+typedef struct _GimpColorHexEntryPrivate GimpColorHexEntryPrivate;
+typedef struct _GimpColorHexEntryClass GimpColorHexEntryClass;
struct _GimpColorHexEntry
{
- GtkEntry parent_instance;
+ GtkEntry parent_instance;
+
+ GimpColorHexEntryPrivate *priv;
};
struct _GimpColorHexEntryClass
@@ -55,6 +58,10 @@ struct _GimpColorHexEntryClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolornotebook.h b/libgimpwidgets/gimpcolornotebook.h
index 663f603..4303e90 100644
--- a/libgimpwidgets/gimpcolornotebook.h
+++ b/libgimpwidgets/gimpcolornotebook.h
@@ -61,6 +61,10 @@ struct _GimpColorNotebookClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorprofilechooserdialog.h b/libgimpwidgets/gimpcolorprofilechooserdialog.h
index 0fbb19e..bcba3ae 100644
--- a/libgimpwidgets/gimpcolorprofilechooserdialog.h
+++ b/libgimpwidgets/gimpcolorprofilechooserdialog.h
@@ -52,6 +52,10 @@ struct _GimpColorProfileChooserDialogClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorprofilecombobox.c b/libgimpwidgets/gimpcolorprofilecombobox.c
index 3da49e5..32bd36e 100644
--- a/libgimpwidgets/gimpcolorprofilecombobox.c
+++ b/libgimpwidgets/gimpcolorprofilecombobox.c
@@ -51,17 +51,13 @@ enum
};
-typedef struct _GimpColorProfileComboBoxPrivate GimpColorProfileComboBoxPrivate;
-
struct _GimpColorProfileComboBoxPrivate
{
GtkWidget *dialog;
GtkTreePath *last_path;
};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_COLOR_PROFILE_COMBO_BOX, \
- GimpColorProfileComboBoxPrivate)
+#define GET_PRIVATE(obj) (((GimpColorProfileComboBox *) (obj))->priv)
static void gimp_color_profile_combo_box_finalize (GObject *object);
@@ -142,7 +138,13 @@ gimp_color_profile_combo_box_class_init (GimpColorProfileComboBoxClass *klass)
static void
gimp_color_profile_combo_box_init (GimpColorProfileComboBox *combo_box)
{
- GtkCellRenderer *cell = gtk_cell_renderer_text_new ();
+ GtkCellRenderer *cell;
+
+ combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box,
+ GIMP_TYPE_COLOR_PROFILE_COMBO_BOX,
+ GimpColorProfileComboBoxPrivate);
+
+ cell = gtk_cell_renderer_text_new ();
g_object_set (cell,
"width-chars", 42,
diff --git a/libgimpwidgets/gimpcolorprofilecombobox.h b/libgimpwidgets/gimpcolorprofilecombobox.h
index 96003b6..cc57854 100644
--- a/libgimpwidgets/gimpcolorprofilecombobox.h
+++ b/libgimpwidgets/gimpcolorprofilecombobox.h
@@ -36,11 +36,14 @@ G_BEGIN_DECLS
#define GIMP_COLOR_PROFILE_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_COLOR_PROFILE_COMBO_BOX, GimpColorProfileComboBoxClass))
-typedef struct _GimpColorProfileComboBoxClass GimpColorProfileComboBoxClass;
+typedef struct _GimpColorProfileComboBoxPrivate GimpColorProfileComboBoxPrivate;
+typedef struct _GimpColorProfileComboBoxClass GimpColorProfileComboBoxClass;
struct _GimpColorProfileComboBox
{
- GtkComboBox parent_instance;
+ GtkComboBox parent_instance;
+
+ GimpColorProfileComboBoxPrivate *priv;
};
struct _GimpColorProfileComboBoxClass
@@ -52,6 +55,10 @@ struct _GimpColorProfileComboBoxClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorprofilestore.c b/libgimpwidgets/gimpcolorprofilestore.c
index dc42c1f..bc637d1 100644
--- a/libgimpwidgets/gimpcolorprofilestore.c
+++ b/libgimpwidgets/gimpcolorprofilestore.c
@@ -54,16 +54,12 @@ enum
};
-typedef struct _GimpColorProfileStorePrivate GimpColorProfileStorePrivate;
-
struct _GimpColorProfileStorePrivate
{
gchar *history;
};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_COLOR_PROFILE_STORE, \
- GimpColorProfileStorePrivate)
+#define GET_PRIVATE(obj) (((GimpColorProfileStore *) (obj))->priv)
static void gimp_color_profile_store_constructed (GObject *object);
@@ -141,6 +137,10 @@ gimp_color_profile_store_init (GimpColorProfileStore *store)
G_TYPE_INT /* GIMP_COLOR_PROFILE_STORE_INDEX */
};
+ store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store,
+ GIMP_TYPE_COLOR_PROFILE_STORE,
+ GimpColorProfileStorePrivate);
+
gtk_list_store_set_column_types (GTK_LIST_STORE (store),
G_N_ELEMENTS (types), types);
}
diff --git a/libgimpwidgets/gimpcolorprofilestore.h b/libgimpwidgets/gimpcolorprofilestore.h
index 0c78c0f..22024de 100644
--- a/libgimpwidgets/gimpcolorprofilestore.h
+++ b/libgimpwidgets/gimpcolorprofilestore.h
@@ -37,11 +37,14 @@ G_BEGIN_DECLS
#define GIMP_COLOR_PROFILE_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_COLOR_PROFILE_STORE, GimpColorProfileStoreClass))
-typedef struct _GimpColorProfileStoreClass GimpColorProfileStoreClass;
+typedef struct _GimpColorProfileStorePrivate GimpColorProfileStorePrivate;
+typedef struct _GimpColorProfileStoreClass GimpColorProfileStoreClass;
struct _GimpColorProfileStore
{
- GtkListStore parent_instance;
+ GtkListStore parent_instance;
+
+ GimpColorProfileStorePrivate *priv;
};
struct _GimpColorProfileStoreClass
@@ -52,6 +55,10 @@ struct _GimpColorProfileStoreClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorprofileview.h b/libgimpwidgets/gimpcolorprofileview.h
index bccffe0..7151eac 100644
--- a/libgimpwidgets/gimpcolorprofileview.h
+++ b/libgimpwidgets/gimpcolorprofileview.h
@@ -51,6 +51,10 @@ struct _GimpColorProfileViewClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorscale.c b/libgimpwidgets/gimpcolorscale.c
index 3ceffed..cec094b 100644
--- a/libgimpwidgets/gimpcolorscale.c
+++ b/libgimpwidgets/gimpcolorscale.c
@@ -62,8 +62,6 @@ struct _GimpLCH
};
-typedef struct _GimpColorScalePrivate GimpColorScalePrivate;
-
struct _GimpColorScalePrivate
{
GimpColorConfig *config;
@@ -82,10 +80,7 @@ struct _GimpColorScalePrivate
gboolean needs_render;
};
-#define GET_PRIVATE(obj) \
- G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_COLOR_SCALE, \
- GimpColorScalePrivate)
+#define GET_PRIVATE(obj) (((GimpColorScale *) (obj))->priv)
static void gimp_color_scale_dispose (GObject *object);
@@ -172,10 +167,16 @@ gimp_color_scale_class_init (GimpColorScaleClass *klass)
static void
gimp_color_scale_init (GimpColorScale *scale)
{
- GimpColorScalePrivate *priv = GET_PRIVATE (scale);
+ GimpColorScalePrivate *priv;
GtkRange *range = GTK_RANGE (scale);
GtkCssProvider *css;
+ scale->priv = G_TYPE_INSTANCE_GET_PRIVATE (scale,
+ GIMP_TYPE_COLOR_SCALE,
+ GimpColorScalePrivate);
+
+ priv = scale->priv;
+
gtk_widget_set_can_focus (GTK_WIDGET (scale), TRUE);
gtk_range_set_slider_size_fixed (range, TRUE);
diff --git a/libgimpwidgets/gimpcolorscale.h b/libgimpwidgets/gimpcolorscale.h
index 6f7cfea..921d3d9 100644
--- a/libgimpwidgets/gimpcolorscale.h
+++ b/libgimpwidgets/gimpcolorscale.h
@@ -38,11 +38,14 @@ G_BEGIN_DECLS
#define GIMP_COLOR_SCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_SCALE,
GimpColorScaleClass))
-typedef struct _GimpColorScaleClass GimpColorScaleClass;
+typedef struct _GimpColorScalePrivate GimpColorScalePrivate;
+typedef struct _GimpColorScaleClass GimpColorScaleClass;
struct _GimpColorScale
{
- GtkRange parent_instance;
+ GtkRange parent_instance;
+
+ GimpColorScalePrivate *priv;
};
struct _GimpColorScaleClass
@@ -54,6 +57,10 @@ struct _GimpColorScaleClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorselection.c b/libgimpwidgets/gimpcolorselection.c
index f438835..685bad3 100644
--- a/libgimpwidgets/gimpcolorselection.c
+++ b/libgimpwidgets/gimpcolorselection.c
@@ -82,8 +82,6 @@ enum
};
-typedef struct _GimpColorSelectionPrivate GimpColorSelectionPrivate;
-
struct _GimpColorSelectionPrivate
{
gboolean show_alpha;
@@ -102,9 +100,7 @@ struct _GimpColorSelectionPrivate
GtkWidget *old_color;
};
-#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
- GIMP_TYPE_COLOR_SELECTION, \
- GimpColorSelectionPrivate))
+#define GET_PRIVATE(obj) (((GimpColorSelection *) (obj))->priv)
static void gimp_color_selection_set_property (GObject *object,
@@ -177,7 +173,7 @@ gimp_color_selection_class_init (GimpColorSelectionClass *klass)
static void
gimp_color_selection_init (GimpColorSelection *selection)
{
- GimpColorSelectionPrivate *priv = GET_PRIVATE (selection);
+ GimpColorSelectionPrivate *priv;
GtkWidget *main_hbox;
GtkWidget *hbox;
GtkWidget *vbox;
@@ -188,6 +184,12 @@ gimp_color_selection_init (GimpColorSelection *selection)
GtkSizeGroup *new_group;
GtkSizeGroup *old_group;
+ selection->priv = G_TYPE_INSTANCE_GET_PRIVATE (selection,
+ GIMP_TYPE_COLOR_SELECTION,
+ GimpColorSelectionPrivate);
+
+ priv = selection->priv;
+
priv->show_alpha = TRUE;
gtk_orientable_set_orientation (GTK_ORIENTABLE (selection),
diff --git a/libgimpwidgets/gimpcolorselection.h b/libgimpwidgets/gimpcolorselection.h
index 5263d69..34f8f78 100644
--- a/libgimpwidgets/gimpcolorselection.h
+++ b/libgimpwidgets/gimpcolorselection.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_COLOR_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_SELECTION,
GimpColorSelectionClass))
-typedef struct _GimpColorSelectionClass GimpColorSelectionClass;
+typedef struct _GimpColorSelectionPrivate GimpColorSelectionPrivate;
+typedef struct _GimpColorSelectionClass GimpColorSelectionClass;
struct _GimpColorSelection
{
- GtkBox parent_instance;
+ GtkBox parent_instance;
+
+ GimpColorSelectionPrivate *priv;
};
struct _GimpColorSelectionClass
@@ -57,6 +60,10 @@ struct _GimpColorSelectionClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpcolorselector.c b/libgimpwidgets/gimpcolorselector.c
index 24497ea..88f501a 100644
--- a/libgimpwidgets/gimpcolorselector.c
+++ b/libgimpwidgets/gimpcolorselector.c
@@ -58,17 +58,12 @@ enum
};
-typedef struct _GimpColorSelectorPrivate GimpColorSelectorPrivate;
-
struct _GimpColorSelectorPrivate
{
gboolean model_visible[3];
};
-#define GET_PRIVATE(obj) \
- G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_COLOR_SELECTOR, \
- GimpColorSelectorPrivate)
+#define GET_PRIVATE(obj) (((GimpColorSelector *) (obj))->priv)
static void gimp_color_selector_dispose (GObject *object);
@@ -141,7 +136,13 @@ gimp_color_selector_class_init (GimpColorSelectorClass *klass)
static void
gimp_color_selector_init (GimpColorSelector *selector)
{
- GimpColorSelectorPrivate *priv = GET_PRIVATE (selector);
+ GimpColorSelectorPrivate *priv;
+
+ selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector,
+ GIMP_TYPE_COLOR_SELECTOR,
+ GimpColorSelectorPrivate);
+
+ priv = GET_PRIVATE (selector);
selector->toggles_visible = TRUE;
selector->toggles_sensitive = TRUE;
diff --git a/libgimpwidgets/gimpcolorselector.h b/libgimpwidgets/gimpcolorselector.h
index f79d0e2..fdff737 100644
--- a/libgimpwidgets/gimpcolorselector.h
+++ b/libgimpwidgets/gimpcolorselector.h
@@ -59,13 +59,16 @@ G_BEGIN_DECLS
#define GIMP_IS_COLOR_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_SELECTOR))
#define GIMP_COLOR_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_SELECTOR,
GimpColorSelectorClass))
-
-typedef struct _GimpColorSelectorClass GimpColorSelectorClass;
+typedef struct _GimpColorSelectorPrivate GimpColorSelectorPrivate;
+typedef struct _GimpColorSelectorClass GimpColorSelectorClass;
struct _GimpColorSelector
{
GtkBox parent_instance;
+ GimpColorSelectorPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
gboolean toggles_visible;
gboolean toggles_sensitive;
gboolean show_alpha;
diff --git a/libgimpwidgets/gimpcontroller.h b/libgimpwidgets/gimpcontroller.h
index 0022d98..2c8e9d5 100644
--- a/libgimpwidgets/gimpcontroller.h
+++ b/libgimpwidgets/gimpcontroller.h
@@ -89,12 +89,16 @@ union _GimpControllerEvent
#define GIMP_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CONTROLLER,
GimpControllerClass))
-typedef struct _GimpControllerClass GimpControllerClass;
+typedef struct _GimpControllerPrivate GimpControllerPrivate;
+typedef struct _GimpControllerClass GimpControllerClass;
struct _GimpController
{
- GObject parent_instance;
+ GObject parent_instance;
+ GimpControllerPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
gchar *name;
gchar *state;
};
@@ -106,6 +110,7 @@ struct _GimpControllerClass
const gchar *name;
const gchar *help_domain;
const gchar *help_id;
+ const gchar *icon_name;
/* virtual functions */
gint (* get_n_events) (GimpController *controller);
@@ -118,12 +123,15 @@ struct _GimpControllerClass
gboolean (* event) (GimpController *controller,
const GimpControllerEvent *event);
- const gchar *icon_name;
-
/* Padding for future expansion */
+ void (* _gimp_reserved1) (void);
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpdialog.c b/libgimpwidgets/gimpdialog.c
index fdaddca..63c302d 100644
--- a/libgimpwidgets/gimpdialog.c
+++ b/libgimpwidgets/gimpdialog.c
@@ -51,8 +51,6 @@ enum
};
-typedef struct _GimpDialogPrivate GimpDialogPrivate;
-
struct _GimpDialogPrivate
{
GimpHelpFunc help_func;
@@ -60,9 +58,7 @@ struct _GimpDialogPrivate
GtkWidget *help_button;
};
-#define GET_PRIVATE(dialog) G_TYPE_INSTANCE_GET_PRIVATE (dialog, \
- GIMP_TYPE_DIALOG, \
- GimpDialogPrivate)
+#define GET_PRIVATE(obj) (((GimpDialog *) (obj))->priv)
static void gimp_dialog_constructed (GObject *object);
@@ -156,6 +152,10 @@ gimp_dialog_class_init (GimpDialogClass *klass)
static void
gimp_dialog_init (GimpDialog *dialog)
{
+ dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog,
+ GIMP_TYPE_DIALOG,
+ GimpDialogPrivate);
+
g_signal_connect (dialog, "response",
G_CALLBACK (gimp_dialog_response),
NULL);
diff --git a/libgimpwidgets/gimpdialog.h b/libgimpwidgets/gimpdialog.h
index 8183f47..7e2577a 100644
--- a/libgimpwidgets/gimpdialog.h
+++ b/libgimpwidgets/gimpdialog.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DIALOG, GimpDialogClass))
-typedef struct _GimpDialogClass GimpDialogClass;
+typedef struct _GimpDialogPrivate GimpDialogPrivate;
+typedef struct _GimpDialogClass GimpDialogClass;
struct _GimpDialog
{
- GtkDialog parent_instance;
+ GtkDialog parent_instance;
+
+ GimpDialogPrivate *priv;
};
struct _GimpDialogClass
@@ -55,6 +58,10 @@ struct _GimpDialogClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpenumcombobox.h b/libgimpwidgets/gimpenumcombobox.h
index 1cdd762..650c2b2 100644
--- a/libgimpwidgets/gimpenumcombobox.h
+++ b/libgimpwidgets/gimpenumcombobox.h
@@ -38,11 +38,14 @@ G_BEGIN_DECLS
#define GIMP_ENUM_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_ENUM_COMBO_BOX,
GimpEnumComboBoxClass))
-typedef struct _GimpEnumComboBoxClass GimpEnumComboBoxClass;
+typedef struct _GimpEnumComboBoxPrivate GimpEnumComboBoxPrivate;
+typedef struct _GimpEnumComboBoxClass GimpEnumComboBoxClass;
struct _GimpEnumComboBox
{
- GimpIntComboBox parent_instance;
+ GimpIntComboBox parent_instance;
+
+ GimpEnumComboBoxPrivate *priv;
};
struct _GimpEnumComboBoxClass
@@ -54,6 +57,10 @@ struct _GimpEnumComboBoxClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpenumlabel.c b/libgimpwidgets/gimpenumlabel.c
index d236e2f..0b70d9a 100644
--- a/libgimpwidgets/gimpenumlabel.c
+++ b/libgimpwidgets/gimpenumlabel.c
@@ -47,17 +47,12 @@ enum
};
-
-typedef struct _GimpEnumLabelPrivate GimpEnumLabelPrivate;
-
struct _GimpEnumLabelPrivate
{
GEnumClass *enum_class;
};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_ENUM_LABEL, \
- GimpEnumLabelPrivate)
+#define GET_PRIVATE(obj) (((GimpEnumLabel *) (obj))->priv)
static void gimp_enum_label_finalize (GObject *object);
@@ -121,6 +116,9 @@ gimp_enum_label_class_init (GimpEnumLabelClass *klass)
static void
gimp_enum_label_init (GimpEnumLabel *enum_label)
{
+ enum_label->priv = G_TYPE_INSTANCE_GET_PRIVATE (enum_label,
+ GIMP_TYPE_ENUM_LABEL,
+ GimpEnumLabelPrivate);
}
static void
diff --git a/libgimpwidgets/gimpenumlabel.h b/libgimpwidgets/gimpenumlabel.h
index 11139e0..362960f 100644
--- a/libgimpwidgets/gimpenumlabel.h
+++ b/libgimpwidgets/gimpenumlabel.h
@@ -37,11 +37,14 @@ G_BEGIN_DECLS
#define GIMP_ENUM_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_ENUM_LABEL,
GimpEnumLabelClass))
-typedef struct _GimpEnumLabelClass GimpEnumLabelClass;
+typedef struct _GimpEnumLabelPrivate GimpEnumLabelPrivate;
+typedef struct _GimpEnumLabelClass GimpEnumLabelClass;
struct _GimpEnumLabel
{
- GtkLabel parent_instance;
+ GtkLabel parent_instance;
+
+ GimpEnumLabelPrivate *priv;
};
struct _GimpEnumLabelClass
@@ -53,6 +56,10 @@ struct _GimpEnumLabelClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpenumstore.h b/libgimpwidgets/gimpenumstore.h
index 5da587b..856299d 100644
--- a/libgimpwidgets/gimpenumstore.h
+++ b/libgimpwidgets/gimpenumstore.h
@@ -39,12 +39,16 @@ G_BEGIN_DECLS
#define GIMP_ENUM_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_ENUM_STORE,
GimpEnumStoreClass))
-typedef struct _GimpEnumStoreClass GimpEnumStoreClass;
+typedef struct _GimpEnumStorePrivate GimpEnumStorePrivate;
+typedef struct _GimpEnumStoreClass GimpEnumStoreClass;
struct _GimpEnumStore
{
- GimpIntStore parent_instance;
+ GimpIntStore parent_instance;
+ GimpEnumStorePrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
GEnumClass *enum_class;
};
@@ -56,6 +60,10 @@ struct _GimpEnumStoreClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpfileentry.h b/libgimpwidgets/gimpfileentry.h
index 7c45a7f..e084c4b 100644
--- a/libgimpwidgets/gimpfileentry.h
+++ b/libgimpwidgets/gimpfileentry.h
@@ -41,12 +41,16 @@ G_BEGIN_DECLS
#define GIMP_FILE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_FILE_ENTRY,
GimpFileEntryClass))
-typedef struct _GimpFileEntryClass GimpFileEntryClass;
+typedef struct _GimpFileEntryPrivate GimpFileEntryPrivate;
+typedef struct _GimpFileEntryClass GimpFileEntryClass;
struct _GimpFileEntry
{
- GtkBox parent_instance;
+ GtkBox parent_instance;
+ GimpFileEntryPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
GtkWidget *file_exists;
GtkWidget *entry;
GtkWidget *browse_button;
@@ -69,6 +73,10 @@ struct _GimpFileEntryClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpframe.h b/libgimpwidgets/gimpframe.h
index 61cb59b..d979d93 100644
--- a/libgimpwidgets/gimpframe.h
+++ b/libgimpwidgets/gimpframe.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_FRAME, GimpFrameClass))
-typedef struct _GimpFrameClass GimpFrameClass;
+typedef struct _GimpFramePrivate GimpFramePrivate;
+typedef struct _GimpFrameClass GimpFrameClass;
struct _GimpFrame
{
- GtkFrame parent_instance;
+ GtkFrame parent_instance;
+
+ GimpFramePrivate *priv;
};
struct _GimpFrameClass
@@ -55,6 +58,10 @@ struct _GimpFrameClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpintcombobox.c b/libgimpwidgets/gimpintcombobox.c
index d2c4fa8..39c97da 100644
--- a/libgimpwidgets/gimpintcombobox.c
+++ b/libgimpwidgets/gimpintcombobox.c
@@ -50,7 +50,7 @@ enum
};
-typedef struct
+struct _GimpIntComboBoxPrivate
{
GtkCellRenderer *pixbuf_renderer;
GtkCellRenderer *text_renderer;
@@ -66,10 +66,9 @@ typedef struct
GimpIntSensitivityFunc sensitivity_func;
gpointer sensitivity_data;
GDestroyNotify sensitivity_destroy;
-} GimpIntComboBoxPrivate;
+};
-#define GIMP_INT_COMBO_BOX_GET_PRIVATE(obj) \
- ((GimpIntComboBoxPrivate *) ((GimpIntComboBox *) (obj))->priv)
+#define GET_PRIVATE(obj) (((GimpIntComboBox *) (obj))->priv)
static void gimp_int_combo_box_constructed (GObject *object);
@@ -183,7 +182,7 @@ gimp_int_combo_box_constructed (GObject *object)
static void
gimp_int_combo_box_finalize (GObject *object)
{
- GimpIntComboBoxPrivate *priv = GIMP_INT_COMBO_BOX_GET_PRIVATE (object);
+ GimpIntComboBoxPrivate *priv = GET_PRIVATE (object);
g_clear_pointer (&priv->label, g_free);
@@ -204,7 +203,7 @@ gimp_int_combo_box_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GimpIntComboBoxPrivate *priv = GIMP_INT_COMBO_BOX_GET_PRIVATE (object);
+ GimpIntComboBoxPrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
@@ -237,7 +236,7 @@ gimp_int_combo_box_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GimpIntComboBoxPrivate *priv = GIMP_INT_COMBO_BOX_GET_PRIVATE (object);
+ GimpIntComboBoxPrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
@@ -637,7 +636,7 @@ gimp_int_combo_box_set_label (GimpIntComboBox *combo_box,
g_return_if_fail (GIMP_IS_INT_COMBO_BOX (combo_box));
- priv = GIMP_INT_COMBO_BOX_GET_PRIVATE (combo_box);
+ priv = GET_PRIVATE (combo_box);
if (label == priv->label)
return;
@@ -667,7 +666,7 @@ gimp_int_combo_box_get_label (GimpIntComboBox *combo_box)
{
g_return_val_if_fail (GIMP_IS_INT_COMBO_BOX (combo_box), NULL);
- return GIMP_INT_COMBO_BOX_GET_PRIVATE (combo_box)->label;
+ return GET_PRIVATE (combo_box)->label;
}
/**
@@ -687,7 +686,7 @@ gimp_int_combo_box_set_layout (GimpIntComboBox *combo_box,
g_return_if_fail (GIMP_IS_INT_COMBO_BOX (combo_box));
- priv = GIMP_INT_COMBO_BOX_GET_PRIVATE (combo_box);
+ priv = GET_PRIVATE (combo_box);
if (layout == priv->layout)
return;
@@ -715,7 +714,7 @@ gimp_int_combo_box_get_layout (GimpIntComboBox *combo_box)
g_return_val_if_fail (GIMP_IS_INT_COMBO_BOX (combo_box),
GIMP_INT_COMBO_BOX_LAYOUT_ABBREVIATED);
- return GIMP_INT_COMBO_BOX_GET_PRIVATE (combo_box)->layout;
+ return GET_PRIVATE (combo_box)->layout;
}
/**
@@ -744,7 +743,7 @@ gimp_int_combo_box_set_sensitivity (GimpIntComboBox *combo_box,
g_return_if_fail (GIMP_IS_INT_COMBO_BOX (combo_box));
- priv = GIMP_INT_COMBO_BOX_GET_PRIVATE (combo_box);
+ priv = GET_PRIVATE (combo_box);
if (priv->sensitivity_destroy)
{
@@ -789,7 +788,7 @@ queue_resize_cell_view (GtkContainer *container)
static void
gimp_int_combo_box_create_cells (GimpIntComboBox *combo_box)
{
- GimpIntComboBoxPrivate *priv = GIMP_INT_COMBO_BOX_GET_PRIVATE (combo_box);
+ GimpIntComboBoxPrivate *priv = GET_PRIVATE (combo_box);
GtkCellLayout *layout;
/* menu layout */
diff --git a/libgimpwidgets/gimpintcombobox.h b/libgimpwidgets/gimpintcombobox.h
index aec6888..9d1c84a 100644
--- a/libgimpwidgets/gimpintcombobox.h
+++ b/libgimpwidgets/gimpintcombobox.h
@@ -37,14 +37,14 @@ G_BEGIN_DECLS
#define GIMP_INT_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_INT_COMBO_BOX,
GimpIntComboBoxClass))
-typedef struct _GimpIntComboBoxClass GimpIntComboBoxClass;
+typedef struct _GimpIntComboBoxPrivate GimpIntComboBoxPrivate;
+typedef struct _GimpIntComboBoxClass GimpIntComboBoxClass;
struct _GimpIntComboBox
{
- GtkComboBox parent_instance;
+ GtkComboBox parent_instance;
- /*< private >*/
- gpointer priv;
+ GimpIntComboBoxPrivate *priv;
};
struct _GimpIntComboBoxClass
@@ -56,6 +56,10 @@ struct _GimpIntComboBoxClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpintstore.c b/libgimpwidgets/gimpintstore.c
index fb6a885..f91e32c 100644
--- a/libgimpwidgets/gimpintstore.c
+++ b/libgimpwidgets/gimpintstore.c
@@ -48,10 +48,13 @@ enum
PROP_USER_DATA_TYPE
};
-typedef struct
+
+struct _GimpIntStorePrivate
{
GType user_data_type;
-} GimpIntStorePrivate;
+};
+
+#define GET_PRIVATE(obj) (((GimpIntStore *) (obj))->priv)
static void gimp_int_store_tree_model_init (GtkTreeModelIface *iface);
@@ -79,9 +82,6 @@ G_DEFINE_TYPE_WITH_CODE (GimpIntStore, gimp_int_store, GTK_TYPE_LIST_STORE,
G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL,
gimp_int_store_tree_model_init))
-#define GIMP_INT_STORE_GET_PRIVATE(obj) \
- G_TYPE_INSTANCE_GET_PRIVATE (obj, GIMP_TYPE_INT_STORE, GimpIntStorePrivate)
-
#define parent_class gimp_int_store_parent_class
static GtkTreeModelIface *parent_iface = NULL;
@@ -132,14 +132,16 @@ gimp_int_store_tree_model_init (GtkTreeModelIface *iface)
static void
gimp_int_store_init (GimpIntStore *store)
{
- store->empty_iter = NULL;
+ store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store,
+ GIMP_TYPE_INT_STORE,
+ GimpIntStorePrivate);
}
static void
gimp_int_store_constructed (GObject *object)
{
GimpIntStore *store = GIMP_INT_STORE (object);
- GimpIntStorePrivate *priv = GIMP_INT_STORE_GET_PRIVATE (store);
+ GimpIntStorePrivate *priv = GET_PRIVATE (store);
GType types[GIMP_INT_STORE_NUM_COLUMNS];
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -178,7 +180,7 @@ gimp_int_store_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GimpIntStorePrivate *priv = GIMP_INT_STORE_GET_PRIVATE (object);
+ GimpIntStorePrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
@@ -197,7 +199,7 @@ gimp_int_store_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GimpIntStorePrivate *priv = GIMP_INT_STORE_GET_PRIVATE (object);
+ GimpIntStorePrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
diff --git a/libgimpwidgets/gimpintstore.h b/libgimpwidgets/gimpintstore.h
index 36049ad..a12fa50 100644
--- a/libgimpwidgets/gimpintstore.h
+++ b/libgimpwidgets/gimpintstore.h
@@ -61,13 +61,16 @@ typedef enum
#define GIMP_INT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_INT_STORE,
GimpIntStoreClass))
-typedef struct _GimpIntStoreClass GimpIntStoreClass;
+typedef struct _GimpIntStorePrivate GimpIntStorePrivate;
+typedef struct _GimpIntStoreClass GimpIntStoreClass;
struct _GimpIntStore
{
- GtkListStore parent_instance;
+ GtkListStore parent_instance;
- /*< private >*/
+ GimpIntStorePrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
GtkTreeIter *empty_iter;
};
@@ -80,6 +83,10 @@ struct _GimpIntStoreClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpmemsizeentry.c b/libgimpwidgets/gimpmemsizeentry.c
index 405c926..123c331 100644
--- a/libgimpwidgets/gimpmemsizeentry.c
+++ b/libgimpwidgets/gimpmemsizeentry.c
@@ -51,8 +51,6 @@ enum
};
-typedef struct _GimpMemsizeEntryPrivate GimpMemsizeEntryPrivate;
-
struct _GimpMemsizeEntryPrivate
{
guint64 value;
@@ -66,9 +64,7 @@ struct _GimpMemsizeEntryPrivate
GtkWidget *menu;
};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_MEMSIZE_ENTRY, \
- GimpMemsizeEntryPrivate)
+#define GET_PRIVATE(obj) (((GimpMemsizeEntry *) (obj))->priv)
static void gimp_memsize_entry_finalize (GObject *object);
@@ -110,19 +106,14 @@ gimp_memsize_entry_class_init (GimpMemsizeEntryClass *klass)
static void
gimp_memsize_entry_init (GimpMemsizeEntry *entry)
{
- GimpMemsizeEntryPrivate *private = GET_PRIVATE (entry);
+ entry->priv = G_TYPE_INSTANCE_GET_PRIVATE (entry,
+ GIMP_TYPE_MEMSIZE_ENTRY,
+ GimpMemsizeEntryPrivate);
gtk_orientable_set_orientation (GTK_ORIENTABLE (entry),
GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing (GTK_BOX (entry), 4);
-
- private->value = 0;
- private->lower = 0;
- private->upper = 0;
- private->shift = 0;
- private->adjustment = NULL;
- private->menu = NULL;
}
static void
diff --git a/libgimpwidgets/gimpmemsizeentry.h b/libgimpwidgets/gimpmemsizeentry.h
index a231bd6..4fed8c9 100644
--- a/libgimpwidgets/gimpmemsizeentry.h
+++ b/libgimpwidgets/gimpmemsizeentry.h
@@ -37,11 +37,14 @@ G_BEGIN_DECLS
#define GIMP_MEMSIZE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_MEMSIZE_ENTRY,
GimpMemsizeEntryClass))
-typedef struct _GimpMemsizeEntryClass GimpMemsizeEntryClass;
+typedef struct _GimpMemsizeEntryPrivate GimpMemsizeEntryPrivate;
+typedef struct _GimpMemsizeEntryClass GimpMemsizeEntryClass;
struct _GimpMemsizeEntry
{
GtkBox parent_instance;
+
+ GimpMemsizeEntryPrivate *priv;
};
struct _GimpMemsizeEntryClass
@@ -55,6 +58,10 @@ struct _GimpMemsizeEntryClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpnumberpairentry.c b/libgimpwidgets/gimpnumberpairentry.c
index 5c1d53c..99b5e54 100644
--- a/libgimpwidgets/gimpnumberpairentry.c
+++ b/libgimpwidgets/gimpnumberpairentry.c
@@ -80,7 +80,8 @@ typedef enum
PARSE_INVALID
} ParseResult;
-typedef struct
+
+struct _GimpNumberPairEntryPrivate
{
/* The current number pair displayed in the widget. */
gdouble left_number;
@@ -117,10 +118,9 @@ typedef struct
/* What range of values considered valid. */
gdouble min_valid_value;
gdouble max_valid_value;
-} GimpNumberPairEntryPrivate;
+};
-#define GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE(obj) \
- ((GimpNumberPairEntryPrivate *) ((GimpNumberPairEntry *) (obj))->priv)
+#define GET_PRIVATE(obj) (((GimpNumberPairEntry *) (obj))->priv)
static void gimp_number_pair_entry_finalize (GObject *entry);
@@ -310,7 +310,7 @@ gimp_number_pair_entry_init (GimpNumberPairEntry *entry)
GIMP_TYPE_NUMBER_PAIR_ENTRY,
GimpNumberPairEntryPrivate);
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
priv->left_number = 1.0;
priv->right_number = 1.0;
@@ -348,9 +348,7 @@ gimp_number_pair_entry_init (GimpNumberPairEntry *entry)
static void
gimp_number_pair_entry_finalize (GObject *object)
{
- GimpNumberPairEntryPrivate *priv;
-
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (object);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (object);
if (priv->separators)
{
@@ -506,7 +504,7 @@ gimp_number_pair_entry_get_ratio (GimpNumberPairEntry *entry)
g_return_val_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry), 1.0);
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
return priv->left_number / priv->right_number;
}
@@ -538,7 +536,7 @@ gimp_number_pair_entry_set_values (GimpNumberPairEntry *entry,
g_return_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry));
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
/* Store current values */
@@ -616,7 +614,7 @@ gimp_number_pair_entry_get_values (GimpNumberPairEntry *entry,
g_return_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry));
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
if (left != NULL)
*left = priv->left_number;
@@ -648,7 +646,7 @@ gimp_number_pair_entry_set_default_text (GimpNumberPairEntry *entry,
g_return_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry));
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
g_free (priv->default_text);
priv->default_text = g_strdup (string);
@@ -674,7 +672,7 @@ gimp_number_pair_entry_get_default_text (GimpNumberPairEntry *entry)
g_return_val_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry), NULL);
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
return priv->default_text;
}
@@ -701,7 +699,7 @@ gimp_number_pair_entry_set_aspect (GimpNumberPairEntry *entry,
if (gimp_number_pair_entry_get_aspect (entry) == aspect)
return;
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
switch (aspect)
{
@@ -737,7 +735,7 @@ gimp_number_pair_entry_get_aspect (GimpNumberPairEntry *entry)
g_return_val_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry), GIMP_ASPECT_SQUARE);
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
if (priv->left_number > priv->right_number)
{
@@ -757,7 +755,7 @@ static void
gimp_number_pair_entry_modify_font (GimpNumberPairEntry *entry,
gboolean italic)
{
- GimpNumberPairEntryPrivate *priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (entry);
PangoContext *context;
PangoFontDescription *font_desc;
@@ -804,7 +802,7 @@ gimp_number_pair_entry_set_user_override (GimpNumberPairEntry *entry,
g_return_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry));
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
priv->user_override = user_override;
@@ -835,7 +833,7 @@ gimp_number_pair_entry_get_user_override (GimpNumberPairEntry *entry)
g_return_val_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry), FALSE);
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
return priv->user_override;
}
@@ -858,12 +856,10 @@ static gboolean
gimp_number_pair_entry_events (GtkWidget *widget,
GdkEvent *event)
{
- GimpNumberPairEntry *entry;
- GimpNumberPairEntryPrivate *priv;
+ GimpNumberPairEntry *entry = GIMP_NUMBER_PAIR_ENTRY (widget);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (entry);
gboolean force_user_override;
- entry = GIMP_NUMBER_PAIR_ENTRY (widget);
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
force_user_override = FALSE;
switch (event->type)
@@ -951,7 +947,7 @@ gimp_number_pair_entry_strdup_number_pair_string (GimpNumberPairEntry *entry,
gdouble left_number,
gdouble right_number)
{
- GimpNumberPairEntryPrivate *priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (entry);
gchar sep[8];
gint len;
@@ -968,7 +964,7 @@ gimp_number_pair_entry_strdup_number_pair_string (GimpNumberPairEntry *entry,
static void
gimp_number_pair_entry_update_text (GimpNumberPairEntry *entry)
{
- GimpNumberPairEntryPrivate *priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (entry);
gchar *buffer;
if (! priv->user_override &&
@@ -1002,7 +998,7 @@ static gboolean
gimp_number_pair_entry_valid_separator (GimpNumberPairEntry *entry,
gunichar candidate)
{
- GimpNumberPairEntryPrivate *priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (entry);
if (priv->num_separators > 0)
{
@@ -1026,7 +1022,7 @@ gimp_number_pair_entry_parse_text (GimpNumberPairEntry *entry,
gdouble *left_value,
gdouble *right_value)
{
- GimpNumberPairEntryPrivate *priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (entry);
gdouble new_left_number;
gdouble new_right_number;
@@ -1114,9 +1110,7 @@ gimp_number_pair_entry_set_property (GObject *object,
GParamSpec *pspec)
{
GimpNumberPairEntry *entry = GIMP_NUMBER_PAIR_ENTRY (object);
- GimpNumberPairEntryPrivate *priv;
-
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (entry);
switch (property_id)
{
@@ -1185,9 +1179,7 @@ gimp_number_pair_entry_get_property (GObject *object,
GParamSpec *pspec)
{
GimpNumberPairEntry *entry = GIMP_NUMBER_PAIR_ENTRY (object);
- GimpNumberPairEntryPrivate *priv;
-
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (entry);
switch (property_id)
{
@@ -1253,7 +1245,7 @@ gimp_number_pair_entry_set_default_values (GimpNumberPairEntry *entry,
g_return_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry));
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
priv->default_left_number = left;
priv->default_right_number = right;
@@ -1283,7 +1275,7 @@ gimp_number_pair_entry_get_default_values (GimpNumberPairEntry *entry,
g_return_if_fail (GIMP_IS_NUMBER_PAIR_ENTRY (entry));
- priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ priv = GET_PRIVATE (entry);
if (left != NULL)
*left = priv->default_left_number;
@@ -1297,7 +1289,7 @@ gimp_number_pair_entry_numbers_in_range (GimpNumberPairEntry *entry,
gdouble left_number,
gdouble right_number)
{
- GimpNumberPairEntryPrivate *priv = GIMP_NUMBER_PAIR_ENTRY_GET_PRIVATE (entry);
+ GimpNumberPairEntryPrivate *priv = GET_PRIVATE (entry);
return (left_number >= priv->min_valid_value &&
left_number <= priv->max_valid_value &&
diff --git a/libgimpwidgets/gimpnumberpairentry.h b/libgimpwidgets/gimpnumberpairentry.h
index caa070d..908ae9c 100644
--- a/libgimpwidgets/gimpnumberpairentry.h
+++ b/libgimpwidgets/gimpnumberpairentry.h
@@ -39,14 +39,15 @@ G_BEGIN_DECLS
#define GIMP_NUMBER_PAIR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_NUMBER_PAIR_AREA, GimpNumberPairEntryClass))
+typedef struct _GimpNumberPairEntryPrivate GimpNumberPairEntryPrivate;
typedef struct _GimpNumberPairEntryClass GimpNumberPairEntryClass;
struct _GimpNumberPairEntry
{
- GtkEntry parent_instance;
+ GtkEntry parent_instance;
- gpointer priv;
+ GimpNumberPairEntryPrivate *priv;
};
struct _GimpNumberPairEntryClass
@@ -61,6 +62,10 @@ struct _GimpNumberPairEntryClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpoffsetarea.c b/libgimpwidgets/gimpoffsetarea.c
index d5c3a77..dd1ba27 100644
--- a/libgimpwidgets/gimpoffsetarea.c
+++ b/libgimpwidgets/gimpoffsetarea.c
@@ -48,8 +48,6 @@ enum
};
-typedef struct _GimpOffsetAreaPrivate GimpOffsetAreaPrivate;
-
struct _GimpOffsetAreaPrivate
{
gint orig_width;
@@ -62,9 +60,7 @@ struct _GimpOffsetAreaPrivate
gdouble display_ratio_y;
};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_OFFSET_AREA, \
- GimpOffsetAreaPrivate)
+#define GET_PRIVATE(obj) (((GimpOffsetArea *) (obj))->priv)
static void gimp_offset_area_resize (GimpOffsetArea *area);
@@ -113,14 +109,14 @@ gimp_offset_area_class_init (GimpOffsetAreaClass *klass)
static void
gimp_offset_area_init (GimpOffsetArea *area)
{
- GimpOffsetAreaPrivate *private = GET_PRIVATE (area);
+ GimpOffsetAreaPrivate *private;
+
+ area->priv = G_TYPE_INSTANCE_GET_PRIVATE (area,
+ GIMP_TYPE_OFFSET_AREA,
+ GimpOffsetAreaPrivate);
+
+ private = GET_PRIVATE (area);
- private->orig_width = 0;
- private->orig_height = 0;
- private->width = 0;
- private->height = 0;
- private->offset_x = 0;
- private->offset_y = 0;
private->display_ratio_x = 1.0;
private->display_ratio_y = 1.0;
diff --git a/libgimpwidgets/gimpoffsetarea.h b/libgimpwidgets/gimpoffsetarea.h
index acd1d23..744374f 100644
--- a/libgimpwidgets/gimpoffsetarea.h
+++ b/libgimpwidgets/gimpoffsetarea.h
@@ -39,11 +39,14 @@ G_BEGIN_DECLS
#define GIMP_OFFSET_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OFFSET_AREA,
GimpOffsetAreaClass))
-typedef struct _GimpOffsetAreaClass GimpOffsetAreaClass;
+typedef struct _GimpOffsetAreaPrivate GimpOffsetAreaPrivate;
+typedef struct _GimpOffsetAreaClass GimpOffsetAreaClass;
struct _GimpOffsetArea
{
- GtkDrawingArea parent_instance;
+ GtkDrawingArea parent_instance;
+
+ GimpOffsetAreaPrivate *priv;
};
struct _GimpOffsetAreaClass
@@ -59,6 +62,10 @@ struct _GimpOffsetAreaClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimppageselector.c b/libgimpwidgets/gimppageselector.c
index e5e0f71..6a1063a 100644
--- a/libgimpwidgets/gimppageselector.c
+++ b/libgimpwidgets/gimppageselector.c
@@ -70,7 +70,7 @@ enum
};
-typedef struct
+struct _GimpPageSelectorPrivate
{
gint n_pages;
GimpPageSelectorTarget target;
@@ -82,10 +82,9 @@ typedef struct
GtkWidget *range_entry;
GdkPixbuf *default_thumbnail;
-} GimpPageSelectorPrivate;
+};
-#define GIMP_PAGE_SELECTOR_GET_PRIVATE(obj) \
- ((GimpPageSelectorPrivate *) ((GimpPageSelector *) (obj))->priv)
+#define GET_PRIVATE(obj) (((GimpPageSelector *) (obj))->priv)
static void gimp_page_selector_finalize (GObject *object);
@@ -222,7 +221,7 @@ gimp_page_selector_init (GimpPageSelector *selector)
GIMP_TYPE_PAGE_SELECTOR,
GimpPageSelectorPrivate);
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
priv->n_pages = 0;
priv->target = GIMP_PAGE_SELECTOR_TARGET_LAYERS;
@@ -338,7 +337,7 @@ gimp_page_selector_init (GimpPageSelector *selector)
static void
gimp_page_selector_finalize (GObject *object)
{
- GimpPageSelectorPrivate *priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (object);
+ GimpPageSelectorPrivate *priv = GET_PRIVATE (object);
g_clear_object (&priv->default_thumbnail);
@@ -351,7 +350,7 @@ gimp_page_selector_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GimpPageSelectorPrivate *priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (object);
+ GimpPageSelectorPrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
@@ -374,7 +373,7 @@ gimp_page_selector_set_property (GObject *object,
GParamSpec *pspec)
{
GimpPageSelector *selector = GIMP_PAGE_SELECTOR (object);
- GimpPageSelectorPrivate *priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (object);
+ GimpPageSelectorPrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
@@ -426,7 +425,7 @@ gimp_page_selector_set_n_pages (GimpPageSelector *selector,
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
g_return_if_fail (n_pages >= 0);
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
if (n_pages != priv->n_pages)
{
@@ -483,7 +482,7 @@ gimp_page_selector_get_n_pages (GimpPageSelector *selector)
g_return_val_if_fail (GIMP_IS_PAGE_SELECTOR (selector), 0);
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
return priv->n_pages;
}
@@ -504,7 +503,7 @@ gimp_page_selector_set_target (GimpPageSelector *selector,
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
g_return_if_fail (target <= GIMP_PAGE_SELECTOR_TARGET_IMAGES);
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
if (target != priv->target)
{
@@ -530,7 +529,7 @@ gimp_page_selector_get_target (GimpPageSelector *selector)
g_return_val_if_fail (GIMP_IS_PAGE_SELECTOR (selector),
GIMP_PAGE_SELECTOR_TARGET_LAYERS);
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
return priv->target;
}
@@ -557,7 +556,7 @@ gimp_page_selector_set_page_thumbnail (GimpPageSelector *selector,
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
g_return_if_fail (thumbnail == NULL || GDK_IS_PIXBUF (thumbnail));
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
g_return_if_fail (page_no >= 0 && page_no < priv->n_pages);
@@ -601,7 +600,7 @@ gimp_page_selector_get_page_thumbnail (GimpPageSelector *selector,
g_return_val_if_fail (GIMP_IS_PAGE_SELECTOR (selector), NULL);
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
g_return_val_if_fail (page_no >= 0 && page_no < priv->n_pages, NULL);
@@ -641,7 +640,7 @@ gimp_page_selector_set_page_label (GimpPageSelector *selector,
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
g_return_if_fail (page_no >= 0 && page_no < priv->n_pages);
@@ -683,7 +682,7 @@ gimp_page_selector_get_page_label (GimpPageSelector *selector,
g_return_val_if_fail (GIMP_IS_PAGE_SELECTOR (selector), NULL);
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
g_return_val_if_fail (page_no >= 0 && page_no < priv->n_pages, NULL);
@@ -718,7 +717,7 @@ gimp_page_selector_select_all (GimpPageSelector *selector)
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
gtk_icon_view_select_all (GTK_ICON_VIEW (priv->view));
}
@@ -738,7 +737,7 @@ gimp_page_selector_unselect_all (GimpPageSelector *selector)
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
gtk_icon_view_unselect_all (GTK_ICON_VIEW (priv->view));
}
@@ -762,7 +761,7 @@ gimp_page_selector_select_page (GimpPageSelector *selector,
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
g_return_if_fail (page_no >= 0 && page_no < priv->n_pages);
@@ -794,7 +793,7 @@ gimp_page_selector_unselect_page (GimpPageSelector *selector,
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
g_return_if_fail (page_no >= 0 && page_no < priv->n_pages);
@@ -827,7 +826,7 @@ gimp_page_selector_page_is_selected (GimpPageSelector *selector,
g_return_val_if_fail (GIMP_IS_PAGE_SELECTOR (selector), FALSE);
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
g_return_val_if_fail (page_no >= 0 && page_no < priv->n_pages, FALSE);
@@ -866,7 +865,7 @@ gimp_page_selector_get_selected_pages (GimpPageSelector *selector,
g_return_val_if_fail (GIMP_IS_PAGE_SELECTOR (selector), NULL);
g_return_val_if_fail (n_selected_pages != NULL, NULL);
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
selected = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (priv->view));
@@ -912,7 +911,7 @@ gimp_page_selector_select_range (GimpPageSelector *selector,
g_return_if_fail (GIMP_IS_PAGE_SELECTOR (selector));
- priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ priv = GET_PRIVATE (selector);
if (! range)
range = "";
@@ -1054,7 +1053,7 @@ static void
gimp_page_selector_selection_changed (GtkIconView *icon_view,
GimpPageSelector *selector)
{
- GimpPageSelectorPrivate *priv = GIMP_PAGE_SELECTOR_GET_PRIVATE (selector);
+ GimpPageSelectorPrivate *priv = GET_PRIVATE (selector);
GList *selected;
gint n_selected;
gchar *range;
diff --git a/libgimpwidgets/gimppageselector.h b/libgimpwidgets/gimppageselector.h
index 454a881..8a6d26d 100644
--- a/libgimpwidgets/gimppageselector.h
+++ b/libgimpwidgets/gimppageselector.h
@@ -36,13 +36,14 @@ G_BEGIN_DECLS
#define GIMP_PAGE_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PAGE_SELECTOR,
GimpPageSelectorClass))
-typedef struct _GimpPageSelectorClass GimpPageSelectorClass;
+typedef struct _GimpPageSelectorPrivate GimpPageSelectorPrivate;
+typedef struct _GimpPageSelectorClass GimpPageSelectorClass;
struct _GimpPageSelector
{
- GtkBox parent_instance;
+ GtkBox parent_instance;
- gpointer priv;
+ GimpPageSelectorPrivate *priv;
};
struct _GimpPageSelectorClass
@@ -57,6 +58,10 @@ struct _GimpPageSelectorClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimppatheditor.h b/libgimpwidgets/gimppatheditor.h
index 54ad032..ff65d8f 100644
--- a/libgimpwidgets/gimppatheditor.h
+++ b/libgimpwidgets/gimppatheditor.h
@@ -39,12 +39,16 @@ G_BEGIN_DECLS
#define GIMP_PATH_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PATH_EDITOR,
GimpPathEditorClass))
-typedef struct _GimpPathEditorClass GimpPathEditorClass;
+typedef struct _GimpPathEditorPrivate GimpPathEditorPrivate;
+typedef struct _GimpPathEditorClass GimpPathEditorClass;
struct _GimpPathEditor
{
- GtkBox parent_instance;
+ GtkBox parent_instance;
+ GimpPathEditorPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
GtkWidget *upper_hbox;
GtkWidget *new_button;
@@ -76,6 +80,10 @@ struct _GimpPathEditorClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimppickbutton.h b/libgimpwidgets/gimppickbutton.h
index bfd16a8..e7d6923 100644
--- a/libgimpwidgets/gimppickbutton.h
+++ b/libgimpwidgets/gimppickbutton.h
@@ -56,6 +56,10 @@ struct _GimpPickButtonClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimppreview.c b/libgimpwidgets/gimppreview.c
index f707dc8..bdaad98 100644
--- a/libgimpwidgets/gimppreview.c
+++ b/libgimpwidgets/gimppreview.c
@@ -59,12 +59,13 @@ enum
PROP_UPDATE
};
-typedef struct
+
+struct _GimpPreviewPrivate
{
GtkWidget *controls;
-} GimpPreviewPrivate;
+};
-#define GIMP_PREVIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GIMP_TYPE_PREVIEW,
GimpPreviewPrivate))
+#define GET_PRIVATE(obj) (((GimpPreview *) (obj))->priv)
static void gimp_preview_class_init (GimpPreviewClass *klass);
@@ -114,6 +115,8 @@ static void gimp_preview_real_untransform (GimpPreview *preview,
gint *dest_y);
+/* FIXME G_DEFINE_TYPE */
+
static guint preview_signals[LAST_SIGNAL] = { 0 };
static GtkBoxClass *parent_class = NULL;
@@ -202,10 +205,16 @@ gimp_preview_class_init (GimpPreviewClass *klass)
static void
gimp_preview_init (GimpPreview *preview)
{
- GimpPreviewPrivate *priv = GIMP_PREVIEW_GET_PRIVATE (preview);
+ GimpPreviewPrivate *priv;
GtkWidget *frame;
gdouble xalign = 0.0;
+ preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview,
+ GIMP_TYPE_PREVIEW,
+ GimpPreviewPrivate);
+
+ priv = preview->priv;
+
gtk_orientable_set_orientation (GTK_ORIENTABLE (preview),
GTK_ORIENTATION_VERTICAL);
@@ -853,5 +862,5 @@ gimp_preview_get_controls (GimpPreview *preview)
{
g_return_val_if_fail (GIMP_IS_PREVIEW (preview), NULL);
- return GIMP_PREVIEW_GET_PRIVATE (preview)->controls;
+ return GET_PRIVATE (preview)->controls;
}
diff --git a/libgimpwidgets/gimppreview.h b/libgimpwidgets/gimppreview.h
index 71a5241..d044556 100644
--- a/libgimpwidgets/gimppreview.h
+++ b/libgimpwidgets/gimppreview.h
@@ -39,12 +39,16 @@ G_BEGIN_DECLS
#define GIMP_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PREVIEW, GimpPreviewClass))
-typedef struct _GimpPreviewClass GimpPreviewClass;
+typedef struct _GimpPreviewPrivate GimpPreviewPrivate;
+typedef struct _GimpPreviewClass GimpPreviewClass;
struct _GimpPreview
{
- GtkBox parent_instance;
+ GtkBox parent_instance;
+ GimpPreviewPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
gboolean update_preview;
/*< protected >*/
@@ -78,10 +82,6 @@ struct _GimpPreviewClass
gint rowstride);
void (* set_cursor) (GimpPreview *preview);
- /* signal */
- void (* invalidated) (GimpPreview *preview);
-
- /* virtual methods */
void (* transform) (GimpPreview *preview,
gint src_x,
gint src_y,
@@ -93,9 +93,18 @@ struct _GimpPreviewClass
gint *dest_x,
gint *dest_y);
+ /* signal */
+ void (* invalidated) (GimpPreview *preview);
+
/* Padding for future expansion */
+ void (* _gimp_reserved1) (void);
+ void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimppreviewarea.c b/libgimpwidgets/gimppreviewarea.c
index a5b00e8..9c17656 100644
--- a/libgimpwidgets/gimppreviewarea.c
+++ b/libgimpwidgets/gimppreviewarea.c
@@ -61,18 +61,13 @@ enum
(((area)->offset_x + (col)) & size)) ? dark : light)
-typedef struct _GimpPreviewAreaPrivate GimpPreviewAreaPrivate;
-
struct _GimpPreviewAreaPrivate
{
GimpColorConfig *config;
GimpColorTransform *transform;
};
-#define GET_PRIVATE(obj) \
- G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_PREVIEW_AREA, \
- GimpPreviewAreaPrivate)
+#define GET_PRIVATE(obj) (((GimpPreviewArea *) (obj))->priv)
static void gimp_preview_area_dispose (GObject *object);
@@ -143,15 +138,12 @@ gimp_preview_area_class_init (GimpPreviewAreaClass *klass)
static void
gimp_preview_area_init (GimpPreviewArea *area)
{
+ area->priv = G_TYPE_INSTANCE_GET_PRIVATE (area,
+ GIMP_TYPE_PREVIEW_AREA,
+ GimpPreviewAreaPrivate);
+
area->check_size = DEFAULT_CHECK_SIZE;
area->check_type = DEFAULT_CHECK_TYPE;
- area->buf = NULL;
- area->colormap = NULL;
- area->offset_x = 0;
- area->offset_y = 0;
- area->width = 0;
- area->height = 0;
- area->rowstride = 0;
area->max_width = -1;
area->max_height = -1;
diff --git a/libgimpwidgets/gimppreviewarea.h b/libgimpwidgets/gimppreviewarea.h
index 256a9fb..9d7e471 100644
--- a/libgimpwidgets/gimppreviewarea.h
+++ b/libgimpwidgets/gimppreviewarea.h
@@ -34,12 +34,16 @@ G_BEGIN_DECLS
#define GIMP_PREVIEW_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PREVIEW_AREA,
GimpPreviewArea))
-typedef struct _GimpPreviewAreaClass GimpPreviewAreaClass;
+typedef struct _GimpPreviewAreaPrivate GimpPreviewAreaPrivate;
+typedef struct _GimpPreviewAreaClass GimpPreviewAreaClass;
struct _GimpPreviewArea
{
- GtkDrawingArea parent_instance;
+ GtkDrawingArea parent_instance;
+ GimpPreviewAreaPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
GimpCheckSize check_size;
GimpCheckType check_type;
gint width;
@@ -62,6 +66,10 @@ struct _GimpPreviewAreaClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpruler.c b/libgimpwidgets/gimpruler.c
index b203a17..41ef8c2 100644
--- a/libgimpwidgets/gimpruler.c
+++ b/libgimpwidgets/gimpruler.c
@@ -58,7 +58,7 @@ enum
/* All distances below are in 1/72nd's of an inch. (According to
* Adobe that's a point, but points are really 1/72.27 in.)
*/
-typedef struct
+struct _GimpRulerPrivate
{
GtkOrientation orientation;
GimpUnit unit;
@@ -75,10 +75,9 @@ typedef struct
PangoLayout *layout;
GList *track_widgets;
-} GimpRulerPrivate;
+};
-#define GIMP_RULER_GET_PRIVATE(ruler) \
- G_TYPE_INSTANCE_GET_PRIVATE (ruler, GIMP_TYPE_RULER, GimpRulerPrivate)
+#define GET_PRIVATE(obj) (((GimpRuler *) (obj))->priv)
typedef struct
@@ -246,32 +245,25 @@ gimp_ruler_class_init (GimpRulerClass *klass)
static void
gimp_ruler_init (GimpRuler *ruler)
{
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv;
- gtk_widget_set_has_window (GTK_WIDGET (ruler), FALSE);
+ ruler->priv = G_TYPE_INSTANCE_GET_PRIVATE (ruler,
+ GIMP_TYPE_RULER,
+ GimpRulerPrivate);
- priv->orientation = GTK_ORIENTATION_HORIZONTAL;
- priv->unit = GIMP_UNIT_PIXEL;
- priv->lower = 0;
- priv->upper = 0;
- priv->position = 0;
- priv->max_size = 0;
+ priv = ruler->priv;
- priv->backing_store = NULL;
- priv->backing_store_valid = FALSE;
+ gtk_widget_set_has_window (GTK_WIDGET (ruler), FALSE);
- priv->last_pos_rect.x = 0;
- priv->last_pos_rect.y = 0;
- priv->last_pos_rect.width = 0;
- priv->last_pos_rect.height = 0;
- priv->pos_redraw_idle_id = 0;
+ priv->orientation = GTK_ORIENTATION_HORIZONTAL;
+ priv->unit = GIMP_UNIT_PIXEL;
}
static void
gimp_ruler_dispose (GObject *object)
{
GimpRuler *ruler = GIMP_RULER (object);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
while (priv->track_widgets)
gimp_ruler_remove_track_widget (ruler, priv->track_widgets->data);
@@ -292,7 +284,7 @@ gimp_ruler_set_property (GObject *object,
GParamSpec *pspec)
{
GimpRuler *ruler = GIMP_RULER (object);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
switch (prop_id)
{
@@ -342,7 +334,7 @@ gimp_ruler_get_property (GObject *object,
GParamSpec *pspec)
{
GimpRuler *ruler = GIMP_RULER (object);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
switch (prop_id)
{
@@ -399,7 +391,7 @@ gimp_ruler_update_position (GimpRuler *ruler,
gdouble x,
gdouble y)
{
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
GtkAllocation allocation;
gdouble lower;
gdouble upper;
@@ -537,7 +529,7 @@ gimp_ruler_add_track_widget (GimpRuler *ruler,
g_return_if_fail (GIMP_IS_RULER (ruler));
g_return_if_fail (GTK_IS_WIDGET (ruler));
- priv = GIMP_RULER_GET_PRIVATE (ruler);
+ priv = GET_PRIVATE (ruler);
g_return_if_fail (g_list_find (priv->track_widgets, widget) == NULL);
@@ -570,7 +562,7 @@ gimp_ruler_remove_track_widget (GimpRuler *ruler,
g_return_if_fail (GIMP_IS_RULER (ruler));
g_return_if_fail (GTK_IS_WIDGET (ruler));
- priv = GIMP_RULER_GET_PRIVATE (ruler);
+ priv = GET_PRIVATE (ruler);
g_return_if_fail (g_list_find (priv->track_widgets, widget) != NULL);
@@ -601,7 +593,7 @@ gimp_ruler_set_unit (GimpRuler *ruler,
g_return_if_fail (GIMP_IS_RULER (ruler));
- priv = GIMP_RULER_GET_PRIVATE (ruler);
+ priv = GET_PRIVATE (ruler);
if (priv->unit != unit)
{
@@ -626,7 +618,7 @@ gimp_ruler_get_unit (GimpRuler *ruler)
{
g_return_val_if_fail (GIMP_IS_RULER (ruler), 0);
- return GIMP_RULER_GET_PRIVATE (ruler)->unit;
+ return GET_PRIVATE (ruler)->unit;
}
/**
@@ -646,7 +638,7 @@ gimp_ruler_set_position (GimpRuler *ruler,
g_return_if_fail (GIMP_IS_RULER (ruler));
- priv = GIMP_RULER_GET_PRIVATE (ruler);
+ priv = GET_PRIVATE (ruler);
if (priv->position != position)
{
@@ -705,7 +697,7 @@ gimp_ruler_get_position (GimpRuler *ruler)
{
g_return_val_if_fail (GIMP_IS_RULER (ruler), 0.0);
- return GIMP_RULER_GET_PRIVATE (ruler)->position;
+ return GET_PRIVATE (ruler)->position;
}
/**
@@ -730,7 +722,7 @@ gimp_ruler_set_range (GimpRuler *ruler,
g_return_if_fail (GIMP_IS_RULER (ruler));
- priv = GIMP_RULER_GET_PRIVATE (ruler);
+ priv = GET_PRIVATE (ruler);
g_object_freeze_notify (G_OBJECT (ruler));
if (priv->lower != lower)
@@ -777,7 +769,7 @@ gimp_ruler_get_range (GimpRuler *ruler,
g_return_if_fail (GIMP_IS_RULER (ruler));
- priv = GIMP_RULER_GET_PRIVATE (ruler);
+ priv = GET_PRIVATE (ruler);
if (lower)
*lower = priv->lower;
@@ -791,7 +783,7 @@ static void
gimp_ruler_realize (GtkWidget *widget)
{
GimpRuler *ruler = GIMP_RULER (widget);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
GtkAllocation allocation;
GdkWindowAttr attributes;
gint attributes_mask;
@@ -823,7 +815,7 @@ static void
gimp_ruler_unrealize (GtkWidget *widget)
{
GimpRuler *ruler = GIMP_RULER (widget);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
g_clear_pointer (&priv->backing_store, cairo_surface_destroy);
priv->backing_store_valid = FALSE;
@@ -838,7 +830,7 @@ gimp_ruler_unrealize (GtkWidget *widget)
static void
gimp_ruler_map (GtkWidget *widget)
{
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (widget);
+ GimpRulerPrivate *priv = GET_PRIVATE (widget);
GTK_WIDGET_CLASS (parent_class)->map (widget);
@@ -849,7 +841,7 @@ gimp_ruler_map (GtkWidget *widget)
static void
gimp_ruler_unmap (GtkWidget *widget)
{
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (widget);
+ GimpRulerPrivate *priv = GET_PRIVATE (widget);
if (priv->input_window)
gdk_window_hide (priv->input_window);
@@ -862,7 +854,7 @@ gimp_ruler_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GimpRuler *ruler = GIMP_RULER (widget);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
GtkAllocation widget_allocation;
gboolean resized;
@@ -888,7 +880,7 @@ static void
gimp_ruler_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (widget);
+ GimpRulerPrivate *priv = GET_PRIVATE (widget);
GtkStyleContext *context = gtk_widget_get_style_context (widget);
PangoLayout *layout;
PangoRectangle ink_rect;
@@ -944,7 +936,7 @@ gimp_ruler_get_preferred_height (GtkWidget *widget,
static void
gimp_ruler_style_updated (GtkWidget *widget)
{
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (widget);
+ GimpRulerPrivate *priv = GET_PRIVATE (widget);
GTK_WIDGET_CLASS (gimp_ruler_parent_class)->style_updated (widget);
@@ -969,7 +961,7 @@ gimp_ruler_draw (GtkWidget *widget,
cairo_t *cr)
{
GimpRuler *ruler = GIMP_RULER (widget);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkAllocation allocation;
@@ -993,7 +985,7 @@ gimp_ruler_draw_ticks (GimpRuler *ruler)
{
GtkWidget *widget = GTK_WIDGET (ruler);
GtkStyleContext *context = gtk_widget_get_style_context (widget);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
GtkAllocation allocation;
GtkBorder border;
GdkRGBA color;
@@ -1201,7 +1193,7 @@ gimp_ruler_get_pos_rect (GimpRuler *ruler,
{
GtkWidget *widget = GTK_WIDGET (ruler);
GtkStyleContext *context = gtk_widget_get_style_context (widget);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
GtkAllocation allocation;
GtkBorder border;
gint width, height;
@@ -1258,7 +1250,7 @@ static gboolean
gimp_ruler_idle_queue_pos_redraw (gpointer data)
{
GimpRuler *ruler = data;
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
gimp_ruler_queue_pos_redraw (ruler);
@@ -1270,7 +1262,7 @@ gimp_ruler_idle_queue_pos_redraw (gpointer data)
static void
gimp_ruler_queue_pos_redraw (GimpRuler *ruler)
{
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
const GdkRectangle rect = gimp_ruler_get_pos_rect (ruler, priv->position);
GtkAllocation allocation;
@@ -1304,7 +1296,7 @@ gimp_ruler_draw_pos (GimpRuler *ruler,
{
GtkWidget *widget = GTK_WIDGET (ruler);
GtkStyleContext *context = gtk_widget_get_style_context (widget);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
GdkRectangle pos_rect;
if (! gtk_widget_is_drawable (widget))
@@ -1357,7 +1349,7 @@ static void
gimp_ruler_make_pixmap (GimpRuler *ruler)
{
GtkWidget *widget = GTK_WIDGET (ruler);
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (ruler);
+ GimpRulerPrivate *priv = GET_PRIVATE (ruler);
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
@@ -1378,7 +1370,7 @@ static PangoLayout *
gimp_ruler_get_layout (GtkWidget *widget,
const gchar *text)
{
- GimpRulerPrivate *priv = GIMP_RULER_GET_PRIVATE (widget);
+ GimpRulerPrivate *priv = GET_PRIVATE (widget);
if (priv->layout)
{
diff --git a/libgimpwidgets/gimpruler.h b/libgimpwidgets/gimpruler.h
index 6ae8355..00bd974 100644
--- a/libgimpwidgets/gimpruler.h
+++ b/libgimpwidgets/gimpruler.h
@@ -33,11 +33,14 @@ G_BEGIN_DECLS
#define GIMP_RULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_RULER, GimpRulerClass))
+typedef struct _GimpRulerPrivate GimpRulerPrivate;
typedef struct _GimpRulerClass GimpRulerClass;
struct _GimpRuler
{
- GtkWidget parent_instance;
+ GtkWidget parent_instance;
+
+ GimpRulerPrivate *priv;
};
struct _GimpRulerClass
@@ -49,6 +52,10 @@ struct _GimpRulerClass
void (*_gimp_reserved2) (void);
void (*_gimp_reserved3) (void);
void (*_gimp_reserved4) (void);
+ void (*_gimp_reserved5) (void);
+ void (*_gimp_reserved6) (void);
+ void (*_gimp_reserved7) (void);
+ void (*_gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpscrolledpreview.c b/libgimpwidgets/gimpscrolledpreview.c
index 1d6c474..b5d52ea 100644
--- a/libgimpwidgets/gimpscrolledpreview.c
+++ b/libgimpwidgets/gimpscrolledpreview.c
@@ -46,7 +46,7 @@
#define POPUP_SIZE 100
-typedef struct
+struct _GimpScrolledPreviewPrivate
{
GtkPolicyType hscr_policy;
GtkPolicyType vscr_policy;
@@ -56,10 +56,9 @@ typedef struct
gint drag_yoff;
gboolean in_drag;
gint frozen;
-} GimpScrolledPreviewPrivate;
+};
-#define GIMP_SCROLLED_PREVIEW_GET_PRIVATE(obj) \
- ((GimpScrolledPreviewPrivate *) ((GimpScrolledPreview *) (obj))->priv)
+#define GET_PRIVATE(obj) (((GimpScrolledPreview *) (obj))->priv)
static void gimp_scrolled_preview_class_init (GimpScrolledPreviewClass *klass);
@@ -154,7 +153,7 @@ gimp_scrolled_preview_init (GimpScrolledPreview *preview)
GIMP_TYPE_SCROLLED_PREVIEW,
GimpScrolledPreviewPrivate);
- priv = GIMP_SCROLLED_PREVIEW_GET_PRIVATE (preview);
+ priv = GET_PRIVATE (preview);
preview->nav_popup = NULL;
@@ -300,7 +299,7 @@ gimp_scrolled_preview_area_size_allocate (GtkWidget *widget,
GtkAllocation *allocation,
GimpScrolledPreview *preview)
{
- GimpScrolledPreviewPrivate *priv = GIMP_SCROLLED_PREVIEW_GET_PRIVATE (preview);
+ GimpScrolledPreviewPrivate *priv = GET_PRIVATE (preview);
gint width = GIMP_PREVIEW (preview)->xmax - GIMP_PREVIEW (preview)->xmin;
gint height = GIMP_PREVIEW (preview)->ymax - GIMP_PREVIEW (preview)->ymin;
@@ -359,7 +358,7 @@ gimp_scrolled_preview_area_event (GtkWidget *area,
GdkEvent *event,
GimpScrolledPreview *preview)
{
- GimpScrolledPreviewPrivate *priv = GIMP_SCROLLED_PREVIEW_GET_PRIVATE (preview);
+ GimpScrolledPreviewPrivate *priv = GET_PRIVATE (preview);
GdkEventButton *button_event = (GdkEventButton *) event;
GdkCursor *cursor;
@@ -516,7 +515,7 @@ static void
gimp_scrolled_preview_h_scroll (GtkAdjustment *hadj,
GimpPreview *preview)
{
- GimpScrolledPreviewPrivate *priv = GIMP_SCROLLED_PREVIEW_GET_PRIVATE (preview);
+ GimpScrolledPreviewPrivate *priv = GET_PRIVATE (preview);
preview->xoff = gtk_adjustment_get_value (hadj);
@@ -534,7 +533,7 @@ static void
gimp_scrolled_preview_v_scroll (GtkAdjustment *vadj,
GimpPreview *preview)
{
- GimpScrolledPreviewPrivate *priv = GIMP_SCROLLED_PREVIEW_GET_PRIVATE (preview);
+ GimpScrolledPreviewPrivate *priv = GET_PRIVATE (preview);
preview->yoff = gtk_adjustment_get_value (vadj);
@@ -843,7 +842,7 @@ gimp_scrolled_preview_set_policy (GimpScrolledPreview *preview,
g_return_if_fail (GIMP_IS_SCROLLED_PREVIEW (preview));
- priv = GIMP_SCROLLED_PREVIEW_GET_PRIVATE (preview);
+ priv = GET_PRIVATE (preview);
priv->hscr_policy = hscrollbar_policy;
priv->vscr_policy = vscrollbar_policy;
@@ -871,7 +870,7 @@ gimp_scrolled_preview_freeze (GimpScrolledPreview *preview)
g_return_if_fail (GIMP_IS_SCROLLED_PREVIEW (preview));
- priv = GIMP_SCROLLED_PREVIEW_GET_PRIVATE (preview);
+ priv = GET_PRIVATE (preview);
priv->frozen++;
}
@@ -895,7 +894,7 @@ gimp_scrolled_preview_thaw (GimpScrolledPreview *preview)
g_return_if_fail (GIMP_IS_SCROLLED_PREVIEW (preview));
- priv = GIMP_SCROLLED_PREVIEW_GET_PRIVATE (preview);
+ priv = GET_PRIVATE (preview);
g_return_if_fail (priv->frozen > 0);
diff --git a/libgimpwidgets/gimpscrolledpreview.h b/libgimpwidgets/gimpscrolledpreview.h
index a184a92..7e8bf4e 100644
--- a/libgimpwidgets/gimpscrolledpreview.h
+++ b/libgimpwidgets/gimpscrolledpreview.h
@@ -41,22 +41,22 @@ G_BEGIN_DECLS
#define GIMP_SCROLLED_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_SCROLLED_PREVIEW,
GimpScrolledPreviewClass))
-typedef struct _GimpScrolledPreviewClass GimpScrolledPreviewClass;
+typedef struct _GimpScrolledPreviewPrivate GimpScrolledPreviewPrivate;
+typedef struct _GimpScrolledPreviewClass GimpScrolledPreviewClass;
struct _GimpScrolledPreview
{
- GimpPreview parent_instance;
+ GimpPreview parent_instance;
- /*< protected >*/
+ GimpScrolledPreviewPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
GtkWidget *hscr;
GtkWidget *vscr;
GtkWidget *nav_icon;
GtkWidget *nav_popup;
GdkCursor *cursor_move;
gpointer nav_gc; /* unused */
-
- /*< private >*/
- gpointer priv;
};
struct _GimpScrolledPreviewClass
@@ -68,6 +68,10 @@ struct _GimpScrolledPreviewClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpsizeentry.h b/libgimpwidgets/gimpsizeentry.h
index a1d6bb7..998c955 100644
--- a/libgimpwidgets/gimpsizeentry.h
+++ b/libgimpwidgets/gimpsizeentry.h
@@ -40,14 +40,18 @@ G_BEGIN_DECLS
#define GIMP_SIZE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_SIZE_ENTRY,
GimpSizeEntryClass))
-typedef struct _GimpSizeEntryClass GimpSizeEntryClass;
+typedef struct _GimpSizeEntryPrivate GimpSizeEntryPrivate;
+typedef struct _GimpSizeEntryClass GimpSizeEntryClass;
typedef struct _GimpSizeEntryField GimpSizeEntryField;
struct _GimpSizeEntry
{
- GtkGrid parent_instance;
+ GtkGrid parent_instance;
+ GimpSizeEntryPrivate *priv;
+
+ /* FIXME MOVE TO PRIVATE */
GSList *fields;
gint number_of_fields;
@@ -73,6 +77,10 @@ struct _GimpSizeEntryClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpstringcombobox.c b/libgimpwidgets/gimpstringcombobox.c
index 4d1f13c..9b719d5 100644
--- a/libgimpwidgets/gimpstringcombobox.c
+++ b/libgimpwidgets/gimpstringcombobox.c
@@ -48,15 +48,14 @@ enum
};
-typedef struct
+struct _GimpStringComboBoxPrivate
{
gint id_column;
gint label_column;
GtkCellRenderer *text_renderer;
-} GimpStringComboBoxPrivate;
+};
-#define GIMP_STRING_COMBO_BOX_GET_PRIVATE(obj) \
- ((GimpStringComboBoxPrivate *) ((GimpStringComboBox *) (obj))->priv)
+#define GET_PRIVATE(obj) (((GimpStringComboBox *) (obj))->priv)
static void gimp_string_combo_box_constructed (GObject *object);
@@ -151,7 +150,7 @@ gimp_string_combo_box_init (GimpStringComboBox *combo_box)
static void
gimp_string_combo_box_constructed (GObject *object)
{
- GimpStringComboBoxPrivate *priv = GIMP_STRING_COMBO_BOX_GET_PRIVATE (object);
+ GimpStringComboBoxPrivate *priv = GET_PRIVATE (object);
GtkCellRenderer *cell;
G_OBJECT_CLASS (parent_class)->constructed (object);
@@ -170,7 +169,7 @@ gimp_string_combo_box_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GimpStringComboBoxPrivate *priv = GIMP_STRING_COMBO_BOX_GET_PRIVATE (object);
+ GimpStringComboBoxPrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
@@ -198,7 +197,7 @@ gimp_string_combo_box_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GimpStringComboBoxPrivate *priv = GIMP_STRING_COMBO_BOX_GET_PRIVATE (object);
+ GimpStringComboBoxPrivate *priv = GET_PRIVATE (object);
switch (property_id)
{
@@ -312,7 +311,7 @@ gimp_string_combo_box_set_active (GimpStringComboBox *combo_box,
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box));
- column = GIMP_STRING_COMBO_BOX_GET_PRIVATE (combo_box)->id_column;
+ column = GET_PRIVATE (combo_box)->id_column;
if (gimp_string_model_lookup (model, column, id, &iter))
{
@@ -353,7 +352,7 @@ gimp_string_combo_box_get_active (GimpStringComboBox *combo_box)
gchar *value;
gint column;
- column = GIMP_STRING_COMBO_BOX_GET_PRIVATE (combo_box)->id_column;
+ column = GET_PRIVATE (combo_box)->id_column;
gtk_tree_model_get (model, &iter,
column, &value,
diff --git a/libgimpwidgets/gimpstringcombobox.h b/libgimpwidgets/gimpstringcombobox.h
index 298f10e..2eb3c4e 100644
--- a/libgimpwidgets/gimpstringcombobox.h
+++ b/libgimpwidgets/gimpstringcombobox.h
@@ -37,14 +37,14 @@ G_BEGIN_DECLS
#define GIMP_STRING_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_STRING_COMBO_BOX,
GimpStringComboBoxClass))
-typedef struct _GimpStringComboBoxClass GimpStringComboBoxClass;
+typedef struct _GimpStringComboBoxPrivate GimpStringComboBoxPrivate;
+typedef struct _GimpStringComboBoxClass GimpStringComboBoxClass;
struct _GimpStringComboBox
{
- GtkComboBox parent_instance;
+ GtkComboBox parent_instance;
- /*< private >*/
- gpointer priv;
+ GimpStringComboBoxPrivate *priv;
};
struct _GimpStringComboBoxClass
@@ -56,6 +56,10 @@ struct _GimpStringComboBoxClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpunitcombobox.h b/libgimpwidgets/gimpunitcombobox.h
index f469b75..ca25caa 100644
--- a/libgimpwidgets/gimpunitcombobox.h
+++ b/libgimpwidgets/gimpunitcombobox.h
@@ -37,11 +37,14 @@ G_BEGIN_DECLS
#define GIMP_UNIT_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_UNIT_COMBO_BOX,
GimpUnitComboBoxClass))
-typedef struct _GimpUnitComboBoxClass GimpUnitComboBoxClass;
+typedef struct _GimpUnitComboBoxPrivate GimpUnitComboBoxPrivate;
+typedef struct _GimpUnitComboBoxClass GimpUnitComboBoxClass;
struct _GimpUnitComboBox
{
- GtkComboBox parent_instance;
+ GtkComboBox parent_instance;
+
+ GimpUnitComboBoxPrivate *priv;
};
struct _GimpUnitComboBoxClass
@@ -53,6 +56,10 @@ struct _GimpUnitComboBoxClass
void (*_gimp_reserved2) (void);
void (*_gimp_reserved3) (void);
void (*_gimp_reserved4) (void);
+ void (*_gimp_reserved5) (void);
+ void (*_gimp_reserved6) (void);
+ void (*_gimp_reserved7) (void);
+ void (*_gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpunitstore.c b/libgimpwidgets/gimpunitstore.c
index 83588fa..a5f8d06 100644
--- a/libgimpwidgets/gimpunitstore.c
+++ b/libgimpwidgets/gimpunitstore.c
@@ -40,7 +40,7 @@ enum
PROP_LONG_FORMAT
};
-typedef struct
+struct _GimpUnitStorePrivate
{
gint num_values;
gboolean has_pixels;
@@ -53,11 +53,9 @@ typedef struct
gdouble *resolutions;
GimpUnit synced_unit;
-} GimpUnitStorePrivate;
+};
-#define GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE (obj, \
- GIMP_TYPE_UNIT_STORE, \
- GimpUnitStorePrivate)
+#define GET_PRIVATE(obj) (((GimpUnitStore *) (obj))->priv)
static void gimp_unit_store_tree_model_init (GtkTreeModelIface *iface);
@@ -178,7 +176,13 @@ gimp_unit_store_class_init (GimpUnitStoreClass *klass)
static void
gimp_unit_store_init (GimpUnitStore *store)
{
- GimpUnitStorePrivate *private = GET_PRIVATE (store);
+ GimpUnitStorePrivate *private;
+
+ store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store,
+ GIMP_TYPE_UNIT_STORE,
+ GimpUnitStorePrivate);
+
+ private = store->priv;
private->has_pixels = TRUE;
private->has_percent = FALSE;
diff --git a/libgimpwidgets/gimpunitstore.h b/libgimpwidgets/gimpunitstore.h
index 25688d6..23dd774 100644
--- a/libgimpwidgets/gimpunitstore.h
+++ b/libgimpwidgets/gimpunitstore.h
@@ -54,11 +54,14 @@ enum
#define GIMP_UNIT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_UNIT_STORE,
GimpUnitStoreClass))
-typedef struct _GimpUnitStoreClass GimpUnitStoreClass;
+typedef struct _GimpUnitStorePrivate GimpUnitStorePrivate;
+typedef struct _GimpUnitStoreClass GimpUnitStoreClass;
struct _GimpUnitStore
{
- GObject parent_instance;
+ GObject parent_instance;
+
+ GimpUnitStorePrivate *priv;
};
struct _GimpUnitStoreClass
@@ -66,10 +69,14 @@ struct _GimpUnitStoreClass
GObjectClass parent_class;
/* Padding for future expansion */
- void (*_gtk_reserved1) (void);
- void (*_gtk_reserved2) (void);
- void (*_gtk_reserved3) (void);
- void (*_gtk_reserved4) (void);
+ void (*_gimp_reserved1) (void);
+ void (*_gimp_reserved2) (void);
+ void (*_gimp_reserved3) (void);
+ void (*_gimp_reserved4) (void);
+ void (*_gimp_reserved5) (void);
+ void (*_gimp_reserved6) (void);
+ void (*_gimp_reserved7) (void);
+ void (*_gimp_reserved8) (void);
};
diff --git a/libgimpwidgets/gimpzoommodel.c b/libgimpwidgets/gimpzoommodel.c
index c11a9b0..805a039 100644
--- a/libgimpwidgets/gimpzoommodel.c
+++ b/libgimpwidgets/gimpzoommodel.c
@@ -62,15 +62,14 @@ enum
};
-typedef struct
+struct _GimpZoomModelPrivate
{
gdouble value;
gdouble minimum;
gdouble maximum;
-} GimpZoomModelPrivate;
+};
-#define GIMP_ZOOM_MODEL_GET_PRIVATE(obj) \
- ((GimpZoomModelPrivate *) ((GimpZoomModel *) (obj))->priv)
+#define GET_PRIVATE(obj) (((GimpZoomModel *) (obj))->priv)
static void gimp_zoom_model_set_property (GObject *object,
@@ -189,7 +188,7 @@ gimp_zoom_model_init (GimpZoomModel *model)
GIMP_TYPE_ZOOM_MODEL,
GimpZoomModelPrivate);
- priv = GIMP_ZOOM_MODEL_GET_PRIVATE (model);
+ priv = GET_PRIVATE (model);
priv->value = 1.0;
priv->minimum = ZOOM_MIN;
@@ -202,7 +201,7 @@ gimp_zoom_model_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GimpZoomModelPrivate *priv = GIMP_ZOOM_MODEL_GET_PRIVATE (object);
+ GimpZoomModelPrivate *priv = GET_PRIVATE (object);
gdouble previous_value;
previous_value = priv->value;
@@ -255,7 +254,7 @@ gimp_zoom_model_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GimpZoomModelPrivate *priv = GIMP_ZOOM_MODEL_GET_PRIVATE (object);
+ GimpZoomModelPrivate *priv = GET_PRIVATE (object);
gchar *tmp;
switch (property_id)
@@ -302,7 +301,7 @@ gimp_zoom_model_get_property (GObject *object,
static void
gimp_zoom_model_zoom_in (GimpZoomModel *model)
{
- GimpZoomModelPrivate *priv = GIMP_ZOOM_MODEL_GET_PRIVATE (model);
+ GimpZoomModelPrivate *priv = GET_PRIVATE (model);
if (priv->value < priv->maximum)
gimp_zoom_model_zoom (model, GIMP_ZOOM_IN, 0.0);
@@ -311,7 +310,7 @@ gimp_zoom_model_zoom_in (GimpZoomModel *model)
static void
gimp_zoom_model_zoom_out (GimpZoomModel *model)
{
- GimpZoomModelPrivate *priv = GIMP_ZOOM_MODEL_GET_PRIVATE (model);
+ GimpZoomModelPrivate *priv = GET_PRIVATE (model);
if (priv->value > priv->minimum)
gimp_zoom_model_zoom (model, GIMP_ZOOM_OUT, 0.0);
@@ -397,7 +396,7 @@ gimp_zoom_model_get_factor (GimpZoomModel *model)
{
g_return_val_if_fail (GIMP_IS_ZOOM_MODEL (model), 1.0);
- return GIMP_ZOOM_MODEL_GET_PRIVATE (model)->value;
+ return GET_PRIVATE (model)->value;
}
@@ -518,7 +517,7 @@ zoom_in_button_callback (GimpZoomModel *model,
gdouble new,
GtkWidget *button)
{
- GimpZoomModelPrivate *priv = GIMP_ZOOM_MODEL_GET_PRIVATE (model);
+ GimpZoomModelPrivate *priv = GET_PRIVATE (model);
gtk_widget_set_sensitive (button, priv->value != priv->maximum);
}
@@ -529,7 +528,7 @@ zoom_out_button_callback (GimpZoomModel *model,
gdouble new,
GtkWidget *button)
{
- GimpZoomModelPrivate *priv = GIMP_ZOOM_MODEL_GET_PRIVATE (model);
+ GimpZoomModelPrivate *priv = GET_PRIVATE (model);
gtk_widget_set_sensitive (button, priv->value != priv->minimum);
}
diff --git a/libgimpwidgets/gimpzoommodel.h b/libgimpwidgets/gimpzoommodel.h
index 2a8577b..50f6052 100644
--- a/libgimpwidgets/gimpzoommodel.h
+++ b/libgimpwidgets/gimpzoommodel.h
@@ -37,14 +37,14 @@ G_BEGIN_DECLS
#define GIMP_ZOOM_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_ZOOM_MODEL,
GimpZoomModel))
-typedef struct _GimpZoomModelClass GimpZoomModelClass;
+typedef struct _GimpZoomModelPrivate GimpZoomModelPrivate;
+typedef struct _GimpZoomModelClass GimpZoomModelClass;
struct _GimpZoomModel
{
- GObject parent_instance;
+ GObject parent_instance;
- /*< private >*/
- gpointer priv;
+ GimpZoomModelPrivate *priv;
};
struct _GimpZoomModelClass
@@ -60,6 +60,10 @@ struct _GimpZoomModelClass
void (* _gimp_reserved2) (void);
void (* _gimp_reserved3) (void);
void (* _gimp_reserved4) (void);
+ void (* _gimp_reserved5) (void);
+ void (* _gimp_reserved6) (void);
+ void (* _gimp_reserved7) (void);
+ void (* _gimp_reserved8) (void);
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]