[gtk+/gestures: 40/55] Add: GTK_PHASE_NONE value to GtkCapturePhase.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gestures: 40/55] Add: GTK_PHASE_NONE value to GtkCapturePhase.
- Date: Fri, 28 Mar 2014 22:53:04 +0000 (UTC)
commit 682b323a3f43a6a7c76908d5bea8a94edd55db9d
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 24 13:19:53 2014 +0100
Add: GTK_PHASE_NONE value to GtkCapturePhase.
Gestures attached with this phase will expect callers to have it
receive events through gtk_event_controller_handle_event(), but
the gesture will still be notified of sequence state changes,
grabs, etc...
gtk/gtkenums.h | 1 +
gtk/gtkwidget.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index eb54825..fdb58f4 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -1268,6 +1268,7 @@ typedef enum
typedef enum
{
+ GTK_PHASE_NONE,
GTK_PHASE_CAPTURE,
GTK_PHASE_BUBBLE
} GtkPropagationPhase;
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 120ef87..45d6157 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -16499,8 +16499,8 @@ gtk_widget_add_controller (GtkWidget *widget,
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (GTK_IS_EVENT_CONTROLLER (controller));
- g_return_if_fail (phase == GTK_PHASE_CAPTURE ||
- phase == GTK_PHASE_BUBBLE);
+ g_return_if_fail (phase >= GTK_PHASE_NONE &&
+ phase <= GTK_PHASE_BUBBLE);
priv = widget->priv;
@@ -16563,8 +16563,8 @@ gtk_widget_list_controllers (GtkWidget *widget,
GList *l, *retval = NULL;
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
- g_return_val_if_fail (phase == GTK_PHASE_CAPTURE ||
- phase == GTK_PHASE_BUBBLE, NULL);
+ g_return_val_if_fail (phase >= GTK_PHASE_NONE &&
+ phase <= GTK_PHASE_BUBBLE, NULL);
priv = widget->priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]