Events
<!-- ##### SECTION Short_Description ##### -->
-functions for handling events from the window system.
+Functions for handling events from the window system
<!-- ##### SECTION Long_Description ##### -->
<para>
</variablelist>
</para>
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### ENUM GdkEventType ##### -->
<para>
Specifies the type of the event.
@GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
@GDK_NO_EXPOSE: indicates that the source region was completely available
when parts of a drawable were copied. This is not very useful.
-@GDK_SCROLL:
+@GDK_SCROLL: the scroll wheel was turned
+@GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
+for the possible window states
+@GDK_SETTING: a setting has been modified.
+@GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
+ was added in 2.6
+@GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
+ was added in 2.8.
+@GDK_DAMAGE: the content of the window has been changed. This event type
+ was added in 2.14.
+@GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
<!-- ##### ENUM GdkEventMask ##### -->
<para>
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().
-</para>
-
-@GDK_EXPOSURE_MASK:
-@GDK_POINTER_MOTION_MASK:
-@GDK_POINTER_MOTION_HINT_MASK:
-@GDK_BUTTON_MOTION_MASK:
-@GDK_BUTTON1_MOTION_MASK:
-@GDK_BUTTON2_MOTION_MASK:
-@GDK_BUTTON3_MOTION_MASK:
-@GDK_BUTTON_PRESS_MASK:
-@GDK_BUTTON_RELEASE_MASK:
-@GDK_KEY_PRESS_MASK:
-@GDK_KEY_RELEASE_MASK:
-@GDK_ENTER_NOTIFY_MASK:
-@GDK_LEAVE_NOTIFY_MASK:
-@GDK_FOCUS_CHANGE_MASK:
-@GDK_STRUCTURE_MASK:
-@GDK_PROPERTY_CHANGE_MASK:
-@GDK_VISIBILITY_NOTIFY_MASK:
-@GDK_PROXIMITY_IN_MASK:
-@GDK_PROXIMITY_OUT_MASK:
-@GDK_SUBSTRUCTURE_MASK:
-@GDK_SCROLL_MASK:
+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 gdk_event_request_motions().
+</para>
+
+@GDK_EXPOSURE_MASK: receive expose events
+@GDK_POINTER_MOTION_MASK: receive all pointer motion events
+@GDK_POINTER_MOTION_HINT_MASK: see the explanation above
+@GDK_BUTTON_MOTION_MASK: receive pointer motion events while any button is pressed
+@GDK_BUTTON1_MOTION_MASK: receive pointer motion events while 1 button is pressed
+@GDK_BUTTON2_MOTION_MASK: receive pointer motion events while 2 button is pressed
+@GDK_BUTTON3_MOTION_MASK: receive pointer motion events while 3 button is pressed
+@GDK_BUTTON_PRESS_MASK: receive button press events
+@GDK_BUTTON_RELEASE_MASK: receive button release events
+@GDK_KEY_PRESS_MASK: receive key press events
+@GDK_KEY_RELEASE_MASK: receive key release events
+@GDK_ENTER_NOTIFY_MASK: receive window enter events
+@GDK_LEAVE_NOTIFY_MASK: receive window leave events
+@GDK_FOCUS_CHANGE_MASK: receive focus change events
+@GDK_STRUCTURE_MASK: receive events about window configuration change
+@GDK_PROPERTY_CHANGE_MASK: receive property change events
+@GDK_VISIBILITY_NOTIFY_MASK: receive visibility change events
+@GDK_PROXIMITY_IN_MASK: receive proximity in events
+@GDK_PROXIMITY_OUT_MASK: receive proximity out events
+@GDK_SUBSTRUCTURE_MASK: receive events about window configuration changes of
+ child windows
+@GDK_SCROLL_MASK: receive scroll events
@GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
<!-- ##### MACRO GDK_CURRENT_TIME ##### -->
<!-- ##### MACRO GDK_PRIORITY_REDRAW ##### -->
<para>
-
+This is the priority that the idle handler processing window updates
+is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
</para>
<!-- ##### FUNCTION gdk_events_pending ##### -->
<para>
-Checks if any events are waiting to be processed.
</para>
-@Returns: TRUE if any events are pending.
+@void:
+@Returns:
<!-- ##### FUNCTION gdk_event_peek ##### -->
<para>
-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.)
</para>
-@Returns: a copy of the first #GdkEvent on the event queue, or NULL if no
-events are in the queue. The returned #GdkEvent should be freed with
-gdk_event_free().
+@void:
+@Returns:
<!-- ##### FUNCTION gdk_event_get ##### -->
<para>
-Gets the next #GdkEvent to be processed, fetching events from the X server if
-necessary.
</para>
-@Returns: the next #GdkEvent to be processed, or NULL if no events are pending.
-The returned #GdkEvent should be freed with gdk_event_free().
+@void:
+@Returns:
-<!-- ##### FUNCTION gdk_event_get_graphics_expose ##### -->
+<!-- ##### FUNCTION gdk_event_put ##### -->
<para>
-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.
</para>
-@window: the #GdkWindow to wait for the events for.
-@Returns: a #GdkEventExpose if a GraphicsExpose was received, or NULL if a
-NoExpose event was received.
+@event:
-<!-- ##### FUNCTION gdk_event_put ##### -->
+<!-- ##### FUNCTION gdk_event_new ##### -->
<para>
-Appends a copy of the given event onto the front of the event queue.
+
</para>
-@event: a #GdkEvent.
+@type:
+@Returns:
<!-- ##### FUNCTION gdk_event_copy ##### -->
<para>
-Copies a #GdkEvent, copying or incrementing the reference count of the
-resources associated with it (e.g. #GdkWindow's and strings).
</para>
-@event: a #GdkEvent.
-@Returns: a copy of @event. The returned #GdkEvent should be freed with
-gdk_event_free().
+@event:
+@Returns:
<!-- ##### FUNCTION gdk_event_free ##### -->
<para>
-Frees a #GdkEvent, freeing or decrementing any resources associated with it.
-Note that this function should only be called with events returned from
-gdk_event_peek(), gdk_event_get(), gdk_event_get_graphics_expose() and
-gdk_event_copy().
</para>
@event: a #GdkEvent.
<!-- ##### FUNCTION gdk_event_get_time ##### -->
<para>
-Gets the timestamp from a #GdkEvent.
</para>
-@event: a #GdkEvent.
-@Returns: the timestamp from @event, or #GDK_CURRENT_TIME if the event has
-no timestamp.
+@event:
+@Returns:
<!-- ##### FUNCTION gdk_event_get_state ##### -->
@Returns:
-<!-- ##### FUNCTION gdk_event_handler_set ##### -->
+<!-- ##### FUNCTION gdk_event_get_coords ##### -->
+<para>
+
+</para>
+
+@event:
+@x_win:
+@y_win:
+@Returns:
+
+
+<!-- ##### FUNCTION gdk_event_get_root_coords ##### -->
<para>
-Sets the function to call to handle all events from GDK.
+
</para>
+
+@event:
+@x_root:
+@y_root:
+@Returns:
+
+
+<!-- ##### FUNCTION gdk_event_request_motions ##### -->
<para>
-Note that GTK+ uses this to install its own event handler, so it is probably
-not useful for GTK+ applications.
+
</para>
-@func: the function to call to handle events from GDK.
-@data: user data to pass to the function.
-@notify: the function to call when the handler function is removed, i.e. when
-gdk_event_handler_set() is called with another event handler.
+@event:
+
+
+<!-- ##### FUNCTION gdk_event_handler_set ##### -->
+<para>
+</para>
+
+@func:
+@data:
+@notify:
<!-- ##### USER_FUNCTION GdkEventFunc ##### -->
<!-- ##### FUNCTION gdk_event_send_client_message ##### -->
<para>
-Sends an X ClientMessage event to a given window.
</para>
+
+@event:
+@winid:
+@Returns:
+
+
+<!-- ##### FUNCTION gdk_event_send_client_message_for_display ##### -->
<para>
-This could be used for communicating between different applications,
-though the amount of data is limited to 20 bytes.
+
</para>
-@event: the #GdkEvent to send, which should be a #GdkEventClient.
-@xid: the window to send the X ClientMessage event to.
-@Returns: non-zero on success.
+@display:
+@event:
+@winid:
+@Returns:
<!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
<para>
-Sends an X ClientMessage event to all toplevel windows.
-</para>
-<para>
-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.
</para>
-@event: the #GdkEvent to send, which should be a #GdkEventClient.
+@event:
<!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
<para>
-Adds a filter to be called when X ClientMessage events are received.
</para>
-@message_type: the type of ClientMessage events to receive. This will be
-checked against the <structfield>message_type</structfield> field of the
-XClientMessage event struct.
-@func: the function to call to process the event.
-@data: user data to pass to @func.
+@message_type:
+@func:
+@data:
<!-- ##### FUNCTION gdk_get_show_events ##### -->
<para>
-Returns non-zero if event debugging output is enabled.
</para>
-@Returns: non-zero if event debugging output is enabled.
+@void:
+@Returns:
<!-- ##### FUNCTION gdk_set_show_events ##### -->
<para>
-Sets whether event debugging information is output.
-Note that GTK+ must be compiled with debugging enabled, i.e. using the
-'--enable-debug' configure option.
</para>
-@show_events: TRUE to output event debugging information.
+@show_events:
+
+
+<!-- ##### FUNCTION gdk_event_set_screen ##### -->
+<para>
+
+</para>
+
+@event:
+@screen:
+
+
+<!-- ##### FUNCTION gdk_event_get_screen ##### -->
+<para>
+
+</para>
+
+@event:
+@Returns:
+
+
+<!-- ##### FUNCTION gdk_setting_get ##### -->
+<para>
+</para>
+
+@name:
+@value:
+@Returns: