Commit c102dde9 authored by Michael Natterer's avatar Michael Natterer 😴

libgimpcolor, *: change GimpColorProfile to be a GObject

it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
parent 763e459a
......@@ -52,14 +52,14 @@
/* local function prototypes */
static void gimp_image_convert_profile_rgb (GimpImage *image,
GimpColorProfile src_profile,
GimpColorProfile dest_profile,
GimpColorProfile *src_profile,
GimpColorProfile *dest_profile,
GimpColorRenderingIntent intent,
gboolean bpc,
GimpProgress *progress);
static void gimp_image_convert_profile_indexed (GimpImage *image,
GimpColorProfile src_profile,
GimpColorProfile dest_profile,
GimpColorProfile *src_profile,
GimpColorProfile *dest_profile,
GimpColorRenderingIntent intent,
gboolean bpc,
GimpProgress *progress);
......@@ -133,14 +133,14 @@ gimp_image_validate_icc_profile (GimpImage *image,
gsize length,
GError **error)
{
GimpColorProfile profile;
GimpColorProfile *profile;
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (data != NULL, FALSE);
g_return_val_if_fail (length != 0, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
profile = gimp_color_profile_open_from_data (data, length, error);
profile = gimp_color_profile_new_from_icc_profile (data, length, error);
if (! profile)
{
......@@ -150,11 +150,11 @@ gimp_image_validate_icc_profile (GimpImage *image,
if (! gimp_image_validate_color_profile (image, profile, error))
{
gimp_color_profile_close (profile);
g_object_unref (profile);
return FALSE;
}
gimp_color_profile_close (profile);
g_object_unref (profile);
return TRUE;
}
......@@ -219,11 +219,11 @@ gimp_image_set_icc_profile (GimpImage *image,
gboolean
gimp_image_validate_color_profile (GimpImage *image,
GimpColorProfile profile,
GimpColorProfile *profile,
GError **error)
{
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (profile != NULL, FALSE);
g_return_val_if_fail (GIMP_IS_COLOR_PROFILE (profile), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (gimp_image_get_base_type (image) == GIMP_GRAY)
......@@ -245,7 +245,7 @@ gimp_image_validate_color_profile (GimpImage *image,
return TRUE;
}
GimpColorProfile
GimpColorProfile *
gimp_image_get_color_profile (GimpImage *image)
{
const GimpParasite *parasite;
......@@ -255,53 +255,42 @@ gimp_image_get_color_profile (GimpImage *image)
parasite = gimp_image_get_icc_parasite (image);
if (parasite)
return gimp_color_profile_open_from_data (gimp_parasite_data (parasite),
gimp_parasite_data_size (parasite),
NULL);
return gimp_color_profile_new_from_icc_profile (gimp_parasite_data (parasite),
gimp_parasite_data_size (parasite),
NULL);
return NULL;
}
gboolean
gimp_image_set_color_profile (GimpImage *image,
GimpColorProfile profile,
GimpColorProfile *profile,
GError **error)
{
guint8 *data = NULL;
gsize length = 0;
const guint8 *data = NULL;
gsize length = 0;
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (profile == NULL || GIMP_IS_COLOR_PROFILE (profile),
FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (profile)
{
data = gimp_color_profile_save_to_data (profile, &length, error);
if (! data)
return FALSE;
}
if (! gimp_image_set_icc_profile (image, data, length, error))
{
g_free (data);
return FALSE;
}
data = gimp_color_profile_get_icc_profile (profile, &length);
g_free (data);
return TRUE;
return gimp_image_set_icc_profile (image, data, length, error);
}
gboolean
gimp_image_convert_color_profile (GimpImage *image,
GimpColorProfile dest_profile,
GimpColorProfile *dest_profile,
GimpColorRenderingIntent intent,
gboolean bpc,
GimpProgress *progress,
GError **error)
{
GimpColorProfile src_profile;
GimpColorProfile builtin_profile;
GimpColorProfile *src_profile;
GimpColorProfile *builtin_profile;
const Babl *layer_format;
gchar *src_label;
gchar *dest_label;
......@@ -318,7 +307,7 @@ gimp_image_convert_color_profile (GimpImage *image,
if (gimp_color_profile_is_equal (src_profile, dest_profile))
{
gimp_color_profile_close (src_profile);
g_object_unref (src_profile);
return TRUE;
}
......@@ -353,7 +342,7 @@ gimp_image_convert_color_profile (GimpImage *image,
gimp_image_set_color_profile (image, dest_profile, NULL);
}
gimp_color_profile_close (builtin_profile);
g_object_unref (builtin_profile);
/* omg... */
gimp_image_parasite_detach (image, "icc-profile-name");
......@@ -383,7 +372,7 @@ gimp_image_convert_color_profile (GimpImage *image,
if (progress)
gimp_progress_end (progress);
gimp_color_profile_close (src_profile);
g_object_unref (src_profile);
return TRUE;
}
......@@ -393,8 +382,8 @@ gimp_image_convert_color_profile (GimpImage *image,
static void
gimp_image_convert_profile_rgb (GimpImage *image,
GimpColorProfile src_profile,
GimpColorProfile dest_profile,
GimpColorProfile *src_profile,
GimpColorProfile *dest_profile,
GimpColorRenderingIntent intent,
gboolean bpc,
GimpProgress *progress)
......@@ -413,6 +402,8 @@ gimp_image_convert_profile_rgb (GimpImage *image,
list = g_list_next (list), nth_drawable++)
{
GimpDrawable *drawable = list->data;
cmsHPROFILE src_lcms;
cmsHPROFILE dest_lcms;
const Babl *iter_format;
cmsUInt32Number lcms_format;
cmsUInt32Number flags;
......@@ -421,6 +412,9 @@ gimp_image_convert_profile_rgb (GimpImage *image,
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
continue;
src_lcms = gimp_color_profile_get_lcms_profile (src_profile);
dest_lcms = gimp_color_profile_get_lcms_profile (dest_profile);
iter_format =
gimp_color_profile_get_format (gimp_drawable_get_format (drawable),
&lcms_format);
......@@ -430,8 +424,8 @@ gimp_image_convert_profile_rgb (GimpImage *image,
if (bpc)
flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
transform = cmsCreateTransform (src_profile, lcms_format,
dest_profile, lcms_format,
transform = cmsCreateTransform (src_lcms, lcms_format,
dest_lcms, lcms_format,
intent, flags);
if (transform)
......@@ -474,21 +468,26 @@ gimp_image_convert_profile_rgb (GimpImage *image,
static void
gimp_image_convert_profile_indexed (GimpImage *image,
GimpColorProfile src_profile,
GimpColorProfile dest_profile,
GimpColorProfile *src_profile,
GimpColorProfile *dest_profile,
GimpColorRenderingIntent intent,
gboolean bpc,
GimpProgress *progress)
{
GimpColorTransform transform;
cmsHPROFILE src_lcms;
cmsHPROFILE dest_lcms;
guchar *cmap;
gint n_colors;
GimpColorTransform transform;
src_lcms = gimp_color_profile_get_lcms_profile (src_profile);
dest_lcms = gimp_color_profile_get_lcms_profile (dest_profile);
n_colors = gimp_image_get_colormap_size (image);
cmap = g_memdup (gimp_image_get_colormap (image), n_colors * 3);
transform = cmsCreateTransform (src_profile, TYPE_RGB_8,
dest_profile, TYPE_RGB_8,
transform = cmsCreateTransform (src_lcms, TYPE_RGB_8,
dest_lcms, TYPE_RGB_8,
intent,
cmsFLAGS_NOOPTIMIZE |
(bpc ? cmsFLAGS_BLACKPOINTCOMPENSATION : 0));
......
......@@ -44,15 +44,15 @@ gboolean gimp_image_set_icc_profile (GimpImage *ima
GError **error);
gboolean gimp_image_validate_color_profile (GimpImage *image,
GimpColorProfile profile,
GimpColorProfile *profile,
GError **error);
GimpColorProfile gimp_image_get_color_profile (GimpImage *image);
GimpColorProfile * gimp_image_get_color_profile (GimpImage *image);
gboolean gimp_image_set_color_profile (GimpImage *image,
GimpColorProfile profile,
GimpColorProfile *profile,
GError **error);
gboolean gimp_image_convert_color_profile (GimpImage *image,
GimpColorProfile dest_profile,
GimpColorProfile *dest_profile,
GimpColorRenderingIntent intent,
gboolean bpc,
GimpProgress *progress,
......
......@@ -180,7 +180,7 @@ static void gimp_image_real_colormap_changed (GimpImage *image,
static const guint8 *
gimp_image_color_managed_get_icc_profile (GimpColorManaged *managed,
gsize *len);
static GimpColorProfile
static GimpColorProfile *
gimp_image_color_managed_get_color_profile (GimpColorManaged *managed);
static void gimp_image_projectable_flush (GimpProjectable *projectable,
......@@ -1369,11 +1369,11 @@ gimp_image_color_managed_get_icc_profile (GimpColorManaged *managed,
return gimp_image_get_icc_profile (GIMP_IMAGE (managed), len);
}
static GimpColorProfile
static GimpColorProfile *
gimp_image_color_managed_get_color_profile (GimpColorManaged *managed)
{
GimpImage *image = GIMP_IMAGE (managed);
GimpColorProfile profile;
GimpColorProfile *profile;
profile = gimp_image_get_color_profile (image);
......
......@@ -461,7 +461,7 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
i += print (title, title_len, i, "%s",
gimp_color_profile_get_label (profile));
gimp_color_profile_close (profile);
g_object_unref (profile);
}
break;
......
......@@ -150,7 +150,7 @@ static void gimp_display_shell_real_rotated (GimpDisplayShell *shell);
static const guint8 *
gimp_display_shell_get_icc_profile(GimpColorManaged *managed,
gsize *len);
static GimpColorProfile
static GimpColorProfile *
gimp_display_shell_get_color_profile(GimpColorManaged *managed);
static void gimp_display_shell_profile_changed(GimpColorManaged *managed);
......@@ -1138,7 +1138,7 @@ gimp_display_shell_get_icc_profile (GimpColorManaged *managed,
return NULL;
}
static GimpColorProfile
static GimpColorProfile *
gimp_display_shell_get_color_profile (GimpColorManaged *managed)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (managed);
......
......@@ -60,18 +60,21 @@ image_get_color_profile_invoker (GimpProcedure *procedure,
if (success)
{
GimpColorProfile profile;
GimpColorProfile *profile;
profile = gimp_image_get_color_profile (image);
if (profile)
{
gsize length;
const guint8 *data;
gsize length;
profile_data = gimp_color_profile_save_to_data (profile, &length, NULL);
data = gimp_color_profile_get_icc_profile (profile, &length);
profile_data = g_memdup (data, length);
num_bytes = length;
gimp_color_profile_close (profile);
g_object_unref (profile);
}
}
......@@ -108,15 +111,16 @@ image_set_color_profile_invoker (GimpProcedure *procedure,
{
if (color_profile)
{
GimpColorProfile profile;
GimpColorProfile *profile;
profile = gimp_color_profile_open_from_data (color_profile, num_bytes,
error);
profile = gimp_color_profile_new_from_icc_profile (color_profile,
num_bytes,
error);
if (profile)
{
success = gimp_image_set_color_profile (image, profile, error);
gimp_color_profile_close (profile);
g_object_unref (profile);
}
else
success = FALSE;
......@@ -149,15 +153,18 @@ image_get_effective_color_profile_invoker (GimpProcedure *procedure,
if (success)
{
GimpColorProfile profile;
gsize length;
GimpColorProfile *profile;
const guint8 *data;
gsize length;
profile = gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (image));
profile_data = gimp_color_profile_save_to_data (profile, &length, NULL);
data = gimp_color_profile_get_icc_profile (profile, &length);
profile_data = g_memdup (data, length);
num_bytes = length;
gimp_color_profile_close (profile);
g_object_unref (profile);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
......@@ -197,16 +204,18 @@ image_convert_color_profile_invoker (GimpProcedure *procedure,
{
if (color_profile)
{
GimpColorProfile profile;
GimpColorProfile *profile;
profile = gimp_color_profile_open_from_data (color_profile, num_bytes,
error);
profile = gimp_color_profile_new_from_icc_profile (color_profile,
num_bytes,
error);
if (profile)
{
success = gimp_image_convert_color_profile (image, profile,
intent, bpc,
progress, error);
g_object_unref (profile);
}
else
success = FALSE;
......
......@@ -1880,7 +1880,7 @@ plug_in_icc_profile_info_invoker (GimpProcedure *procedure,
if (success)
{
GimpColorProfile profile;
GimpColorProfile *profile;
profile = gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (image));
......@@ -1888,7 +1888,7 @@ plug_in_icc_profile_info_invoker (GimpProcedure *procedure,
profile_desc = gimp_color_profile_get_description (profile);
profile_info = gimp_color_profile_get_summary (profile);
gimp_color_profile_close (profile);
g_object_unref (profile);
}
......@@ -1928,9 +1928,9 @@ plug_in_icc_profile_file_info_invoker (GimpProcedure *procedure,
if (file)
{
GimpColorProfile p;
GimpColorProfile *p;
p = gimp_color_profile_open_from_file (file, error);
p = gimp_color_profile_new_from_file (file, error);
g_object_unref (file);
if (p)
......@@ -1939,7 +1939,7 @@ plug_in_icc_profile_file_info_invoker (GimpProcedure *procedure,
profile_desc = gimp_color_profile_get_description (p);
profile_info = gimp_color_profile_get_summary (p);
gimp_color_profile_close (p);
g_object_unref (p);
}
else
success = FALSE;
......
......@@ -103,7 +103,7 @@ gimp_image_profile_view_update (GimpImageParasiteView *view)
GimpImageProfileView *profile_view = GIMP_IMAGE_PROFILE_VIEW (view);
GimpImage *image;
GimpColorManaged *managed;
GimpColorProfile profile;
GimpColorProfile *profile;
image = gimp_image_parasite_view_get_image (view);
managed = GIMP_COLOR_MANAGED (image);
......@@ -112,5 +112,5 @@ gimp_image_profile_view_update (GimpImageParasiteView *view)
gimp_color_profile_view_set_profile (profile_view->profile_view, profile);
gimp_color_profile_close (profile);
g_object_unref (profile);
}
......@@ -33,11 +33,11 @@
* image has no color profile assigned.
*
* Returns: The image's color profile. The returned value
* must be freed with gimp_color_profile_close().
* must be freed with g_object_unref().
*
* Since: 2.10
**/
GimpColorProfile
GimpColorProfile *
gimp_image_get_color_profile (gint32 image_ID)
{
guint8 *data;
......@@ -47,9 +47,9 @@ gimp_image_get_color_profile (gint32 image_ID)
if (data)
{
GimpColorProfile profile;
GimpColorProfile *profile;
profile = gimp_color_profile_open_from_data (data, length, NULL);
profile = gimp_color_profile_new_from_icc_profile (data, length, NULL);
g_free (data);
return profile;
......@@ -72,28 +72,24 @@ gimp_image_get_color_profile (gint32 image_ID)
* Since: 2.10
**/
gboolean
gimp_image_set_color_profile (gint32 image_ID,
GimpColorProfile profile)
gimp_image_set_color_profile (gint32 image_ID,
GimpColorProfile *profile)
{
guint8 *data = NULL;
gint length = 0;
gboolean success;
const guint8 *data = NULL;
gint length = 0;
g_return_val_if_fail (profile == NULL || GIMP_IS_COLOR_PROFILE (profile),
NULL);
if (profile)
{
gsize l;
data = gimp_color_profile_save_to_data (profile, &l, NULL);
data = gimp_color_profile_get_icc_profile (profile, &l);
length = l;
if (! data)
return FALSE;
}
success = _gimp_image_set_color_profile (image_ID, length, data);
g_free (data);
return success;
return _gimp_image_set_color_profile (image_ID, length, data);
}
/**
......@@ -110,11 +106,11 @@ gimp_image_set_color_profile (gint32 image_ID,
* in preferences either, a generated default RGB profile is returned.
*
* Returns: The color profile. The returned value
* must be freed with gimp_color_profile_close().
* must be freed with g_object_unref().
*
* Since: 2.10
**/
GimpColorProfile
GimpColorProfile *
gimp_image_get_effective_color_profile (gint32 image_ID)
{
guint8 *data;
......@@ -124,9 +120,9 @@ gimp_image_get_effective_color_profile (gint32 image_ID)
if (data)
{
GimpColorProfile profile;
GimpColorProfile *profile;
profile = gimp_color_profile_open_from_data (data, length, NULL);
profile = gimp_color_profile_new_from_icc_profile (data, length, NULL);
g_free (data);
return profile;
......@@ -138,9 +134,9 @@ gimp_image_get_effective_color_profile (gint32 image_ID)
/**
* gimp_image_convert_color_profile:
* @image_ID: The image.
* @profile: The color profile to convert to.
* @intent: Rendering intent.
* @bpc: Black point compensation.
* @profile: The color profile to convert to.
* @intent: Rendering intent.
* @bpc: Black point compensation.
*
* Convert the image's layers to a color profile
*
......@@ -153,29 +149,25 @@ gimp_image_get_effective_color_profile (gint32 image_ID)
* Since: 2.10
**/
gboolean
gimp_image_convert_color_profile (gint32 image_ID,
GimpColorProfile profile,
GimpColorRenderingIntent intent,
gboolean bpc)
gimp_image_convert_color_profile (gint32 image_ID,
GimpColorProfile *profile,
GimpColorRenderingIntent intent,
gboolean bpc)
{
guint8 *data = NULL;
gint length = 0;
gboolean success;
const guint8 *data = NULL;
gint length = 0;
g_return_val_if_fail (profile == NULL || GIMP_IS_COLOR_PROFILE (profile),
NULL);
if (profile)
{
gsize l;
data = gimp_color_profile_save_to_data (profile, &l, NULL);
data = gimp_color_profile_get_icc_profile (profile, &l);
length = l;
if (! data)
return FALSE;
}
success = _gimp_image_convert_color_profile (image_ID, length, data,
intent, bpc);
g_free (data);
return success;
return _gimp_image_convert_color_profile (image_ID, length, data,
intent, bpc);
}
......@@ -30,16 +30,17 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
GimpColorProfile gimp_image_get_color_profile (gint32 image_ID);
gboolean gimp_image_set_color_profile (gint32 image_ID,
GimpColorProfile profile);
GimpColorProfile * gimp_image_get_color_profile (gint32 image_ID);
gboolean gimp_image_set_color_profile (gint32 image_ID,
GimpColorProfile *profile);
GimpColorProfile gimp_image_get_effective_color_profile (gint32 image_ID);
GimpColorProfile * gimp_image_get_effective_color_profile (gint32 image_ID);
gboolean gimp_image_convert_color_profile (gint32 image_ID,
GimpColorProfile *profile,
GimpColorRenderingIntent intent,
gboolean bpc);
gboolean gimp_image_convert_color_profile (gint32 image_ID,
GimpColorProfile profile,
GimpColorRenderingIntent intent,
gboolean bpc);
G_END_DECLS
......
......@@ -25,22 +25,23 @@ EXPORTS
gimp_color_managed_get_icc_profile
gimp_color_managed_interface_get_type
gimp_color_managed_profile_changed
gimp_color_profile_close
gimp_color_profile_get_copyright
gimp_color_profile_get_description
gimp_color_profile_get_format
gimp_color_profile_get_icc_profile
gimp_color_profile_get_label
gimp_color_profile_get_lcms_profile
gimp_color_profile_get_manufacturer
gimp_color_profile_get_model
gimp_color_profile_get_summary
gimp_color_profile_is_cmyk
gimp_color_profile_is_equal
gimp_color_profile_is_rgb
gimp_color_profile_new_from_file
gimp_color_profile_new_from_icc_profile
gimp_color_profile_new_from_lcms_profile
gimp_color_profile_new_linear_rgb
gimp_color_profile_new_srgb
gimp_color_profile_open_from_data
gimp_color_profile_open_from_file
gimp_color_profile_save_to_data
gimp_hsl_get_type
gimp_hsl_set
gimp_hsl_set_alpha
......
......@@ -141,7 +141,7 @@ gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
*
* Since: 2.10
**/
GimpColorProfile
GimpColorProfile *
gimp_color_managed_get_color_profile (GimpColorManaged *managed)
{
GimpColorManagedInterface *iface;
......
......@@ -51,17 +51,17 @@ struct _GimpColorManagedInterface
void (* profile_changed) (GimpColorManaged *managed);
/* virtual functions */
GimpColorProfile (* get_color_profile) (GimpColorManaged *managed);
GimpColorProfile * (* get_color_profile) (GimpColorManaged *managed);
};
GType gimp_color_managed_interface_get_type (void) G_GNUC_CONST;
GType gimp_color_managed_interface_get_type (void) G_GNUC_CONST;
const guint8 * gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
gsize *len);
GimpColorProfile gimp_color_managed_get_color_profile (GimpColorManaged *managed);
const guint8 * gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
gsize *len);
GimpColorProfile * gimp_color_managed_get_color_profile (GimpColorManaged *managed);
void gimp_color_managed_profile_changed (GimpColorManaged *managed);
void gimp_color_managed_profile_changed (GimpColorManaged *managed);
G_END_DECLS
......
This diff is collapsed.
......@@ -32,35 +32,70 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
GimpColorProfile gimp_color_profile_open_from_file (GFile *file,
GError **error);
GimpColorProfile gimp_color_profile_open_from_data (const guint8 *data,
gsize length,
GError **error);
guint8 * gimp_color_profile_save_to_data (GimpColorProfile profile,
gsize *length,
GError **error);
void gimp_color_profile_close (GimpColorProfile profile);
gchar * gimp_color_profile_get_description (GimpColorProfile profile);
gchar * gimp_color_profile_get_manufacturer (GimpColorProfile profile);
gchar * gimp_color_profile_get_model (GimpColorProfile profile);
gchar * gimp_color_profile_get_copyright (GimpColorProfile profile);
gchar * gimp_color_profile_get_label (GimpColorProfile profile);
gchar * gimp_color_profile_get_summary (GimpColorProfile profile);
gboolean gimp_color_profile_is_equal (GimpColorProfile profile1,
GimpColorProfile profile2);
gboolean gimp_color_profile_is_rgb (GimpColorProfile profile);
gboolean gimp_color_profile_is_cmyk (GimpColorProfile profile);
GimpColorProfile gimp_color_profile_new_srgb (void);
GimpColorProfile gimp_color_profile_new_linear_rgb (void);
const Babl * gimp_color_profile_get_format (const Babl *format,
guint32 *lcms_format);
#define GIMP_TYPE_COLOR_PROFILE (gimp_color_profile_get_type ())
#define GIMP_COLOR_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_PROFILE, GimpColorProfile))
#define GIMP_COLOR_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_PROFILE, GimpColorProfileClass))
#define GIMP_IS_COLOR_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_PROFILE))
#define GIMP_IS_COLOR_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_PROFILE))
#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;
struct _GimpColorProfile
{
GObject parent_instance;