mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
libgimp, libgimpcolor, libgimpconfig: Convert to derivable types
Also converted GimpPreview and GimpScrolledPreview as they are the parents of several of these widgets.
This commit is contained in:
@@ -141,7 +141,7 @@ enum
|
||||
};
|
||||
|
||||
|
||||
struct _GimpColorConfigPrivate
|
||||
typedef struct _GimpColorConfigPrivate
|
||||
{
|
||||
GimpColorManagementMode mode;
|
||||
|
||||
@@ -164,9 +164,9 @@ struct _GimpColorConfigPrivate
|
||||
|
||||
gboolean show_rgb_u8;
|
||||
gboolean show_hsv;
|
||||
};
|
||||
} GimpColorConfigPrivate;
|
||||
|
||||
#define GET_PRIVATE(obj) (((GimpColorConfig *) (obj))->priv)
|
||||
#define GET_PRIVATE(obj) ((GimpColorConfigPrivate *) gimp_color_config_get_instance_private ((GimpColorConfig *) (obj)))
|
||||
|
||||
|
||||
static void gimp_color_config_finalize (GObject *object);
|
||||
@@ -351,11 +351,9 @@ gimp_color_config_init (GimpColorConfig *config)
|
||||
{
|
||||
GeglColor *magenta = gegl_color_new (NULL);
|
||||
|
||||
config->priv = gimp_color_config_get_instance_private (config);
|
||||
|
||||
/* Magenta (sRGB space). */
|
||||
gegl_color_set_rgba (magenta, 1.0, 0.0, 1.0, 1.0);
|
||||
config->priv->out_of_gamut_color = magenta;
|
||||
GET_PRIVATE (config)->out_of_gamut_color = magenta;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -27,22 +27,8 @@
|
||||
#define __GIMP_COLOR_CONFIG_H__
|
||||
|
||||
|
||||
#define GIMP_TYPE_COLOR_CONFIG (gimp_color_config_get_type ())
|
||||
#define GIMP_COLOR_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_CONFIG, GimpColorConfig))
|
||||
#define GIMP_COLOR_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_CONFIG, GimpColorConfigClass))
|
||||
#define GIMP_IS_COLOR_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_CONFIG))
|
||||
#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;
|
||||
|
||||
GimpColorConfigPrivate *priv;
|
||||
};
|
||||
#define GIMP_TYPE_COLOR_CONFIG (gimp_color_config_get_type ())
|
||||
G_DECLARE_DERIVABLE_TYPE (GimpColorConfig, gimp_color_config, GIMP, COLOR_CONFIG, GObject)
|
||||
|
||||
struct _GimpColorConfigClass
|
||||
{
|
||||
@@ -59,8 +45,6 @@ struct _GimpColorConfigClass
|
||||
};
|
||||
|
||||
|
||||
GType gimp_color_config_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpColorManagementMode
|
||||
gimp_color_config_get_mode (GimpColorConfig *config);
|
||||
|
||||
|
Reference in New Issue
Block a user