mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
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.
This commit is contained in:
parent
4afb7ca4c7
commit
f4f106ad26
94 changed files with 927 additions and 670 deletions
|
@ -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;
|
||||
|
|
|
@ -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 _GimpAspectPreviewPrivate GimpAspectPreviewPrivate;
|
||||
typedef struct _GimpAspectPreviewClass GimpAspectPreviewClass;
|
||||
|
||||
struct _GimpAspectPreview
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -49,11 +49,6 @@ enum
|
|||
PROP_DRAWABLE_ID
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gint32 drawable_ID;
|
||||
} GimpDrawablePreviewPrivate;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gint x;
|
||||
|
@ -62,10 +57,13 @@ typedef struct
|
|||
} 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);
|
||||
|
||||
|
|
|
@ -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 _GimpDrawablePreviewPrivate GimpDrawablePreviewPrivate;
|
||||
typedef struct _GimpDrawablePreviewClass GimpDrawablePreviewClass;
|
||||
|
||||
struct _GimpDrawablePreview
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 ();
|
||||
|
||||
|
|
|
@ -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 _GimpFontSelectButtonPrivate GimpFontSelectButtonPrivate;
|
||||
typedef struct _GimpFontSelectButtonClass GimpFontSelectButtonClass;
|
||||
|
||||
struct _GimpFontSelectButton
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 ();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 _GimpProcBrowserDialogPrivate GimpProcBrowserDialogPrivate;
|
||||
typedef struct _GimpProcBrowserDialogClass GimpProcBrowserDialogClass;
|
||||
|
||||
struct _GimpProcBrowserDialog
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -50,6 +50,11 @@ enum
|
|||
PROP_MODEL
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gboolean update;
|
||||
} PreviewSettings;
|
||||
|
||||
|
||||
struct _GimpZoomPreviewPrivate
|
||||
{
|
||||
|
@ -58,15 +63,9 @@ 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);
|
||||
static void gimp_zoom_preview_dispose (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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
|
||||
#include "libgimp/libgimp-intl.h"
|
||||
|
||||
typedef struct _GimpMetadataClass GimpMetadataClass;
|
||||
typedef struct _GimpMetadataPrivate GimpMetadataPrivate;
|
||||
typedef struct _GimpMetadataClass GimpMetadataClass;
|
||||
|
||||
struct _GimpMetadata
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -34,13 +34,16 @@
|
|||
#define GIMP_IS_COLOR_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_CONFIG))
|
||||
|
||||
|
||||
typedef struct _GimpColorConfigPrivate GimpColorConfigPrivate;
|
||||
typedef struct _GimpColorConfigClass GimpColorConfigClass;
|
||||
|
||||
struct _GimpColorConfig
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< public >*/
|
||||
GimpColorConfigPrivate *priv;
|
||||
|
||||
/* FIXME MOVE TO PRIVATE */
|
||||
GimpColorManagementMode mode;
|
||||
gchar *rgb_profile;
|
||||
gchar *cmyk_profile;
|
||||
|
@ -57,22 +60,20 @@ struct _GimpColorConfig
|
|||
gboolean simulation_use_black_point_compensation;
|
||||
|
||||
gchar *gray_profile;
|
||||
|
||||
/*< private >*/
|
||||
/* Padding for future expansion */
|
||||
#if (GLIB_SIZEOF_VOID_P == 8)
|
||||
void (* _gimp_reserved3) (void);
|
||||
#endif
|
||||
void (* _gimp_reserved4) (void);
|
||||
void (* _gimp_reserved5) (void);
|
||||
void (* _gimp_reserved6) (void);
|
||||
void (* _gimp_reserved7) (void);
|
||||
void (* _gimp_reserved8) (void);
|
||||
};
|
||||
|
||||
struct _GimpColorConfigClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -151,6 +151,7 @@ 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 _GimpModulePrivate GimpModulePrivate;
|
||||
typedef struct _GimpModuleClass GimpModuleClass;
|
||||
|
||||
/**
|
||||
|
@ -173,6 +174,9 @@ struct _GimpModule
|
|||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 _GimpModuleDBPrivate GimpModuleDBPrivate;
|
||||
typedef struct _GimpModuleDBClass GimpModuleDBClass;
|
||||
|
||||
struct _GimpModuleDB
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ G_BEGIN_DECLS
|
|||
#define GIMP_THUMBNAIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_THUMBNAIL, GimpThumbnailClass))
|
||||
|
||||
|
||||
typedef struct _GimpThumbnailPrivate GimpThumbnailPrivate;
|
||||
typedef struct _GimpThumbnailClass GimpThumbnailClass;
|
||||
|
||||
/**
|
||||
|
@ -52,6 +53,9 @@ struct _GimpThumbnail
|
|||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 _GimpBrowserPrivate GimpBrowserPrivate;
|
||||
typedef struct _GimpBrowserClass GimpBrowserClass;
|
||||
|
||||
struct _GimpBrowser
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 _GimpButtonPrivate GimpButtonPrivate;
|
||||
typedef struct _GimpButtonClass GimpButtonClass;
|
||||
|
||||
struct _GimpButton
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 _GimpCellRendererColorPrivate GimpCellRendererColorPrivate;
|
||||
typedef struct _GimpCellRendererColorClass GimpCellRendererColorClass;
|
||||
|
||||
struct _GimpCellRendererColor
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 _GimpCellRendererTogglePrivate GimpCellRendererTogglePrivate;
|
||||
typedef struct _GimpCellRendererToggleClass GimpCellRendererToggleClass;
|
||||
|
||||
struct _GimpCellRendererToggle
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 _GimpColorAreaPrivate GimpColorAreaPrivate;
|
||||
typedef struct _GimpColorAreaClass GimpColorAreaClass;
|
||||
|
||||
struct _GimpColorArea
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 _GimpColorButtonPrivate GimpColorButtonPrivate;
|
||||
typedef struct _GimpColorButtonClass GimpColorButtonClass;
|
||||
|
||||
struct _GimpColorButton
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 _GimpColorDisplayPrivate GimpColorDisplayPrivate;
|
||||
typedef struct _GimpColorDisplayClass GimpColorDisplayClass;
|
||||
|
||||
struct _GimpColorDisplay
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
GimpColorDisplayPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GimpColorDisplayClass
|
||||
|
@ -55,7 +58,6 @@ struct _GimpColorDisplayClass
|
|||
const gchar *icon_name;
|
||||
|
||||
/* virtual functions */
|
||||
|
||||
void (* convert_buffer) (GimpColorDisplay *display,
|
||||
GeglBuffer *buffer,
|
||||
GeglRectangle *area);
|
||||
|
@ -69,6 +71,10 @@ struct _GimpColorDisplayClass
|
|||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 _GimpColorDisplayStackPrivate GimpColorDisplayStackPrivate;
|
||||
typedef struct _GimpColorDisplayStackClass GimpColorDisplayStackClass;
|
||||
|
||||
struct _GimpColorDisplayStack
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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 _GimpColorHexEntryPrivate GimpColorHexEntryPrivate;
|
||||
typedef struct _GimpColorHexEntryClass GimpColorHexEntryClass;
|
||||
|
||||
struct _GimpColorHexEntry
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 _GimpColorProfileComboBoxPrivate GimpColorProfileComboBoxPrivate;
|
||||
typedef struct _GimpColorProfileComboBoxClass GimpColorProfileComboBoxClass;
|
||||
|
||||
struct _GimpColorProfileComboBox
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 _GimpColorProfileStorePrivate GimpColorProfileStorePrivate;
|
||||
typedef struct _GimpColorProfileStoreClass GimpColorProfileStoreClass;
|
||||
|
||||
struct _GimpColorProfileStore
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 _GimpColorScalePrivate GimpColorScalePrivate;
|
||||
typedef struct _GimpColorScaleClass GimpColorScaleClass;
|
||||
|
||||
struct _GimpColorScale
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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 _GimpColorSelectionPrivate GimpColorSelectionPrivate;
|
||||
typedef struct _GimpColorSelectionClass GimpColorSelectionClass;
|
||||
|
||||
struct _GimpColorSelection
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 _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;
|
||||
|
|
|
@ -89,12 +89,16 @@ union _GimpControllerEvent
|
|||
#define GIMP_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CONTROLLER, GimpControllerClass))
|
||||
|
||||
|
||||
typedef struct _GimpControllerPrivate GimpControllerPrivate;
|
||||
typedef struct _GimpControllerClass GimpControllerClass;
|
||||
|
||||
struct _GimpController
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 _GimpDialogPrivate GimpDialogPrivate;
|
||||
typedef struct _GimpDialogClass GimpDialogClass;
|
||||
|
||||
struct _GimpDialog
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 _GimpEnumComboBoxPrivate GimpEnumComboBoxPrivate;
|
||||
typedef struct _GimpEnumComboBoxClass GimpEnumComboBoxClass;
|
||||
|
||||
struct _GimpEnumComboBox
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 _GimpEnumLabelPrivate GimpEnumLabelPrivate;
|
||||
typedef struct _GimpEnumLabelClass GimpEnumLabelClass;
|
||||
|
||||
struct _GimpEnumLabel
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 _GimpEnumStorePrivate GimpEnumStorePrivate;
|
||||
typedef struct _GimpEnumStoreClass GimpEnumStoreClass;
|
||||
|
||||
struct _GimpEnumStore
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 _GimpFileEntryPrivate GimpFileEntryPrivate;
|
||||
typedef struct _GimpFileEntryClass GimpFileEntryClass;
|
||||
|
||||
struct _GimpFileEntry
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 _GimpFramePrivate GimpFramePrivate;
|
||||
typedef struct _GimpFrameClass GimpFrameClass;
|
||||
|
||||
struct _GimpFrame
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 _GimpIntComboBoxPrivate GimpIntComboBoxPrivate;
|
||||
typedef struct _GimpIntComboBoxClass GimpIntComboBoxClass;
|
||||
|
||||
struct _GimpIntComboBox
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 _GimpIntStorePrivate GimpIntStorePrivate;
|
||||
typedef struct _GimpIntStoreClass GimpIntStoreClass;
|
||||
|
||||
struct _GimpIntStore
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 _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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 &&
|
||||
|
|
|
@ -39,6 +39,7 @@ 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;
|
||||
|
||||
|
||||
|
@ -46,7 +47,7 @@ struct _GimpNumberPairEntry
|
|||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 _GimpOffsetAreaPrivate GimpOffsetAreaPrivate;
|
||||
typedef struct _GimpOffsetAreaClass GimpOffsetAreaClass;
|
||||
|
||||
struct _GimpOffsetArea
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 _GimpPageSelectorPrivate GimpPageSelectorPrivate;
|
||||
typedef struct _GimpPageSelectorClass GimpPageSelectorClass;
|
||||
|
||||
struct _GimpPageSelector
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 _GimpPathEditorPrivate GimpPathEditorPrivate;
|
||||
typedef struct _GimpPathEditorClass GimpPathEditorClass;
|
||||
|
||||
struct _GimpPathEditor
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 _GimpPreviewPrivate GimpPreviewPrivate;
|
||||
typedef struct _GimpPreviewClass GimpPreviewClass;
|
||||
|
||||
struct _GimpPreview
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 _GimpPreviewAreaPrivate GimpPreviewAreaPrivate;
|
||||
typedef struct _GimpPreviewAreaClass GimpPreviewAreaClass;
|
||||
|
||||
struct _GimpPreviewArea
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
ruler->priv = G_TYPE_INSTANCE_GET_PRIVATE (ruler,
|
||||
GIMP_TYPE_RULER,
|
||||
GimpRulerPrivate);
|
||||
|
||||
priv = ruler->priv;
|
||||
|
||||
gtk_widget_set_has_window (GTK_WIDGET (ruler), FALSE);
|
||||
|
||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
priv->unit = GIMP_UNIT_PIXEL;
|
||||
priv->lower = 0;
|
||||
priv->upper = 0;
|
||||
priv->position = 0;
|
||||
priv->max_size = 0;
|
||||
|
||||
priv->backing_store = NULL;
|
||||
priv->backing_store_valid = 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;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 _GimpScrolledPreviewPrivate GimpScrolledPreviewPrivate;
|
||||
typedef struct _GimpScrolledPreviewClass GimpScrolledPreviewClass;
|
||||
|
||||
struct _GimpScrolledPreview
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ G_BEGIN_DECLS
|
|||
#define GIMP_SIZE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_SIZE_ENTRY, GimpSizeEntryClass))
|
||||
|
||||
|
||||
typedef struct _GimpSizeEntryPrivate GimpSizeEntryPrivate;
|
||||
typedef struct _GimpSizeEntryClass GimpSizeEntryClass;
|
||||
|
||||
typedef struct _GimpSizeEntryField GimpSizeEntryField;
|
||||
|
@ -48,6 +49,9 @@ struct _GimpSizeEntry
|
|||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 _GimpStringComboBoxPrivate GimpStringComboBoxPrivate;
|
||||
typedef struct _GimpStringComboBoxClass GimpStringComboBoxClass;
|
||||
|
||||
struct _GimpStringComboBox
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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 _GimpUnitComboBoxPrivate GimpUnitComboBoxPrivate;
|
||||
typedef struct _GimpUnitComboBoxClass GimpUnitComboBoxClass;
|
||||
|
||||
struct _GimpUnitComboBox
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 _GimpUnitStorePrivate GimpUnitStorePrivate;
|
||||
typedef struct _GimpUnitStoreClass GimpUnitStoreClass;
|
||||
|
||||
struct _GimpUnitStore
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 _GimpZoomModelPrivate GimpZoomModelPrivate;
|
||||
typedef struct _GimpZoomModelClass GimpZoomModelClass;
|
||||
|
||||
struct _GimpZoomModel
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue