1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
Events
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2002-11-23 23:02:10 +00:00
|
|
|
Functions for handling events from the window system
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
This section describes functions dealing with events from the window system.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
In GTK+ applications the events are handled automatically in
|
|
|
|
gtk_main_do_event() and passed on to the appropriate widgets, so these
|
|
|
|
functions are rarely needed. Though some of the fields in the
|
|
|
|
<link linkend="gdk-Event-Structures">Event Structures</link> are useful.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><link linkend="gdk-Event-Structures">Event Structures</link></term>
|
|
|
|
<listitem><para>
|
|
|
|
The structs used for each type of event.
|
|
|
|
</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-05-08 05:48:45 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### ENUM GdkEventType ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Specifies the type of the event.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
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.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@GDK_NOTHING: a special code to indicate a null event.
|
|
|
|
@GDK_DELETE: the 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.
|
|
|
|
@GDK_DESTROY: the window has been destroyed.
|
|
|
|
@GDK_EXPOSE: all or part of the window has become visible and needs to be
|
|
|
|
redrawn.
|
|
|
|
@GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
|
|
|
|
@GDK_BUTTON_PRESS: a mouse button has been pressed.
|
|
|
|
@GDK_2BUTTON_PRESS: a 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.
|
|
|
|
@GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period
|
|
|
|
of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
|
|
|
|
@GDK_BUTTON_RELEASE: a mouse button has been released.
|
|
|
|
@GDK_KEY_PRESS: a key has been pressed.
|
|
|
|
@GDK_KEY_RELEASE: a key has been released.
|
|
|
|
@GDK_ENTER_NOTIFY: the pointer has entered the window.
|
|
|
|
@GDK_LEAVE_NOTIFY: the pointer has left the window.
|
2000-02-02 03:23:11 +00:00
|
|
|
@GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
|
2000-02-01 04:27:56 +00:00
|
|
|
@GDK_CONFIGURE: the size, position or stacking order of the window has changed.
|
|
|
|
Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
|
|
|
|
@GDK_MAP: the window has been mapped.
|
|
|
|
@GDK_UNMAP: the window has been unmapped.
|
|
|
|
@GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted.
|
|
|
|
@GDK_SELECTION_CLEAR: the application has lost ownership of a selection.
|
|
|
|
@GDK_SELECTION_REQUEST: another application has requested a selection.
|
|
|
|
@GDK_SELECTION_NOTIFY: a selection has been received.
|
|
|
|
@GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
|
|
|
|
surface (e.g. a touchscreen or graphics tablet).
|
|
|
|
@GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
|
|
|
|
surface.
|
|
|
|
@GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress.
|
|
|
|
@GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress.
|
|
|
|
@GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in
|
|
|
|
progress.
|
|
|
|
@GDK_DRAG_STATUS: the status of the drag operation initiated by the window
|
|
|
|
has changed.
|
|
|
|
@GDK_DROP_START: a drop operation onto the window has started.
|
|
|
|
@GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
|
|
|
|
@GDK_CLIENT_EVENT: a message has been received from another application.
|
|
|
|
@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.
|
2005-05-08 05:48:45 +00:00
|
|
|
@GDK_SCROLL: the scroll wheel was turned
|
|
|
|
@GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
|
|
|
|
for the possible window states
|
2005-06-20 22:06:27 +00:00
|
|
|
@GDK_SETTING: a setting has been modified.
|
2005-02-02 06:24:17 +00:00
|
|
|
@GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
|
|
|
|
was added in 2.6
|
2005-06-25 07:10:40 +00:00
|
|
|
@GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
|
|
|
|
was added in 2.8.
|
2008-07-04 21:52:54 +00:00
|
|
|
@GDK_DAMAGE: the content of the window has been changed. This event type
|
|
|
|
was added in 2.14.
|
2009-07-03 19:35:41 +00:00
|
|
|
@GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### ENUM GdkEventMask ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
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.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
%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),
|
2007-07-03 22:59:06 +00:00
|
|
|
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().
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-06-30 03:21:25 +00:00
|
|
|
@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
|
2005-07-01 19:24:05 +00:00
|
|
|
@GDK_PROXIMITY_IN_MASK: receive proximity in events
|
2005-06-30 03:21:25 +00:00
|
|
|
@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
|
2000-02-01 04:27:56 +00:00
|
|
|
@GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### MACRO GDK_CURRENT_TIME ##### -->
|
|
|
|
<para>
|
|
|
|
Represents the current time, and can be used anywhere a time is expected.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GDK_PRIORITY_EVENTS ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
This is the priority that events from the X server are given in the
|
|
|
|
<link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
|
2000-09-07 18:17:06 +00:00
|
|
|
<!-- ##### MACRO GDK_PRIORITY_REDRAW ##### -->
|
|
|
|
<para>
|
2001-10-07 18:59:46 +00:00
|
|
|
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>.
|
2000-09-07 18:17:06 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_events_pending ##### -->
|
|
|
|
<para>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_event_peek ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@Returns:
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_event_get ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_event_put ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@event:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
<!-- ##### FUNCTION gdk_event_new ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@type:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gdk_event_copy ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@event:
|
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_event_free ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@event: a #GdkEvent.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_event_get_time ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@event:
|
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2001-02-20 05:21:44 +00:00
|
|
|
<!-- ##### FUNCTION gdk_event_get_state ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event:
|
|
|
|
@state:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-09-07 18:17:06 +00:00
|
|
|
<!-- ##### FUNCTION gdk_event_get_axis ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event:
|
|
|
|
@axis_use:
|
|
|
|
@value:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-10-03 18:19:48 +00:00
|
|
|
<!-- ##### FUNCTION gdk_event_get_coords ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event:
|
|
|
|
@x_win:
|
|
|
|
@y_win:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_event_get_root_coords ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event:
|
|
|
|
@x_root:
|
|
|
|
@y_root:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2007-06-04 17:01:14 +00:00
|
|
|
<!-- ##### FUNCTION gdk_event_request_motions ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gdk_event_handler_set ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@func:
|
|
|
|
@data:
|
|
|
|
@notify:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
|
|
|
|
<!-- ##### USER_FUNCTION GdkEventFunc ##### -->
|
|
|
|
<para>
|
|
|
|
Specifies the type of function passed to gdk_event_handler_set() to handle
|
|
|
|
all GDK events.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@event: the #GdkEvent to process.
|
|
|
|
@data: user data set when the event handler was installed with
|
|
|
|
gdk_event_handler_set().
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_event_send_client_message ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@event:
|
2002-09-28 20:03:56 +00:00
|
|
|
@winid:
|
2002-04-30 18:07:51 +00:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_event_send_client_message_for_display ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@display:
|
|
|
|
@event:
|
2002-09-28 20:03:56 +00:00
|
|
|
@winid:
|
2002-04-30 18:07:51 +00:00
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@event:
|
2000-02-01 04:27:56 +00:00
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
|
|
|
|
<para>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2002-04-26 02:39:49 +00:00
|
|
|
@message_type:
|
2002-04-30 18:07:51 +00:00
|
|
|
@func:
|
|
|
|
@data:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_get_show_events ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
</para>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@Returns:
|
2000-02-01 04:27:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_set_show_events ##### -->
|
|
|
|
<para>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@show_events:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
<!-- ##### FUNCTION gdk_event_set_screen ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event:
|
|
|
|
@screen:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_event_get_screen ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-04-17 18:12:46 +00:00
|
|
|
<!-- ##### FUNCTION gdk_setting_get ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-04-30 18:07:51 +00:00
|
|
|
@name:
|
|
|
|
@value:
|
|
|
|
@Returns:
|
2001-04-17 18:12:46 +00:00
|
|
|
|
|
|
|
|