[gtk+/wip/carlosg/event-delivery: 100/105] Constify GdkEvent parameters in gtk_get_event_widget and _event_target



commit 8bbf33dd23ff5f2fc1155ff496b384553c63fa80
Author: Timm B├Ąder <mail baedert org>
Date:   Wed May 10 18:03:10 2017 +0200

    Constify GdkEvent parameters in gtk_get_event_widget and _event_target

 gdk/gdkevents.c |    2 +-
 gdk/gdkevents.h |    2 +-
 gtk/gtkmain.c   |    4 ++--
 gtk/gtkmain.h   |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index a3512b0..094e32c 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -2593,7 +2593,7 @@ gdk_event_set_user_data (GdkEvent *event,
 }
 
 GObject *
-gdk_event_get_user_data (GdkEvent *event)
+gdk_event_get_user_data (const GdkEvent *event)
 {
   GdkEventPrivate *private;
 
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 39cb761..6040af7 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -1571,7 +1571,7 @@ GDK_AVAILABLE_IN_3_90
 void           gdk_event_set_user_data (GdkEvent *event,
                                         GObject  *user_data);
 GDK_AVAILABLE_IN_3_90
-GObject *      gdk_event_get_user_data (GdkEvent *event);
+GObject *      gdk_event_get_user_data (const GdkEvent *event);
 
 G_END_DECLS
 
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 9f7ed2f..343227c 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -2342,7 +2342,7 @@ gtk_get_current_event_device (void)
  *     received @event, or %NULL
  */
 GtkWidget*
-gtk_get_event_widget (GdkEvent *event)
+gtk_get_event_widget (const GdkEvent *event)
 {
   GtkWidget *widget;
   gpointer widget_ptr;
@@ -2371,7 +2371,7 @@ gtk_get_event_widget (GdkEvent *event)
  * Since: 3.90
  */
 GtkWidget *
-gtk_get_event_target (GdkEvent *event)
+gtk_get_event_target (const GdkEvent *event)
 {
   return GTK_WIDGET (gdk_event_get_user_data (event));
 }
diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h
index 47681be..c0b492e 100644
--- a/gtk/gtkmain.h
+++ b/gtk/gtkmain.h
@@ -149,10 +149,10 @@ GDK_AVAILABLE_IN_ALL
 GdkDevice *gtk_get_current_event_device (void);
 
 GDK_AVAILABLE_IN_ALL
-GtkWidget *gtk_get_event_widget         (GdkEvent        *event);
+GtkWidget *gtk_get_event_widget         (const GdkEvent  *event);
 
 GDK_AVAILABLE_IN_3_90
-GtkWidget *gtk_get_event_target         (GdkEvent        *event);
+GtkWidget *gtk_get_event_target         (const GdkEvent  *event);
 
 GDK_AVAILABLE_IN_3_90
 GtkWidget *gtk_get_event_target_with_type (GdkEvent *event,


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