The following data types are passed into event handlers by GTK+. For each data type listed, the signals that use this data type are listed.
GdkEvent
GdkEventAny
GdkEventExpose
GdkEventMotion
GdkEventButton
GdkEventKey
GdkEventCrossing
GdkEventFocus
GdkEventConfigure
GdkEventProperty
GdkEventSelection
GdkEventProximity
GdkEventDragBegin
GdkEventDragRequest
GdkEventDropEnter
GdkEventDropLeave
GdkEventDropDataAvailable
GdkEventClient
GdkEventOther
The data type GdkEventType is a special data type that is used by all the other data types as an indicator of the data type being passed to the signal handler. As you will see below, each of the event data structures has a member of this type. It is defined as an enumeration type as follows:
typedef enum { GDK_NOTHING = -1, GDK_DELETE = 0, GDK_DESTROY = 1, GDK_EXPOSE = 2, GDK_MOTION_NOTIFY = 3, GDK_BUTTON_PRESS = 4, GDK_2BUTTON_PRESS = 5, GDK_3BUTTON_PRESS = 6, GDK_BUTTON_RELEASE = 7, GDK_KEY_PRESS = 8, GDK_KEY_RELEASE = 9, GDK_ENTER_NOTIFY = 10, GDK_LEAVE_NOTIFY = 11, GDK_FOCUS_CHANGE = 12, GDK_CONFIGURE = 13, GDK_MAP = 14, GDK_UNMAP = 15, GDK_PROPERTY_NOTIFY = 16, GDK_SELECTION_CLEAR = 17, GDK_SELECTION_REQUEST = 18, GDK_SELECTION_NOTIFY = 19, GDK_PROXIMITY_IN = 20, GDK_PROXIMITY_OUT = 21, GDK_DRAG_BEGIN = 22, GDK_DRAG_REQUEST = 23, GDK_DROP_ENTER = 24, GDK_DROP_LEAVE = 25, GDK_DROP_DATA_AVAIL = 26, GDK_CLIENT_EVENT = 27, GDK_VISIBILITY_NOTIFY = 28, GDK_NO_EXPOSE = 29, GDK_OTHER_EVENT = 9999 /* Deprecated, use filters instead */ } GdkEventType; |
The other event type that is different from the others is Gtk2::Gdk::Event itself. This is a union of all the other data types, which allows it to be cast to a specific event data type within a signal handler.