Commit f7287be7 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/tools/gimptool.[ch] made all GimpCoords* in the tool API const.

2008-11-01  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: made all GimpCoords* in the tool
	API const.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbrushtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpeditselectiontool.[ch]
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.[ch]
	* app/tools/gimpsourcetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: changed accordingly and added const
	to all GimpCoords* in utility functions too.

	* app/tools/gimptexttool.c: don't modify the passed coords. In
	fact, simply removed the code that did because it had no effect.


svn path=/trunk/; revision=27517
parent 9604c6f1
2008-11-01 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]
* app/tools/tool_manager.[ch]: made all GimpCoords* in the tool
API const.
* app/tools/gimpaligntool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpbrushtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcolortool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimpeditselectiontool.[ch]
* app/tools/gimperasertool.c
* app/tools/gimpfliptool.c
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimpperspectiveclonetool.c
* app/tools/gimprectangleselecttool.c
* app/tools/gimprectangletool.[ch]
* app/tools/gimpregionselecttool.c
* app/tools/gimpselectiontool.[ch]
* app/tools/gimpsourcetool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.c
* app/tools/gimpvectortool.c: changed accordingly and added const
to all GimpCoords* in utility functions too.
* app/tools/gimptexttool.c: don't modify the passed coords. In
fact, simply removed the code that did because it had no effect.
2008-11-01 Martin Nordholts <martinn@svn.gnome.org>
* app/gegl/gimpoperationpointlayermode.c
......
......@@ -69,23 +69,23 @@ static void gimp_align_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display);
static void gimp_align_tool_button_press (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
static void gimp_align_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_tyle,
GimpDisplay *display);
static void gimp_align_tool_motion (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
static void gimp_align_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
......@@ -94,7 +94,7 @@ static void gimp_align_tool_status_update (GimpTool *tool,
GdkModifierType state,
gboolean proximity);
static void gimp_align_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
......@@ -265,11 +265,11 @@ gimp_align_tool_control (GimpTool *tool,
}
static void
gimp_align_tool_button_press (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
gimp_align_tool_button_press (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
GimpAlignTool *align_tool = GIMP_ALIGN_TOOL (tool);
......@@ -309,7 +309,7 @@ gimp_align_tool_button_press (GimpTool *tool,
*/
static void
gimp_align_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
......@@ -438,11 +438,11 @@ gimp_align_tool_button_release (GimpTool *tool,
}
static void
gimp_align_tool_motion (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
gimp_align_tool_motion (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
GimpAlignTool *align_tool = GIMP_ALIGN_TOOL (tool);
......@@ -455,11 +455,11 @@ gimp_align_tool_motion (GimpTool *tool,
}
static void
gimp_align_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display)
gimp_align_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display)
{
GimpAlignTool *align_tool = GIMP_ALIGN_TOOL (tool);
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
......@@ -510,10 +510,10 @@ gimp_align_tool_oper_update (GimpTool *tool,
}
static void
gimp_align_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
gimp_align_tool_cursor_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
{
GimpAlignTool *align_tool = GIMP_ALIGN_TOOL (tool);
GimpToolCursorType tool_cursor = GIMP_TOOL_CURSOR_NONE;
......
......@@ -55,18 +55,18 @@ static gboolean gimp_blend_tool_initialize (GimpTool *tool,
GimpDisplay *display,
GError **error);
static void gimp_blend_tool_button_press (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
static void gimp_blend_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
GimpDisplay *display);
static void gimp_blend_tool_motion (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
......@@ -76,7 +76,7 @@ static void gimp_blend_tool_active_modifier_key (GimpTool *tool,
GdkModifierType state,
GimpDisplay *display);
static void gimp_blend_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
......@@ -168,11 +168,11 @@ gimp_blend_tool_initialize (GimpTool *tool,
}
static void
gimp_blend_tool_button_press (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
gimp_blend_tool_button_press (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
GimpBlendTool *blend_tool = GIMP_BLEND_TOOL (tool);
......@@ -193,7 +193,7 @@ gimp_blend_tool_button_press (GimpTool *tool,
static void
gimp_blend_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
......@@ -252,11 +252,11 @@ gimp_blend_tool_button_release (GimpTool *tool,
}
static void
gimp_blend_tool_motion (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
gimp_blend_tool_motion (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
GimpBlendTool *blend_tool = GIMP_BLEND_TOOL (tool);
......@@ -331,10 +331,10 @@ gimp_blend_tool_active_modifier_key (GimpTool *tool,
}
static void
gimp_blend_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
gimp_blend_tool_cursor_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
{
switch (gimp_drawable_type (gimp_image_get_active_drawable (display->image)))
{
......
......@@ -58,18 +58,18 @@ static gboolean gimp_brightness_contrast_tool_initialize (GimpTool
GError **error);
static void gimp_brightness_contrast_tool_button_press (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
static void gimp_brightness_contrast_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
GimpDisplay *display);
static void gimp_brightness_contrast_tool_motion (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
......@@ -226,11 +226,11 @@ gimp_brightness_contrast_tool_map (GimpImageMapTool *im_tool)
static void
gimp_brightness_contrast_tool_button_press (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
gimp_brightness_contrast_tool_button_press (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
GimpBrightnessContrastTool *bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (tool);
......@@ -245,7 +245,7 @@ gimp_brightness_contrast_tool_button_press (GimpTool *tool,
static void
gimp_brightness_contrast_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
......@@ -266,11 +266,11 @@ gimp_brightness_contrast_tool_button_release (GimpTool *tool,
}
static void
gimp_brightness_contrast_tool_motion (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
gimp_brightness_contrast_tool_motion (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
GimpBrightnessContrastTool *bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (tool);
......
......@@ -47,17 +47,17 @@ static GObject * gimp_brush_tool_constructor (GType type,
GObjectConstructParam *params);
static void gimp_brush_tool_motion (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
static void gimp_brush_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
static void gimp_brush_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
......@@ -170,11 +170,11 @@ gimp_brush_tool_constructor (GType type,
}
static void
gimp_brush_tool_motion (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
gimp_brush_tool_motion (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
GimpBrushTool *brush_tool = GIMP_BRUSH_TOOL (tool);
......@@ -192,11 +192,11 @@ gimp_brush_tool_motion (GimpTool *tool,
}
static void
gimp_brush_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display)
gimp_brush_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display)
{
GimpBrushTool *brush_tool = GIMP_BRUSH_TOOL (tool);
GimpPaintOptions *paint_options = GIMP_PAINT_TOOL_GET_OPTIONS (tool);
......@@ -226,10 +226,10 @@ gimp_brush_tool_oper_update (GimpTool *tool,
}
static void
gimp_brush_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
gimp_brush_tool_cursor_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
{
GimpBrushTool *brush_tool = GIMP_BRUSH_TOOL (tool);
......
......@@ -45,7 +45,7 @@
/* local function prototypes */
static void gimp_bucket_fill_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
......@@ -56,7 +56,7 @@ static void gimp_bucket_fill_tool_modifier_key (GimpTool *tool,
GdkModifierType state,
GimpDisplay *display);
static void gimp_bucket_fill_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
......@@ -114,7 +114,7 @@ gimp_bucket_fill_tool_init (GimpBucketFillTool *bucket_fill_tool)
static void
gimp_bucket_fill_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
......@@ -204,10 +204,10 @@ gimp_bucket_fill_tool_modifier_key (GimpTool *tool,
}
static void
gimp_bucket_fill_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
gimp_bucket_fill_tool_cursor_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
{
GimpBucketFillOptions *options = GIMP_BUCKET_FILL_TOOL_GET_OPTIONS (tool);
GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_BAD;
......
......@@ -44,39 +44,39 @@
/* local function prototypes */
static GObject * gimp_color_picker_tool_constructor (GType type,
guint n_params,
static GObject * gimp_color_picker_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_color_picker_tool_finalize (GObject *object);
static void gimp_color_picker_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display);
static void gimp_color_picker_tool_modifier_key (GimpTool *tool,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *display);
static void gimp_color_picker_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
static void gimp_color_picker_tool_picked (GimpColorTool *color_tool,
static void gimp_color_picker_tool_finalize (GObject *object);
static void gimp_color_picker_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display);
static void gimp_color_picker_tool_modifier_key (GimpTool *tool,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *display);
static void gimp_color_picker_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
static void gimp_color_picker_tool_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
GimpImageType sample_type,
GimpRGB *color,
gint color_index);
GimpImageType sample_type,
GimpRGB *color,
gint color_index);
static void gimp_color_picker_tool_info_create (GimpColorPickerTool *picker_tool);
static void gimp_color_picker_tool_info_response (GtkWidget *widget,
gint response_id,
GimpColorPickerTool *picker_tool);
static void gimp_color_picker_tool_info_update (GimpColorPickerTool *picker_tool,
GimpImageType sample_type,
GimpRGB *color,
gint color_index);
static void gimp_color_picker_tool_info_create (GimpColorPickerTool *picker_tool);
static void gimp_color_picker_tool_info_response (GtkWidget *widget,
gint response_id,
GimpColorPickerTool *picker_tool);
static void gimp_color_picker_tool_info_update (GimpColorPickerTool *picker_tool,
GimpImageType sample_type,
GimpRGB *color,
gint color_index);
G_DEFINE_TYPE (GimpColorPickerTool, gimp_color_picker_tool,
......@@ -216,11 +216,11 @@ gimp_color_picker_tool_modifier_key (GimpTool *tool,
}
static void
gimp_color_picker_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display)
gimp_color_picker_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display)
{
GimpColorPickerTool *picker_tool = GIMP_COLOR_PICKER_TOOL (tool);
GimpColorPickerOptions *options = GIMP_COLOR_PICKER_TOOL_GET_OPTIONS (tool);
......
......@@ -73,28 +73,28 @@ static void gimp_color_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display);
static void gimp_color_tool_button_press (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
static void gimp_color_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
GimpDisplay *display);
static void gimp_color_tool_motion (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
static void gimp_color_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
static void gimp_color_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
......@@ -226,11 +226,11 @@ gimp_color_tool_control (GimpTool *tool,
}
static void
gimp_color_tool_button_press (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
gimp_color_tool_button_press (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
......@@ -281,7 +281,7 @@ gimp_color_tool_button_press (GimpTool *tool,
static void
gimp_color_tool_button_release (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
......@@ -368,11 +368,11 @@ gimp_color_tool_button_release (GimpTool *tool,
}
static void
gimp_color_tool_motion (GimpTool *tool,
GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
gimp_color_tool_motion (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display)
{
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
......@@ -462,11 +462,11 @@ gimp_color_tool_motion (GimpTool *tool,
}
static void
gimp_color_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display)
gimp_color_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display)
{
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
......@@ -499,10 +499,10 @@ gimp_color_tool_oper_update (GimpTool *tool,
}
static void
gimp_color_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
gimp_color_tool_cursor_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display)
{
GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);
......
......@@ -42,11 +42,11 @@ static void gimp_convolve_tool_modifier_key (GimpTool *tool,
GdkModifierType state,
GimpDisplay *display);
static void gimp_convolve_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
static void gimp_convolve_tool_oper_update (GimpTool *tool,
GimpCoords *coords,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
......@@ -130,10 +130,10 @@ gimp_convolve_tool_modifier_key (GimpTool *tool,
}
static void
gimp_convolve_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,