mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
52dc7fb800
commit
b8558f8859
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue