[gimp] app: some more mostly cosmetic tool cleanup



commit 492e0f9cfd64724ef6ab5ef76d6b2db2a1a7e19e
Author: Michael Natterer <mitch gimp org>
Date:   Mon Apr 4 08:19:12 2011 +0200

    app: some more mostly cosmetic tool cleanup

 app/tools/gimpcroptool.c            |   25 +----
 app/tools/gimpcroptool.h            |   12 ++
 app/tools/gimpeditselectiontool.c   |   11 ++-
 app/tools/gimpellipseselecttool.c   |    5 -
 app/tools/gimpfliptool.c            |    6 +-
 app/tools/gimpfreeselecttool.c      |    4 +-
 app/tools/gimpfreeselecttool.h      |    2 -
 app/tools/gimpgegltool.c            |   14 ++-
 app/tools/gimphealtool.h            |    1 -
 app/tools/gimpmagnifytool.c         |   12 +--
 app/tools/gimpmagnifytool.h         |    2 +-
 app/tools/gimpmeasuretool.c         |    2 +-
 app/tools/gimpmovetool.c            |   11 +-
 app/tools/gimpmovetool.h            |    2 +-
 app/tools/gimppainttool.h           |   14 ++--
 app/tools/gimpperspectivetool.c     |    5 +
 app/tools/gimprectangleselecttool.c |    6 +-
 app/tools/gimprectangleselecttool.h |    2 +-
 app/tools/gimpsourcetool.c          |    7 +-
 app/tools/gimpsourcetool.h          |    2 +-
 app/tools/gimptexttool.h            |    2 +-
 app/tools/gimptool.h                |  204 +++++++++++++++++-----------------
 app/tools/gimptransformtool.h       |    2 +-
 app/tools/gimpvectortool.c          |    1 -
 app/tools/gimpvectortool.h          |   11 +-
 25 files changed, 178 insertions(+), 187 deletions(-)
---
diff --git a/app/tools/gimpcroptool.c b/app/tools/gimpcroptool.c
index 3665e62..218f50d 100644
--- a/app/tools/gimpcroptool.c
+++ b/app/tools/gimpcroptool.c
@@ -43,19 +43,6 @@
 #include "gimp-intl.h"
 
 
-struct _GimpCropTool
-{
-  GimpDrawTool  parent_instance;
-
-  GimpImage    *current_image;
-};
-
-struct _GimpCropToolClass
-{
-  GimpDrawToolClass parent_class;
-};
-
-
 static void      gimp_crop_tool_rectangle_tool_iface_init (GimpRectangleToolInterface *iface);
 
 static void      gimp_crop_tool_constructed               (GObject              *object);
@@ -146,8 +133,6 @@ gimp_crop_tool_class_init (GimpCropToolClass *klass)
   object_class->set_property      = gimp_rectangle_tool_set_property;
   object_class->get_property      = gimp_rectangle_tool_get_property;
 
-  gimp_rectangle_tool_install_properties (object_class);
-
   tool_class->control             = gimp_crop_tool_control;
   tool_class->button_press        = gimp_crop_tool_button_press;
   tool_class->button_release      = gimp_crop_tool_button_release;
@@ -158,6 +143,8 @@ gimp_crop_tool_class_init (GimpCropToolClass *klass)
   tool_class->cursor_update       = gimp_crop_tool_cursor_update;
 
   draw_tool_class->draw           = gimp_crop_tool_draw;
+
+  gimp_rectangle_tool_install_properties (object_class);
 }
 
 static void
@@ -173,13 +160,13 @@ gimp_crop_tool_init (GimpCropTool *crop_tool)
 {
   GimpTool *tool = GIMP_TOOL (crop_tool);
 
-  gimp_rectangle_tool_init (GIMP_RECTANGLE_TOOL (crop_tool));
-
   gimp_tool_control_set_wants_click (tool->control, TRUE);
   gimp_tool_control_set_precision   (tool->control,
                                      GIMP_CURSOR_PRECISION_PIXEL_BORDER);
   gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_CROP);
 
+  gimp_rectangle_tool_init (GIMP_RECTANGLE_TOOL (crop_tool));
+
   crop_tool->current_image = NULL;
 }
 
@@ -196,9 +183,7 @@ gimp_crop_tool_constructed (GObject *object)
 
   gimp_rectangle_tool_constructor (object);
 
-  g_object_get (object,
-                "tool-info", &tool_info,
-                NULL);
+  tool_info = GIMP_TOOL (crop_tool)->tool_info;
 
   gimp_context = gimp_get_user_context (tool_info->gimp);
 
diff --git a/app/tools/gimpcroptool.h b/app/tools/gimpcroptool.h
index 398b4a5..bd7dc34 100644
--- a/app/tools/gimpcroptool.h
+++ b/app/tools/gimpcroptool.h
@@ -35,6 +35,18 @@
 typedef struct _GimpCropTool      GimpCropTool;
 typedef struct _GimpCropToolClass GimpCropToolClass;
 
+struct _GimpCropTool
+{
+  GimpDrawTool  parent_instance;
+
+  GimpImage    *current_image;
+};
+
+struct _GimpCropToolClass
+{
+  GimpDrawToolClass parent_class;
+};
+
 
 void    gimp_crop_tool_register (GimpToolRegisterCallback  callback,
                                  gpointer                  data);
diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c
index 2d2db55..bbe5036 100644
--- a/app/tools/gimpeditselectiontool.c
+++ b/app/tools/gimpeditselectiontool.c
@@ -64,7 +64,10 @@
 #define ARROW_VELOCITY          25
 
 
-typedef struct _GimpEditSelectionTool
+typedef struct _GimpEditSelectionTool      GimpEditSelectionTool;
+typedef struct _GimpEditSelectionToolClass GimpEditSelectionToolClass;
+
+struct _GimpEditSelectionTool
 {
   GimpDrawTool        parent_instance;
 
@@ -91,12 +94,12 @@ typedef struct _GimpEditSelectionTool
   gboolean            constrain;       /*  Constrain the movement            */
   gdouble             start_x, start_y;/*  Coords when button was pressed    */
   gdouble             last_x,  last_y; /*  Previous coords sent to _motion   */
-} GimpEditSelectionTool;
+};
 
-typedef struct _GimpEditSelectionToolClass
+struct _GimpEditSelectionToolClass
 {
   GimpDrawToolClass   parent_class;
-} GimpEditSelectionToolClass;
+};
 
 
 static void       gimp_edit_selection_tool_button_release      (GimpTool                    *tool,
diff --git a/app/tools/gimpellipseselecttool.c b/app/tools/gimpellipseselecttool.c
index 21571b5..93134b4 100644
--- a/app/tools/gimpellipseselecttool.c
+++ b/app/tools/gimpellipseselecttool.c
@@ -54,8 +54,6 @@ G_DEFINE_TYPE (GimpEllipseSelectTool, gimp_ellipse_select_tool,
 #define parent_class gimp_ellipse_select_tool_parent_class
 
 
-/*  public functions  */
-
 void
 gimp_ellipse_select_tool_register (GimpToolRegisterCallback  callback,
                                    gpointer                  data)
@@ -73,9 +71,6 @@ gimp_ellipse_select_tool_register (GimpToolRegisterCallback  callback,
                 data);
 }
 
-
-/*  private functions  */
-
 static void
 gimp_ellipse_select_tool_class_init (GimpEllipseSelectToolClass *klass)
 {
diff --git a/app/tools/gimpfliptool.c b/app/tools/gimpfliptool.c
index 7377011..360e9c0 100644
--- a/app/tools/gimpfliptool.c
+++ b/app/tools/gimpfliptool.c
@@ -212,8 +212,8 @@ gimp_flip_tool_transform (GimpTransformTool *trans_tool,
 
   if (orig_tiles)
     {
-      /*  this happens when transforming a normal drawable or the
-       *  selection
+      /*  this happens when transforming a selection cut out of a
+       *  normal drawable, or the selection
        */
 
       ret = gimp_drawable_transform_tiles_flip (GIMP_DRAWABLE (active_item),
@@ -228,7 +228,7 @@ gimp_flip_tool_transform (GimpTransformTool *trans_tool,
     }
   else
     {
-      /*  this happens for paths and layer groups  */
+      /*  this happens for entire drawables, paths and layer groups  */
 
       gimp_item_flip (active_item, context, options->flip_type, axis, FALSE);
     }
diff --git a/app/tools/gimpfreeselecttool.c b/app/tools/gimpfreeselecttool.c
index 0461cd1..e54d334 100644
--- a/app/tools/gimpfreeselecttool.c
+++ b/app/tools/gimpfreeselecttool.c
@@ -426,11 +426,11 @@ gimp_free_select_tool_handle_segment_selection (GimpFreeSelectTool *fst,
 
   if (grabbed_segment_index != priv->grabbed_segment_index)
     {
-      gimp_draw_tool_pause(draw_tool);
+      gimp_draw_tool_pause (draw_tool);
 
       priv->grabbed_segment_index = grabbed_segment_index;
 
-      gimp_draw_tool_resume(draw_tool);
+      gimp_draw_tool_resume (draw_tool);
     }
 }
 
diff --git a/app/tools/gimpfreeselecttool.h b/app/tools/gimpfreeselecttool.h
index c5f7e4d..974c25e 100644
--- a/app/tools/gimpfreeselecttool.h
+++ b/app/tools/gimpfreeselecttool.h
@@ -19,8 +19,6 @@
 #define __GIMP_FREE_SELECT_TOOL_H__
 
 
-#include "libgimpmath/gimpmath.h"
-
 #include "gimpselectiontool.h"
 
 
diff --git a/app/tools/gimpgegltool.c b/app/tools/gimpgegltool.c
index 13c9543..756625e 100644
--- a/app/tools/gimpgegltool.c
+++ b/app/tools/gimpgegltool.c
@@ -234,7 +234,6 @@ static gboolean
 gimp_gegl_tool_operation_blacklisted (const gchar *name,
                                       const gchar *categories_str)
 {
-  gchar **categories;
   static const gchar * const category_blacklist[] =
   {
     "compositors",
@@ -257,10 +256,12 @@ gimp_gegl_tool_operation_blacklisted (const gchar *name,
     "gimp-",
     "gimp:"
   };
-  gint i;
+
+  gchar **categories;
+  gint    i;
 
   /* Operations with no name are abstract base classes */
-  if (!name)
+  if (! name)
     return TRUE;
 
   for (i = 0; i < G_N_ELEMENTS (name_blacklist); i++)
@@ -269,8 +270,7 @@ gimp_gegl_tool_operation_blacklisted (const gchar *name,
         return TRUE;
     }
 
-
-  if (!categories_str)
+  if (! categories_str)
     return FALSE;
 
   categories = g_strsplit (categories_str, ":", 0);
@@ -278,8 +278,9 @@ gimp_gegl_tool_operation_blacklisted (const gchar *name,
   for (i = 0; i < G_N_ELEMENTS (category_blacklist); i++)
     {
       gint j;
+
       for (j = 0; categories[j]; j++)
-        if (g_str_equal (categories[j], category_blacklist[i]))
+        if (! strcmp (categories[j], category_blacklist[i]))
           {
             g_strfreev (categories);
             return TRUE;
@@ -287,6 +288,7 @@ gimp_gegl_tool_operation_blacklisted (const gchar *name,
     }
 
   g_strfreev (categories);
+
   return FALSE;
 }
 
diff --git a/app/tools/gimphealtool.h b/app/tools/gimphealtool.h
index 813721f..51e8482 100644
--- a/app/tools/gimphealtool.h
+++ b/app/tools/gimphealtool.h
@@ -33,7 +33,6 @@
 typedef struct _GimpHealTool      GimpHealTool;
 typedef struct _GimpHealToolClass GimpHealToolClass;
 
-
 struct _GimpHealTool
 {
   GimpSourceTool  parent_instance;
diff --git a/app/tools/gimpmagnifytool.c b/app/tools/gimpmagnifytool.c
index 57f78d9..d4553ee 100644
--- a/app/tools/gimpmagnifytool.c
+++ b/app/tools/gimpmagnifytool.c
@@ -115,24 +115,22 @@ gimp_magnify_tool_init (GimpMagnifyTool *magnify_tool)
 {
   GimpTool *tool = GIMP_TOOL (magnify_tool);
 
-  magnify_tool->x = 0;
-  magnify_tool->y = 0;
-  magnify_tool->w = 0;
-  magnify_tool->h = 0;
-
   gimp_tool_control_set_scroll_lock            (tool->control, TRUE);
   gimp_tool_control_set_handle_empty_image     (tool->control, TRUE);
   gimp_tool_control_set_wants_click            (tool->control, TRUE);
   gimp_tool_control_set_snap_to                (tool->control, FALSE);
 
-  gimp_tool_control_set_cursor                 (tool->control,
-                                                GIMP_CURSOR_MOUSE);
   gimp_tool_control_set_tool_cursor            (tool->control,
                                                 GIMP_TOOL_CURSOR_ZOOM);
   gimp_tool_control_set_cursor_modifier        (tool->control,
                                                 GIMP_CURSOR_MODIFIER_PLUS);
   gimp_tool_control_set_toggle_cursor_modifier (tool->control,
                                                 GIMP_CURSOR_MODIFIER_MINUS);
+
+  magnify_tool->x = 0;
+  magnify_tool->y = 0;
+  magnify_tool->w = 0;
+  magnify_tool->h = 0;
 }
 
 static void
diff --git a/app/tools/gimpmagnifytool.h b/app/tools/gimpmagnifytool.h
index 17ab99f..a95dc4b 100644
--- a/app/tools/gimpmagnifytool.h
+++ b/app/tools/gimpmagnifytool.h
@@ -47,7 +47,7 @@ struct _GimpMagnifyTool
 
 struct _GimpMagnifyToolClass
 {
-  GimpDrawToolClass parent_class;
+  GimpDrawToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c
index 97c6b3f..ee6bd97 100644
--- a/app/tools/gimpmeasuretool.c
+++ b/app/tools/gimpmeasuretool.c
@@ -205,7 +205,7 @@ gimp_measure_tool_button_press (GimpTool            *tool,
   if (display != tool->display)
     {
       if (tool->display)
-        gimp_tool_pop_status (tool, display);
+        gimp_tool_pop_status (tool, tool->display);
     }
 
   measure->function = CREATING;
diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c
index db9e149..af9abc4 100644
--- a/app/tools/gimpmovetool.c
+++ b/app/tools/gimpmovetool.c
@@ -39,7 +39,6 @@
 #include "core/gimpimage-undo.h"
 #include "core/gimplayermask.h"
 #include "core/gimplayer-floating-sel.h"
-#include "core/gimpitem.h"
 #include "core/gimpundostack.h"
 
 #include "widgets/gimphelp-ids.h"
@@ -154,6 +153,11 @@ gimp_move_tool_init (GimpMoveTool *move_tool)
 {
   GimpTool *tool = GIMP_TOOL (move_tool);
 
+  gimp_tool_control_set_snap_to            (tool->control, FALSE);
+  gimp_tool_control_set_handle_empty_image (tool->control, TRUE);
+  gimp_tool_control_set_tool_cursor        (tool->control,
+                                            GIMP_TOOL_CURSOR_MOVE);
+
   move_tool->floating_layer     = NULL;
   move_tool->guide              = NULL;
 
@@ -165,11 +169,6 @@ gimp_move_tool_init (GimpMoveTool *move_tool)
 
   move_tool->old_active_layer   = NULL;
   move_tool->old_active_vectors = NULL;
-
-  gimp_tool_control_set_snap_to            (tool->control, FALSE);
-  gimp_tool_control_set_handle_empty_image (tool->control, TRUE);
-  gimp_tool_control_set_tool_cursor        (tool->control,
-                                            GIMP_TOOL_CURSOR_MOVE);
 }
 
 static void
diff --git a/app/tools/gimpmovetool.h b/app/tools/gimpmovetool.h
index 14bb836..669ce90 100644
--- a/app/tools/gimpmovetool.h
+++ b/app/tools/gimpmovetool.h
@@ -54,7 +54,7 @@ struct _GimpMoveTool
 
 struct _GimpMoveToolClass
 {
-  GimpDrawToolClass parent_class;
+  GimpDrawToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimppainttool.h b/app/tools/gimppainttool.h
index 2481665..cb4e592 100644
--- a/app/tools/gimppainttool.h
+++ b/app/tools/gimppainttool.h
@@ -36,16 +36,16 @@ typedef struct _GimpPaintToolClass GimpPaintToolClass;
 
 struct _GimpPaintTool
 {
-  GimpColorTool    parent_instance;
+  GimpColorTool  parent_instance;
 
-  gboolean         pick_colors;  /*  pick color if ctrl is pressed   */
-  gboolean         draw_line;
+  gboolean       pick_colors;  /*  pick color if ctrl is pressed   */
+  gboolean       draw_line;
 
-  const gchar     *status;       /* status message */
-  const gchar     *status_line;  /* status message when drawing a line */
-  const gchar     *status_ctrl;  /* additional message for the ctrl modifier */
+  const gchar   *status;       /* status message */
+  const gchar   *status_line;  /* status message when drawing a line */
+  const gchar   *status_ctrl;  /* additional message for the ctrl modifier */
 
-  GimpPaintCore   *core;
+  GimpPaintCore *core;
 };
 
 struct _GimpPaintToolClass
diff --git a/app/tools/gimpperspectivetool.c b/app/tools/gimpperspectivetool.c
index 82f3d06..69de210 100644
--- a/app/tools/gimpperspectivetool.c
+++ b/app/tools/gimpperspectivetool.c
@@ -197,18 +197,22 @@ gimp_perspective_tool_motion (GimpTransformTool *transform_tool)
       transform_tool->trans_info[X0] += diff_x;
       transform_tool->trans_info[Y0] += diff_y;
       break;
+
     case TRANSFORM_HANDLE_NE:
       transform_tool->trans_info[X1] += diff_x;
       transform_tool->trans_info[Y1] += diff_y;
       break;
+
     case TRANSFORM_HANDLE_SW:
       transform_tool->trans_info[X2] += diff_x;
       transform_tool->trans_info[Y2] += diff_y;
       break;
+
     case TRANSFORM_HANDLE_SE:
       transform_tool->trans_info[X3] += diff_x;
       transform_tool->trans_info[Y3] += diff_y;
       break;
+
     case TRANSFORM_HANDLE_CENTER:
       transform_tool->trans_info[X0] += diff_x;
       transform_tool->trans_info[Y0] += diff_y;
@@ -219,6 +223,7 @@ gimp_perspective_tool_motion (GimpTransformTool *transform_tool)
       transform_tool->trans_info[X3] += diff_x;
       transform_tool->trans_info[Y3] += diff_y;
       break;
+
     default:
       break;
     }
diff --git a/app/tools/gimprectangleselecttool.c b/app/tools/gimprectangleselecttool.c
index c6e7841..ffcdc40 100644
--- a/app/tools/gimprectangleselecttool.c
+++ b/app/tools/gimprectangleselecttool.c
@@ -186,8 +186,6 @@ gimp_rectangle_select_tool_class_init (GimpRectangleSelectToolClass *klass)
   object_class->set_property      = gimp_rectangle_tool_set_property;
   object_class->get_property      = gimp_rectangle_tool_get_property;
 
-  gimp_rectangle_tool_install_properties (object_class);
-
   tool_class->control             = gimp_rectangle_select_tool_control;
   tool_class->button_press        = gimp_rectangle_select_tool_button_press;
   tool_class->button_release      = gimp_rectangle_select_tool_button_release;
@@ -200,6 +198,8 @@ gimp_rectangle_select_tool_class_init (GimpRectangleSelectToolClass *klass)
   draw_tool_class->draw           = gimp_rectangle_select_tool_draw;
 
   klass->select                   = gimp_rectangle_select_tool_real_select;
+
+  gimp_rectangle_tool_install_properties (object_class);
 }
 
 static void
@@ -392,7 +392,7 @@ gimp_rectangle_select_tool_button_press (GimpTool            *tool,
                                                         coords,
                                                         display))
     {
-      /* In some cases we want to finnish the rectangle select tool
+      /* In some cases we want to finish the rectangle select tool
        * and hand over responsability to the selection tool
        */
       gimp_rectangle_tool_execute (rectangle);
diff --git a/app/tools/gimprectangleselecttool.h b/app/tools/gimprectangleselecttool.h
index 09e9d20..46a2c52 100644
--- a/app/tools/gimprectangleselecttool.h
+++ b/app/tools/gimprectangleselecttool.h
@@ -44,7 +44,7 @@ struct _GimpRectangleSelectTool
 
 struct _GimpRectangleSelectToolClass
 {
-  GimpSelectionToolClass parent_class;
+  GimpSelectionToolClass  parent_class;
 
   void (* select) (GimpRectangleSelectTool *rect_select,
                    GimpChannelOps           operation,
diff --git a/app/tools/gimpsourcetool.c b/app/tools/gimpsourcetool.c
index cc4b599..6b6e547 100644
--- a/app/tools/gimpsourcetool.c
+++ b/app/tools/gimpsourcetool.c
@@ -143,11 +143,6 @@ gimp_source_tool_control (GimpTool       *tool,
 {
   GimpSourceTool *source_tool = GIMP_SOURCE_TOOL (tool);
 
-  /*  chain up early so the draw tool can undraw the source marker
-   *  while we still know about source drawable and display
-   */
-  GIMP_TOOL_CLASS (parent_class)->control (tool, action, display);
-
   switch (action)
     {
     case GIMP_TOOL_ACTION_PAUSE:
@@ -161,6 +156,8 @@ gimp_source_tool_control (GimpTool       *tool,
                     NULL);
       break;
     }
+
+  GIMP_TOOL_CLASS (parent_class)->control (tool, action, display);
 }
 
 static void
diff --git a/app/tools/gimpsourcetool.h b/app/tools/gimpsourcetool.h
index 222c294..37d6517 100644
--- a/app/tools/gimpsourcetool.h
+++ b/app/tools/gimpsourcetool.h
@@ -52,7 +52,7 @@ struct _GimpSourceTool
 
 struct _GimpSourceToolClass
 {
-  GimpBrushToolClass parent_class;
+  GimpBrushToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimptexttool.h b/app/tools/gimptexttool.h
index b93c29c..2901c9a 100644
--- a/app/tools/gimptexttool.h
+++ b/app/tools/gimptexttool.h
@@ -94,7 +94,7 @@ struct _GimpTextTool
 
 struct _GimpTextToolClass
 {
-  GimpDrawToolClass parent_class;
+  GimpDrawToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimptool.h b/app/tools/gimptool.h
index 9a4ee80..e667e78 100644
--- a/app/tools/gimptool.h
+++ b/app/tools/gimptool.h
@@ -151,108 +151,108 @@ struct _GimpToolClass
 };
 
 
-GType         gimp_tool_get_type            (void) G_GNUC_CONST;
-
-GimpToolOptions * gimp_tool_get_options     (GimpTool            *tool);
-
-gboolean      gimp_tool_has_display         (GimpTool            *tool,
-                                             GimpDisplay         *display);
-GimpDisplay * gimp_tool_has_image           (GimpTool            *tool,
-                                             GimpImage           *image);
-
-gboolean      gimp_tool_initialize          (GimpTool            *tool,
-                                             GimpDisplay         *display);
-void          gimp_tool_control             (GimpTool            *tool,
-                                             GimpToolAction       action,
-                                             GimpDisplay         *display);
-
-void          gimp_tool_button_press        (GimpTool            *tool,
-                                             const GimpCoords    *coords,
-                                             guint32              time,
-                                             GdkModifierType      state,
-                                             GimpButtonPressType  press_type,
-                                             GimpDisplay         *display);
-void          gimp_tool_button_release      (GimpTool            *tool,
-                                             const GimpCoords    *coords,
-                                             guint32              time,
-                                             GdkModifierType      state,
-                                             GimpDisplay         *display);
-void          gimp_tool_motion              (GimpTool            *tool,
-                                             const GimpCoords    *coords,
-                                             guint32              time,
-                                             GdkModifierType      state,
-                                             GimpDisplay         *display);
-
-gboolean      gimp_tool_key_press           (GimpTool            *tool,
-                                             GdkEventKey         *kevent,
-                                             GimpDisplay         *display);
-gboolean      gimp_tool_key_release         (GimpTool            *tool,
-                                             GdkEventKey         *kevent,
-                                             GimpDisplay         *display);
-
-void          gimp_tool_set_focus_display   (GimpTool            *tool,
-                                             GimpDisplay         *display);
-void          gimp_tool_set_modifier_state  (GimpTool            *tool,
-                                             GdkModifierType      state,
-                                             GimpDisplay         *display);
-void    gimp_tool_set_active_modifier_state (GimpTool            *tool,
-                                             GdkModifierType      state,
-                                             GimpDisplay         *display);
-
-void          gimp_tool_oper_update         (GimpTool            *tool,
-                                             const GimpCoords    *coords,
-                                             GdkModifierType      state,
-                                             gboolean             proximity,
-                                             GimpDisplay         *display);
-void          gimp_tool_cursor_update       (GimpTool            *tool,
-                                             const GimpCoords    *coords,
-                                             GdkModifierType      state,
-                                             GimpDisplay         *display);
-
-GimpUIManager * gimp_tool_get_popup         (GimpTool            *tool,
-                                             const GimpCoords    *coords,
-                                             GdkModifierType      state,
-                                             GimpDisplay         *display,
-                                             const gchar        **ui_path);
-
-void          gimp_tool_push_status         (GimpTool            *tool,
-                                             GimpDisplay         *display,
-                                             const gchar         *format,
-                                             ...) G_GNUC_PRINTF(3,4);
-void          gimp_tool_push_status_coords  (GimpTool            *tool,
-                                             GimpDisplay         *display,
-                                             GimpCursorPrecision  precision,
-                                             const gchar         *title,
-                                             gdouble              x,
-                                             const gchar         *separator,
-                                             gdouble              y,
-                                             const gchar         *help);
-void          gimp_tool_push_status_length  (GimpTool            *tool,
-                                             GimpDisplay         *display,
-                                             const gchar         *title,
-                                             GimpOrientationType  axis,
-                                             gdouble              value,
-                                             const gchar         *help);
-void          gimp_tool_replace_status      (GimpTool            *tool,
-                                             GimpDisplay         *display,
-                                             const gchar         *format,
-                                             ...) G_GNUC_PRINTF(3,4);
-void          gimp_tool_pop_status          (GimpTool            *tool,
-                                             GimpDisplay         *display);
-
-void          gimp_tool_message             (GimpTool            *tool,
-                                             GimpDisplay         *display,
-                                             const gchar         *format,
-                                             ...) G_GNUC_PRINTF(3,4);
-void          gimp_tool_message_literal     (GimpTool            *tool,
-					     GimpDisplay         *display,
-					     const gchar         *message);
-
-void          gimp_tool_set_cursor          (GimpTool            *tool,
-                                             GimpDisplay         *display,
-                                             GimpCursorType       cursor,
-                                             GimpToolCursorType   tool_cursor,
-                                             GimpCursorModifier   modifier);
+GType             gimp_tool_get_type            (void) G_GNUC_CONST;
+
+GimpToolOptions * gimp_tool_get_options         (GimpTool            *tool);
+
+gboolean          gimp_tool_has_display         (GimpTool            *tool,
+                                                 GimpDisplay         *display);
+GimpDisplay     * gimp_tool_has_image           (GimpTool            *tool,
+                                                 GimpImage           *image);
+
+gboolean          gimp_tool_initialize          (GimpTool            *tool,
+                                                 GimpDisplay         *display);
+void              gimp_tool_control             (GimpTool            *tool,
+                                                 GimpToolAction       action,
+                                                 GimpDisplay         *display);
+
+void              gimp_tool_button_press        (GimpTool            *tool,
+                                                 const GimpCoords    *coords,
+                                                 guint32              time,
+                                                 GdkModifierType      state,
+                                                 GimpButtonPressType  press_type,
+                                                 GimpDisplay         *display);
+void              gimp_tool_button_release      (GimpTool            *tool,
+                                                 const GimpCoords    *coords,
+                                                 guint32              time,
+                                                 GdkModifierType      state,
+                                                 GimpDisplay         *display);
+void              gimp_tool_motion              (GimpTool            *tool,
+                                                 const GimpCoords    *coords,
+                                                 guint32              time,
+                                                 GdkModifierType      state,
+                                                 GimpDisplay         *display);
+
+gboolean          gimp_tool_key_press           (GimpTool            *tool,
+                                                 GdkEventKey         *kevent,
+                                                 GimpDisplay         *display);
+gboolean          gimp_tool_key_release         (GimpTool            *tool,
+                                                 GdkEventKey         *kevent,
+                                                 GimpDisplay         *display);
+
+void              gimp_tool_set_focus_display   (GimpTool            *tool,
+                                                 GimpDisplay         *display);
+void              gimp_tool_set_modifier_state  (GimpTool            *tool,
+                                                 GdkModifierType      state,
+                                                 GimpDisplay         *display);
+void        gimp_tool_set_active_modifier_state (GimpTool            *tool,
+                                                 GdkModifierType      state,
+                                                 GimpDisplay         *display);
+
+void              gimp_tool_oper_update         (GimpTool            *tool,
+                                                 const GimpCoords    *coords,
+                                                 GdkModifierType      state,
+                                                 gboolean             proximity,
+                                                 GimpDisplay         *display);
+void              gimp_tool_cursor_update       (GimpTool            *tool,
+                                                 const GimpCoords    *coords,
+                                                 GdkModifierType      state,
+                                                 GimpDisplay         *display);
+
+GimpUIManager   * gimp_tool_get_popup           (GimpTool            *tool,
+                                                 const GimpCoords    *coords,
+                                                 GdkModifierType      state,
+                                                 GimpDisplay         *display,
+                                                 const gchar        **ui_path);
+
+void              gimp_tool_push_status         (GimpTool            *tool,
+                                                 GimpDisplay         *display,
+                                                 const gchar         *format,
+                                                 ...) G_GNUC_PRINTF(3,4);
+void              gimp_tool_push_status_coords  (GimpTool            *tool,
+                                                 GimpDisplay         *display,
+                                                 GimpCursorPrecision  precision,
+                                                 const gchar         *title,
+                                                 gdouble              x,
+                                                 const gchar         *separator,
+                                                 gdouble              y,
+                                                 const gchar         *help);
+void              gimp_tool_push_status_length  (GimpTool            *tool,
+                                                 GimpDisplay         *display,
+                                                 const gchar         *title,
+                                                 GimpOrientationType  axis,
+                                                 gdouble              value,
+                                                 const gchar         *help);
+void              gimp_tool_replace_status      (GimpTool            *tool,
+                                                 GimpDisplay         *display,
+                                                 const gchar         *format,
+                                                 ...) G_GNUC_PRINTF(3,4);
+void              gimp_tool_pop_status          (GimpTool            *tool,
+                                                 GimpDisplay         *display);
+
+void              gimp_tool_message             (GimpTool            *tool,
+                                                 GimpDisplay         *display,
+                                                 const gchar         *format,
+                                                 ...) G_GNUC_PRINTF(3,4);
+void              gimp_tool_message_literal     (GimpTool            *tool,
+                                                 GimpDisplay         *display,
+                                                 const gchar         *message);
+
+void              gimp_tool_set_cursor          (GimpTool            *tool,
+                                                 GimpDisplay         *display,
+                                                 GimpCursorType       cursor,
+                                                 GimpToolCursorType   tool_cursor,
+                                                 GimpCursorModifier   modifier);
 
 
 #endif  /*  __GIMP_TOOL_H__  */
diff --git a/app/tools/gimptransformtool.h b/app/tools/gimptransformtool.h
index 2265c96..2639622 100644
--- a/app/tools/gimptransformtool.h
+++ b/app/tools/gimptransformtool.h
@@ -109,7 +109,7 @@ struct _GimpTransformTool
 
 struct _GimpTransformToolClass
 {
-  GimpDrawToolClass parent_class;
+  GimpDrawToolClass  parent_class;
 
   /*  virtual functions  */
   void          (* dialog)        (GimpTransformTool *tool);
diff --git a/app/tools/gimpvectortool.c b/app/tools/gimpvectortool.c
index 021dc4c..6ff526f 100644
--- a/app/tools/gimpvectortool.c
+++ b/app/tools/gimpvectortool.c
@@ -193,7 +193,6 @@ gimp_vector_tool_init (GimpVectorTool *vector_tool)
                                             GIMP_MOTION_MODE_COMPRESS);
   gimp_tool_control_set_precision          (tool->control,
                                             GIMP_CURSOR_PRECISION_SUBPIXEL);
-  gimp_tool_control_set_cursor             (tool->control, GIMP_CURSOR_MOUSE);
   gimp_tool_control_set_tool_cursor        (tool->control,
                                             GIMP_TOOL_CURSOR_PATHS);
 
diff --git a/app/tools/gimpvectortool.h b/app/tools/gimpvectortool.h
index f772af1..4d5ad6b 100644
--- a/app/tools/gimpvectortool.h
+++ b/app/tools/gimpvectortool.h
@@ -96,14 +96,13 @@ struct _GimpVectorToolClass
 };
 
 
-void    gimp_vector_tool_register (GimpToolRegisterCallback  callback,
-                                   gpointer                  data);
+void    gimp_vector_tool_register    (GimpToolRegisterCallback  callback,
+                                      gpointer                  data);
 
-GType   gimp_vector_tool_get_type (void) G_GNUC_CONST;
+GType   gimp_vector_tool_get_type    (void) G_GNUC_CONST;
 
-
-void    gimp_vector_tool_set_vectors (GimpVectorTool *vector_tool,
-                                      GimpVectors    *vectors);
+void    gimp_vector_tool_set_vectors (GimpVectorTool           *vector_tool,
+                                      GimpVectors              *vectors);
 
 
 #endif  /*  __GIMP_VECTOR_TOOL_H__  */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]