<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Events</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GDK 2 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk2-Windows.html" title="Windows">
<link rel="next" href="gdk2-Event-Structures.html" title="Event Structures">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk2-Windows.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK 2 Reference Manual</th>
<td><a accesskey="n" href="gdk2-Event-Structures.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gdk2-Events.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gdk2-Events.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gdk2-Events"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk2-Events.top_of_page"></a>Events</span></h2>
<p>Events — Functions for handling events from the window system</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gdk2-Events.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gdk/gdk.h&gt;

enum                <a class="link" href="gdk2-Events.html#GdkEventType" title="enum GdkEventType">GdkEventType</a>;
enum                <a class="link" href="gdk2-Events.html#GdkEventMask" title="enum GdkEventMask">GdkEventMask</a>;
#define             <a class="link" href="gdk2-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME">GDK_CURRENT_TIME</a>
#define             <a class="link" href="gdk2-Events.html#GDK-PRIORITY-EVENTS:CAPS" title="GDK_PRIORITY_EVENTS">GDK_PRIORITY_EVENTS</a>
#define             <a class="link" href="gdk2-Events.html#GDK-PRIORITY-REDRAW:CAPS" title="GDK_PRIORITY_REDRAW">GDK_PRIORITY_REDRAW</a>

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk2-Events.html#gdk-events-pending" title="gdk_events_pending ()">gdk_events_pending</a>                  (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          <a class="link" href="gdk2-Events.html#gdk-event-peek" title="gdk_event_peek ()">gdk_event_peek</a>                      (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          <a class="link" href="gdk2-Events.html#gdk-event-get" title="gdk_event_get ()">gdk_event_get</a>                       (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          <a class="link" href="gdk2-Events.html#gdk-event-get-graphics-expose" title="gdk_event_get_graphics_expose ()">gdk_event_get_graphics_expose</a>       (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Events.html#gdk-event-put" title="gdk_event_put ()">gdk_event_put</a>                       (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          <a class="link" href="gdk2-Events.html#gdk-event-new" title="gdk_event_new ()">gdk_event_new</a>                       (<em class="parameter"><code><a class="link" href="gdk2-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> type</code></em>);
<a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          <a class="link" href="gdk2-Events.html#gdk-event-copy" title="gdk_event_copy ()">gdk_event_copy</a>                      (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Events.html#gdk-event-free" title="gdk_event_free ()">gdk_event_free</a>                      (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             <a class="link" href="gdk2-Events.html#gdk-event-get-time" title="gdk_event_get_time ()">gdk_event_get_time</a>                  (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk2-Events.html#gdk-event-get-state" title="gdk_event_get_state ()">gdk_event_get_state</a>                 (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *state</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk2-Events.html#gdk-event-get-axis" title="gdk_event_get_axis ()">gdk_event_get_axis</a>                  (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Input-Devices.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> axis_use</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk2-Events.html#gdk-event-get-coords" title="gdk_event_get_coords ()">gdk_event_get_coords</a>                (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_win</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_win</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk2-Events.html#gdk-event-get-root-coords" title="gdk_event_get_root_coords ()">gdk_event_get_root_coords</a>           (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_root</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_root</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Events.html#gdk-event-request-motions" title="gdk_event_request_motions ()">gdk_event_request_motions</a>           (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEventMotion" title="struct GdkEventMotion"><span class="type">GdkEventMotion</span></a> *event</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="gdk2-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()">gdk_event_handler_set</a>               (<em class="parameter"><code><a class="link" href="gdk2-Events.html#GdkEventFunc" title="GdkEventFunc ()"><span class="type">GdkEventFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="gdk2-Events.html#GdkEventFunc" title="GdkEventFunc ()">*GdkEventFunc</a>)                     (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk2-Events.html#gdk-event-send-client-message" title="gdk_event_send_client_message ()">gdk_event_send_client_message</a>       (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> winid</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk2-Events.html#gdk-event-send-client-message-for-display" title="gdk_event_send_client_message_for_display ()">gdk_event_send_client_message_for_display</a>
                                                        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> winid</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Events.html#gdk-event-send-clientmessage-toall" title="gdk_event_send_clientmessage_toall ()">gdk_event_send_clientmessage_toall</a>  (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Events.html#gdk-add-client-message-filter" title="gdk_add_client_message_filter ()">gdk_add_client_message_filter</a>       (<em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> message_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkFilterFunc" title="GdkFilterFunc ()"><span class="type">GdkFilterFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk2-Events.html#gdk-get-show-events" title="gdk_get_show_events ()">gdk_get_show_events</a>                 (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Events.html#gdk-set-show-events" title="gdk_set_show_events ()">gdk_set_show_events</a>                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_events</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Events.html#gdk-event-set-screen" title="gdk_event_set_screen ()">gdk_event_set_screen</a>                (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>);
<a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         <a class="link" href="gdk2-Events.html#gdk-event-get-screen" title="gdk_event_get_screen ()">gdk_event_get_screen</a>                (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk2-Events.html#gdk-setting-get" title="gdk_setting_get ()">gdk_setting_get</a>                     (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gdk2-Events.description"></a><h2>Description</h2>
<p>
This section describes functions dealing with events from the window system.
</p>
<p>
In GTK+ applications the events are handled automatically in
<a href="http://developer.gnome.org/gtk2/gtk3-General.html#gtk-main-do-event"><code class="function">gtk_main_do_event()</code></a> and passed on to the appropriate widgets, so these
functions are rarely needed. Though some of the fields in the
Event Structures are useful.
</p>
</div>
<div class="refsect1">
<a name="gdk2-Events.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GdkEventType"></a><h3>enum GdkEventType</h3>
<pre class="programlisting">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,
  GDK_OWNER_CHANGE      = 34,
  GDK_GRAB_BROKEN       = 35,
  GDK_DAMAGE            = 36,
  GDK_EVENT_LAST        /* helper variable for decls */
} GdkEventType;
</pre>
<p>
Specifies the type of the event.
</p>
<p>
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.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="GDK-NOTHING:CAPS"></a><span class="term"><code class="literal">GDK_NOTHING</code></span></p></td>
<td>a special code to indicate a null event.
</td>
</tr>
<tr>
<td><p><a name="GDK-DELETE:CAPS"></a><span class="term"><code class="literal">GDK_DELETE</code></span></p></td>
<td>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.
</td>
</tr>
<tr>
<td><p><a name="GDK-DESTROY:CAPS"></a><span class="term"><code class="literal">GDK_DESTROY</code></span></p></td>
<td>the window has been destroyed.
</td>
</tr>
<tr>
<td><p><a name="GDK-EXPOSE:CAPS"></a><span class="term"><code class="literal">GDK_EXPOSE</code></span></p></td>
<td>all or part of the window has become visible and needs to be
redrawn.
</td>
</tr>
<tr>
<td><p><a name="GDK-MOTION-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_MOTION_NOTIFY</code></span></p></td>
<td>the pointer (usually a mouse) has moved.
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_PRESS</code></span></p></td>
<td>a mouse button has been pressed.
</td>
</tr>
<tr>
<td><p><a name="GDK-2BUTTON-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_2BUTTON_PRESS</code></span></p></td>
<td>a mouse button has been double-clicked (clicked twice
within a short period of time). Note that each click also generates a
<a class="link" href="gdk2-Events.html#GDK-BUTTON-PRESS:CAPS"><code class="literal">GDK_BUTTON_PRESS</code></a> event.
</td>
</tr>
<tr>
<td><p><a name="GDK-3BUTTON-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_3BUTTON_PRESS</code></span></p></td>
<td>a mouse button has been clicked 3 times in a short period
of time. Note that each click also generates a <a class="link" href="gdk2-Events.html#GDK-BUTTON-PRESS:CAPS"><code class="literal">GDK_BUTTON_PRESS</code></a> event.
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-RELEASE:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_RELEASE</code></span></p></td>
<td>a mouse button has been released.
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_KEY_PRESS</code></span></p></td>
<td>a key has been pressed.
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-RELEASE:CAPS"></a><span class="term"><code class="literal">GDK_KEY_RELEASE</code></span></p></td>
<td>a key has been released.
</td>
</tr>
<tr>
<td><p><a name="GDK-ENTER-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_ENTER_NOTIFY</code></span></p></td>
<td>the pointer has entered the window.
</td>
</tr>
<tr>
<td><p><a name="GDK-LEAVE-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_LEAVE_NOTIFY</code></span></p></td>
<td>the pointer has left the window.
</td>
</tr>
<tr>
<td><p><a name="GDK-FOCUS-CHANGE:CAPS"></a><span class="term"><code class="literal">GDK_FOCUS_CHANGE</code></span></p></td>
<td>the keyboard focus has entered or left the window.
</td>
</tr>
<tr>
<td><p><a name="GDK-CONFIGURE:CAPS"></a><span class="term"><code class="literal">GDK_CONFIGURE</code></span></p></td>
<td>the size, position or stacking order of the window has changed.
Note that GTK+ discards these events for <a class="link" href="gdk2-Windows.html#GDK-WINDOW-CHILD:CAPS"><code class="literal">GDK_WINDOW_CHILD</code></a> windows.
</td>
</tr>
<tr>
<td><p><a name="GDK-MAP:CAPS"></a><span class="term"><code class="literal">GDK_MAP</code></span></p></td>
<td>the window has been mapped.
</td>
</tr>
<tr>
<td><p><a name="GDK-UNMAP:CAPS"></a><span class="term"><code class="literal">GDK_UNMAP</code></span></p></td>
<td>the window has been unmapped.
</td>
</tr>
<tr>
<td><p><a name="GDK-PROPERTY-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_PROPERTY_NOTIFY</code></span></p></td>
<td>a property on the window has been changed or deleted.
</td>
</tr>
<tr>
<td><p><a name="GDK-SELECTION-CLEAR:CAPS"></a><span class="term"><code class="literal">GDK_SELECTION_CLEAR</code></span></p></td>
<td>the application has lost ownership of a selection.
</td>
</tr>
<tr>
<td><p><a name="GDK-SELECTION-REQUEST:CAPS"></a><span class="term"><code class="literal">GDK_SELECTION_REQUEST</code></span></p></td>
<td>another application has requested a selection.
</td>
</tr>
<tr>
<td><p><a name="GDK-SELECTION-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_SELECTION_NOTIFY</code></span></p></td>
<td>a selection has been received.
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-IN:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_IN</code></span></p></td>
<td>an input device has moved into contact with a sensing
surface (e.g. a touchscreen or graphics tablet).
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-OUT:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_OUT</code></span></p></td>
<td>an input device has moved out of contact with a sensing
surface.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-ENTER:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_ENTER</code></span></p></td>
<td>the mouse has entered the window while a drag is in progress.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-LEAVE:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_LEAVE</code></span></p></td>
<td>the mouse has left the window while a drag is in progress.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-MOTION:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_MOTION</code></span></p></td>
<td>the mouse has moved in the window while a drag is in
progress.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-STATUS:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_STATUS</code></span></p></td>
<td>the status of the drag operation initiated by the window
has changed.
</td>
</tr>
<tr>
<td><p><a name="GDK-DROP-START:CAPS"></a><span class="term"><code class="literal">GDK_DROP_START</code></span></p></td>
<td>a drop operation onto the window has started.
</td>
</tr>
<tr>
<td><p><a name="GDK-DROP-FINISHED:CAPS"></a><span class="term"><code class="literal">GDK_DROP_FINISHED</code></span></p></td>
<td>the drop operation initiated by the window has completed.
</td>
</tr>
<tr>
<td><p><a name="GDK-CLIENT-EVENT:CAPS"></a><span class="term"><code class="literal">GDK_CLIENT_EVENT</code></span></p></td>
<td>a message has been received from another application.
</td>
</tr>
<tr>
<td><p><a name="GDK-VISIBILITY-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_VISIBILITY_NOTIFY</code></span></p></td>
<td>the window visibility status has changed.
</td>
</tr>
<tr>
<td><p><a name="GDK-NO-EXPOSE:CAPS"></a><span class="term"><code class="literal">GDK_NO_EXPOSE</code></span></p></td>
<td>indicates that the source region was completely available
when parts of a drawable were copied. This is not very useful.
</td>
</tr>
<tr>
<td><p><a name="GDK-SCROLL:CAPS"></a><span class="term"><code class="literal">GDK_SCROLL</code></span></p></td>
<td>the scroll wheel was turned
</td>
</tr>
<tr>
<td><p><a name="GDK-WINDOW-STATE:CAPS"></a><span class="term"><code class="literal">GDK_WINDOW_STATE</code></span></p></td>
<td>the state of a window has changed. See <a class="link" href="gdk2-Event-Structures.html#GdkWindowState" title="enum GdkWindowState"><span class="type">GdkWindowState</span></a>
for the possible window states
</td>
</tr>
<tr>
<td><p><a name="GDK-SETTING:CAPS"></a><span class="term"><code class="literal">GDK_SETTING</code></span></p></td>
<td>a setting has been modified.
</td>
</tr>
<tr>
<td><p><a name="GDK-OWNER-CHANGE:CAPS"></a><span class="term"><code class="literal">GDK_OWNER_CHANGE</code></span></p></td>
<td>the owner of a selection has changed. This event type
  was added in 2.6
</td>
</tr>
<tr>
<td><p><a name="GDK-GRAB-BROKEN:CAPS"></a><span class="term"><code class="literal">GDK_GRAB_BROKEN</code></span></p></td>
<td>a pointer or keyboard grab was broken. This event type
  was added in 2.8.
</td>
</tr>
<tr>
<td><p><a name="GDK-DAMAGE:CAPS"></a><span class="term"><code class="literal">GDK_DAMAGE</code></span></p></td>
<td>the content of the window has been changed. This event type
  was added in 2.14.
</td>
</tr>
<tr>
<td><p><a name="GDK-EVENT-LAST:CAPS"></a><span class="term"><code class="literal">GDK_EVENT_LAST</code></span></p></td>
<td>marks the end of the GdkEventType enumeration. Added in 2.18
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkEventMask"></a><h3>enum GdkEventMask</h3>
<pre class="programlisting">typedef enum {
  GDK_EXPOSURE_MASK		= 1 &lt;&lt; 1,
  GDK_POINTER_MOTION_MASK = 1 &lt;&lt; 2,
  GDK_POINTER_MOTION_HINT_MASK = 1 &lt;&lt; 3,
  GDK_BUTTON_MOTION_MASK = 1 &lt;&lt; 4,
  GDK_BUTTON1_MOTION_MASK = 1 &lt;&lt; 5,
  GDK_BUTTON2_MOTION_MASK = 1 &lt;&lt; 6,
  GDK_BUTTON3_MOTION_MASK = 1 &lt;&lt; 7,
  GDK_BUTTON_PRESS_MASK		= 1 &lt;&lt; 8,
  GDK_BUTTON_RELEASE_MASK = 1 &lt;&lt; 9,
  GDK_KEY_PRESS_MASK		= 1 &lt;&lt; 10,
  GDK_KEY_RELEASE_MASK		= 1 &lt;&lt; 11,
  GDK_ENTER_NOTIFY_MASK		= 1 &lt;&lt; 12,
  GDK_LEAVE_NOTIFY_MASK		= 1 &lt;&lt; 13,
  GDK_FOCUS_CHANGE_MASK		= 1 &lt;&lt; 14,
  GDK_STRUCTURE_MASK		= 1 &lt;&lt; 15,
  GDK_PROPERTY_CHANGE_MASK = 1 &lt;&lt; 16,
  GDK_VISIBILITY_NOTIFY_MASK = 1 &lt;&lt; 17,
  GDK_PROXIMITY_IN_MASK		= 1 &lt;&lt; 18,
  GDK_PROXIMITY_OUT_MASK = 1 &lt;&lt; 19,
  GDK_SUBSTRUCTURE_MASK		= 1 &lt;&lt; 20,
  GDK_SCROLL_MASK               = 1 &lt;&lt; 21,
  GDK_ALL_EVENTS_MASK		= 0x3FFFFE
} GdkEventMask;
</pre>
<p>
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 <a class="link" href="gdk2-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> event types
above.
</p>
<p>
<a class="link" href="gdk2-Events.html#GDK-POINTER-MOTION-HINT-MASK:CAPS"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></a> is a special mask which is used to reduce the
number of <a class="link" href="gdk2-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a> events received. Normally a <a class="link" href="gdk2-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a>
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
<a class="link" href="gdk2-Events.html#GDK-POINTER-MOTION-HINT-MASK:CAPS"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></a>, fewer <a class="link" href="gdk2-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a> events will be sent,
some of which are marked as a hint (the is_hint member is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
To receive more motion events after a motion hint event, the application
needs to asks for more, by calling <a class="link" href="gdk2-Events.html#gdk-event-request-motions" title="gdk_event_request_motions ()"><code class="function">gdk_event_request_motions()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="GDK-EXPOSURE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_EXPOSURE_MASK</code></span></p></td>
<td>receive expose events
</td>
</tr>
<tr>
<td><p><a name="GDK-POINTER-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_POINTER_MOTION_MASK</code></span></p></td>
<td>receive all pointer motion events
</td>
</tr>
<tr>
<td><p><a name="GDK-POINTER-MOTION-HINT-MASK:CAPS"></a><span class="term"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></span></p></td>
<td>see the explanation above
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while any button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON1-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON1_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while 1 button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON2-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON2_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while 2 button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON3-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON3_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while 3 button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-PRESS-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_PRESS_MASK</code></span></p></td>
<td>receive button press events
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-RELEASE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_RELEASE_MASK</code></span></p></td>
<td>receive button release events
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-PRESS-MASK:CAPS"></a><span class="term"><code class="literal">GDK_KEY_PRESS_MASK</code></span></p></td>
<td>receive key press events
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-RELEASE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_KEY_RELEASE_MASK</code></span></p></td>
<td>receive key release events
</td>
</tr>
<tr>
<td><p><a name="GDK-ENTER-NOTIFY-MASK:CAPS"></a><span class="term"><code class="literal">GDK_ENTER_NOTIFY_MASK</code></span></p></td>
<td>receive window enter events
</td>
</tr>
<tr>
<td><p><a name="GDK-LEAVE-NOTIFY-MASK:CAPS"></a><span class="term"><code class="literal">GDK_LEAVE_NOTIFY_MASK</code></span></p></td>
<td>receive window leave events
</td>
</tr>
<tr>
<td><p><a name="GDK-FOCUS-CHANGE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_FOCUS_CHANGE_MASK</code></span></p></td>
<td>receive focus change events
</td>
</tr>
<tr>
<td><p><a name="GDK-STRUCTURE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_STRUCTURE_MASK</code></span></p></td>
<td>receive events about window configuration change
</td>
</tr>
<tr>
<td><p><a name="GDK-PROPERTY-CHANGE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PROPERTY_CHANGE_MASK</code></span></p></td>
<td>receive property change events
</td>
</tr>
<tr>
<td><p><a name="GDK-VISIBILITY-NOTIFY-MASK:CAPS"></a><span class="term"><code class="literal">GDK_VISIBILITY_NOTIFY_MASK</code></span></p></td>
<td>receive visibility change events
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-IN-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_IN_MASK</code></span></p></td>
<td>receive proximity in events
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-OUT-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_OUT_MASK</code></span></p></td>
<td>receive proximity out events
</td>
</tr>
<tr>
<td><p><a name="GDK-SUBSTRUCTURE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_SUBSTRUCTURE_MASK</code></span></p></td>
<td>receive events about window configuration changes of 
  child windows
</td>
</tr>
<tr>
<td><p><a name="GDK-SCROLL-MASK:CAPS"></a><span class="term"><code class="literal">GDK_SCROLL_MASK</code></span></p></td>
<td>receive scroll events
</td>
</tr>
<tr>
<td><p><a name="GDK-ALL-EVENTS-MASK:CAPS"></a><span class="term"><code class="literal">GDK_ALL_EVENTS_MASK</code></span></p></td>
<td>the combination of all the above event masks.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GDK-CURRENT-TIME:CAPS"></a><h3>GDK_CURRENT_TIME</h3>
<pre class="programlisting">#define GDK_CURRENT_TIME     0L
</pre>
<p>
Represents the current time, and can be used anywhere a time is expected.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-PRIORITY-EVENTS:CAPS"></a><h3>GDK_PRIORITY_EVENTS</h3>
<pre class="programlisting">#define             GDK_PRIORITY_EVENTS</pre>
<p>
This is the priority that events from the X server are given in the
<a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html">GLib Main Loop</a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-PRIORITY-REDRAW:CAPS"></a><h3>GDK_PRIORITY_REDRAW</h3>
<pre class="programlisting">#define GDK_PRIORITY_REDRAW     (G_PRIORITY_HIGH_IDLE + 20)
</pre>
<p>
This is the priority that the idle handler processing window updates
is given in the <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html">GLib Main Loop</a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-events-pending"></a><h3>gdk_events_pending ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_events_pending                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Checks if any events are ready to be processed for any display.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if any events are pending.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-peek"></a><h3>gdk_event_peek ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          gdk_event_peek                      (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
If there is an event waiting in the event queue of some open
display, returns a copy of it. See <a class="link" href="GdkDisplay.html#gdk-display-peek-event" title="gdk_display_peek_event ()"><code class="function">gdk_display_peek_event()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a copy of the first <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> on some event queue, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
events are in any queues. The returned <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> should be freed with
<a class="link" href="gdk2-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get"></a><h3>gdk_event_get ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          gdk_event_get                       (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Checks all open displays for a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to process,to be processed
on, fetching events from the windowing system if necessary.
See <a class="link" href="GdkDisplay.html#gdk-display-get-event" title="gdk_display_get_event ()"><code class="function">gdk_display_get_event()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the next <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to be processed, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no events
are pending. The returned <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> should be freed with <a class="link" href="gdk2-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-graphics-expose"></a><h3>gdk_event_get_graphics_expose ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          gdk_event_get_graphics_expose       (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_event_get_graphics_expose</code> has been deprecated since version 2.18 and should not be used in newly-written code. </p>
</div>
<p>
Waits for a GraphicsExpose or NoExpose event from the X server.
This is used in the <span class="type">GtkText</span> and <span class="type">GtkCList</span> widgets in GTK+ to make sure any
GraphicsExpose events are handled before the widget is scrolled.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
<td>the <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> to wait for the events for.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEventExpose" title="struct GdkEventExpose"><span class="type">GdkEventExpose</span></a> if a GraphicsExpose was received, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if a
NoExpose event was received.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-put"></a><h3>gdk_event_put ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_put                       (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Appends a copy of the given event onto the front of the event
queue for event-&gt;any.window's display, or the default event
queue if event-&gt;any.window is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. See <a class="link" href="GdkDisplay.html#gdk-display-put-event" title="gdk_display_put_event ()"><code class="function">gdk_display_put_event()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-new"></a><h3>gdk_event_new ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          gdk_event_new                       (<em class="parameter"><code><a class="link" href="gdk2-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> type</code></em>);</pre>
<p>
Creates a new event of the given type. All fields are set to 0.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly-allocated <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>. The returned <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
should be freed with <a class="link" href="gdk2-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-copy"></a><h3>gdk_event_copy ()</h3>
<pre class="programlisting"><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a> *          gdk_event_copy                      (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Copies a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>, copying or incrementing the reference count of the
resources associated with it (e.g. <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>'s and strings).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a copy of <em class="parameter"><code>event</code></em>. The returned <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> should be freed with
<a class="link" href="gdk2-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-free"></a><h3>gdk_event_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_free                      (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Frees a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>, freeing or decrementing any resources associated with it.
Note that this function should only be called with events returned from
functions such as <a class="link" href="gdk2-Events.html#gdk-event-peek" title="gdk_event_peek ()"><code class="function">gdk_event_peek()</code></a>, <a class="link" href="gdk2-Events.html#gdk-event-get" title="gdk_event_get ()"><code class="function">gdk_event_get()</code></a>,
<a class="link" href="gdk2-Events.html#gdk-event-get-graphics-expose" title="gdk_event_get_graphics_expose ()"><code class="function">gdk_event_get_graphics_expose()</code></a> and <a class="link" href="gdk2-Events.html#gdk-event-copy" title="gdk_event_copy ()"><code class="function">gdk_event_copy()</code></a> and <a class="link" href="gdk2-Events.html#gdk-event-new" title="gdk_event_new ()"><code class="function">gdk_event_new()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-time"></a><h3>gdk_event_get_time ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             gdk_event_get_time                  (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
returns <a class="link" href="gdk2-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><span class="type">GDK_CURRENT_TIME</span></a>. If <em class="parameter"><code>event</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, returns <a class="link" href="gdk2-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><span class="type">GDK_CURRENT_TIME</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>time stamp field from <em class="parameter"><code>event</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-state"></a><h3>gdk_event_get_state ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_state                 (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *state</code></em>);</pre>
<p>
If the event contains a "state" field, puts that field in <em class="parameter"><code>state</code></em>. Otherwise
stores an empty state (0). Returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there was a state field
in the event. <em class="parameter"><code>event</code></em> may be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, in which case it's treated
as if the event had no state field.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> or NULL</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
<td>return location for state. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there was a state field in the event</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-axis"></a><h3>gdk_event_get_axis ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_axis                  (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Input-Devices.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> axis_use</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);</pre>
<p>
Extract the axis value for a particular axis use from
an event structure.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>axis_use</code></em> :</span></p></td>
<td>the axis use to look for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>location to store the value found. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the specified axis was found, otherwise <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-coords"></a><h3>gdk_event_get_coords ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_coords                (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_win</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_win</code></em>);</pre>
<p>
Extract the event window relative x/y coordinates from an event.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_win</code></em> :</span></p></td>
<td>location to put event window x coordinate. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_win</code></em> :</span></p></td>
<td>location to put event window y coordinate. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event delivered event window coordinates</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-root-coords"></a><h3>gdk_event_get_root_coords ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_root_coords           (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_root</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_root</code></em>);</pre>
<p>
Extract the root window relative x/y coordinates from an event.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_root</code></em> :</span></p></td>
<td>location to put root window x coordinate. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_root</code></em> :</span></p></td>
<td>location to put root window y coordinate. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event delivered root window coordinates</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-request-motions"></a><h3>gdk_event_request_motions ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_request_motions           (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEventMotion" title="struct GdkEventMotion"><span class="type">GdkEventMotion</span></a> *event</code></em>);</pre>
<p>
Request more motion notifies if <em class="parameter"><code>event</code></em> is a motion notify hint event.
This function should be used instead of <a class="link" href="gdk2-Windows.html#gdk-window-get-pointer" title="gdk_window_get_pointer ()"><code class="function">gdk_window_get_pointer()</code></a> to
request further motion notifies, because it also works for extension
events where motion notifies are provided for devices other than the
core pointer. Coordinate extraction, processing and requesting more
motion events from a <a class="link" href="gdk2-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a> event usually works like this:
</p>
<p>
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="cbracket">{</span><span class="normal"> </span>
<span class="normal">  </span><span class="comment">/* motion_event handler */</span>
<span class="normal">  x </span><span class="symbol">=</span><span class="normal"> motion_event</span><span class="symbol">-&gt;</span><span class="normal">x</span><span class="symbol">;</span>
<span class="normal">  y </span><span class="symbol">=</span><span class="normal"> motion_event</span><span class="symbol">-&gt;</span><span class="normal">y</span><span class="symbol">;</span>
<span class="normal">  </span><span class="comment">/* handle (x,y) motion */</span>
<span class="normal">  </span><span class="function"><a href="gdk2-Events.html#gdk-event-request-motions">gdk_event_request_motions</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">motion_event</span><span class="symbol">);</span><span class="normal"> </span><span class="comment">/* handles is_hint events */</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a valid <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-handler-set"></a><h3>gdk_event_handler_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_handler_set               (<em class="parameter"><code><a class="link" href="gdk2-Events.html#GdkEventFunc" title="GdkEventFunc ()"><span class="type">GdkEventFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
<p>
Sets the function to call to handle all events from GDK.
</p>
<p>
Note that GTK+ uses this to install its own event handler, so it is
usually not useful for GTK+ applications. (Although an application
can call this function then call <a href="http://developer.gnome.org/gtk2/gtk3-General.html#gtk-main-do-event"><code class="function">gtk_main_do_event()</code></a> to pass
events to GTK+.)
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to call to handle events from GDK.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data to pass to the function.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>the function to call when the handler function is removed, i.e. when
<a class="link" href="gdk2-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()"><code class="function">gdk_event_handler_set()</code></a> is called with another event handler.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GdkEventFunc"></a><h3>GdkEventFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GdkEventFunc)                     (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Specifies the type of function passed to <a class="link" href="gdk2-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()"><code class="function">gdk_event_handler_set()</code></a> to handle
all GDK events.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to process.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data set when the event handler was installed with
<a class="link" href="gdk2-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()"><code class="function">gdk_event_handler_set()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-send-client-message"></a><h3>gdk_event_send_client_message ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_send_client_message       (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> winid</code></em>);</pre>
<p>
Sends an X ClientMessage event to a given window (which must be
on the default <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>.)
This could be used for communicating between different applications,
though the amount of data is limited to 20 bytes.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to send, which should be a <a class="link" href="gdk2-Event-Structures.html#GdkEventClient" title="struct GdkEventClient"><span class="type">GdkEventClient</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>winid</code></em> :</span></p></td>
<td>the window to send the X ClientMessage event to.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non-zero on success.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-send-client-message-for-display"></a><h3>gdk_event_send_client_message_for_display ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_send_client_message_for_display
                                                        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> winid</code></em>);</pre>
<p>
On X11, sends an X ClientMessage event to a given window. On
Windows, sends a message registered with the name
GDK_WIN32_CLIENT_MESSAGE.
</p>
<p>
This could be used for communicating between different
applications, though the amount of data is limited to 20 bytes on
X11, and to just four bytes on Windows.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td>the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> for the window where the message is to be sent.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to send, which should be a <a class="link" href="gdk2-Event-Structures.html#GdkEventClient" title="struct GdkEventClient"><span class="type">GdkEventClient</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>winid</code></em> :</span></p></td>
<td>the window to send the client message to.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>non-zero on success.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-send-clientmessage-toall"></a><h3>gdk_event_send_clientmessage_toall ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_send_clientmessage_toall  (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Sends an X ClientMessage event to all toplevel windows on the default
<a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a>.
</p>
<p>
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.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to send, which should be a <a class="link" href="gdk2-Event-Structures.html#GdkEventClient" title="struct GdkEventClient"><span class="type">GdkEventClient</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-add-client-message-filter"></a><h3>gdk_add_client_message_filter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_add_client_message_filter       (<em class="parameter"><code><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> message_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkFilterFunc" title="GdkFilterFunc ()"><span class="type">GdkFilterFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Adds a filter to the default display to be called when X ClientMessage events
are received. See <a class="link" href="GdkDisplay.html#gdk-display-add-client-message-filter" title="gdk_display_add_client_message_filter ()"><code class="function">gdk_display_add_client_message_filter()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>message_type</code></em> :</span></p></td>
<td>the type of ClientMessage events to receive. This will be
checked against the <em class="structfield"><code>message_type</code></em> field of the
XClientMessage event struct.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to call to process the event.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data to pass to <em class="parameter"><code>func</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-get-show-events"></a><h3>gdk_get_show_events ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_get_show_events                 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Gets whether event debugging output is enabled.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if event debugging output is enabled.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-set-show-events"></a><h3>gdk_set_show_events ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_set_show_events                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_events</code></em>);</pre>
<p>
Sets whether a trace of received events is output.
Note that GTK+ must be compiled with debugging (that is,
configured using the <code class="option">--enable-debug</code> option)
to use this option.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>show_events</code></em> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to output event debugging information.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-set-screen"></a><h3>gdk_event_set_screen ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_set_screen                (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
<p>
Sets the screen for <em class="parameter"><code>event</code></em> to <em class="parameter"><code>screen</code></em>. The event must
have been allocated by GTK+, for instance, by
<a class="link" href="gdk2-Events.html#gdk-event-copy" title="gdk_event_copy ()"><code class="function">gdk_event_copy()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td>a <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-event-get-screen"></a><h3>gdk_event_get_screen ()</h3>
<pre class="programlisting"><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         gdk_event_get_screen                (<em class="parameter"><code>const <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Returns the screen for the event. The screen is
typically the screen for <code class="literal">event-&gt;any.window</code>, but
for events such as mouse events, it is the screen
where the pointer was when the event occurs -
that is, the screen which has the root window 
to which <code class="literal">event-&gt;motion.x_root</code> and
<code class="literal">event-&gt;motion.y_root</code> are relative.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk2-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the screen for the event</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-setting-get"></a><h3>gdk_setting_get ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_setting_get                     (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Obtains a desktop-wide setting, such as the double-click time,
for the default screen. See <a class="link" href="GdkScreen.html#gdk-screen-get-setting" title="gdk_screen_get_setting ()"><code class="function">gdk_screen_get_setting()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the setting.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>location to store the value of the setting.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the setting existed and a value was stored
in <em class="parameter"><code>value</code></em>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="gdk2-Events.see-also"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Event Structures</span></p></td>
<td><p>
The structs used for each type of event.
</p></td>
</tr></tbody>
</table></div>
<p>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>