[gimp] Revert "app: add ::get_color_profile() to GimpPickable and GimpProjectable"
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Revert "app: add ::get_color_profile() to GimpPickable and GimpProjectable"
- Date: Wed, 2 Sep 2015 22:34:50 +0000 (UTC)
commit 76ff1c1584f5a81356b75aafed82ac466cfbada5
Author: Michael Natterer <mitch gimp org>
Date: Wed Sep 2 21:23:13 2015 +0200
Revert "app: add ::get_color_profile() to GimpPickable and GimpProjectable"
This reverts commit 5c8ffdf6c5ae3f2f1b678bb8822ba1177b939faf.
It was a bad idea, we have the GimpColorManaged interface for that.
app/core/gimpgrouplayer.c | 9 -----
app/core/gimpimage.c | 20 -----------
app/core/gimplayer.c | 13 +-------
app/core/gimppickable.c | 15 --------
app/core/gimppickable.h | 78 +++++++++++++++++++++----------------------
app/core/gimpprojectable.c | 17 +---------
app/core/gimpprojectable.h | 39 ++++++++++------------
app/core/gimpprojection.c | 11 ------
8 files changed, 58 insertions(+), 144 deletions(-)
---
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index cf9016a..8ddb4b9 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -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)
{
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index b7f99ec..4677062 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -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)
{
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index e7dafef..d60441c 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -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,
diff --git a/app/core/gimppickable.c b/app/core/gimppickable.c
index 461875c..d264116 100644
--- a/app/core/gimppickable.c
+++ b/app/core/gimppickable.c
@@ -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)
{
diff --git a/app/core/gimppickable.h b/app/core/gimppickable.h
index 89865d3..7308127 100644
--- a/app/core/gimppickable.h
+++ b/app/core/gimppickable.h
@@ -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__ */
diff --git a/app/core/gimpprojectable.c b/app/core/gimpprojectable.c
index 0c97418..c5ae3ef 100644
--- a/app/core/gimpprojectable.c
+++ b/app/core/gimpprojectable.c
@@ -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
diff --git a/app/core/gimpprojectable.h b/app/core/gimpprojectable.h
index ea77f3b..09bcc29 100644
--- a/app/core/gimpprojectable.h
+++ b/app/core/gimpprojectable.h
@@ -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);
diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c
index 024b395..733c4e3 100644
--- a/app/core/gimpprojection.c
+++ b/app/core/gimpprojection.c
@@ -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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]