GdkEvent

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:

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.types.EventType.ButtonPress then the x coordinate of the button press can be accessed with:

GdkEvent *event;
gdouble x;

x = ((GdkEventButton*)event)->x;

or:

GdkEvent *event;
gdouble x;

x = event->button.x;

Members

Variables

any
GdkEventAny any;

a #GdkEventAny

button
GdkEventButton button;

a #GdkEventButton

configure
GdkEventConfigure configure;

a #GdkEventConfigure

crossing
GdkEventCrossing crossing;

a #GdkEventCrossing

dnd
GdkEventDND dnd;

a #GdkEventDND

expose
GdkEventExpose expose;

a #GdkEventExpose

focusChange
GdkEventFocus focusChange;

a #GdkEventFocus

grabBroken
GdkEventGrabBroken grabBroken;

a #GdkEventGrabBroken

key
GdkEventKey key;

a #GdkEventKey

motion
GdkEventMotion motion;

a #GdkEventMotion

ownerChange
GdkEventOwnerChange ownerChange;

a #GdkEventOwnerChange

padAxis
GdkEventPadAxis padAxis;

a #GdkEventPadAxis

padButton
GdkEventPadButton padButton;

a #GdkEventPadButton

padGroupMode
GdkEventPadGroupMode padGroupMode;

a #GdkEventPadGroupMode

property
GdkEventProperty property;

a #GdkEventProperty

proximity
GdkEventProximity proximity;

a #GdkEventProximity

scroll
GdkEventScroll scroll;

a #GdkEventScroll

selection
GdkEventSelection selection;

a #GdkEventSelection

setting
GdkEventSetting setting;

a #GdkEventSetting

touch
GdkEventTouch touch;

a #GdkEventTouch

touchpadPinch
GdkEventTouchpadPinch touchpadPinch;

a #GdkEventTouchpadPinch

touchpadSwipe
GdkEventTouchpadSwipe touchpadSwipe;

a #GdkEventTouchpadSwipe

type
GdkEventType type;

the #GdkEventType

visibility
GdkEventVisibility visibility;

a #GdkEventVisibility

windowState
GdkEventWindowState windowState;

a #GdkEventWindowState