[gimp] app: add coordinates to GimpColorTool's and GimpImageMapTool's "picked"
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add coordinates to GimpColorTool's and GimpImageMapTool's "picked"
- Date: Thu, 30 May 2013 17:31:50 +0000 (UTC)
commit b8558f8859a39c073d21d7f0a1173feb1a6c9b3c
Author: Michael Natterer <mitch gimp org>
Date: Thu May 30 19:29:36 2013 +0200
app: add coordinates to GimpColorTool's and GimpImageMapTool's "picked"
signals and vfuncs. This is currently unused, but GEGL operations
can soon pick coordinates just like they can pick colors.
app/core/gimpmarshal.list | 2 +-
app/tools/gimpcolorizetool.c | 4 ++++
app/tools/gimpcolorpickertool.c | 5 +++++
app/tools/gimpcolortool.c | 14 +++++++++++---
app/tools/gimpcolortool.h | 2 ++
app/tools/gimpcurvestool.c | 4 ++++
app/tools/gimpimagemaptool.c | 5 +++++
app/tools/gimpimagemaptool.h | 2 ++
app/tools/gimplevelstool.c | 4 ++++
app/tools/gimpoperationtool.c | 4 ++++
10 files changed, 42 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpmarshal.list b/app/core/gimpmarshal.list
index faea253..f3a1069 100644
--- a/app/core/gimpmarshal.list
+++ b/app/core/gimpmarshal.list
@@ -37,7 +37,7 @@ VOID: DOUBLE
VOID: DOUBLE, DOUBLE
VOID: DOUBLE, DOUBLE, DOUBLE, DOUBLE
VOID: ENUM
-VOID: ENUM, POINTER, BOXED, INT
+VOID: ENUM, DOUBLE, DOUBLE, POINTER, BOXED, INT
VOID: ENUM, INT
VOID: ENUM, INT, BOOLEAN
VOID: ENUM, OBJECT
diff --git a/app/tools/gimpcolorizetool.c b/app/tools/gimpcolorizetool.c
index 7ff64ad..f3add4c 100644
--- a/app/tools/gimpcolorizetool.c
+++ b/app/tools/gimpcolorizetool.c
@@ -58,6 +58,8 @@ static GeglNode * gimp_colorize_tool_get_operation (GimpImageMapTool *im_tool,
static void gimp_colorize_tool_dialog (GimpImageMapTool *im_tool);
static void gimp_colorize_tool_color_picked (GimpImageMapTool *im_tool,
gpointer identifier,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color);
@@ -214,6 +216,8 @@ gimp_colorize_tool_dialog (GimpImageMapTool *image_map_tool)
static void
gimp_colorize_tool_color_picked (GimpImageMapTool *im_tool,
gpointer identifier,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color)
{
diff --git a/app/tools/gimpcolorpickertool.c b/app/tools/gimpcolorpickertool.c
index 3882186..3d69292 100644
--- a/app/tools/gimpcolorpickertool.c
+++ b/app/tools/gimpcolorpickertool.c
@@ -61,6 +61,8 @@ static void gimp_color_picker_tool_oper_update (GimpTool *tool,
static void gimp_color_picker_tool_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color,
gint color_index);
@@ -271,6 +273,8 @@ gimp_color_picker_tool_oper_update (GimpTool *tool,
static void
gimp_color_picker_tool_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color,
gint color_index)
@@ -288,6 +292,7 @@ gimp_color_picker_tool_picked (GimpColorTool *color_tool,
color, color_index);
GIMP_COLOR_TOOL_CLASS (parent_class)->picked (color_tool, pick_state,
+ x, y,
sample_format, color,
color_index);
}
diff --git a/app/tools/gimpcolortool.c b/app/tools/gimpcolortool.c
index 78bb291..b31cc56 100644
--- a/app/tools/gimpcolortool.c
+++ b/app/tools/gimpcolortool.c
@@ -113,6 +113,8 @@ static void gimp_color_tool_pick (GimpColorTool *tool,
gint y);
static void gimp_color_tool_real_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color,
gint color_index);
@@ -138,10 +140,12 @@ gimp_color_tool_class_init (GimpColorToolClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpColorToolClass, picked),
NULL, NULL,
- gimp_marshal_VOID__ENUM_POINTER_BOXED_INT,
- G_TYPE_NONE, 4,
+ gimp_marshal_VOID__ENUM_DOUBLE_DOUBLE_POINTER_BOXED_INT,
+ G_TYPE_NONE, 6,
GIMP_TYPE_COLOR_PICK_STATE,
G_TYPE_POINTER,
+ G_TYPE_DOUBLE,
+ G_TYPE_DOUBLE,
GIMP_TYPE_RGB | G_SIGNAL_TYPE_STATIC_SCOPE,
G_TYPE_INT);
@@ -595,6 +599,8 @@ gimp_color_tool_real_pick (GimpColorTool *color_tool,
static void
gimp_color_tool_real_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color,
gint color_index)
@@ -714,7 +720,9 @@ gimp_color_tool_pick (GimpColorTool *tool,
klass->pick (tool, x, y, &sample_format, &color, &color_index))
{
g_signal_emit (tool, gimp_color_tool_signals[PICKED], 0,
- pick_state, sample_format, &color, color_index);
+ pick_state,
+ (gdouble) x, (gdouble) y,
+ sample_format, &color, color_index);
}
}
diff --git a/app/tools/gimpcolortool.h b/app/tools/gimpcolortool.h
index 7599ddd..b71bef0 100644
--- a/app/tools/gimpcolortool.h
+++ b/app/tools/gimpcolortool.h
@@ -66,6 +66,8 @@ struct _GimpColorToolClass
/* signals */
void (* picked) (GimpColorTool *tool,
GimpColorPickState pick_state,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color,
gint color_index);
diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c
index 7d11da0..0de0e4b 100644
--- a/app/tools/gimpcurvestool.c
+++ b/app/tools/gimpcurvestool.c
@@ -82,6 +82,8 @@ static void gimp_curves_tool_oper_update (GimpTool *tool,
static void gimp_curves_tool_color_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color,
gint color_index);
@@ -325,6 +327,8 @@ gimp_curves_tool_oper_update (GimpTool *tool,
static void
gimp_curves_tool_color_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color,
gint color_index)
diff --git a/app/tools/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c
index d0d8a2c..3dd5fb2 100644
--- a/app/tools/gimpimagemaptool.c
+++ b/app/tools/gimpimagemaptool.c
@@ -101,6 +101,8 @@ static gboolean gimp_image_map_tool_pick_color (GimpColorTool *color_too
gint *color_index);
static void gimp_image_map_tool_color_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color,
gint color_index);
@@ -570,6 +572,8 @@ gimp_image_map_tool_pick_color (GimpColorTool *color_tool,
static void
gimp_image_map_tool_color_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color,
gint color_index)
@@ -582,6 +586,7 @@ gimp_image_map_tool_color_picked (GimpColorTool *color_tool,
GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->color_picked (tool,
identifier,
+ x, y,
sample_format,
color);
}
diff --git a/app/tools/gimpimagemaptool.h b/app/tools/gimpimagemaptool.h
index 40bb29c..58eab3a 100644
--- a/app/tools/gimpimagemaptool.h
+++ b/app/tools/gimpimagemaptool.h
@@ -93,6 +93,8 @@ struct _GimpImageMapToolClass
void (* color_picked) (GimpImageMapTool *image_map_tool,
gpointer identifier,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color);
};
diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c
index 8f4cdaa..3215f48 100644
--- a/app/tools/gimplevelstool.c
+++ b/app/tools/gimplevelstool.c
@@ -86,6 +86,8 @@ static gboolean gimp_levels_tool_settings_export(GimpImageMapTool *im_tool,
GError **error);
static void gimp_levels_tool_color_picked (GimpImageMapTool *im_tool,
gpointer identifier,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color);
@@ -1161,6 +1163,8 @@ levels_input_adjust_by_color (GimpLevelsConfig *config,
static void
gimp_levels_tool_color_picked (GimpImageMapTool *color_tool,
gpointer identifier,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color)
{
diff --git a/app/tools/gimpoperationtool.c b/app/tools/gimpoperationtool.c
index 3b91eab..e334d39 100644
--- a/app/tools/gimpoperationtool.c
+++ b/app/tools/gimpoperationtool.c
@@ -71,6 +71,8 @@ static GtkWidget * gimp_operation_tool_get_settings_ui (GimpImageMapTool *image
GtkWidget **settings_box);
static void gimp_operation_tool_color_picked (GimpImageMapTool *im_tool,
gpointer identifier,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color);
@@ -264,6 +266,8 @@ gimp_operation_tool_get_settings_ui (GimpImageMapTool *image_map_tool,
static void
gimp_operation_tool_color_picked (GimpImageMapTool *im_tool,
gpointer identifier,
+ gdouble x,
+ gdouble y,
const Babl *sample_format,
const GimpRGB *color)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]