Events
Functions for handling events from the window system
gdkEventsPending()gdkEventPeek()gdkEventGet()gdkEventGetGraphicsExpose(window)gdkEventPut(object)gdkEventNew(type)gdkEventCopy(object)gdkEventGetTime(object)gdkEventGetState(object)gdkEventGetAxis(object, axis.use)gdkEventGetCoords(object)gdkEventGetRootCoords(object)gdkEventRequestMotions(event)gdkEventHandlerSet(func, data)gdkAddClientMessageFilter(message.type, func, data)gdkGetShowEvents()gdkSetShowEvents(show.events)gdkEventSetScreen(object, screen)gdkEventGetScreen(object)gdkSettingGet(name)
This section describes functions dealing with events from the window system.
In GTK+ applications the events are handled automatically in
gtkMainDoEvent and passed on to the appropriate widgets, so these
functions are rarely needed. Though some of the fields in the
Event Structures are useful.
GdkEventTypeSpecifies the type of the event.
Do not confuse these events with the signals that GTK+ widgets emit. Although many of these events result in corresponding signals being emitted, the events are often transformed or filtered along the way.
nothinga special code to indicate a null event.
deletethe window manager has requested that the toplevel window be hidden or destroyed, usually when the user clicks on a special icon in the title bar.
destroythe window has been destroyed.
exposeall or part of the window has become visible and needs to be redrawn.
motion-notifythe pointer (usually a mouse) has moved.
button-pressa mouse button has been pressed.
2button-pressa mouse button has been double-clicked (clicked twice
within a short period of time). Note that each click also generates a
GDK_BUTTON_PRESS event.
3button-pressa mouse button has been clicked 3 times in a short period
of time. Note that each click also generates a GDK_BUTTON_PRESS event.
button-releasea mouse button has been released.
key-pressa key has been pressed.
key-releasea key has been released.
enter-notifythe pointer has entered the window.
leave-notifythe pointer has left the window.
focus-changethe keyboard focus has entered or left the window.
configurethe size, position or stacking order of the window has changed.
Note that GTK+ discards these events for GDK_WINDOW_CHILD windows.
mapthe window has been mapped.
unmapthe window has been unmapped.
property-notifya property on the window has been changed or deleted.
selection-clearthe application has lost ownership of a selection.
selection-requestanother application has requested a selection.
selection-notifya selection has been received.
proximity-inan input device has moved into contact with a sensing surface (e.g. a touchscreen or graphics tablet).
proximity-outan input device has moved out of contact with a sensing surface.
drag-enterthe mouse has entered the window while a drag is in progress.
drag-leavethe mouse has left the window while a drag is in progress.
drag-motionthe mouse has moved in the window while a drag is in progress.
drag-statusthe status of the drag operation initiated by the window has changed.
drop-starta drop operation onto the window has started.
drop-finishedthe drop operation initiated by the window has completed.
client-eventa message has been received from another application.
visibility-notifythe window visibility status has changed.
no-exposeindicates that the source region was completely available when parts of a drawable were copied. This is not very useful.
scrollthe scroll wheel was turned
window-statethe state of a window has changed. See GdkWindowState
for the possible window states
settinga setting has been modified.
owner-changethe owner of a selection has changed. This event type was added in 2.6
grab-brokena pointer or keyboard grab was broken. This event type was added in 2.8.
gdk-damagethe content of the window has been changed. This event type was added in 2.14.
GdkEventMaskA set of bit-flags to indicate which events a window is to receive.
Most of these masks map onto one or more of the GdkEventType event types
above.
GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the
number of GDK_MOTION_NOTIFY events received. Normally a GDK_MOTION_NOTIFY
event is received each time the mouse moves. However, if the application
spends a lot of time processing the event (updating the display, for example),
it can lag behind the position of the mouse. When using
GDK_POINTER_MOTION_HINT_MASK, fewer GDK_MOTION_NOTIFY events will be sent,
some of which are marked as a hint (the is_hint member is TRUE).
To receive more motion events after a motion hint event, the application
needs to asks for more, by calling gdkEventRequestMotions.
exposure-maskreceive expose events
pointer-motion-maskreceive all pointer motion events
pointer-motion-hint-masksee the explanation above
button-motion-maskreceive pointer motion events while any button is pressed
button1-motion-maskreceive pointer motion events while 1 button is pressed
button2-motion-maskreceive pointer motion events while 2 button is pressed
button3-motion-maskreceive pointer motion events while 3 button is pressed
button-press-maskreceive button press events
button-release-maskreceive button release events
key-press-maskreceive key press events
key-release-maskreceive key release events
enter-notify-maskreceive window enter events
leave-notify-maskreceive window leave events
focus-change-maskreceive focus change events
structure-maskreceive events about window configuration change
property-change-maskreceive property change events
visibility-notify-maskreceive visibility change events
proximity-in-maskreceive proximity in events
proximity-out-maskreceive proximity out events
substructure-maskreceive events about window configuration changes of child windows
scroll-maskreceive scroll events
all-events-maskthe combination of all the above event masks.
GdkEventFunc(event, data)Specifies the type of function passed to gdkEventHandlerSet to handle
all GDK events.
eventthe GdkEvent to process.
datauser data set when the event handler was installed with
gdkEventHandlerSet.
Derived by RGtkGen from GTK+ documentation
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.