mirror of https://github.com/GNOME/gimp.git
Revert "app: add ::get_color_profile() to GimpPickable and GimpProjectable"
This reverts commit 5c8ffdf6c5
.
It was a bad idea, we have the GimpColorManaged interface for that.
This commit is contained in:
parent
f374377e9b
commit
76ff1c1584
|
@ -147,8 +147,6 @@ static void gimp_group_layer_convert_type (GimpDrawable *drawabl
|
|||
gboolean push_undo);
|
||||
|
||||
static const Babl * gimp_group_layer_get_format (GimpProjectable *projectable);
|
||||
static GimpColorProfile
|
||||
* gimp_group_layer_get_color_profile (GimpProjectable *projectable);
|
||||
static GeglNode * gimp_group_layer_get_graph (GimpProjectable *projectable);
|
||||
static gdouble gimp_group_layer_get_opacity_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
|
@ -246,7 +244,6 @@ gimp_projectable_iface_init (GimpProjectableInterface *iface)
|
|||
{
|
||||
iface->get_image = (GimpImage * (*) (GimpProjectable *)) gimp_item_get_image;
|
||||
iface->get_format = gimp_group_layer_get_format;
|
||||
iface->get_color_profile = gimp_group_layer_get_color_profile;
|
||||
iface->get_offset = (void (*) (GimpProjectable*, gint*, gint*)) gimp_item_get_offset;
|
||||
iface->get_size = (void (*) (GimpProjectable*, gint*, gint*)) gimp_viewable_get_size;
|
||||
iface->get_graph = gimp_group_layer_get_graph;
|
||||
|
@ -950,12 +947,6 @@ gimp_group_layer_get_format (GimpProjectable *projectable)
|
|||
return get_projection_format (projectable, base_type, precision);
|
||||
}
|
||||
|
||||
static GimpColorProfile *
|
||||
gimp_group_layer_get_color_profile (GimpProjectable *projectable)
|
||||
{
|
||||
return gimp_pickable_get_color_profile (GIMP_PICKABLE (projectable));
|
||||
}
|
||||
|
||||
static GeglNode *
|
||||
gimp_group_layer_get_graph (GimpProjectable *projectable)
|
||||
{
|
||||
|
|
|
@ -190,12 +190,8 @@ static void gimp_image_projectable_flush (GimpProjectable *projectable
|
|||
static GeglNode * gimp_image_get_graph (GimpProjectable *projectable);
|
||||
static GimpImage * gimp_image_get_image (GimpProjectable *projectable);
|
||||
static const Babl * gimp_image_get_proj_format (GimpProjectable *projectable);
|
||||
static GimpColorProfile
|
||||
* gimp_image_get_proj_color_profile (GimpProjectable *projectable);
|
||||
|
||||
static void gimp_image_pickable_flush (GimpPickable *pickable);
|
||||
static GimpColorProfile
|
||||
* gimp_image_pickable_get_color_profile (GimpPickable *pickable);
|
||||
static GeglBuffer * gimp_image_get_buffer (GimpPickable *pickable);
|
||||
static gboolean gimp_image_get_pixel_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
|
@ -646,7 +642,6 @@ gimp_projectable_iface_init (GimpProjectableInterface *iface)
|
|||
iface->flush = gimp_image_projectable_flush;
|
||||
iface->get_image = gimp_image_get_image;
|
||||
iface->get_format = gimp_image_get_proj_format;
|
||||
iface->get_color_profile = gimp_image_get_proj_color_profile;
|
||||
iface->get_size = (void (*) (GimpProjectable*, gint*, gint*)) gimp_image_get_size;
|
||||
iface->get_graph = gimp_image_get_graph;
|
||||
iface->invalidate_preview = (void (*) (GimpProjectable*)) gimp_viewable_invalidate_preview;
|
||||
|
@ -659,7 +654,6 @@ gimp_pickable_iface_init (GimpPickableInterface *iface)
|
|||
iface->get_image = (GimpImage * (*) (GimpPickable *pickable)) gimp_image_get_image;
|
||||
iface->get_format = (const Babl * (*) (GimpPickable *pickable)) gimp_image_get_proj_format;
|
||||
iface->get_format_with_alpha = (const Babl * (*) (GimpPickable *pickable)) gimp_image_get_proj_format;
|
||||
iface->get_color_profile = gimp_image_pickable_get_color_profile;
|
||||
iface->get_buffer = gimp_image_get_buffer;
|
||||
iface->get_pixel_at = gimp_image_get_pixel_at;
|
||||
iface->get_opacity_at = gimp_image_get_opacity_at;
|
||||
|
@ -1475,12 +1469,6 @@ gimp_image_get_proj_format (GimpProjectable *projectable)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static GimpColorProfile *
|
||||
gimp_image_get_proj_color_profile (GimpProjectable *projectable)
|
||||
{
|
||||
return gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (projectable));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_image_pickable_flush (GimpPickable *pickable)
|
||||
{
|
||||
|
@ -1489,14 +1477,6 @@ gimp_image_pickable_flush (GimpPickable *pickable)
|
|||
return gimp_pickable_flush (GIMP_PICKABLE (private->projection));
|
||||
}
|
||||
|
||||
static GimpColorProfile *
|
||||
gimp_image_pickable_get_color_profile (GimpPickable *pickable)
|
||||
{
|
||||
GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (pickable);
|
||||
|
||||
return gimp_pickable_get_color_profile (GIMP_PICKABLE (private->projection));
|
||||
}
|
||||
|
||||
static GeglBuffer *
|
||||
gimp_image_get_buffer (GimpPickable *pickable)
|
||||
{
|
||||
|
|
|
@ -183,8 +183,6 @@ static void gimp_layer_set_buffer (GimpDrawable *drawable,
|
|||
gint offset_x,
|
||||
gint offset_y);
|
||||
|
||||
static GimpColorProfile *
|
||||
gimp_layer_get_color_profile (GimpPickable *pickable);
|
||||
static gdouble gimp_layer_get_opacity_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y);
|
||||
|
@ -394,8 +392,7 @@ gimp_layer_init (GimpLayer *layer)
|
|||
static void
|
||||
gimp_layer_pickable_iface_init (GimpPickableInterface *iface)
|
||||
{
|
||||
iface->get_color_profile = gimp_layer_get_color_profile;
|
||||
iface->get_opacity_at = gimp_layer_get_opacity_at;
|
||||
iface->get_opacity_at = gimp_layer_get_opacity_at;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1189,14 +1186,6 @@ gimp_layer_set_buffer (GimpDrawable *drawable,
|
|||
}
|
||||
}
|
||||
|
||||
static GimpColorProfile *
|
||||
gimp_layer_get_color_profile (GimpPickable *pickable)
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (pickable));
|
||||
|
||||
return gimp_pickable_get_color_profile (GIMP_PICKABLE (image));
|
||||
}
|
||||
|
||||
static gdouble
|
||||
gimp_layer_get_opacity_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
|
|
|
@ -144,21 +144,6 @@ gimp_pickable_get_format_with_alpha (GimpPickable *pickable)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
GimpColorProfile *
|
||||
gimp_pickable_get_color_profile (GimpPickable *pickable)
|
||||
{
|
||||
GimpPickableInterface *pickable_iface;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL);
|
||||
|
||||
pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
|
||||
|
||||
if (pickable_iface->get_color_profile)
|
||||
return pickable_iface->get_color_profile (pickable);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GeglBuffer *
|
||||
gimp_pickable_get_buffer (GimpPickable *pickable)
|
||||
{
|
||||
|
|
|
@ -35,51 +35,49 @@ struct _GimpPickableInterface
|
|||
GTypeInterface base_iface;
|
||||
|
||||
/* virtual functions */
|
||||
void (* flush) (GimpPickable *pickable);
|
||||
GimpImage * (* get_image) (GimpPickable *pickable);
|
||||
const Babl * (* get_format) (GimpPickable *pickable);
|
||||
const Babl * (* get_format_with_alpha) (GimpPickable *pickable);
|
||||
GimpColorProfile * (* get_color_profile) (GimpPickable *pickable);
|
||||
GeglBuffer * (* get_buffer) (GimpPickable *pickable);
|
||||
gboolean (* get_pixel_at) (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y,
|
||||
const Babl *format,
|
||||
gpointer pixel);
|
||||
gdouble (* get_opacity_at) (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y);
|
||||
void (* flush) (GimpPickable *pickable);
|
||||
GimpImage * (* get_image) (GimpPickable *pickable);
|
||||
const Babl * (* get_format) (GimpPickable *pickable);
|
||||
const Babl * (* get_format_with_alpha) (GimpPickable *pickable);
|
||||
GeglBuffer * (* get_buffer) (GimpPickable *pickable);
|
||||
gboolean (* get_pixel_at) (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y,
|
||||
const Babl *format,
|
||||
gpointer pixel);
|
||||
gdouble (* get_opacity_at) (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y);
|
||||
};
|
||||
|
||||
|
||||
GType gimp_pickable_interface_get_type (void) G_GNUC_CONST;
|
||||
GType gimp_pickable_interface_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void gimp_pickable_flush (GimpPickable *pickable);
|
||||
GimpImage * gimp_pickable_get_image (GimpPickable *pickable);
|
||||
const Babl * gimp_pickable_get_format (GimpPickable *pickable);
|
||||
const Babl * gimp_pickable_get_format_with_alpha (GimpPickable *pickable);
|
||||
GimpColorProfile * gimp_pickable_get_color_profile (GimpPickable *pickable);
|
||||
GeglBuffer * gimp_pickable_get_buffer (GimpPickable *pickable);
|
||||
gboolean gimp_pickable_get_pixel_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y,
|
||||
const Babl *format,
|
||||
gpointer pixel);
|
||||
gboolean gimp_pickable_get_color_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpRGB *color);
|
||||
gdouble gimp_pickable_get_opacity_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y);
|
||||
void gimp_pickable_flush (GimpPickable *pickable);
|
||||
GimpImage * gimp_pickable_get_image (GimpPickable *pickable);
|
||||
const Babl * gimp_pickable_get_format (GimpPickable *pickable);
|
||||
const Babl * gimp_pickable_get_format_with_alpha (GimpPickable *pickable);
|
||||
GeglBuffer * gimp_pickable_get_buffer (GimpPickable *pickable);
|
||||
gboolean gimp_pickable_get_pixel_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y,
|
||||
const Babl *format,
|
||||
gpointer pixel);
|
||||
gboolean gimp_pickable_get_color_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y,
|
||||
GimpRGB *color);
|
||||
gdouble gimp_pickable_get_opacity_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y);
|
||||
|
||||
gboolean gimp_pickable_pick_color (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y,
|
||||
gboolean sample_average,
|
||||
gdouble average_radius,
|
||||
gpointer pixel,
|
||||
GimpRGB *color);
|
||||
gboolean gimp_pickable_pick_color (GimpPickable *pickable,
|
||||
gint x,
|
||||
gint y,
|
||||
gboolean sample_average,
|
||||
gdouble average_radius,
|
||||
gpointer pixel,
|
||||
GimpRGB *color);
|
||||
|
||||
|
||||
#endif /* __GIMP_PICKABLE_H__ */
|
||||
|
|
|
@ -177,22 +177,7 @@ gimp_projectable_get_format (GimpProjectable *projectable)
|
|||
if (iface->get_format)
|
||||
return iface->get_format (projectable);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GimpColorProfile *
|
||||
gimp_projectable_get_color_profile (GimpProjectable *projectable)
|
||||
{
|
||||
GimpProjectableInterface *iface;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_PROJECTABLE (projectable), NULL);
|
||||
|
||||
iface = GIMP_PROJECTABLE_GET_INTERFACE (projectable);
|
||||
|
||||
if (iface->get_color_profile)
|
||||
return iface->get_color_profile (projectable);
|
||||
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -35,27 +35,26 @@ struct _GimpProjectableInterface
|
|||
GTypeInterface base_iface;
|
||||
|
||||
/* signals */
|
||||
void (* invalidate) (GimpProjectable *projectable,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* flush) (GimpProjectable *projectable,
|
||||
gboolean invalidate_preview);
|
||||
void (* structure_changed) (GimpProjectable *projectable);
|
||||
void (* invalidate) (GimpProjectable *projectable,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* flush) (GimpProjectable *projectable,
|
||||
gboolean invalidate_preview);
|
||||
void (* structure_changed) (GimpProjectable *projectable);
|
||||
|
||||
/* virtual functions */
|
||||
GimpImage * (* get_image) (GimpProjectable *projectable);
|
||||
const Babl * (* get_format) (GimpProjectable *projectable);
|
||||
GimpColorProfile * (* get_color_profile) (GimpProjectable *projectable);
|
||||
void (* get_offset) (GimpProjectable *projectable,
|
||||
gint *x,
|
||||
gint *y);
|
||||
void (* get_size) (GimpProjectable *projectable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
GeglNode * (* get_graph) (GimpProjectable *projectable);
|
||||
void (* invalidate_preview) (GimpProjectable *projectable);
|
||||
GimpImage * (* get_image) (GimpProjectable *projectable);
|
||||
const Babl * (* get_format) (GimpProjectable *projectable);
|
||||
void (* get_offset) (GimpProjectable *projectable,
|
||||
gint *x,
|
||||
gint *y);
|
||||
void (* get_size) (GimpProjectable *projectable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
GeglNode * (* get_graph) (GimpProjectable *projectable);
|
||||
void (* invalidate_preview) (GimpProjectable *projectable);
|
||||
};
|
||||
|
||||
|
||||
|
@ -72,8 +71,6 @@ void gimp_projectable_structure_changed (GimpProjectable *projectable);
|
|||
|
||||
GimpImage * gimp_projectable_get_image (GimpProjectable *projectable);
|
||||
const Babl * gimp_projectable_get_format (GimpProjectable *projectable);
|
||||
GimpColorProfile
|
||||
* gimp_projectable_get_color_profile (GimpProjectable *projectable);
|
||||
void gimp_projectable_get_offset (GimpProjectable *projectable,
|
||||
gint *x,
|
||||
gint *y);
|
||||
|
|
|
@ -119,8 +119,6 @@ static gint64 gimp_projection_get_memsize (GimpObject *objec
|
|||
static void gimp_projection_pickable_flush (GimpPickable *pickable);
|
||||
static GimpImage * gimp_projection_get_image (GimpPickable *pickable);
|
||||
static const Babl * gimp_projection_get_format (GimpPickable *pickable);
|
||||
static GimpColorProfile
|
||||
* gimp_projection_get_color_profile (GimpPickable *pickable);
|
||||
static GeglBuffer * gimp_projection_get_buffer (GimpPickable *pickable);
|
||||
static gboolean gimp_projection_get_pixel_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
|
@ -239,7 +237,6 @@ gimp_projection_pickable_iface_init (GimpPickableInterface *iface)
|
|||
iface->get_image = gimp_projection_get_image;
|
||||
iface->get_format = gimp_projection_get_format;
|
||||
iface->get_format_with_alpha = gimp_projection_get_format; /* sic */
|
||||
iface->get_color_profile = gimp_projection_get_color_profile;
|
||||
iface->get_buffer = gimp_projection_get_buffer;
|
||||
iface->get_pixel_at = gimp_projection_get_pixel_at;
|
||||
iface->get_opacity_at = gimp_projection_get_opacity_at;
|
||||
|
@ -375,14 +372,6 @@ gimp_projection_get_format (GimpPickable *pickable)
|
|||
return gimp_projectable_get_format (proj->priv->projectable);
|
||||
}
|
||||
|
||||
static GimpColorProfile *
|
||||
gimp_projection_get_color_profile (GimpPickable *pickable)
|
||||
{
|
||||
GimpProjection *proj = GIMP_PROJECTION (pickable);
|
||||
|
||||
return gimp_projectable_get_color_profile (proj->priv->projectable);
|
||||
}
|
||||
|
||||
static GeglBuffer *
|
||||
gimp_projection_get_buffer (GimpPickable *pickable)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue