summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-03-31 18:58:16 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-05-25 16:25:58 +0200
commita72404dd5ab1874ac3d601cd94e0fa7184873851 (patch)
treeb28cd7bb3937ad7f327e7c184ffa65b259179b8d /demos
parentef4f0e53364b51efea1d71f7770e8d52631c3cb0 (diff)
downloadgtk+-a72404dd5ab1874ac3d601cd94e0fa7184873851.tar.gz
gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events the windowing should be able to handle. Event masks are no longer a way to determine whether an event is deliverable ot a widget. Events will always be delivered in the three captured/target/bubbled phases, widgets can now just attach GtkEventControllers and let those handle the events.
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/css_multiplebgs.c8
-rw-r--r--demos/gtk-demo/drawingarea.c11
-rw-r--r--demos/gtk-demo/event_axes.c8
-rw-r--r--demos/gtk-demo/gestures.c3
4 files changed, 0 insertions, 30 deletions
diff --git a/demos/gtk-demo/css_multiplebgs.c b/demos/gtk-demo/css_multiplebgs.c
index 2d8d935d0e..920109c737 100644
--- a/demos/gtk-demo/css_multiplebgs.c
+++ b/demos/gtk-demo/css_multiplebgs.c
@@ -92,10 +92,6 @@ do_css_multiplebgs (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
container = gtk_overlay_new ();
- gtk_widget_add_events (container,
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_POINTER_MOTION_MASK);
gtk_container_add (GTK_CONTAINER (window), container);
child = gtk_drawing_area_new ();
@@ -106,10 +102,6 @@ do_css_multiplebgs (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (container), child);
child = gtk_button_new ();
- gtk_widget_add_events (child,
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_POINTER_MOTION_MASK);
gtk_overlay_add_overlay (GTK_OVERLAY (container), child);
gtk_widget_set_name (child, "bricks-button");
gtk_widget_set_halign (child, GTK_ALIGN_CENTER);
diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c
index ec48399d88..a6a685bebf 100644
--- a/demos/gtk-demo/drawingarea.c
+++ b/demos/gtk-demo/drawingarea.c
@@ -263,17 +263,6 @@ do_drawingarea (GtkWidget *do_widget)
G_CALLBACK (scribble_motion_notify_event), NULL);
g_signal_connect (da, "button-press-event",
G_CALLBACK (scribble_button_press_event), NULL);
-
-
- /* Ask to receive events the drawing area doesn't normally
- * subscribe to
- */
- gtk_widget_set_events (da, gtk_widget_get_events (da)
- | GDK_LEAVE_NOTIFY_MASK
- | GDK_BUTTON_PRESS_MASK
- | GDK_POINTER_MOTION_MASK
- | GDK_POINTER_MOTION_HINT_MASK);
-
}
if (!gtk_widget_get_visible (window))
diff --git a/demos/gtk-demo/event_axes.c b/demos/gtk-demo/event_axes.c
index e1539f88f1..82ec258ba4 100644
--- a/demos/gtk-demo/event_axes.c
+++ b/demos/gtk-demo/event_axes.c
@@ -628,14 +628,6 @@ do_event_axes (GtkWidget *toplevel)
box = gtk_event_box_new ();
gtk_container_add (GTK_CONTAINER (window), box);
gtk_widget_set_support_multidevice (box, TRUE);
- gtk_widget_add_events (box,
- GDK_POINTER_MOTION_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_SMOOTH_SCROLL_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_TOUCH_MASK);
event_data = event_data_new ();
g_object_set_data_full (G_OBJECT (box), "gtk-demo-event-data",
diff --git a/demos/gtk-demo/gestures.c b/demos/gtk-demo/gestures.c
index 1e49756050..67d1e10d66 100644
--- a/demos/gtk-demo/gestures.c
+++ b/demos/gtk-demo/gestures.c
@@ -151,9 +151,6 @@ do_gestures (GtkWidget *do_widget)
drawing_area = gtk_drawing_area_new ();
gtk_container_add (GTK_CONTAINER (window), drawing_area);
- gtk_widget_add_events (drawing_area,
- GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK | GDK_TOUCH_MASK);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (drawing_area),
drawing_area_draw,