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



commit 34fdc51392149527cb6a4317b135734d7b15db2d
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 e32cbb7..16c0bbf 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -2348,7 +2348,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;
@@ -2377,7 +2377,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]