[gimp] app: sprinkle const qualifiers in the tool event callback functions



commit 1bff2c8df2a3dc95c6bfaf105b3fbaaca736106a
Author: Michael Natterer <mitch gimp org>
Date:   Tue May 31 23:17:29 2011 +0200

    app: sprinkle const qualifiers in the tool event callback functions

 app/display/gimpdisplayshell-grab.c        |    8 +-
 app/display/gimpdisplayshell-grab.h        |    8 +-
 app/display/gimpdisplayshell-tool-events.c |  102 ++++++++++++++--------------
 app/widgets/gimpdeviceinfo-coords.c        |    4 +-
 app/widgets/gimpdeviceinfo-coords.h        |    4 +-
 5 files changed, 63 insertions(+), 63 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-grab.c b/app/display/gimpdisplayshell-grab.c
index 1320a47..8769679 100644
--- a/app/display/gimpdisplayshell-grab.c
+++ b/app/display/gimpdisplayshell-grab.c
@@ -34,7 +34,7 @@
 
 gboolean
 gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
-                                 GdkEvent         *event,
+                                 const GdkEvent   *event,
                                  GdkEventMask      event_mask)
 {
   GdkGrabStatus status;
@@ -81,7 +81,7 @@ gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
 
 void
 gimp_display_shell_pointer_ungrab (GimpDisplayShell *shell,
-                                   GdkEvent         *event)
+                                   const GdkEvent   *event)
 {
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
   g_return_if_fail (event != NULL);
@@ -95,7 +95,7 @@ gimp_display_shell_pointer_ungrab (GimpDisplayShell *shell,
 
 gboolean
 gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
-                                  GdkEvent         *event)
+                                  const GdkEvent   *event)
 {
   GdkGrabStatus status;
 
@@ -122,7 +122,7 @@ gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
 
 void
 gimp_display_shell_keyboard_ungrab (GimpDisplayShell *shell,
-                                    GdkEvent         *event)
+                                    const GdkEvent   *event)
 {
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
   g_return_if_fail (event != NULL);
diff --git a/app/display/gimpdisplayshell-grab.h b/app/display/gimpdisplayshell-grab.h
index b011445..cfe5f6d 100644
--- a/app/display/gimpdisplayshell-grab.h
+++ b/app/display/gimpdisplayshell-grab.h
@@ -22,15 +22,15 @@
 
 
 gboolean   gimp_display_shell_pointer_grab    (GimpDisplayShell *shell,
-                                               GdkEvent         *event,
+                                               const GdkEvent   *event,
                                                GdkEventMask      event_mask);
 void       gimp_display_shell_pointer_ungrab  (GimpDisplayShell *shell,
-                                               GdkEvent         *event);
+                                               const GdkEvent   *event);
 
 gboolean   gimp_display_shell_keyboard_grab   (GimpDisplayShell *shell,
-                                               GdkEvent         *event);
+                                               const GdkEvent   *event);
 void       gimp_display_shell_keyboard_ungrab (GimpDisplayShell *shell,
-                                               GdkEvent         *event);
+                                               const GdkEvent   *event);
 
 
 #endif /* __GIMP_DISPLAY_SHELL_GRAB_H__ */
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 1dfb255..f8bd67d 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -66,52 +66,52 @@
 /*  local function prototypes  */
 
 static GdkModifierType
-                  gimp_display_shell_key_to_state             (gint              key);
-
-static void       gimp_display_shell_proximity_in             (GimpDisplayShell *shell);
-static void       gimp_display_shell_proximity_out            (GimpDisplayShell *shell);
-
-static void       gimp_display_shell_check_device_cursor      (GimpDisplayShell *shell);
-
-static void       gimp_display_shell_start_scrolling          (GimpDisplayShell *shell,
-                                                               gint              x,
-                                                               gint              y);
-static void       gimp_display_shell_stop_scrolling           (GimpDisplayShell *shell);
-
-static void       gimp_display_shell_space_pressed            (GimpDisplayShell *shell,
-                                                               GdkEvent         *event);
-static void       gimp_display_shell_space_released           (GimpDisplayShell *shell,
-                                                               GdkEvent         *event,
-                                                               const GimpCoords *image_coords);
-
-static gboolean   gimp_display_shell_tab_pressed              (GimpDisplayShell *shell,
-                                                               GdkEventKey      *event);
-
-static void       gimp_display_shell_update_focus             (GimpDisplayShell *shell,
-                                                               gboolean          focus_in,
-                                                               const GimpCoords *image_coords,
-                                                               GdkModifierType   state);
-static void       gimp_display_shell_update_cursor            (GimpDisplayShell *shell,
-                                                               const GimpCoords *display_coords,
-                                                               const GimpCoords *image_coords,
-                                                               GdkModifierType   state,
-                                                               gboolean          update_software_cursor);
-
-static gboolean   gimp_display_shell_initialize_tool          (GimpDisplayShell *shell,
-                                                               const GimpCoords *image_coords,
-                                                               GdkModifierType   state);
-
-static void       gimp_display_shell_get_event_coords         (GimpDisplayShell *shell,
-                                                               GdkEvent         *event,
-                                                               GimpCoords       *display_coords,
-                                                               GdkModifierType  *state,
-                                                               guint32          *time);
-static void       gimp_display_shell_untransform_event_coords (GimpDisplayShell *shell,
-                                                               const GimpCoords *display_coords,
-                                                               GimpCoords       *image_coords,
-                                                               gboolean         *update_software_cursor);
-
-static GdkEvent * gimp_display_shell_compress_motion          (GimpDisplayShell *shell);
+                  gimp_display_shell_key_to_state             (gint               key);
+
+static void       gimp_display_shell_proximity_in             (GimpDisplayShell  *shell);
+static void       gimp_display_shell_proximity_out            (GimpDisplayShell  *shell);
+
+static void       gimp_display_shell_check_device_cursor      (GimpDisplayShell  *shell);
+
+static void       gimp_display_shell_start_scrolling          (GimpDisplayShell  *shell,
+                                                               gint               x,
+                                                               gint               y);
+static void       gimp_display_shell_stop_scrolling           (GimpDisplayShell  *shell);
+
+static void       gimp_display_shell_space_pressed            (GimpDisplayShell  *shell,
+                                                               const GdkEvent    *event);
+static void       gimp_display_shell_space_released           (GimpDisplayShell  *shell,
+                                                               const GdkEvent    *event,
+                                                               const GimpCoords  *image_coords);
+
+static gboolean   gimp_display_shell_tab_pressed              (GimpDisplayShell  *shell,
+                                                               const GdkEventKey *event);
+
+static void       gimp_display_shell_update_focus             (GimpDisplayShell  *shell,
+                                                               gboolean           focus_in,
+                                                               const GimpCoords  *image_coords,
+                                                               GdkModifierType    state);
+static void       gimp_display_shell_update_cursor            (GimpDisplayShell  *shell,
+                                                               const GimpCoords  *display_coords,
+                                                               const GimpCoords  *image_coords,
+                                                               GdkModifierType    state,
+                                                               gboolean           update_software_cursor);
+
+static gboolean   gimp_display_shell_initialize_tool          (GimpDisplayShell  *shell,
+                                                               const GimpCoords  *image_coords,
+                                                               GdkModifierType    state);
+
+static void       gimp_display_shell_get_event_coords         (GimpDisplayShell  *shell,
+                                                               const GdkEvent    *event,
+                                                               GimpCoords        *display_coords,
+                                                               GdkModifierType   *state,
+                                                               guint32           *time);
+static void       gimp_display_shell_untransform_event_coords (GimpDisplayShell  *shell,
+                                                               const GimpCoords  *display_coords,
+                                                               GimpCoords        *image_coords,
+                                                               gboolean          *update_software_cursor);
+
+static GdkEvent * gimp_display_shell_compress_motion          (GimpDisplayShell  *shell);
 
 
 /*  public functions  */
@@ -1419,7 +1419,7 @@ gimp_display_shell_stop_scrolling (GimpDisplayShell *shell)
 
 static void
 gimp_display_shell_space_pressed (GimpDisplayShell *shell,
-                                  GdkEvent         *event)
+                                  const GdkEvent   *event)
 {
   Gimp *gimp = gimp_display_get_gimp (shell->display);
 
@@ -1486,7 +1486,7 @@ gimp_display_shell_space_pressed (GimpDisplayShell *shell,
 
 static void
 gimp_display_shell_space_released (GimpDisplayShell *shell,
-                                   GdkEvent         *event,
+                                   const GdkEvent   *event,
                                    const GimpCoords *image_coords)
 {
   Gimp *gimp = gimp_display_get_gimp (shell->display);
@@ -1536,8 +1536,8 @@ gimp_display_shell_space_released (GimpDisplayShell *shell,
 }
 
 static gboolean
-gimp_display_shell_tab_pressed (GimpDisplayShell *shell,
-                                GdkEventKey      *kevent)
+gimp_display_shell_tab_pressed (GimpDisplayShell  *shell,
+                                const GdkEventKey *kevent)
 {
   GimpImageWindow *window  = gimp_display_shell_get_window (shell);
   GimpUIManager   *manager = gimp_image_window_get_ui_manager (window);
@@ -1712,7 +1712,7 @@ gimp_display_shell_initialize_tool (GimpDisplayShell *shell,
 
 static void
 gimp_display_shell_get_event_coords (GimpDisplayShell *shell,
-                                     GdkEvent         *event,
+                                     const GdkEvent   *event,
                                      GimpCoords       *display_coords,
                                      GdkModifierType  *state,
                                      guint32          *time)
diff --git a/app/widgets/gimpdeviceinfo-coords.c b/app/widgets/gimpdeviceinfo-coords.c
index 2c2266b..ba63d58 100644
--- a/app/widgets/gimpdeviceinfo-coords.c
+++ b/app/widgets/gimpdeviceinfo-coords.c
@@ -33,7 +33,7 @@ static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES;
 gboolean
 gimp_device_info_get_event_coords (GimpDeviceInfo *info,
                                    GdkWindow      *window,
-                                   GdkEvent       *event,
+                                   const GdkEvent *event,
                                    GimpCoords     *coords)
 {
   gdouble x;
@@ -178,7 +178,7 @@ gimp_device_info_get_time_coords (GimpDeviceInfo *info,
 gboolean
 gimp_device_info_get_event_state (GimpDeviceInfo  *info,
                                   GdkWindow       *window,
-                                  GdkEvent        *event,
+                                  const GdkEvent  *event,
                                   GdkModifierType *state)
 {
   if (gdk_event_get_state (event, state))
diff --git a/app/widgets/gimpdeviceinfo-coords.h b/app/widgets/gimpdeviceinfo-coords.h
index fae6d23..98f3807 100644
--- a/app/widgets/gimpdeviceinfo-coords.h
+++ b/app/widgets/gimpdeviceinfo-coords.h
@@ -21,7 +21,7 @@
 
 gboolean gimp_device_info_get_event_coords   (GimpDeviceInfo  *info,
                                               GdkWindow       *window,
-                                              GdkEvent        *event,
+                                              const GdkEvent  *event,
                                               GimpCoords      *coords);
 void     gimp_device_info_get_device_coords  (GimpDeviceInfo  *info,
                                               GdkWindow       *window,
@@ -33,7 +33,7 @@ void     gimp_device_info_get_time_coords    (GimpDeviceInfo  *info,
 
 gboolean gimp_device_info_get_event_state    (GimpDeviceInfo  *info,
                                               GdkWindow       *window,
-                                              GdkEvent        *event,
+                                              const GdkEvent  *event,
                                               GdkModifierType *state);
 void     gimp_device_info_get_device_state   (GimpDeviceInfo  *info,
                                               GdkWindow       *window,



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