app: sprinkle const qualifiers in the tool event callback functions
This commit is contained in:
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
|
gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
GdkEventMask event_mask)
|
GdkEventMask event_mask)
|
||||||
{
|
{
|
||||||
GdkGrabStatus status;
|
GdkGrabStatus status;
|
||||||
@ -81,7 +81,7 @@ gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
|
|||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_pointer_ungrab (GimpDisplayShell *shell,
|
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 (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
g_return_if_fail (event != NULL);
|
g_return_if_fail (event != NULL);
|
||||||
@ -95,7 +95,7 @@ gimp_display_shell_pointer_ungrab (GimpDisplayShell *shell,
|
|||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
|
gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
|
||||||
GdkEvent *event)
|
const GdkEvent *event)
|
||||||
{
|
{
|
||||||
GdkGrabStatus status;
|
GdkGrabStatus status;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
|
|||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_keyboard_ungrab (GimpDisplayShell *shell,
|
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 (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
g_return_if_fail (event != NULL);
|
g_return_if_fail (event != NULL);
|
||||||
|
@ -22,15 +22,15 @@
|
|||||||
|
|
||||||
|
|
||||||
gboolean gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
|
gboolean gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
GdkEventMask event_mask);
|
GdkEventMask event_mask);
|
||||||
void gimp_display_shell_pointer_ungrab (GimpDisplayShell *shell,
|
void gimp_display_shell_pointer_ungrab (GimpDisplayShell *shell,
|
||||||
GdkEvent *event);
|
const GdkEvent *event);
|
||||||
|
|
||||||
gboolean gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
|
gboolean gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
|
||||||
GdkEvent *event);
|
const GdkEvent *event);
|
||||||
void gimp_display_shell_keyboard_ungrab (GimpDisplayShell *shell,
|
void gimp_display_shell_keyboard_ungrab (GimpDisplayShell *shell,
|
||||||
GdkEvent *event);
|
const GdkEvent *event);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_DISPLAY_SHELL_GRAB_H__ */
|
#endif /* __GIMP_DISPLAY_SHELL_GRAB_H__ */
|
||||||
|
@ -66,52 +66,52 @@
|
|||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
|
||||||
static GdkModifierType
|
static GdkModifierType
|
||||||
gimp_display_shell_key_to_state (gint key);
|
gimp_display_shell_key_to_state (gint key);
|
||||||
|
|
||||||
static void gimp_display_shell_proximity_in (GimpDisplayShell *shell);
|
static void gimp_display_shell_proximity_in (GimpDisplayShell *shell);
|
||||||
static void gimp_display_shell_proximity_out (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_check_device_cursor (GimpDisplayShell *shell);
|
||||||
|
|
||||||
static void gimp_display_shell_start_scrolling (GimpDisplayShell *shell,
|
static void gimp_display_shell_start_scrolling (GimpDisplayShell *shell,
|
||||||
gint x,
|
gint x,
|
||||||
gint y);
|
gint y);
|
||||||
static void gimp_display_shell_stop_scrolling (GimpDisplayShell *shell);
|
static void gimp_display_shell_stop_scrolling (GimpDisplayShell *shell);
|
||||||
|
|
||||||
static void gimp_display_shell_space_pressed (GimpDisplayShell *shell,
|
static void gimp_display_shell_space_pressed (GimpDisplayShell *shell,
|
||||||
GdkEvent *event);
|
const GdkEvent *event);
|
||||||
static void gimp_display_shell_space_released (GimpDisplayShell *shell,
|
static void gimp_display_shell_space_released (GimpDisplayShell *shell,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
const GimpCoords *image_coords);
|
const GimpCoords *image_coords);
|
||||||
|
|
||||||
static gboolean gimp_display_shell_tab_pressed (GimpDisplayShell *shell,
|
static gboolean gimp_display_shell_tab_pressed (GimpDisplayShell *shell,
|
||||||
GdkEventKey *event);
|
const GdkEventKey *event);
|
||||||
|
|
||||||
static void gimp_display_shell_update_focus (GimpDisplayShell *shell,
|
static void gimp_display_shell_update_focus (GimpDisplayShell *shell,
|
||||||
gboolean focus_in,
|
gboolean focus_in,
|
||||||
const GimpCoords *image_coords,
|
const GimpCoords *image_coords,
|
||||||
GdkModifierType state);
|
GdkModifierType state);
|
||||||
static void gimp_display_shell_update_cursor (GimpDisplayShell *shell,
|
static void gimp_display_shell_update_cursor (GimpDisplayShell *shell,
|
||||||
const GimpCoords *display_coords,
|
const GimpCoords *display_coords,
|
||||||
const GimpCoords *image_coords,
|
const GimpCoords *image_coords,
|
||||||
GdkModifierType state,
|
GdkModifierType state,
|
||||||
gboolean update_software_cursor);
|
gboolean update_software_cursor);
|
||||||
|
|
||||||
static gboolean gimp_display_shell_initialize_tool (GimpDisplayShell *shell,
|
static gboolean gimp_display_shell_initialize_tool (GimpDisplayShell *shell,
|
||||||
const GimpCoords *image_coords,
|
const GimpCoords *image_coords,
|
||||||
GdkModifierType state);
|
GdkModifierType state);
|
||||||
|
|
||||||
static void gimp_display_shell_get_event_coords (GimpDisplayShell *shell,
|
static void gimp_display_shell_get_event_coords (GimpDisplayShell *shell,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
GimpCoords *display_coords,
|
GimpCoords *display_coords,
|
||||||
GdkModifierType *state,
|
GdkModifierType *state,
|
||||||
guint32 *time);
|
guint32 *time);
|
||||||
static void gimp_display_shell_untransform_event_coords (GimpDisplayShell *shell,
|
static void gimp_display_shell_untransform_event_coords (GimpDisplayShell *shell,
|
||||||
const GimpCoords *display_coords,
|
const GimpCoords *display_coords,
|
||||||
GimpCoords *image_coords,
|
GimpCoords *image_coords,
|
||||||
gboolean *update_software_cursor);
|
gboolean *update_software_cursor);
|
||||||
|
|
||||||
static GdkEvent * gimp_display_shell_compress_motion (GimpDisplayShell *shell);
|
static GdkEvent * gimp_display_shell_compress_motion (GimpDisplayShell *shell);
|
||||||
|
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
@ -1419,7 +1419,7 @@ gimp_display_shell_stop_scrolling (GimpDisplayShell *shell)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_display_shell_space_pressed (GimpDisplayShell *shell,
|
gimp_display_shell_space_pressed (GimpDisplayShell *shell,
|
||||||
GdkEvent *event)
|
const GdkEvent *event)
|
||||||
{
|
{
|
||||||
Gimp *gimp = gimp_display_get_gimp (shell->display);
|
Gimp *gimp = gimp_display_get_gimp (shell->display);
|
||||||
|
|
||||||
@ -1486,7 +1486,7 @@ gimp_display_shell_space_pressed (GimpDisplayShell *shell,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_display_shell_space_released (GimpDisplayShell *shell,
|
gimp_display_shell_space_released (GimpDisplayShell *shell,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
const GimpCoords *image_coords)
|
const GimpCoords *image_coords)
|
||||||
{
|
{
|
||||||
Gimp *gimp = gimp_display_get_gimp (shell->display);
|
Gimp *gimp = gimp_display_get_gimp (shell->display);
|
||||||
@ -1536,8 +1536,8 @@ gimp_display_shell_space_released (GimpDisplayShell *shell,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gimp_display_shell_tab_pressed (GimpDisplayShell *shell,
|
gimp_display_shell_tab_pressed (GimpDisplayShell *shell,
|
||||||
GdkEventKey *kevent)
|
const GdkEventKey *kevent)
|
||||||
{
|
{
|
||||||
GimpImageWindow *window = gimp_display_shell_get_window (shell);
|
GimpImageWindow *window = gimp_display_shell_get_window (shell);
|
||||||
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
|
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
|
||||||
@ -1712,7 +1712,7 @@ gimp_display_shell_initialize_tool (GimpDisplayShell *shell,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_display_shell_get_event_coords (GimpDisplayShell *shell,
|
gimp_display_shell_get_event_coords (GimpDisplayShell *shell,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
GimpCoords *display_coords,
|
GimpCoords *display_coords,
|
||||||
GdkModifierType *state,
|
GdkModifierType *state,
|
||||||
guint32 *time)
|
guint32 *time)
|
||||||
|
@ -33,7 +33,7 @@ static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES;
|
|||||||
gboolean
|
gboolean
|
||||||
gimp_device_info_get_event_coords (GimpDeviceInfo *info,
|
gimp_device_info_get_event_coords (GimpDeviceInfo *info,
|
||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
GimpCoords *coords)
|
GimpCoords *coords)
|
||||||
{
|
{
|
||||||
gdouble x;
|
gdouble x;
|
||||||
@ -178,7 +178,7 @@ gimp_device_info_get_time_coords (GimpDeviceInfo *info,
|
|||||||
gboolean
|
gboolean
|
||||||
gimp_device_info_get_event_state (GimpDeviceInfo *info,
|
gimp_device_info_get_event_state (GimpDeviceInfo *info,
|
||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
GdkModifierType *state)
|
GdkModifierType *state)
|
||||||
{
|
{
|
||||||
if (gdk_event_get_state (event, state))
|
if (gdk_event_get_state (event, state))
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
gboolean gimp_device_info_get_event_coords (GimpDeviceInfo *info,
|
gboolean gimp_device_info_get_event_coords (GimpDeviceInfo *info,
|
||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
GimpCoords *coords);
|
GimpCoords *coords);
|
||||||
void gimp_device_info_get_device_coords (GimpDeviceInfo *info,
|
void gimp_device_info_get_device_coords (GimpDeviceInfo *info,
|
||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
@ -33,7 +33,7 @@ void gimp_device_info_get_time_coords (GimpDeviceInfo *info,
|
|||||||
|
|
||||||
gboolean gimp_device_info_get_event_state (GimpDeviceInfo *info,
|
gboolean gimp_device_info_get_event_state (GimpDeviceInfo *info,
|
||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
GdkEvent *event,
|
const GdkEvent *event,
|
||||||
GdkModifierType *state);
|
GdkModifierType *state);
|
||||||
void gimp_device_info_get_device_state (GimpDeviceInfo *info,
|
void gimp_device_info_get_device_state (GimpDeviceInfo *info,
|
||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
|
Reference in New Issue
Block a user