Details
enum GdkEventType
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_ENTER = 22,
GDK_DRAG_LEAVE = 23,
GDK_DRAG_MOTION = 24,
GDK_DRAG_STATUS = 25,
GDK_DROP_START = 26,
GDK_DROP_FINISHED = 27,
GDK_CLIENT_EVENT = 28,
GDK_VISIBILITY_NOTIFY = 29,
GDK_NO_EXPOSE = 30,
GDK_SCROLL = 31,
GDK_WINDOW_STATE = 32,
GDK_SETTING = 33
} GdkEventType; |
Specifies 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.
enum GdkEventMask
typedef enum
{
GDK_EXPOSURE_MASK = 1 << 1,
GDK_POINTER_MOTION_MASK = 1 << 2,
GDK_POINTER_MOTION_HINT_MASK = 1 << 3,
GDK_BUTTON_MOTION_MASK = 1 << 4,
GDK_BUTTON1_MOTION_MASK = 1 << 5,
GDK_BUTTON2_MOTION_MASK = 1 << 6,
GDK_BUTTON3_MOTION_MASK = 1 << 7,
GDK_BUTTON_PRESS_MASK = 1 << 8,
GDK_BUTTON_RELEASE_MASK = 1 << 9,
GDK_KEY_PRESS_MASK = 1 << 10,
GDK_KEY_RELEASE_MASK = 1 << 11,
GDK_ENTER_NOTIFY_MASK = 1 << 12,
GDK_LEAVE_NOTIFY_MASK = 1 << 13,
GDK_FOCUS_CHANGE_MASK = 1 << 14,
GDK_STRUCTURE_MASK = 1 << 15,
GDK_PROPERTY_CHANGE_MASK = 1 << 16,
GDK_VISIBILITY_NOTIFY_MASK = 1 << 17,
GDK_PROXIMITY_IN_MASK = 1 << 18,
GDK_PROXIMITY_OUT_MASK = 1 << 19,
GDK_SUBSTRUCTURE_MASK = 1 << 20,
GDK_SCROLL_MASK = 1 << 21,
GDK_ALL_EVENTS_MASK = 0x3FFFFE
} GdkEventMask; |
A 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 easily lag behind the position of the mouse. When using the
GDK_POINTER_MOTION_HINT_MASK the server will only send GDK_MOTION_NOTIFY
events when the application asks for them, by calling gdk_window_get_pointer().
GDK_CURRENT_TIME
#define GDK_CURRENT_TIME 0L |
Represents the current time, and can be used anywhere a time is expected.
GDK_PRIORITY_EVENTS
#define GDK_PRIORITY_EVENTS |
This is the priority that events from the X server are given in the
GLib Main Loop.
GDK_PRIORITY_REDRAW
#define GDK_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 20) |
This is the priority that the idle handler processing window updates
is given in the GLib Main Loop.
gdk_events_pending ()
gboolean gdk_events_pending (void); |
Checks if any events are waiting to be processed.
gdk_event_peek ()
Gets a copy of the first GdkEvent in the event queue.
(Note that this function will not get more events from the X server.
It only checks the events that have already been moved to the GDK event queue.)
gdk_event_get ()
Gets the next GdkEvent to be processed, fetching events from the X server if
necessary.
gdk_event_get_graphics_expose ()
Waits for a GraphicsExpose or NoExpose event from the X server.
This is used in the GtkText and GtkCList widgets in GTK+ to make sure any
GraphicsExpose events are handled before the widget is scrolled.
gdk_event_put ()
Appends a copy of the given event onto the front of the event queue.
gdk_event_copy ()
Copies a GdkEvent, copying or incrementing the reference count of the
resources associated with it (e.g. GdkWindow's and strings).
gdk_event_get_state ()
If the event contains a "state" field, puts that field in state. Otherwise
stores an empty state (0). Returns TRUE if there was a state field
in the event. event may be NULL, in which case it's treated
as if the event had no state field.
gdk_event_get_axis ()
Extract the axis value for a particular axis use from
an event structure.
gdk_event_get_coords ()
gboolean gdk_event_get_coords (GdkEvent *event,
gdouble *x_win,
gdouble *y_win); |
Extract the event window relative x/y coordinates from an event.
gdk_event_get_root_coords ()
gboolean gdk_event_get_root_coords (GdkEvent *event,
gdouble *x_root,
gdouble *y_root); |
Extract the root window relative x/y coordinates from an event.
gdk_event_handler_set ()
void gdk_event_handler_set (GdkEventFunc func,
gpointer data,
GDestroyNotify notify); |
Sets the function to call to handle all events from GDK.
Note that GTK+ uses this to install its own event handler, so it is probably
not useful for GTK+ applications.
GdkEventFunc ()
void (*GdkEventFunc) (GdkEvent *event,
gpointer data); |
Specifies the type of function passed to gdk_event_handler_set() to handle
all GDK events.
gdk_event_send_client_message ()
gboolean gdk_event_send_client_message (GdkEvent *event,
guint32 xid); |
Sends an X ClientMessage event to a given window.
This could be used for communicating between different applications,
though the amount of data is limited to 20 bytes.
gdk_event_send_clientmessage_toall ()
void gdk_event_send_clientmessage_toall
(GdkEvent *event); |
Sends an X ClientMessage event to all toplevel windows.
Toplevel windows are determined by checking for the WM_STATE property, as
described in the Inter-Client Communication Conventions Manual (ICCCM).
If no windows are found with the WM_STATE property set, the message is sent
to all children of the root window.
gdk_add_client_message_filter ()
Adds a filter to be called when X ClientMessage events are received.
gdk_get_show_events ()
gboolean gdk_get_show_events (void); |
Returns non-zero if event debugging output is enabled.
gdk_set_show_events ()
void gdk_set_show_events (gboolean show_events); |
Sets whether event debugging information is output.
Note that GTK+ must be compiled with debugging enabled, i.e. using the
--enable-debug configure option.
gdk_setting_get ()
gboolean gdk_setting_get (const gchar *name,
GValue *value); |
Obtains a desktop-wide setting, such as the double-click time.
FIXME needs a list of valid settings here, or a link to
more information.