summaryrefslogtreecommitdiff
path: root/gtk/gtkeventcontroller.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-02-18 23:30:16 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-02-21 00:51:03 -0500
commit89c3a7ab24cb16e8b64aa924170d0a38bada8a65 (patch)
treed107e70906f1122b37071db409afb8aa00e2d9b3 /gtk/gtkeventcontroller.h
parent7bb6abb1d4e4616521fbcfe2d080f9b2c96afb0e (diff)
downloadgtk+-89c3a7ab24cb16e8b64aa924170d0a38bada8a65.tar.gz
wip: Add more information to crossing events
Add fields for direct descendents to GtkCrossingData, and populate them when emitting focus change events. Also add accessors for these fields to GtkEventControllerKey, and verify that they are set properly in the focus test. Not done yet: Do the same for pointer crossing events.
Diffstat (limited to 'gtk/gtkeventcontroller.h')
-rw-r--r--gtk/gtkeventcontroller.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/gtkeventcontroller.h b/gtk/gtkeventcontroller.h
index 38569453f1..2cd8167c03 100644
--- a/gtk/gtkeventcontroller.h
+++ b/gtk/gtkeventcontroller.h
@@ -48,10 +48,15 @@ typedef struct _GtkCrossingData GtkCrossingData;
* @direction: whether this is a focus-in or focus-out event
* @mode: the crossing mode
* @old_target: the old target
+ * @old_descendent: the direct child of the receiving widget that
+ * is an ancestor of @old_target, or %NULL if @old_target is not
+ * a descendent of the receiving widget
* @new_target: the new target
+ * @new_descendent: the direct child of the receiving widget that
+ * is an ancestor of @new_target, or %NULL if @new_target is not
+ * a descendent of the receiving widget
*
- * The struct that is passed to gtk_event_controller_handle_crossing()
- * and is also passed to #GtkEventControllerKey::focus-change.
+ * The struct that is passed to gtk_event_controller_handle_crossing().
*
* The @old_target and @new_target fields are set to the old or new
* focus or hover location.
@@ -61,7 +66,9 @@ struct _GtkCrossingData {
GtkCrossingDirection direction;
GdkCrossingMode mode;
GtkWidget *old_target;
+ GtkWidget *old_descendent;
GtkWidget *new_target;
+ GtkWidget *new_descendent;
};
GDK_AVAILABLE_IN_ALL