[gtk+] eventcontroller: Drop event_mask API



commit c02d0f3c0ab72741ba8ae7dbd5ec4dbf922ed6f2
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon May 29 12:08:19 2017 +0200

    eventcontroller: Drop event_mask API
    
    This is unchecked, we can remove it entirely as well.

 gtk/gtkeventcontroller.c        |   28 ----------------------------
 gtk/gtkeventcontrollerprivate.h |    4 ----
 gtk/gtkgesture.c                |    4 ----
 gtk/gtkgesturesingle.c          |   19 -------------------
 4 files changed, 0 insertions(+), 55 deletions(-)
---
diff --git a/gtk/gtkeventcontroller.c b/gtk/gtkeventcontroller.c
index 4a98c44..0d4f7a0 100644
--- a/gtk/gtkeventcontroller.c
+++ b/gtk/gtkeventcontroller.c
@@ -234,34 +234,6 @@ gtk_event_controller_handle_event (GtkEventController *controller,
   return retval;
 }
 
-void
-gtk_event_controller_set_event_mask (GtkEventController *controller,
-                                     GdkEventMask        event_mask)
-{
-  GtkEventControllerPrivate *priv;
-
-  g_return_if_fail (GTK_IS_EVENT_CONTROLLER (controller));
-
-  priv = gtk_event_controller_get_instance_private (controller);
-
-  if (priv->evmask == event_mask)
-    return;
-
-  priv->evmask = event_mask;
-}
-
-GdkEventMask
-gtk_event_controller_get_event_mask (GtkEventController *controller)
-{
-  GtkEventControllerPrivate *priv;
-
-  g_return_val_if_fail (GTK_IS_EVENT_CONTROLLER (controller), 0);
-
-  priv = gtk_event_controller_get_instance_private (controller);
-
-  return priv->evmask;
-}
-
 /**
  * gtk_event_controller_get_widget:
  * @controller: a #GtkEventController
diff --git a/gtk/gtkeventcontrollerprivate.h b/gtk/gtkeventcontrollerprivate.h
index f847198..40462c1 100644
--- a/gtk/gtkeventcontrollerprivate.h
+++ b/gtk/gtkeventcontrollerprivate.h
@@ -45,8 +45,4 @@ struct _GtkEventControllerClass
   gpointer padding[10];
 };
 
-void         gtk_event_controller_set_event_mask (GtkEventController *controller,
-                                                 GdkEventMask        event_mask);
-GdkEventMask gtk_event_controller_get_event_mask (GtkEventController *controller);
-
 #endif /* __GTK_EVENT_CONTROLLER_PRIVATE_H__ */
diff --git a/gtk/gtkgesture.c b/gtk/gtkgesture.c
index f36984f..d170fd0 100644
--- a/gtk/gtkgesture.c
+++ b/gtk/gtkgesture.c
@@ -927,10 +927,6 @@ gtk_gesture_init (GtkGesture *gesture)
   priv = gtk_gesture_get_instance_private (gesture);
   priv->points = g_hash_table_new_full (NULL, NULL, NULL,
                                         (GDestroyNotify) free_point_data);
-  gtk_event_controller_set_event_mask (GTK_EVENT_CONTROLLER (gesture),
-                                       GDK_TOUCH_MASK |
-                                       GDK_TOUCHPAD_GESTURE_MASK);
-
   priv->group_link = g_list_prepend (NULL, gesture);
 }
 
diff --git a/gtk/gtkgesturesingle.c b/gtk/gtkgesturesingle.c
index d0a624e..d87fc0c 100644
--- a/gtk/gtkgesturesingle.c
+++ b/gtk/gtkgesturesingle.c
@@ -305,22 +305,6 @@ gtk_gesture_single_class_init (GtkGestureSingleClass *klass)
 }
 
 static void
-_gtk_gesture_single_update_evmask (GtkGestureSingle *gesture)
-{
-  GtkGestureSinglePrivate *priv;
-  GdkEventMask evmask;
-
-  priv = gtk_gesture_single_get_instance_private (gesture);
-  evmask = GDK_TOUCH_MASK;
-
-  if (!priv->touch_only || gtk_simulate_touchscreen ())
-    evmask |= GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
-      GDK_BUTTON_MOTION_MASK;
-
-  gtk_event_controller_set_event_mask (GTK_EVENT_CONTROLLER (gesture), evmask);
-}
-
-static void
 gtk_gesture_single_init (GtkGestureSingle *gesture)
 {
   GtkGestureSinglePrivate *priv;
@@ -328,7 +312,6 @@ gtk_gesture_single_init (GtkGestureSingle *gesture)
   priv = gtk_gesture_single_get_instance_private (gesture);
   priv->touch_only = FALSE;
   priv->button = GDK_BUTTON_PRIMARY;
-  _gtk_gesture_single_update_evmask (gesture);
 }
 
 /**
@@ -379,7 +362,6 @@ gtk_gesture_single_set_touch_only (GtkGestureSingle *gesture,
     return;
 
   priv->touch_only = touch_only;
-  _gtk_gesture_single_update_evmask (gesture);
   g_object_notify_by_pspec (G_OBJECT (gesture), properties[PROP_TOUCH_ONLY]);
 }
 
@@ -433,7 +415,6 @@ gtk_gesture_single_set_exclusive (GtkGestureSingle *gesture,
     return;
 
   priv->exclusive = exclusive;
-  _gtk_gesture_single_update_evmask (gesture);
   g_object_notify_by_pspec (G_OBJECT (gesture), properties[PROP_EXCLUSIVE]);
 }
 


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