summaryrefslogtreecommitdiff
path: root/gdk/gdkeventsprivate.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-02-17 22:11:56 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-02-21 00:51:03 -0500
commitb1eaa502dfda1dd727e938ce710c3861f1cad8fe (patch)
tree3cb71e60ccf5c6fdae527c9c4ef2e9bee8f0cd15 /gdk/gdkeventsprivate.h
parentf1cf0eb3fc95c94d5594aa700cbcb12bc32ebc43 (diff)
downloadgtk+-b1eaa502dfda1dd727e938ce710c3861f1cad8fe.tar.gz
events: reorganize getters
Restructure the getters for event fields to be more targeted at particular event types. Update all callers, and replace all direct event struct access with getters. As a side-effect, this drops some unused getters.
Diffstat (limited to 'gdk/gdkeventsprivate.h')
-rw-r--r--gdk/gdkeventsprivate.h50
1 files changed, 2 insertions, 48 deletions
diff --git a/gdk/gdkeventsprivate.h b/gdk/gdkeventsprivate.h
index cb2cfea839..c8006961c2 100644
--- a/gdk/gdkeventsprivate.h
+++ b/gdk/gdkeventsprivate.h
@@ -521,55 +521,9 @@ struct _GdkEventPadGroupMode {
/*
* GdkEvent:
- * @type: the #GdkEventType
- * @any: a #GdkEventAny
- * @motion: a #GdkEventMotion
- * @button: a #GdkEventButton
- * @touch: a #GdkEventTouch
- * @scroll: a #GdkEventScroll
- * @key: a #GdkEventKey
- * @crossing: a #GdkEventCrossing
- * @focus_change: a #GdkEventFocus
- * @configure: a #GdkEventConfigure
- * @proximity: a #GdkEventProximity
- * @dnd: a #GdkEventDND
- * @grab_broken: a #GdkEventGrabBroken
- * @touchpad_swipe: a #GdkEventTouchpadSwipe
- * @touchpad_pinch: a #GdkEventTouchpadPinch
- * @pad_button: a #GdkEventPadButton
- * @pad_axis: a #GdkEventPadAxis
- * @pad_group_mode: a #GdkEventPadGroupMode
*
- * A #GdkEvent contains a union of all of the event types,
- * and allows access to the data fields in a number of ways.
- *
- * The event type is always the first field in all of the event types, and
- * can always be accessed with the following code, no matter what type of
- * event it is:
- * |[<!-- language="C" -->
- * GdkEvent *event;
- * GdkEventType type;
- *
- * type = event->type;
- * ]|
- *
- * To access other fields of the event, the pointer to the event
- * can be cast to the appropriate event type, or the union member
- * name can be used. For example if the event type is %GDK_BUTTON_PRESS
- * then the x coordinate of the button press can be accessed with:
- * |[<!-- language="C" -->
- * GdkEvent *event;
- * gdouble x;
- *
- * x = ((GdkEventButton*)event)->x;
- * ]|
- * or:
- * |[<!-- language="C" -->
- * GdkEvent *event;
- * gdouble x;
- *
- * x = event->button.x;
- * ]|
+ * The GdkEvent struct is private and should only be accessed
+ * using the accessor functions.
*/
union _GdkEvent
{