Strip const from GdkEvent

Events are refcounted structs, and we generally don't
pass these as const.
This commit is contained in:
Matthias Clasen 2020-02-16 11:09:02 -05:00
parent 1026bfb1ac
commit 31bf9da63a
56 changed files with 195 additions and 195 deletions

View File

@ -135,7 +135,7 @@ clicked (GtkGestureClick *gesture,
gpointer data)
{
GtkWidget *window;
const GdkEvent *event;
GdkEvent *event;
GdkModifierType state;
window = gtk_widget_get_ancestor (gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture)), GTK_TYPE_WINDOW);

View File

@ -133,7 +133,7 @@ gdk_display_real_opened (GdkDisplay *display)
static void
gdk_display_real_event_data_copy (GdkDisplay *display,
const GdkEvent *src,
GdkEvent *src,
GdkEvent *dst)
{
}
@ -484,7 +484,7 @@ gdk_display_peek_event (GdkDisplay *display)
**/
void
gdk_display_put_event (GdkDisplay *display,
const GdkEvent *event)
GdkEvent *event)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
g_return_if_fail (event != NULL);
@ -688,7 +688,7 @@ switch_to_pointer_grab (GdkDisplay *display,
void
_gdk_display_update_last_event (GdkDisplay *display,
const GdkEvent *event)
GdkEvent *event)
{
if (gdk_event_get_time (event) != GDK_CURRENT_TIME)
display->last_event_time = gdk_event_get_time (event);
@ -1290,7 +1290,7 @@ _gdk_display_unpause_events (GdkDisplay *display)
void
_gdk_display_event_data_copy (GdkDisplay *display,
const GdkEvent *event,
GdkEvent *event,
GdkEvent *new_event)
{
GDK_DISPLAY_GET_CLASS (display)->event_data_copy (display, event, new_event);

View File

@ -72,7 +72,7 @@ GDK_AVAILABLE_IN_ALL
GdkEvent* gdk_display_peek_event (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
void gdk_display_put_event (GdkDisplay *display,
const GdkEvent *event);
GdkEvent *event);
GDK_AVAILABLE_IN_ALL
gboolean gdk_display_has_pending (GdkDisplay *display);

View File

@ -136,7 +136,7 @@ struct _GdkDisplayClass
const gchar * (*get_startup_notification_id) (GdkDisplay *display);
void (*event_data_copy) (GdkDisplay *display,
const GdkEvent *event,
GdkEvent *event,
GdkEvent *new_event);
void (*event_data_free) (GdkDisplay *display,
GdkEvent *event);
@ -191,7 +191,7 @@ typedef void (* GdkDisplayPointerInfoForeach) (GdkDisplay *display,
gpointer user_data);
void _gdk_display_update_last_event (GdkDisplay *display,
const GdkEvent *event);
GdkEvent *event);
void _gdk_display_device_grab_update (GdkDisplay *display,
GdkDevice *device,
GdkDevice *source_device,
@ -227,7 +227,7 @@ gulong _gdk_display_get_next_serial (GdkDisplay *display
void _gdk_display_pause_events (GdkDisplay *display);
void _gdk_display_unpause_events (GdkDisplay *display);
void _gdk_display_event_data_copy (GdkDisplay *display,
const GdkEvent *event,
GdkEvent *event,
GdkEvent *new_event);
void _gdk_display_event_data_free (GdkDisplay *display,
GdkEvent *event);

View File

@ -49,7 +49,7 @@ struct _GdkDragClass {
void (*dnd_finished) (GdkDrag *drag);
gboolean (*handle_event) (GdkDrag *drag,
const GdkEvent *event);
GdkEvent *event);
};
struct _GdkDrag {

View File

@ -265,7 +265,7 @@ _gdk_event_unqueue (GdkDisplay *display)
static void
gdk_event_push_history (GdkEvent *event,
const GdkEvent *history_event)
GdkEvent *history_event)
{
GdkTimeCoord *hist;
GdkDevice *device;
@ -468,7 +468,7 @@ gdk_event_free (GdkEvent *event)
* Returns: (transfer none): The #GdkSurface associated with the event
*/
GdkSurface *
gdk_event_get_surface (const GdkEvent *event)
gdk_event_get_surface (GdkEvent *event)
{
g_return_val_if_fail (event != NULL, NULL);
@ -485,7 +485,7 @@ gdk_event_get_surface (const GdkEvent *event)
* Returns: time stamp field from @event
**/
guint32
gdk_event_get_time (const GdkEvent *event)
gdk_event_get_time (GdkEvent *event)
{
if (event)
switch (event->any.type)
@ -555,7 +555,7 @@ gdk_event_get_time (const GdkEvent *event)
* Returns: %TRUE if there was a state field in the event
**/
gboolean
gdk_event_get_state (const GdkEvent *event,
gdk_event_get_state (GdkEvent *event,
GdkModifierType *state)
{
g_return_val_if_fail (state != NULL, FALSE);
@ -629,7 +629,7 @@ gdk_event_get_state (const GdkEvent *event,
* Returns: %TRUE if the event delivered event surface coordinates
**/
gboolean
gdk_event_get_coords (const GdkEvent *event,
gdk_event_get_coords (GdkEvent *event,
gdouble *x_win,
gdouble *y_win)
{
@ -707,7 +707,7 @@ gdk_event_get_coords (const GdkEvent *event,
* Returns: %TRUE if the event delivered a button number
**/
gboolean
gdk_event_get_button (const GdkEvent *event,
gdk_event_get_button (GdkEvent *event,
guint *button)
{
gboolean fetched = TRUE;
@ -746,7 +746,7 @@ gdk_event_get_button (const GdkEvent *event,
* Returns: %TRUE if the event delivered a click count
*/
gboolean
gdk_event_get_click_count (const GdkEvent *event,
gdk_event_get_click_count (GdkEvent *event,
guint *click_count)
{
gboolean fetched = TRUE;
@ -781,7 +781,7 @@ gdk_event_get_click_count (const GdkEvent *event,
* Returns: %TRUE if the event delivered a key symbol
*/
gboolean
gdk_event_get_keyval (const GdkEvent *event,
gdk_event_get_keyval (GdkEvent *event,
guint *keyval)
{
gboolean fetched = TRUE;
@ -816,7 +816,7 @@ gdk_event_get_keyval (const GdkEvent *event,
* Returns: %TRUE if the event delivered a hardware keycode
*/
gboolean
gdk_event_get_keycode (const GdkEvent *event,
gdk_event_get_keycode (GdkEvent *event,
guint16 *keycode)
{
gboolean fetched = TRUE;
@ -849,7 +849,7 @@ gdk_event_get_keycode (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_key_group (const GdkEvent *event,
gdk_event_get_key_group (GdkEvent *event,
guint *group)
{
gboolean fetched = TRUE;
@ -880,7 +880,7 @@ gdk_event_get_key_group (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_key_is_modifier (const GdkEvent *event,
gdk_event_get_key_is_modifier (GdkEvent *event,
gboolean *is_modifier)
{
gboolean fetched = TRUE;
@ -910,7 +910,7 @@ gdk_event_get_key_is_modifier (const GdkEvent *event,
* Returns: %TRUE if the event delivered a scroll direction
*/
gboolean
gdk_event_get_scroll_direction (const GdkEvent *event,
gdk_event_get_scroll_direction (GdkEvent *event,
GdkScrollDirection *direction)
{
gboolean fetched = TRUE;
@ -946,7 +946,7 @@ gdk_event_get_scroll_direction (const GdkEvent *event,
* Returns: %TRUE if the event contains smooth scroll information
**/
gboolean
gdk_event_get_scroll_deltas (const GdkEvent *event,
gdk_event_get_scroll_deltas (GdkEvent *event,
gdouble *delta_x,
gdouble *delta_y)
{
@ -994,7 +994,7 @@ gdk_event_get_scroll_deltas (const GdkEvent *event,
* Returns: %TRUE if the event is a scroll stop event
*/
gboolean
gdk_event_is_scroll_stop_event (const GdkEvent *event)
gdk_event_is_scroll_stop_event (GdkEvent *event)
{
return event->scroll.is_stop;
}
@ -1011,7 +1011,7 @@ gdk_event_is_scroll_stop_event (const GdkEvent *event)
* Returns: %TRUE if the specified axis was found, otherwise %FALSE
**/
gboolean
gdk_event_get_axis (const GdkEvent *event,
gdk_event_get_axis (GdkEvent *event,
GdkAxisUse axis_use,
gdouble *value)
{
@ -1093,7 +1093,7 @@ gdk_event_get_axis (const GdkEvent *event,
* Returns: (nullable) (transfer none): a #GdkDevice, or %NULL.
**/
GdkDevice *
gdk_event_get_device (const GdkEvent *event)
gdk_event_get_device (GdkEvent *event)
{
g_return_val_if_fail (event != NULL, NULL);
@ -1117,7 +1117,7 @@ gdk_event_get_device (const GdkEvent *event)
* Returns: (nullable) (transfer none): a #GdkDevice, or %NULL.
**/
GdkDevice *
gdk_event_get_source_device (const GdkEvent *event)
gdk_event_get_source_device (GdkEvent *event)
{
g_return_val_if_fail (event != NULL, NULL);
@ -1145,13 +1145,13 @@ gdk_event_get_source_device (const GdkEvent *event)
* Returns: %TRUE if the event should trigger a context menu.
**/
gboolean
gdk_event_triggers_context_menu (const GdkEvent *event)
gdk_event_triggers_context_menu (GdkEvent *event)
{
g_return_val_if_fail (event != NULL, FALSE);
if (event->any.type == GDK_BUTTON_PRESS)
{
const GdkEventButton *bevent = (const GdkEventButton *) event;
GdkEventButton *bevent = (GdkEventButton *) event;
GdkDisplay *display;
GdkModifierType modifier;
@ -1310,7 +1310,7 @@ gdk_events_get_center (GdkEvent *event1,
* Returns: (transfer none) (nullable): a #GdkDisplay
*/
GdkDisplay *
gdk_event_get_display (const GdkEvent *event)
gdk_event_get_display (GdkEvent *event)
{
if (event->any.display)
return event->any.display;
@ -1332,7 +1332,7 @@ gdk_event_get_display (const GdkEvent *event)
* Returns: (transfer none): the event sequence that the event belongs to
*/
GdkEventSequence *
gdk_event_get_event_sequence (const GdkEvent *event)
gdk_event_get_event_sequence (GdkEvent *event)
{
if (!event)
return NULL;
@ -1402,7 +1402,7 @@ G_DEFINE_BOXED_TYPE (GdkEventSequence, gdk_event_sequence,
* Returns: a #GdkEventType
*/
GdkEventType
gdk_event_get_event_type (const GdkEvent *event)
gdk_event_get_event_type (GdkEvent *event)
{
g_return_val_if_fail (event != NULL, 0);
@ -1418,7 +1418,7 @@ gdk_event_get_event_type (const GdkEvent *event)
* Returns: (transfer none): The #GdkSeat of this event
**/
GdkSeat *
gdk_event_get_seat (const GdkEvent *event)
gdk_event_get_seat (GdkEvent *event)
{
GdkDevice *device;
@ -1443,7 +1443,7 @@ gdk_event_get_seat (const GdkEvent *event)
* Returns: (transfer none): The current device tool, or %NULL
**/
GdkDeviceTool *
gdk_event_get_device_tool (const GdkEvent *event)
gdk_event_get_device_tool (GdkEvent *event)
{
if (event->any.type == GDK_BUTTON_PRESS ||
event->any.type == GDK_BUTTON_RELEASE)
@ -1490,7 +1490,7 @@ gdk_event_get_scancode (GdkEvent *event)
* Returns: %TRUE if the event was sent explicitly
*/
gboolean
gdk_event_is_sent (const GdkEvent *event)
gdk_event_is_sent (GdkEvent *event)
{
if (!event)
return FALSE;
@ -1507,7 +1507,7 @@ gdk_event_is_sent (const GdkEvent *event)
* Returns: (transfer none) (nullable): the drop
**/
GdkDrop *
gdk_event_get_drop (const GdkEvent *event)
gdk_event_get_drop (GdkEvent *event)
{
if (!event)
return FALSE;
@ -1533,7 +1533,7 @@ gdk_event_get_drop (const GdkEvent *event)
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_crossing_mode (const GdkEvent *event,
gdk_event_get_crossing_mode (GdkEvent *event,
GdkCrossingMode *mode)
{
if (!event)
@ -1564,7 +1564,7 @@ gdk_event_get_crossing_mode (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_crossing_detail (const GdkEvent *event,
gdk_event_get_crossing_detail (GdkEvent *event,
GdkNotifyType *detail)
{
if (!event)
@ -1595,7 +1595,7 @@ gdk_event_get_crossing_detail (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_touchpad_gesture_phase (const GdkEvent *event,
gdk_event_get_touchpad_gesture_phase (GdkEvent *event,
GdkTouchpadGesturePhase *phase)
{
if (!event)
@ -1625,7 +1625,7 @@ gdk_event_get_touchpad_gesture_phase (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_touchpad_gesture_n_fingers (const GdkEvent *event,
gdk_event_get_touchpad_gesture_n_fingers (GdkEvent *event,
guint *n_fingers)
{
if (!event)
@ -1656,7 +1656,7 @@ gdk_event_get_touchpad_gesture_n_fingers (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_touchpad_deltas (const GdkEvent *event,
gdk_event_get_touchpad_deltas (GdkEvent *event,
double *dx,
double *dy)
{
@ -1689,7 +1689,7 @@ gdk_event_get_touchpad_deltas (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_touchpad_angle_delta (const GdkEvent *event,
gdk_event_get_touchpad_angle_delta (GdkEvent *event,
double *delta)
{
if (!event)
@ -1714,7 +1714,7 @@ gdk_event_get_touchpad_angle_delta (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_touchpad_scale (const GdkEvent *event,
gdk_event_get_touchpad_scale (GdkEvent *event,
double *scale)
{
if (!event)
@ -1739,7 +1739,7 @@ gdk_event_get_touchpad_scale (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_touch_emulating_pointer (const GdkEvent *event,
gdk_event_get_touch_emulating_pointer (GdkEvent *event,
gboolean *emulating)
{
if (!event)
@ -1766,7 +1766,7 @@ gdk_event_get_touch_emulating_pointer (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_grab_surface (const GdkEvent *event,
gdk_event_get_grab_surface (GdkEvent *event,
GdkSurface **surface)
{
if (!event)
@ -1791,7 +1791,7 @@ gdk_event_get_grab_surface (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_focus_in (const GdkEvent *event,
gdk_event_get_focus_in (GdkEvent *event,
gboolean *focus_in)
{
if (!event)
@ -1817,7 +1817,7 @@ gdk_event_get_focus_in (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_pad_group_mode (const GdkEvent *event,
gdk_event_get_pad_group_mode (GdkEvent *event,
guint *group,
guint *mode)
{
@ -1859,7 +1859,7 @@ gdk_event_get_pad_group_mode (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_pad_button (const GdkEvent *event,
gdk_event_get_pad_button (GdkEvent *event,
guint *button)
{
if (!event)
@ -1886,7 +1886,7 @@ gdk_event_get_pad_button (const GdkEvent *event,
* Returns: %TRUE on success, otherwise %FALSE
**/
gboolean
gdk_event_get_pad_axis_value (const GdkEvent *event,
gdk_event_get_pad_axis_value (GdkEvent *event,
guint *index,
gdouble *value)
{
@ -1957,7 +1957,7 @@ gdk_event_get_axes (GdkEvent *event,
* of time and coordinates
*/
GList *
gdk_event_get_motion_history (const GdkEvent *event)
gdk_event_get_motion_history (GdkEvent *event)
{
if (event->any.type != GDK_MOTION_NOTIFY)
return NULL;

View File

@ -341,58 +341,58 @@ GDK_AVAILABLE_IN_ALL
void gdk_event_unref (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
GdkSurface *gdk_event_get_surface (const GdkEvent *event);
GdkSurface *gdk_event_get_surface (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
guint32 gdk_event_get_time (const GdkEvent *event);
guint32 gdk_event_get_time (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_state (const GdkEvent *event,
gboolean gdk_event_get_state (GdkEvent *event,
GdkModifierType *state);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_coords (const GdkEvent *event,
gboolean gdk_event_get_coords (GdkEvent *event,
gdouble *x_win,
gdouble *y_win);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_button (const GdkEvent *event,
gboolean gdk_event_get_button (GdkEvent *event,
guint *button);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_click_count (const GdkEvent *event,
gboolean gdk_event_get_click_count (GdkEvent *event,
guint *click_count);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_keyval (const GdkEvent *event,
gboolean gdk_event_get_keyval (GdkEvent *event,
guint *keyval);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_keycode (const GdkEvent *event,
gboolean gdk_event_get_keycode (GdkEvent *event,
guint16 *keycode);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_key_is_modifier (const GdkEvent *event,
gboolean gdk_event_get_key_is_modifier (GdkEvent *event,
gboolean *is_modifier);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_key_group (const GdkEvent *event,
gboolean gdk_event_get_key_group (GdkEvent *event,
guint *group);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_scroll_direction (const GdkEvent *event,
gboolean gdk_event_get_scroll_direction (GdkEvent *event,
GdkScrollDirection *direction);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_scroll_deltas (const GdkEvent *event,
gboolean gdk_event_get_scroll_deltas (GdkEvent *event,
gdouble *delta_x,
gdouble *delta_y);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_is_scroll_stop_event (const GdkEvent *event);
gboolean gdk_event_is_scroll_stop_event (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_axis (const GdkEvent *event,
gboolean gdk_event_get_axis (GdkEvent *event,
GdkAxisUse axis_use,
gdouble *value);
GDK_AVAILABLE_IN_ALL
GdkDevice* gdk_event_get_device (const GdkEvent *event);
GdkDevice* gdk_event_get_device (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
GdkDevice* gdk_event_get_source_device (const GdkEvent *event);
GdkDevice* gdk_event_get_source_device (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_triggers_context_menu (const GdkEvent *event);
gboolean gdk_event_triggers_context_menu (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
gboolean gdk_events_get_distance (GdkEvent *event1,
@ -408,16 +408,16 @@ gboolean gdk_events_get_center (GdkEvent *event1,
gdouble *x,
gdouble *y);
GDK_AVAILABLE_IN_ALL
GdkDisplay *gdk_event_get_display (const GdkEvent *event);
GdkDisplay *gdk_event_get_display (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
GdkEventSequence *gdk_event_get_event_sequence (const GdkEvent *event);
GdkEventSequence *gdk_event_get_event_sequence (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
GdkEventType gdk_event_get_event_type (const GdkEvent *event);
GdkEventType gdk_event_get_event_type (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
GdkSeat *gdk_event_get_seat (const GdkEvent *event);
GdkSeat *gdk_event_get_seat (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
void gdk_set_show_events (gboolean show_events);
@ -425,7 +425,7 @@ GDK_AVAILABLE_IN_ALL
gboolean gdk_get_show_events (void);
GDK_AVAILABLE_IN_ALL
GdkDeviceTool *gdk_event_get_device_tool (const GdkEvent *event);
GdkDeviceTool *gdk_event_get_device_tool (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
int gdk_event_get_scancode (GdkEvent *event);
@ -434,52 +434,52 @@ GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_pointer_emulated (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_is_sent (const GdkEvent *event);
gboolean gdk_event_is_sent (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
GdkDrop * gdk_event_get_drop (const GdkEvent *event);
GdkDrop * gdk_event_get_drop (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_crossing_mode (const GdkEvent *event,
gboolean gdk_event_get_crossing_mode (GdkEvent *event,
GdkCrossingMode *mode);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_crossing_detail (const GdkEvent *event,
gboolean gdk_event_get_crossing_detail (GdkEvent *event,
GdkNotifyType *detail);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_touchpad_gesture_phase (const GdkEvent *event,
gboolean gdk_event_get_touchpad_gesture_phase (GdkEvent *event,
GdkTouchpadGesturePhase *phase);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_touchpad_gesture_n_fingers (const GdkEvent *event,
gboolean gdk_event_get_touchpad_gesture_n_fingers (GdkEvent *event,
guint *n_fingers);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_touchpad_deltas (const GdkEvent *event,
gboolean gdk_event_get_touchpad_deltas (GdkEvent *event,
double *dx,
double *dy);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_touchpad_angle_delta (const GdkEvent *event,
gboolean gdk_event_get_touchpad_angle_delta (GdkEvent *event,
double *delta);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_touchpad_scale (const GdkEvent *event,
gboolean gdk_event_get_touchpad_scale (GdkEvent *event,
double *scale);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_touch_emulating_pointer (const GdkEvent *event,
gboolean gdk_event_get_touch_emulating_pointer (GdkEvent *event,
gboolean *emulating);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_grab_surface (const GdkEvent *event,
gboolean gdk_event_get_grab_surface (GdkEvent *event,
GdkSurface **surface);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_focus_in (const GdkEvent *event,
gboolean gdk_event_get_focus_in (GdkEvent *event,
gboolean *focus_in);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_pad_group_mode (const GdkEvent *event,
gboolean gdk_event_get_pad_group_mode (GdkEvent *event,
guint *group,
guint *mode);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_pad_button (const GdkEvent *event,
gboolean gdk_event_get_pad_button (GdkEvent *event,
guint *button);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_pad_axis_value (const GdkEvent *event,
gboolean gdk_event_get_pad_axis_value (GdkEvent *event,
guint *index,
gdouble *value);
GDK_AVAILABLE_IN_ALL
@ -487,7 +487,7 @@ gboolean gdk_event_get_axes (GdkEvent *event,
gdouble **axes,
guint *n_axes);
GDK_AVAILABLE_IN_ALL
GList * gdk_event_get_motion_history (const GdkEvent *event);
GList * gdk_event_get_motion_history (GdkEvent *event);
G_END_DECLS

View File

@ -143,7 +143,7 @@ void _gdk_event_queue_flush (GdkDisplay *display);
void _gdk_event_button_generate (GdkDisplay *display,
GdkEvent *event);
void _gdk_windowing_event_data_copy (const GdkEvent *src,
void _gdk_windowing_event_data_copy (GdkEvent *src,
GdkEvent *dst);
void _gdk_windowing_event_data_free (GdkEvent *event);
@ -266,7 +266,7 @@ GdkGrabStatus gdk_seat_grab (GdkSeat *seat,
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data);
void gdk_seat_ungrab (GdkSeat *seat);

View File

@ -286,7 +286,7 @@ gdk_seat_grab (GdkSeat *seat,
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data)
{

View File

@ -109,7 +109,7 @@ gdk_seat_default_grab (GdkSeat *seat,
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data)
{

View File

@ -46,7 +46,7 @@ struct _GdkSeatClass
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data);
void (* ungrab) (GdkSeat *seat);

View File

@ -4467,7 +4467,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
GdkSeatCapabilities capabilities,
gboolean owner_events,
GdkCursor *cursor,
const GdkEvent *event,
GdkEvent *event,
GdkSeatGrabPrepareFunc prepare_func,
gpointer prepare_func_data)
{
@ -4836,7 +4836,7 @@ _gdk_wayland_display_remove_seat (GdkWaylandDisplay *display_wayland,
uint32_t
_gdk_wayland_device_get_implicit_grab_serial (GdkWaylandDevice *device,
const GdkEvent *event)
GdkEvent *event)
{
GdkSeat *seat = gdk_device_get_seat (GDK_DEVICE (device));
GdkEventSequence *sequence = NULL;

View File

@ -145,7 +145,7 @@ void _gdk_wayland_display_remove_seat (GdkWaylandDisplay *displa
GdkKeymap *_gdk_wayland_device_get_keymap (GdkDevice *device);
uint32_t _gdk_wayland_device_get_implicit_grab_serial(GdkWaylandDevice *device,
const GdkEvent *event);
GdkEvent *event);
uint32_t _gdk_wayland_seat_get_last_implicit_grab_serial (GdkWaylandSeat *seat,
GdkEventSequence **seqence);
struct wl_data_device * gdk_wayland_device_get_data_device (GdkDevice *gdk_device);

View File

@ -2332,7 +2332,7 @@ gdk_local_drag_update (GdkDrag *drag,
static gboolean
gdk_dnd_handle_motion_event (GdkDrag *drag,
const GdkEventMotion *event)
GdkEventMotion *event)
{
GdkModifierType state;
GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag);
@ -2375,7 +2375,7 @@ gdk_dnd_handle_motion_event (GdkDrag *drag,
static gboolean
gdk_dnd_handle_key_event (GdkDrag *drag,
const GdkEventKey *event)
GdkEventKey *event)
{
GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag);
GdkModifierType state;
@ -2460,7 +2460,7 @@ gdk_dnd_handle_key_event (GdkDrag *drag,
static gboolean
gdk_dnd_handle_grab_broken_event (GdkDrag *drag,
const GdkEventGrabBroken *event)
GdkEventGrabBroken *event)
{
GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag);
@ -2486,7 +2486,7 @@ gdk_dnd_handle_grab_broken_event (GdkDrag *drag,
static gboolean
gdk_dnd_handle_button_event (GdkDrag *drag,
const GdkEventButton *event)
GdkEventButton *event)
{
GDK_NOTE (DND, g_print ("gdk_dnd_handle_button_event: 0x%p\n",
drag));
@ -2510,7 +2510,7 @@ gdk_dnd_handle_button_event (GdkDrag *drag,
gboolean
gdk_win32_drag_handle_event (GdkDrag *drag,
const GdkEvent *event)
GdkEvent *event)
{
GdkWin32Drag *drag_win32 = GDK_WIN32_DRAG (drag);

View File

@ -755,7 +755,7 @@ print_event_state (guint state)
}
void
_gdk_win32_print_event (const GdkEvent *event)
_gdk_win32_print_event (GdkEvent *event)
{
const char *kvname;

View File

@ -236,7 +236,7 @@ gchar *_gdk_win32_rect_to_string (const RECT *rect);
gchar *_gdk_win32_gdkrectangle_to_string (const GdkRectangle *rect);
gchar *_gdk_win32_cairo_region_to_string (const cairo_region_t *box);
void _gdk_win32_print_event (const GdkEvent *event);
void _gdk_win32_print_event (GdkEvent *event);
#endif

View File

@ -171,7 +171,7 @@ static GdkSurfaceCache *gdk_surface_cache_ref (GdkSurfaceCache *cache);
static void gdk_surface_cache_unref (GdkSurfaceCache *cache);
gboolean gdk_x11_drag_handle_event (GdkDrag *drag,
const GdkEvent *event);
GdkEvent *event);
static GList *drags;
static GSList *window_caches;
@ -2242,7 +2242,7 @@ gdk_drag_update (GdkDrag *drag,
static gboolean
gdk_dnd_handle_motion_event (GdkDrag *drag,
const GdkEvent *event)
GdkEvent *event)
{
GdkModifierType state;
int x_root, y_root;
@ -2259,7 +2259,7 @@ gdk_dnd_handle_motion_event (GdkDrag *drag,
static gboolean
gdk_dnd_handle_key_event (GdkDrag *drag,
const GdkEventKey *event)
GdkEventKey *event)
{
GdkX11Drag *x11_drag = GDK_X11_DRAG (drag);
GdkModifierType state;
@ -2352,7 +2352,7 @@ gdk_dnd_handle_key_event (GdkDrag *drag,
static gboolean
gdk_dnd_handle_grab_broken_event (GdkDrag *drag,
const GdkEventGrabBroken *event)
GdkEventGrabBroken *event)
{
GdkX11Drag *x11_drag = GDK_X11_DRAG (drag);
@ -2375,7 +2375,7 @@ gdk_dnd_handle_grab_broken_event (GdkDrag *drag,
static gboolean
gdk_dnd_handle_button_event (GdkDrag *drag,
const GdkEventButton *event)
GdkEventButton *event)
{
GdkX11Drag *x11_drag = GDK_X11_DRAG (drag);
@ -2398,7 +2398,7 @@ gdk_dnd_handle_button_event (GdkDrag *drag,
gboolean
gdk_x11_drag_handle_event (GdkDrag *drag,
const GdkEvent *event)
GdkEvent *event)
{
GdkX11Drag *x11_drag = GDK_X11_DRAG (drag);

View File

@ -127,7 +127,7 @@ handle_focus_change (GdkEventCrossing *event)
static GdkEvent *
create_synth_crossing_event (GdkEventType evtype,
GdkCrossingMode mode,
const GdkEvent *real_event)
GdkEvent *real_event)
{
GdkEvent *event;
gdouble x, y;

View File

@ -117,11 +117,11 @@ static gboolean gtk_drop_target_accept (GtkDropTarget *dest,
GdkDrop *drop);
static gboolean gtk_drop_target_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y);
static gboolean gtk_drop_target_filter_event (GtkEventController *controller,
const GdkEvent *event);
GdkEvent *event);
static void gtk_drop_target_set_widget (GtkEventController *controller,
GtkWidget *widget);
static void gtk_drop_target_unset_widget (GtkEventController *controller);
@ -675,7 +675,7 @@ gtk_drop_target_get_contains (GtkDropTarget *dest)
static gboolean
gtk_drop_target_filter_event (GtkEventController *controller,
const GdkEvent *event)
GdkEvent *event)
{
switch ((int)gdk_event_get_event_type (event))
{
@ -757,7 +757,7 @@ gtk_drop_set_current_dest (GdkDrop *drop,
static gboolean
gtk_drop_target_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{

View File

@ -198,7 +198,7 @@ gtk_drag_source_get_property (GObject *object,
static gboolean
gtk_drag_source_filter_event (GtkEventController *controller,
const GdkEvent *event)
GdkEvent *event)
{
/* Let touchpad swipe events go through, only if they match n-points */
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_SWIPE)

View File

@ -82,14 +82,14 @@ gtk_event_controller_unset_widget (GtkEventController *self)
static gboolean
gtk_event_controller_filter_event_default (GtkEventController *self,
const GdkEvent *event)
GdkEvent *event)
{
return FALSE;
}
static gboolean
gtk_event_controller_handle_event_default (GtkEventController *self,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{
@ -263,7 +263,7 @@ same_native (GtkWidget *widget,
static gboolean
gtk_event_controller_filter_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
GtkWidget *target)
{
GtkEventControllerPrivate *priv;
@ -318,7 +318,7 @@ gtk_event_controller_filter_crossing (GtkEventController *controller,
**/
gboolean
gtk_event_controller_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
GtkWidget *target,
double x,
double y)

View File

@ -76,7 +76,7 @@ GtkWidget * gtk_event_controller_get_widget (GtkEventController *controller
GDK_AVAILABLE_IN_ALL
gboolean gtk_event_controller_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
GtkWidget *target,
double x,
double y);

View File

@ -50,7 +50,7 @@ struct _GtkEventControllerKey
GdkModifierType state;
const GdkEvent *current_event;
GdkEvent *current_event;
const GtkCrossingData *current_crossing;
guint is_focus : 1;
@ -97,7 +97,7 @@ gtk_event_controller_key_finalize (GObject *object)
static gboolean
gtk_event_controller_key_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{

View File

@ -59,7 +59,7 @@ G_DEFINE_TYPE (GtkEventControllerLegacy, gtk_event_controller_legacy,
static gboolean
gtk_event_controller_legacy_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{

View File

@ -41,7 +41,7 @@ struct _GtkEventControllerMotion
{
GtkEventController parent_instance;
const GdkEvent *current_event;
GdkEvent *current_event;
const GtkCrossingData *current_crossing;
guint is_pointer : 1;
@ -73,7 +73,7 @@ G_DEFINE_TYPE (GtkEventControllerMotion, gtk_event_controller_motion, GTK_TYPE_E
static gboolean
gtk_event_controller_motion_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{

View File

@ -35,7 +35,7 @@ struct _GtkEventControllerClass
GtkWidget *widget);
void (* unset_widget) (GtkEventController *controller);
gboolean (* handle_event) (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y);
void (* reset) (GtkEventController *controller);
@ -51,7 +51,7 @@ struct _GtkEventControllerClass
* the event unseen by the handle_event vfunc.
*/
gboolean (* filter_event) (GtkEventController *controller,
const GdkEvent *event);
GdkEvent *event);
gpointer padding[10];
};

View File

@ -238,7 +238,7 @@ gtk_event_controller_scroll_get_property (GObject *object,
static gboolean
gtk_event_controller_scroll_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{

View File

@ -2708,7 +2708,7 @@ gtk_flow_box_click_gesture_released (GtkGestureClick *gesture,
{
GdkEventSequence *sequence;
GdkInputSource source;
const GdkEvent *event;
GdkEvent *event;
gboolean modify;
gboolean extend;

View File

@ -440,7 +440,7 @@ gtk_gesture_get_group_state (GtkGesture *gesture,
static gboolean
_gtk_gesture_update_point (GtkGesture *gesture,
const GdkEvent *event,
GdkEvent *event,
GtkWidget *target,
double x,
double y,
@ -538,7 +538,7 @@ _gtk_gesture_check_empty (GtkGesture *gesture)
static void
_gtk_gesture_remove_point (GtkGesture *gesture,
const GdkEvent *event)
GdkEvent *event)
{
GdkEventSequence *sequence;
GtkGesturePrivate *priv;
@ -587,7 +587,7 @@ gesture_within_surface (GtkGesture *gesture,
static gboolean
gtk_gesture_filter_event (GtkEventController *controller,
const GdkEvent *event)
GdkEvent *event)
{
/* Even though GtkGesture handles these events, we want
* touchpad gestures disabled by default, it will be
@ -602,7 +602,7 @@ gtk_gesture_filter_event (GtkEventController *controller,
static gboolean
gtk_gesture_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{
@ -1150,7 +1150,7 @@ gtk_gesture_get_last_updated_sequence (GtkGesture *gesture)
*
* Returns: (transfer none) (nullable): The last event from @sequence
**/
const GdkEvent *
GdkEvent *
gtk_gesture_get_last_event (GtkGesture *gesture,
GdkEventSequence *sequence)
{
@ -1346,7 +1346,7 @@ gtk_gesture_get_bounding_box_center (GtkGesture *gesture,
gdouble *x,
gdouble *y)
{
const GdkEvent *last_event;
GdkEvent *last_event;
GdkRectangle rect;
GdkEventSequence *sequence;

View File

@ -66,7 +66,7 @@ GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_handles_sequence (GtkGesture *gesture,
GdkEventSequence *sequence);
GDK_AVAILABLE_IN_ALL
const GdkEvent *
GdkEvent *
gtk_gesture_get_last_event (GtkGesture *gesture,
GdkEventSequence *sequence);

View File

@ -197,7 +197,7 @@ gtk_gesture_click_begin (GtkGesture *gesture,
GtkGestureClickPrivate *priv;
guint n_presses, button = 1;
GdkEventSequence *current;
const GdkEvent *event;
GdkEvent *event;
GdkEventType event_type;
GdkDevice *device;
gdouble x, y;
@ -307,7 +307,7 @@ gtk_gesture_click_reset (GtkEventController *controller)
static gboolean
gtk_gesture_click_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{

View File

@ -60,7 +60,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkGestureDrag, gtk_gesture_drag, GTK_TYPE_GESTURE_S
static gboolean
gtk_gesture_drag_filter_event (GtkEventController *controller,
const GdkEvent *event)
GdkEvent *event)
{
/* Let touchpad swipe events go through, only if they match n-points */
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_SWIPE)

View File

@ -116,7 +116,7 @@ gtk_gesture_long_press_begin (GtkGesture *gesture,
GdkEventSequence *sequence)
{
GtkGestureLongPressPrivate *priv;
const GdkEvent *event;
GdkEvent *event;
GdkEventType event_type;
GtkWidget *widget;
gint delay;

View File

@ -78,7 +78,7 @@ _gtk_gesture_rotate_get_angle (GtkGestureRotate *rotate,
gdouble *angle)
{
GtkGestureRotatePrivate *priv;
const GdkEvent *last_event;
GdkEvent *last_event;
gdouble x1, y1, x2, y2;
GtkGesture *gesture;
gdouble dx, dy;
@ -172,7 +172,7 @@ gtk_gesture_rotate_update (GtkGesture *gesture,
static gboolean
gtk_gesture_rotate_filter_event (GtkEventController *controller,
const GdkEvent *event)
GdkEvent *event)
{
/* Let 2-finger touchpad pinch events go through */
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH)
@ -192,7 +192,7 @@ gtk_gesture_rotate_filter_event (GtkEventController *controller,
static gboolean
gtk_gesture_rotate_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{

View File

@ -131,7 +131,7 @@ gtk_gesture_single_cancel (GtkGesture *gesture,
static gboolean
gtk_gesture_single_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{

View File

@ -49,7 +49,7 @@ static guint signals[N_SIGNALS] = { 0, };
static gboolean
gtk_gesture_stylus_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{
@ -162,7 +162,7 @@ gtk_gesture_stylus_new (void)
NULL);
}
static const GdkEvent *
static GdkEvent *
gesture_get_current_event (GtkGestureStylus *gesture)
{
GdkEventSequence *sequence;
@ -190,7 +190,7 @@ gtk_gesture_stylus_get_axis (GtkGestureStylus *gesture,
GdkAxisUse axis,
gdouble *value)
{
const GdkEvent *event;
GdkEvent *event;
g_return_val_if_fail (GTK_IS_GESTURE_STYLUS (gesture), FALSE);
g_return_val_if_fail (axis < GDK_AXIS_LAST, FALSE);
@ -221,7 +221,7 @@ gtk_gesture_stylus_get_axes (GtkGestureStylus *gesture,
GdkAxisUse axes[],
gdouble **values)
{
const GdkEvent *event;
GdkEvent *event;
GArray *array;
gint i = 0;
@ -281,7 +281,7 @@ gtk_gesture_stylus_get_backlog (GtkGestureStylus *gesture,
GdkTimeCoord **backlog,
guint *n_elems)
{
const GdkEvent *event;
GdkEvent *event;
GArray *backlog_array;
GList *history = NULL, *l;
@ -339,7 +339,7 @@ gtk_gesture_stylus_get_backlog (GtkGestureStylus *gesture,
GdkDeviceTool *
gtk_gesture_stylus_get_device_tool (GtkGestureStylus *gesture)
{
const GdkEvent *event;
GdkEvent *event;
g_return_val_if_fail (GTK_IS_GESTURE_STYLUS (gesture), FALSE);

View File

@ -82,7 +82,7 @@ gtk_gesture_swipe_finalize (GObject *object)
static gboolean
gtk_gesture_swipe_filter_event (GtkEventController *controller,
const GdkEvent *event)
GdkEvent *event)
{
/* Let touchpad swipe events go through, only if they match n-points */
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_SWIPE)

View File

@ -76,7 +76,7 @@ static gboolean
_gtk_gesture_zoom_get_distance (GtkGestureZoom *zoom,
gdouble *distance)
{
const GdkEvent *last_event;
GdkEvent *last_event;
gdouble x1, y1, x2, y2;
GtkGesture *gesture;
GList *sequences = NULL;
@ -149,7 +149,7 @@ _gtk_gesture_zoom_check_emit (GtkGestureZoom *gesture)
static gboolean
gtk_gesture_zoom_filter_event (GtkEventController *controller,
const GdkEvent *event)
GdkEvent *event)
{
/* Let 2-finger touchpad pinch events go through */
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH)

View File

@ -2127,7 +2127,7 @@ gtk_icon_view_button_press (GtkGestureClick *gesture,
GtkCellRenderer *cell = NULL, *cursor_cell = NULL;
int button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
const GdkEventButton *event = (const GdkEventButton *)gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
GdkEventButton *event = (GdkEventButton *)gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
GdkModifierType state;
if (!gtk_widget_has_focus (widget))
@ -2275,7 +2275,7 @@ gtk_icon_view_button_press (GtkGestureClick *gesture,
}
static gboolean
button_event_modifies_selection (const GdkEventButton *event)
button_event_modifies_selection (GdkEventButton *event)
{
guint state;
@ -2293,7 +2293,7 @@ gtk_icon_view_button_release (GtkGestureClick *gesture,
GtkIconView *icon_view = user_data;
int button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
const GdkEventButton *event = (const GdkEventButton *)gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
GdkEventButton *event = (GdkEventButton *)gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
if (icon_view->priv->pressed_button == button)
icon_view->priv->pressed_button = -1;

View File

@ -4456,7 +4456,7 @@ gtk_label_click_gesture_pressed (GtkGestureClick *gesture,
GtkLabelSelectionInfo *info = priv->select_info;
GtkWidget *widget = GTK_WIDGET (label);
GdkEventSequence *sequence;
const GdkEvent *event;
GdkEvent *event;
guint button;
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
@ -4633,7 +4633,7 @@ gtk_label_drag_gesture_begin (GtkGestureDrag *gesture,
GtkLabelSelectionInfo *info = priv->select_info;
GdkModifierType state_mask;
GdkEventSequence *sequence;
const GdkEvent *event;
GdkEvent *event;
gint min, max, index;
if (!info || !info->selectable)

View File

@ -451,7 +451,7 @@ gtk_link_button_pressed_cb (GtkGestureClick *gesture,
GtkLinkButton *link_button = user_data;
GtkLinkButtonPrivate *priv = gtk_link_button_get_instance_private (link_button);
GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
const GdkEvent *event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
GdkEvent *event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
if (!gtk_widget_has_focus (GTK_WIDGET (link_button)))
gtk_widget_grab_focus (GTK_WIDGET (link_button));

View File

@ -1867,7 +1867,7 @@ gtk_list_box_click_gesture_released (GtkGestureClick *gesture,
{
GdkEventSequence *sequence;
GdkInputSource source;
const GdkEvent *event;
GdkEvent *event;
gboolean modify;
gboolean extend;

View File

@ -2202,7 +2202,7 @@ gtk_get_current_event_device (void)
* received @event, or %NULL
*/
GtkWidget*
gtk_get_event_widget (const GdkEvent *event)
gtk_get_event_widget (GdkEvent *event)
{
GtkWidget *widget;

View File

@ -132,7 +132,7 @@ GDK_AVAILABLE_IN_ALL
GdkDevice *gtk_get_current_event_device (void);
GDK_AVAILABLE_IN_ALL
GtkWidget *gtk_get_event_widget (const GdkEvent *event);
GtkWidget *gtk_get_event_widget (GdkEvent *event);
G_END_DECLS

View File

@ -1406,7 +1406,7 @@ on_end_process_activated (GtkModelButton *button,
static gboolean
do_popup_menu_for_process_tree_view (GtkWidget *widget,
const GdkEvent *event,
GdkEvent *event,
GtkMountOperation *op)
{
GtkWidget *menu;
@ -1471,7 +1471,7 @@ click_cb (GtkGesture *gesture,
gpointer user_data)
{
GtkMountOperation *op = GTK_MOUNT_OPERATION (user_data);
const GdkEvent *event;
GdkEvent *event;
GdkEventSequence *sequence;
GtkWidget *widget;

View File

@ -2541,7 +2541,7 @@ gtk_notebook_gesture_pressed (GtkGestureClick *gesture,
GdkEventSequence *sequence;
GtkNotebookArrow arrow;
GtkNotebookPage *page;
const GdkEvent *event;
GdkEvent *event;
guint button;
GList *tab;
@ -2800,7 +2800,7 @@ gtk_notebook_gesture_released (GtkGestureClick *gesture,
GtkNotebook *notebook = user_data;
GtkNotebookPrivate *priv = notebook->priv;
GdkEventSequence *sequence;
const GdkEvent *event;
GdkEvent *event;
guint button;
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));

View File

@ -208,7 +208,7 @@ gtk_pad_controller_handle_mode_switch (GtkPadController *controller,
static gboolean
gtk_pad_controller_filter_event (GtkEventController *controller,
const GdkEvent *event)
GdkEvent *event)
{
GtkPadController *pad_controller = GTK_PAD_CONTROLLER (controller);
GdkEventType event_type = gdk_event_get_event_type (event);
@ -229,7 +229,7 @@ gtk_pad_controller_filter_event (GtkEventController *controller,
static gboolean
gtk_pad_controller_handle_event (GtkEventController *controller,
const GdkEvent *event,
GdkEvent *event,
double x,
double y)
{

View File

@ -745,7 +745,7 @@ gesture_drag_begin_cb (GtkGestureDrag *gesture,
GtkPanedPrivate *priv = gtk_paned_get_instance_private (paned);
GdkEventSequence *sequence;
graphene_rect_t handle_area;
const GdkEvent *event;
GdkEvent *event;
GdkDevice *device;
gboolean is_touch;

View File

@ -1852,7 +1852,7 @@ gtk_range_click_gesture_pressed (GtkGestureClick *gesture,
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
GdkDevice *source_device;
GdkEventSequence *sequence;
const GdkEvent *event;
GdkEvent *event;
GdkInputSource source;
gboolean primary_warps;
gboolean shift_pressed;

View File

@ -992,7 +992,7 @@ scrolled_window_long_press_cancelled_cb (GtkScrolledWindow *scrolled_window,
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
GdkEventSequence *sequence;
const GdkEvent *event;
GdkEvent *event;
GdkEventType event_type;
sequence = gtk_gesture_get_last_updated_sequence (gesture);

View File

@ -2552,7 +2552,7 @@ gtk_text_click_gesture_pressed (GtkGestureClick *gesture,
GtkWidget *widget = GTK_WIDGET (self);
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
GdkEventSequence *current;
const GdkEvent *event;
GdkEvent *event;
int x, y, sel_start, sel_end;
guint button;
int tmp_pos;
@ -2815,7 +2815,7 @@ gtk_text_drag_gesture_update (GtkGestureDrag *gesture,
GtkWidget *widget = GTK_WIDGET (self);
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
GdkEventSequence *sequence;
const GdkEvent *event;
GdkEvent *event;
int x, y;
gtk_text_selection_bubble_popup_unset (self);
@ -2965,7 +2965,7 @@ gtk_text_drag_gesture_end (GtkGestureDrag *gesture,
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
gboolean in_drag, is_touchscreen;
GdkEventSequence *sequence;
const GdkEvent *event;
GdkEvent *event;
GdkDevice *source;
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));

View File

@ -480,7 +480,7 @@ static void gtk_text_view_start_selection_drag (GtkTextView *text
static gboolean gtk_text_view_end_selection_drag (GtkTextView *text_view);
static void gtk_text_view_start_selection_dnd (GtkTextView *text_view,
const GtkTextIter *iter,
const GdkEvent *event,
GdkEvent *event,
gint x,
gint y);
static void gtk_text_view_check_cursor_blink (GtkTextView *text_view);
@ -528,7 +528,7 @@ static void gtk_text_view_set_virtual_cursor_pos (GtkTextView *text_view,
gint y);
static void gtk_text_view_do_popup (GtkTextView *text_view,
const GdkEvent *event);
GdkEvent *event);
static void cancel_pending_scroll (GtkTextView *text_view);
static void gtk_text_view_queue_scroll (GtkTextView *text_view,
@ -5158,7 +5158,7 @@ gtk_text_view_click_gesture_pressed (GtkGestureClick *gesture,
{
GdkEventSequence *sequence;
GtkTextViewPrivate *priv;
const GdkEvent *event;
GdkEvent *event;
gboolean is_touchscreen;
GdkDevice *device;
GtkTextIter iter;
@ -7137,7 +7137,7 @@ gtk_text_view_drag_gesture_update (GtkGestureDrag *gesture,
gint start_x, start_y, x, y;
GdkEventSequence *sequence;
gboolean is_touchscreen;
const GdkEvent *event;
GdkEvent *event;
SelectionData *data;
GdkDevice *device;
GtkTextIter cursor;
@ -7256,7 +7256,7 @@ gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture,
gint start_x, start_y, x, y;
GdkEventSequence *sequence;
GtkTextViewPrivate *priv;
const GdkEvent *event;
GdkEvent *event;
GdkDevice *device;
priv = text_view->priv;
@ -7698,7 +7698,7 @@ dnd_finished_cb (GdkDrag *drag,
static void
gtk_text_view_start_selection_dnd (GtkTextView *text_view,
const GtkTextIter *iter,
const GdkEvent *event,
GdkEvent *event,
gint x,
gint y)
{
@ -8617,7 +8617,7 @@ gtk_text_view_get_menu_model (GtkTextView *text_view)
static void
gtk_text_view_do_popup (GtkTextView *text_view,
const GdkEvent *event)
GdkEvent *event)
{
GtkTextViewPrivate *priv = text_view->priv;
GdkEvent *trigger_event;

View File

@ -2806,7 +2806,7 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture,
GtkTreeViewColumn *column = NULL;
GdkEventSequence *sequence;
GdkModifierType modifiers;
const GdkEvent *event;
GdkEvent *event;
gint new_y, y_offset;
gint bin_x, bin_y;
GtkTreePath *path;
@ -13644,7 +13644,7 @@ gtk_tree_view_search_pressed_cb (GtkGesture *gesture,
{
GdkDevice *keyb_device;
GdkEventSequence *sequence;
const GdkEvent *event;
GdkEvent *event;
sequence = gtk_gesture_get_last_updated_sequence (gesture);
event = gtk_gesture_get_last_event (gesture, sequence);

View File

@ -690,7 +690,7 @@ static void gtk_widget_set_usize_internal (GtkWidget *widget,
gint width,
gint height);
static gboolean event_surface_is_still_viewable (const GdkEvent *event);
static gboolean event_surface_is_still_viewable (GdkEvent *event);
static void gtk_widget_update_input_shape (GtkWidget *widget);
@ -2064,7 +2064,7 @@ gtk_widget_get_property (GObject *object,
static void
_gtk_widget_emulate_press (GtkWidget *widget,
const GdkEvent *event,
GdkEvent *event,
GtkWidget *event_widget)
{
GtkWidget *next_child, *parent;
@ -2154,14 +2154,14 @@ _gtk_widget_emulate_press (GtkWidget *widget,
g_object_unref (press);
}
static const GdkEvent *
static GdkEvent *
_gtk_widget_get_last_event (GtkWidget *widget,
GdkEventSequence *sequence,
GtkWidget **target)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
GtkEventController *controller;
const GdkEvent *event;
GdkEvent *event;
GList *l;
for (l = priv->event_controllers; l; l = l->next)
@ -2195,7 +2195,7 @@ _gtk_widget_get_emulating_sequence (GtkWidget *widget,
if (sequence)
{
const GdkEvent *last_event;
GdkEvent *last_event;
GtkWidget *target;
last_event = _gtk_widget_get_last_event (widget, sequence, &target);
@ -2267,7 +2267,7 @@ _gtk_widget_set_sequence_state_internal (GtkWidget *widget,
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
gboolean emulates_pointer, sequence_handled = FALSE;
const GdkEvent *mimic_event;
GdkEvent *mimic_event;
GtkWidget *target;
GList *group = NULL, *l;
GdkEventSequence *seq;
@ -4801,7 +4801,7 @@ gtk_widget_event (GtkWidget *widget,
gboolean
gtk_widget_run_controllers (GtkWidget *widget,
const GdkEvent *event,
GdkEvent *event,
GtkWidget *target,
double x,
double y,
@ -4911,7 +4911,7 @@ _gtk_widget_captured_event (GtkWidget *widget,
}
static gboolean
event_surface_is_still_viewable (const GdkEvent *event)
event_surface_is_still_viewable (GdkEvent *event)
{
/* Check that we think the event's window is viewable before
* delivering the event, to prevent surprises. We do this here
@ -11916,7 +11916,7 @@ gtk_widget_cancel_event_sequence (GtkWidget *widget,
gboolean handled = FALSE;
GtkWidget *event_widget;
gboolean cancel = TRUE;
const GdkEvent *event;
GdkEvent *event;
handled = _gtk_widget_set_sequence_state_internal (widget, sequence,
state, gesture);

View File

@ -344,7 +344,7 @@ void gtk_widget_cancel_event_sequence (GtkWidget
GtkEventSequenceState state);
gboolean gtk_widget_run_controllers (GtkWidget *widget,
const GdkEvent *event,
GdkEvent *event,
GtkWidget *target,
double x,
double y,

View File

@ -1273,7 +1273,7 @@ popover_destroy (GtkWindowPopover *popover)
static gboolean
gtk_window_titlebar_action (GtkWindow *window,
const GdkEvent *event,
GdkEvent *event,
guint button,
gint n_press)
{
@ -1343,7 +1343,7 @@ click_gesture_pressed_cb (GtkGestureClick *gesture,
GtkWidget *event_widget, *widget;
GdkEventSequence *sequence;
GtkWindowRegion region;
const GdkEvent *event;
GdkEvent *event;
guint button;
gboolean window_drag = FALSE;