diff options
Diffstat (limited to 'docs/reference/pygtk-gdkevent.xml')
-rw-r--r-- | docs/reference/pygtk-gdkevent.xml | 2454 |
1 files changed, 0 insertions, 2454 deletions
diff --git a/docs/reference/pygtk-gdkevent.xml b/docs/reference/pygtk-gdkevent.xml deleted file mode 100644 index ff36df22..00000000 --- a/docs/reference/pygtk-gdkevent.xml +++ /dev/null @@ -1,2454 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" - "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> - -<refentry id="class-gdkevent"> - <refnamediv> - <refname>gtk.gdk.Event</refname> - <refpurpose>an object representing an event from the windowing -system</refpurpose> - </refnamediv> - - <refsect1> - <title>Synopsis</title> - - <classsynopsis language="python"> - <ooclass><classname>gtk.gdk.Event</classname></ooclass> - <ooclass><classname>gobject.GBoxed</classname></ooclass> - <constructorsynopsis language="python"> - <methodname><link linkend="constructor-gdkevent">gtk.gdk.Event</link></methodname> - <methodparam><parameter role="keyword">type</parameter></methodparam> - </constructorsynopsis> - <methodsynopsis language="python"> - <methodname><link -linkend="method-gdkevent--put">put</link></methodname> - <methodparam></methodparam> </methodsynopsis> - <methodsynopsis language="python"> - <methodname><link -linkend="method-gdkevent--copy">copy</link></methodname> - <methodparam></methodparam> </methodsynopsis> - <methodsynopsis language="python"> - <methodname><link -linkend="method-gdkevent--free">free</link></methodname> - <methodparam></methodparam> </methodsynopsis> - <methodsynopsis language="python"> - <methodname><link -linkend="method-gdkevent--get-time">get_time</link></methodname> - <methodparam></methodparam> </methodsynopsis> - <methodsynopsis language="python"> - <methodname><link -linkend="method-gdkevent--get-state">get_state</link></methodname> - <methodparam><parameter - role="keyword">state</parameter></methodparam> - </methodsynopsis> - <methodsynopsis language="python"> - <methodname><link -linkend="method-gdkevent--get-coords">get_coords</link></methodname> - <methodparam></methodparam> - </methodsynopsis> - <methodsynopsis language="python"> - <methodname><link -linkend="method-gdkevent--get-root-coords">get_root_coords</link></methodname> - <methodparam></methodparam> - </methodsynopsis> - <methodsynopsis language="python"> - <methodname><link -linkend="method-gdkevent--get-axis">get_axis</link></methodname> - <methodparam><parameter>axis_use</parameter></methodparam> - </methodsynopsis> - <methodsynopsis language="python"> - <methodname><link linkend="method-gdkevent--set-screen">set_screen</link></methodname> - <methodparam><parameter role="keyword">screen</parameter></methodparam> - </methodsynopsis> - <methodsynopsis language="python"> - <methodname><link linkend="method-gdkevent--get-screen">get_screen</link></methodname> - <methodparam></methodparam> - </methodsynopsis> - </classsynopsis> - - <programlisting> -<emphasis role="bold">Functions</emphasis> - -<methodsynopsis language="python"> - <methodname><link -linkend="function-gdk--events-pending">gtk.gdk.events_pending</link></methodname> - <methodparam></methodparam> - </methodsynopsis><methodsynopsis language="python"> - <methodname><link -linkend="function-gdk--event-peek">gtk.gdk.event_peek</link></methodname> - <methodparam><parameter></parameter></methodparam> - </methodsynopsis><methodsynopsis language="python"> - <methodname><link -linkend="function-gdk--event-get">gtk.gdk.event_get</link></methodname> - <methodparam><parameter></parameter></methodparam> - </methodsynopsis><methodsynopsis language="python"> - <methodname><link -linkend="function-gdk--event-get-graphics-expose">gtk.gdk.event_get_graphics_expose</link></methodname> - <methodparam><parameter - role="keyword">window</parameter></methodparam> - </methodsynopsis><methodsynopsis language="python"> - <methodname><link -linkend="function-gdk--set-show-events">gtk.gdk.set_show_events</link></methodname> - <methodparam><parameter - role="keyword">show_events</parameter></methodparam> - </methodsynopsis><methodsynopsis language="python"> - <methodname><link -linkend="function-gdk--get-show-events">gtk.gdk.get_show_events</link></methodname> - <methodparam><parameter></parameter></methodparam> - </methodsynopsis><methodsynopsis language="python"> - <methodname><link -linkend="function-gdk--event-handler-set">gtk.gdk.event_handler_set</link></methodname> - <methodparam><parameter>func</parameter></methodparam> - <methodparam><parameter>data</parameter><initializer>None</initializer></methodparam> - </methodsynopsis></programlisting> - - </refsect1> - - <refsect1> - <title>Attributes</title> - - <para>The attributes available for a <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> are -dependent on the type of the event. The event types are described in the -<link linkend="description-gdkevent">Description</link> section.</para> - - <refsect2> - <title><literal>gtk.gdk.NOTHING</literal></title> - <title><literal>gtk.gdk.DELETE</literal></title> - <title><literal>gtk.gdk.DESTROY</literal></title> - <title><literal>gtk.gdk.MAP</literal></title> - <title><literal>gtk.gdk.UNMAP</literal></title> - <title><literal>gtk.gdk.NO_EXPOSE</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Contain only the fields that are common to all event - types.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.EXPOSE</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"area"</entry> - <entry>Read/Write</entry> - <entry>The bounding box of the area to be redrawn</entry> - </row> - - <row valign="top"> - <entry>"count"</entry> - <entry>Read/Write</entry> - <entry>The number of contiguous gtk.gdk.EXPOSE events -following this one. The only use for this is "exposure compression", i.e. -handling all contiguous gtk.gdk.EXPOSE events in one go, though -<literal>PyGTK</literal> performs some exposure compression so this is not -normally needed.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when all or part of a window becomes visible and needs - to be redrawn.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.MOTION_NOTIFY</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>The time of the event in milliseconds.</entry> - </row> - - <row valign="top"> - <entry>"x"</entry> - <entry>Read/Write</entry> - <entry>The x coordinate of the pointer relative to the -window.</entry> - </row> - - <row valign="top"> - <entry>"y"</entry> - <entry>Read/Write</entry> - <entry>The y coordinate of the pointer relative to the -window.</entry> - </row> - - <row valign="top"> - <entry>"axes"</entry> - <entry>Read</entry> - <entry><parameter>x</parameter>, <parameter>y</parameter> -translated to the axes of <parameter>device</parameter>, or -<literal>None</literal> if <parameter>device</parameter> is the -mouse.</entry> - </row> - - <row valign="top"> - <entry>"state"</entry> - <entry>Read/Write</entry> - <entry>A bit-mask representing the state of the modifier -keys (e.g. <keycap>Control</keycap>, <keycap>Shift</keycap> and -<keycap>Alt</keycap>) and the pointer buttons.</entry> - </row> - - <row valign="top"> - <entry>"is_hint"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the -<literal>gdk.POINTER_MOTION_HINT_MASK</literal> is set.</entry> - </row> - - <row valign="top"> - <entry>"device"</entry> - <entry>Read</entry> - <entry>The device where the event originated.</entry> - </row> - - <row valign="top"> - <entry>"x_root"</entry> - <entry>Read/Write</entry> - <entry>The x coordinate of the pointer relative to the root -of the screen.</entry> - </row> - - <row valign="top"> - <entry>"y_root"</entry> - <entry>Read/Write</entry> - <entry>The y coordinate of the pointer relative to the root -of the screen.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when the pointer moves.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.BUTTON_PRESS</literal></title> - <title><literal>gtk.gdk._2BUTTON_PRESS</literal></title> - <title><literal>gtk.gdk._3BUTTON_PRESS</literal></title> - <title><literal>gtk.gdk.BUTTON_RELEASE</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>The time of the event in milliseconds.</entry> - </row> - - <row valign="top"> - <entry>"x"</entry> - <entry>Read/Write</entry> - <entry>The x coordinate of the pointer relative to the -window.</entry> - </row> - - <row valign="top"> - <entry>"y"</entry> - <entry>Read/Write</entry> - <entry>The y coordinate of the pointer relative to the -window.</entry> - </row> - - <row valign="top"> - <entry>"axes"</entry> - <entry>Read</entry> - <entry><parameter>x</parameter>, <parameter>y</parameter> -translated to the axes of <parameter>device</parameter>, or -<literal>None</literal> if <parameter>device</parameter> is the -mouse.</entry> - </row> - - <row valign="top"> - <entry>"state"</entry> - <entry>Read/Write</entry> - <entry>A bit-mask representing the state of the modifier -keys (e.g. <keycap>Control</keycap>, <keycap>Shift</keycap> and -<keycap>Alt</keycap>) and the pointer buttons.</entry> - </row> - - <row valign="top"> - <entry>"button"</entry> - <entry>Read/Write</entry> - <entry>The button which was pressed or released, numbered -from 1 to 5. Normally button 1 is the left mouse button, 2 is the middle -button, and 3 is the right button. On 2-button mice, the middle button can -often be simulated by pressing both mouse buttons together.</entry> - </row> - - <row valign="top"> - <entry>"device"</entry> - <entry>Read</entry> - <entry>The device where the event originated.</entry> - </row> - - <row valign="top"> - <entry>"x_root"</entry> - <entry>Read/Write</entry> - <entry>The x coordinate of the pointer relative to the root -of the screen.</entry> - </row> - - <row valign="top"> - <entry>"y_root"</entry> - <entry>Read/Write</entry> - <entry>The y coordinate of the pointer relative to the root -of the screen.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Used for button press and button release events.</para> - - <para>Double and triple-clicks result in a sequence of events being - received. For double-clicks the order of events will be:</para> - - <orderedlist> - <listitem><literal>gtk.gdk.BUTTON_PRESS</literal></listitem> - <listitem><literal>gtk.gdk.BUTTON_RELEASE</literal></listitem> - <listitem><literal>gtk.gdk.BUTTON_PRESS</literal></listitem> - <listitem><literal>gtk.gdk.2BUTTON_PRESS</literal></listitem> - <listitem><literal>gtk.gdk.BUTTON_RELEASE</literal></listitem> - </orderedlist> - - <para>Note that the first click is received just like a normal button - press, while the second click results in a - <literal>gtk.gdk.2BUTTON_PRESS</literal> being received just after the - <literal>gtk.gdk.BUTTON_PRESS</literal>.</para> - - <para>Triple-clicks are very similar to double-clicks, except that - <literal>gtk.gdk.3BUTTON_PRESS</literal> is inserted after the third - click. The order of the events is:</para> - - <orderedlist> - <listitem><literal>gtk.gdk.BUTTON_PRESS</literal></listitem> - <listitem><literal>gtk.gdk.BUTTON_RELEASE</literal></listitem> - <listitem><literal>gtk.gdk.BUTTON_PRESS</literal></listitem> - <listitem><literal>gtk.gdk.2BUTTON_PRESS</literal></listitem> - <listitem><literal>gtk.gdk.BUTTON_RELEASE</literal></listitem> - <listitem><literal>gtk.gdk.BUTTON_PRESS</literal></listitem> - <listitem><literal>gtk.gdk.3BUTTON_PRESS</literal></listitem> - <listitem><literal>gtk.gdk.BUTTON_RELEASE</literal></listitem> - </orderedlist> - - <para>For a double click to occur, the second button press must occur - within 1/4 of a second of the first. For a triple click to occur, the - third button press must also occur within 1/2 second of the first - button press.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.KEY_PRESS</literal></title> - <title><literal>gtk.gdk.KEY_RELEASE</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>The time of the event in milliseconds.</entry> - </row> - - <row valign="top"> - <entry>"state"</entry> - <entry>Read/Write</entry> - <entry>A bit-mask representing the state of the modifier -keys (e.g. <keycap>Control</keycap>, <keycap>Shift</keycap> and -<keycap>Alt</keycap>) and the pointer buttons.</entry> - </row> - - <row valign="top"> - <entry>"keyval"</entry> - <entry>Read/Write</entry> - <entry>The key that was pressed or released.</entry> - </row> - - <row valign="top"> - <entry>"string"</entry> - <entry>Read/Write</entry> - <entry>A multi-byte string containing the composed -characters resulting from the key press. When text is being input, in a -<link linkend="class-gtkentry"><classname>gtk.Entry</classname></link> for -example, it is these characters which should be added to the input buffer. -When using Input Methods to support internationalized text input, the -composed characters appear here after the pre-editing has been -completed.</entry> - </row> - - <row valign="top"> - <entry>"hardware_keycode"</entry> - <entry>Read/Write</entry> - <entry>The raw code of the key that was pressed or -released. Available in PyGTK 2.2 and above.</entry> - </row> - - <row valign="top"> - <entry>"group"</entry> - <entry>Read/Write</entry> - <entry>the keyboard group. Available in PyGTK 2.4 and -above.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated for a key press or key release event.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.ENTER_NOTIFY</literal></title> - <title><literal>gtk.gdk.LEAVE_NOTIFY</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"subwindow"</entry> - <entry>Read/Write</entry> - <entry>The window that was entered or left.</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>The time of the event in milliseconds.</entry> - </row> - - <row valign="top"> - <entry>"x"</entry> - <entry>Read/Write</entry> - <entry>The x coordinate of the pointer relative to the -window.</entry> - </row> - - <row valign="top"> - <entry>"y"</entry> - <entry>Read/Write</entry> - <entry>The y coordinate of the pointer relative to the -window.</entry> - </row> - - <row valign="top"> - <entry>"x_root"</entry> - <entry>Read/Write</entry> - <entry>The x coordinate of the pointer relative to the root -of the screen.</entry> - </row> - - <row valign="top"> - <entry>"y_root"</entry> - <entry>Read/Write</entry> - <entry>The y coordinate of the pointer relative to the root -of the screen.</entry> - </row> - - <row valign="top"> - <entry>"mode"</entry> - <entry>Read/Write</entry> - <entry>The crossing mode -(<literal>gtk.gdk.CROSSING_NORMAL</literal>, -<literal>gtk.gdk.CROSSING_GRAB</literal> or -<literal>gtk.gdk.CROSSING_UNGRAB</literal>).</entry> - </row> - - <row valign="top"> - <entry>"detail"</entry> - <entry>Read/Write</entry> - <entry>The kind of crossing that happened -(<literal>gtk.gdk.NOTIFY_INFERIOR</literal>, -<literal>gtk.gdk.NOTIFY_ANCESTOR</literal>, -<literal>gtk.gdk.NOTIFY_VIRTUAL</literal>, -<literal>gtk.gdk.NOTIFY_NONLINEAR</literal> or -<literal>gtk.gdk.NOTIFY_NONLINEAR_VIRTUAL</literal>).</entry> - </row> - - <row valign="top"> - <entry>"focus"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if -<parameter>window</parameter> is the focus window or an inferior.</entry> - </row> - - <row valign="top"> - <entry>"state"</entry> - <entry>Read/Write</entry> - <entry>A bit-mask representing the state of the modifier -keys (e.g. <keycap>Control</keycap>, <keycap>Shift</keycap> and -<keycap>Alt</keycap>) and the pointer buttons.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when the pointer enters or leaves a window.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.FOCUS_CHANGE</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"in_"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the window has gained the -keyboard focus, <literal>False</literal> if it has lost the focus.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Describes a change of keyboard focus.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.CONFIGURE</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"x"</entry> - <entry>Read/Write</entry> - <entry>The new x coordinate of the window relative to its -parent.</entry> - </row> - - <row valign="top"> - <entry>"y"</entry> - <entry>Read/Write</entry> - <entry>The new y coordinate of the window relative to its -parent.</entry> - </row> - - <row valign="top"> - <entry>"width"</entry> - <entry>Read/Write</entry> - <entry>The new width of the window.</entry> - </row> - - <row valign="top"> - <entry>"height"</entry> - <entry>Read/Write</entry> - <entry>The new height of the window.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when a window size or position has changed.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.PROPERTY_NOTIFY</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"atom"</entry> - <entry>Read</entry> - <entry>The property that was changed.</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>The time of the event in milliseconds.</entry> - </row> - - <row valign="top"> - <entry>"state"</entry> - <entry>Read/Write</entry> - <entry>The property was changed -(<literal>gtk.gdk.PROPERTY_NEW_VALUE</literal>) or deleted -(<literal>gtk.gdk.PROPERTY_DELETE</literal>).</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Describes a property change on a window.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.SELECTION_CLEAR</literal></title> - <title><literal>gtk.gdk.SELECTION_REQUEST</literal></title> - <title><literal>gtk.gdk.SELECTION_NOTIFY</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"selection"</entry> - <entry>Read</entry> - <entry>The selection.</entry> - </row> - - <row valign="top"> - <entry>"target"</entry> - <entry>Read</entry> - <entry>The target to which the selection should be -converted.</entry> - </row> - - <row valign="top"> - <entry>"property"</entry> - <entry>Read</entry> - <entry>The property in which to place the result of the -conversion.</entry> - </row> - - <row valign="top"> - <entry>"requestor"</entry> - <entry>Read/Write</entry> - <entry>the native window ID on which to place -property.</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>The time of the event in milliseconds.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when a selection is requested or ownership of a - selection is taken over by another client application.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.PROXIMITY_IN</literal></title> - <title><literal>gtk.gdk.PROXIMITY_OUT</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>The time of the event in milliseconds.</entry> - </row> - - <row valign="top"> - <entry>"device"</entry> - <entry>Read</entry> - <entry>The device where the event originated.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Proximity events are generated when using GDK's wrapper for the - XInput extension. The XInput extension is an add-on for standard X - that allows you to use nonstandard devices such as graphics tablets. A - proximity event indicates that the stylus has moved in or out of - contact with the tablet, or perhaps that the user's finger has moved - in or out of contact with a touch screen.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.DRAG_ENTER</literal></title> - <title><literal>gtk.gdk.DRAG_LEAVE</literal></title> - <title><literal>gtk.gdk.DRAG_MOTION</literal></title> - <title><literal>gtk.gdk.DRAG_STATUS</literal></title> - <title><literal>gtk.gdk.DRAG_START</literal></title> - <title><literal>gtk.gdk.DRAG_FINISHED</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"context"</entry> - <entry>Read</entry> - <entry>The <link -linkend="class-gdkdragcontext"><classname>gtk.gdk.DragContext</classname></link> -for the current DND operation.</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>The time of the event in milliseconds.</entry> - </row> - - <row valign="top"> - <entry>"x_root"</entry> - <entry>Read/Write</entry> - <entry>The x coordinate of the pointer relative to the root -of the screen only set for <literal>gtk.gdk.DRAG_MOTION</literal> and -<literal>gtk.gdk.DROP_START</literal>.</entry> - </row> - - <row valign="top"> - <entry>"y_root"</entry> - <entry>Read/Write</entry> - <entry>The y coordinate of the pointer relative to the root -of the screen only set for <literal>gtk.gdk.DRAG_MOTION</literal> and -<literal>gtk.gdk.DROP_START</literal>.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated during Drag and Drop operations.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.CLIENT_EVENT</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"message_type"</entry> - <entry>Read/Write</entry> - <entry>The type of the message, which can be defined by the -application.</entry> - </row> - - <row valign="top"> - <entry>"data_format"</entry> - <entry>Read/Write</entry> - <entry>The format of the data, given as the number of bits -in each data element, i.e. 8, 16, or 32.</entry> - </row> - - <row valign="top"> - <entry>"data"</entry> - <entry>Read/Write</entry> - <entry>The data as a string of 8-bit characters.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>An event sent by another client application.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.VISIBILITY_NOTIFY</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"state"</entry> - <entry>Read/Write</entry> - <entry>The new visibility state -(<literal>gtk.gdk.VISIBILITY_FULLY_OBSCURED</literal>, -<literal>gtk.gdk.VISIBILITY_PARTIAL</literal> or -<literal>gtk.gdk.VISIBILITY_UNOBSCURED</literal>).</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when the window visibility status has changed.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.SCROLL</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>The time of the event in milliseconds.</entry> - </row> - - <row valign="top"> - <entry>"x"</entry> - <entry>Read/Write</entry> - <entry>The x coordinate of the pointer relative to the -window.</entry> - </row> - - <row valign="top"> - <entry>"y"</entry> - <entry>Read/Write</entry> - <entry>The y coordinate of the pointer relative to the -window.</entry> - </row> - - <row valign="top"> - <entry>"state"</entry> - <entry>Read/Write</entry> - <entry>A bit-mask representing the state of the modifier -keys (e.g. <keycap>Control</keycap>, <keycap>Shift</keycap> and -<keycap>Alt</keycap>) and the pointer buttons.</entry> - </row> - - <row valign="top"> - <entry>"direction"</entry> - <entry>Read/Write</entry> - <entry>The direction to scroll to (one of -<literal>gtk.gdk.SCROLL_UP</literal>, -<literal>gtk.gdk.SCROLL_DOWN</literal>, -<literal>gtk.gdk.SCROLL_LEFT</literal> or -<literal>gtk.gdk.SCROLL_RIGHT</literal>).</entry> - </row> - - <row valign="top"> - <entry>"device"</entry> - <entry>Read</entry> - <entry>The device where the event originated.</entry> - </row> - - <row valign="top"> - <entry>"x_root"</entry> - <entry>Read/Write</entry> - <entry>The x coordinate of the pointer relative to the root -of the screen.</entry> - </row> - - <row valign="top"> - <entry>"y_root"</entry> - <entry>Read/Write</entry> - <entry>The y coordinate of the pointer relative to the root -of the screen.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated from button presses for the buttons 4 to 7. Wheel mice - are usually configured to generate button press events for buttons 4 - and 5 when the wheel is turned.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.WINDOW_STATE</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"changed_mask"</entry> - <entry>Read/Write</entry> - <entry>The mask specifying what flags have changed - a -combination of: <literal>gtk.gdk.WINDOW_STATE_WITHDRAWN</literal>, -<literal>gtk.gdk.WINDOW_STATE_ICONIFIED</literal>, -<literal>gtk.gdk.WINDOW_STATE_MAXIMIZED</literal> and -<literal>gtk.gdk.WINDOW_STATE_STICKY</literal></entry> - </row> - - <row valign="top"> - <entry>"new_window_state"</entry> - <entry>Read/Write</entry> - <entry>The new window state - a combination of: -<literal>gtk.gdk.WINDOW_STATE_WITHDRAWN</literal>, -<literal>gtk.gdk.WINDOW_STATE_ICONIFIED</literal>, -<literal>gtk.gdk.WINDOW_STATE_MAXIMIZED</literal> and -<literal>gtk.gdk.WINDOW_STATE_STICKY</literal></entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when the state of a toplevel window changes.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.SETTING</literal></title> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"action"</entry> - <entry>Read/Write</entry> - <entry>What happened to the setting -(<literal>gtk.gdk.SETTING_ACTION_NEW</literal>, -<literal>gtk.gdk.SETTING_ACTION_CHANGED</literal> or -<literal>gtk.gdk.SETTING_ACTION_DELETED</literal>).</entry> - </row> - - <row valign="top"> - <entry>"name"</entry> - <entry>Read/Write</entry> - <entry>The name of the setting.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when a setting is modified.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.OWNER_CHANGE</literal></title> - - <note> - <para>This Event type is available in PyGTK 2.8 and above.</para> - </note> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"owner"</entry> - <entry>Read/Write</entry> - <entry>the new owner of the selection - the native window - ID as an integer</entry> - </row> - - <row valign="top"> - <entry>"reason"</entry> - <entry>Read/Write</entry> - <entry>the reason for the ownership change indicated by one - of the <xref linkend="gdk-owner-change-constants" - endterm="gdk-owner-change-constants-title"></xref>.</entry> - </row> - - <row valign="top"> - <entry>"selection"</entry> - <entry>Read</entry> - <entry>the atom identifying the selection</entry> - </row> - - <row valign="top"> - <entry>"time"</entry> - <entry>Read/Write</entry> - <entry>the timestamp of the event</entry> - </row> - - <row valign="top"> - <entry>"selection_time"</entry> - <entry>Read/Write</entry> - <entry>the time at which the selection ownership was taken - over</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when the owner of a selection changes. On X11, this - information is only available if the X server supports the XFIXES - extension.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.GRAB_BROKEN</literal></title> - - <note> - <para>This Event type is available in PyGTK 2.8 and above.</para> - </note> - - <blockquote role="properties"> - <informaltable pgwide="1" frame="none"> - <tgroup cols="3"> - <?dbhtml cellpadding="5"?> - <colspec column="1" colwidth="1in"/> - <colspec column="2" colwidth="1in"/> - <colspec column="3" colwidth="4in"/> - <tbody> - - <row valign="top"> - <entry>"type"</entry> - <entry>Read</entry> - <entry>The event type - see the list below in the <link -linkend="description-gdkevent">Description</link> section</entry> - </row> - - <row valign="top"> - <entry>"window"</entry> - <entry>Read/Write</entry> - <entry>The <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> the -event occurred on.</entry> - </row> - - <row valign="top"> - <entry>"send_event"</entry> - <entry>Read/Write</entry> - <entry><literal>True</literal> if the event was sent -explicitly.</entry> - </row> - - <row valign="top"> - <entry>"keyboard"</entry> - <entry>Read/Write</entry> - <entry>if <literal>True</literal> a keyboard grab was - broken; if <literal>False</literal> a pointer grab was - broken</entry> - </row> - - <row valign="top"> - <entry>"implicit"</entry> - <entry>Read/Write</entry> - <entry>if True the broken grab was implicit</entry> - </row> - - <row valign="top"> - <entry>"grab_window"</entry> - <entry>Read</entry> - <entry>If this event is caused by another grab in the same - application, <parameter>grab_window</parameter> contains the - new grab window. Otherwise - <parameter>grab_window</parameter> is - <literal>None</literal>.</entry> - </row> - - </tbody> - </tgroup> - </informaltable> - </blockquote> - - <para>Generated when a pointer or keyboard grab is broken. On X11, - this happens when the grab window becomes unviewable (i.e. it or one - of its ancestors is unmapped), or if the same application grabs the - pointer or keyboard again. Note that implicit grabs (which are - initiated by button presses) can also cause - <literal>gtk.gdk.GRAB_BROKEN</literal> events.</para> - - </refsect2> - - <para></para> - - </refsect1> - - <refsect1 id="description-gdkevent"> - <title>Description</title> - - <para>A <link - linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> - represents an event from the windowing system. The <link - linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> - methods are usually not used by applications since the - <literal>PyGTK</literal> main loop generates signals and invokes the - appropriate signal handler. The event types are:</para> - - <variablelist> - <varlistentry> - <term><literal>gtk.gdk.NOTHING</literal></term> - <listitem> - <simpara>a special code to indicate a null event.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.DELETE</literal></term> - <listitem> - <simpara>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.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.DESTROY</literal></term> - <listitem> - <simpara>the window has been destroyed.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.EXPOSE</literal></term> - <listitem> - <simpara>all or part of the window has become visible and needs to be redrawn.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.MOTION_NOTIFY</literal></term> - <listitem> - <simpara>the pointer (usually a mouse) has moved.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.BUTTON_PRESS</literal></term> - <listitem> - <simpara>a mouse button has been pressed.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk._2BUTTON_PRESS</literal></term> - <listitem> - <simpara>a mouse button has been double-clicked (clicked twice within a short period of time). Note that each click also generates a <literal>gtk.gdk.BUTTON_PRESS</literal> event.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk._3BUTTON_PRESS</literal></term> - <listitem> - <simpara>a mouse button has been clicked 3 times in a short period of time. Note that each click also generates a <literal>gtk.gdk.BUTTON_PRESS</literal> event.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.BUTTON_RELEASE</literal></term> - <listitem> - <simpara>a mouse button has been released.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.KEY_PRESS</literal></term> - <listitem> - <simpara>a key has been pressed.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.KEY_RELEASE</literal></term> - <listitem> - <simpara>a key has been released.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.ENTER_NOTIFY</literal></term> - <listitem> - <simpara>the pointer has entered the window.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.LEAVE_NOTIFY</literal></term> - <listitem> - <simpara>the pointer has left the window.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.FOCUS_CHANGE</literal></term> - <listitem> - <simpara>the keyboard focus has entered or left the window.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.CONFIGURE</literal></term> - <listitem> - <simpara>the size, position or stacking order of the window has changed. Note that <literal>PyGTK</literal> discards these events for <literal>gtk.gdk.WINDOW_CHILD</literal> windows.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.MAP</literal></term> - <listitem> - <simpara>the window has been mapped.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.UNMA</literal></term> - <listitem> - <simpara>the window has been unmapped.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.PROPERTY_NOTIFY</literal></term> - <listitem> - <simpara>a property on the window has been changed or deleted.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.SELECTION_CLEAR</literal></term> - <listitem> - <simpara>the application has lost ownership of a selection.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.SELECTION_REQUEST</literal></term> - <listitem> - <simpara>another application has requested a selection.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.SELECTION_NOTIFY</literal></term> - <listitem> - <simpara>a selection has been received.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.PROXIMITY_IN</literal></term> - <listitem> - <simpara>an input device has moved into contact with a sensing surface (e.g. a touchscreen or graphics tablet).</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.PROXIMITY_OUT</literal></term> - <listitem> - <simpara>an input device has moved out of contact with a sensing surface.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.DRAG_ENTER</literal></term> - <listitem> - <simpara>the mouse has entered the window while a drag is in progress.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.DRAG_LEAVE</literal></term> - <listitem> - <simpara>the mouse has left the window while a drag is in progress</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.DRAG_MOTION</literal></term> - <listitem> - <simpara>the mouse has moved in the window while a drag is in progress.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.DRAG_STATUS</literal></term> - <listitem> - <simpara>the status of the drag operation initiated by the window has changed.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.DROP_START</literal></term> - <listitem> - <simpara>a drop operation onto the window has started.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.DROP_FINISHED</literal></term> - <listitem> - <simpara>the drop operation initiated by the window has completed.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.CLIENT_EVENT</literal></term> - <listitem> - <simpara>a message has been received from another application.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.VISIBILITY_NOTIFY</literal></term> - <listitem> - <simpara>the window visibility status has changed.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.NO_EXPOSE</literal></term> - <listitem> - <simpara>indicates that the source region was completely available when parts of a drawable were copied. This is not very useful.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.SCROLL</literal></term> - <listitem> - <simpara>a scroll had occurred for a window</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.WINDOW_STATE</literal></term> - <listitem> - <simpara>the window state has changed</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.SETTING</literal></term> - <listitem> - <simpara>a setting has changed</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.OWNER_CHANGE</literal></term> - <listitem> - <simpara>the owner of a selection has changed. Added in GTK+ - 2.6</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.GRAB_BROKEN</literal></term> - <listitem> - <simpara>a pointer or keyboard grab was broken. Added in GTK+ - 2.8.</simpara> - </listitem> - </varlistentry> - </variablelist> - - <para>A set of bit-flags is used to indicate which events a window is to - receive. Most of these masks map onto one or more of the event types - above. Use the <link - linkend="method-gtkwidget--set-events"><methodname>gtk.Widget.set_events</methodname>()</link> - method to indicate which events a widget should receive.</para> - - <para>The <literal>gtk.gdk.POINTER_MOTION_HINT_MASK</literal> is a -special mask which is used to reduce the number of -<literal>gtk.gdk.MOTION_NOTIFY</literal> events received. Normally a -<literal>gtk.gdk.MOTION_NOTIFY</literal> event is received each time the -mouse moves. However, if the application spends a lot of time processing the -event (updating the display, for example), it can easily lag behind the -position of the mouse. When using the -<literal>gtk.gdk.POINTER_MOTION_HINT_MASK</literal> the server will only -send a single <literal>gtk.gdk.MOTION_NOTIFY</literal> event (which is -marked as a hint) until the application asks for more, by calling the <link -linkend="method-gdkwindow--get-pointer"><methodname>gtk.gdk.Window.get_pointer</methodname>()</link> -method. The masks are:</para> - - <itemizedlist> - <listitem> - <simpara><literal>gtk.gdk.EXPOSURE_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.POINTER_MOTION_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.POINTER_MOTION_HINT_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.BUTTON_MOTION_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.BUTTON1_MOTION_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.BUTTON2_MOTION_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.BUTTON3_MOTION_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.BUTTON_PRESS_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.BUTTON_RELEASE_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.KEY_PRESS_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.KEY_RELEASE_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.ENTER_NOTIFY_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.LEAVE_NOTIFY_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.FOCUS_CHANGE_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.STRUCTURE_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.PROPERTY_CHANGE_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.VISIBILITY_NOTIFY_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.PROXIMITY_IN_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.PROXIMITY_OUT_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.SUBSTRUCTURE_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.SCROLL_MASK</literal></simpara> - </listitem> - <listitem> - <simpara><literal>gtk.gdk.ALL_EVENTS_MASK</literal></simpara> - </listitem> - </itemizedlist> - - <para><literal>gtk.gdk.ALL_EVENTS_MASK</literal> is a combination of all -the event masks.</para> - - </refsect1> - - <refsect1 id="constructor-gdkevent"> - <title>Constructor</title> - - <programlisting><constructorsynopsis language="python"> - <methodname>gtk.gdk.Event</methodname> - <methodparam><parameter role="keyword">type</parameter></methodparam> - </constructorsynopsis></programlisting> - <variablelist> - <varlistentry> - <term><parameter>type</parameter> :</term> <listitem><simpara>a - event type - see the <link - linkend="description-gdkevent">Description</link> - above</simpara></listitem> - </varlistentry> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>a newly-allocated <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link>.</simpara></listitem> - </varlistentry> - </variablelist> - - <note> - <para>This constructor is available in PyGTK 2.2 and above.</para> - </note> - - <para>Creates a new <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> of the -given type. All fields are set to 0.</para> - - </refsect1> - - <refsect1> - <title>Methods</title> - - <refsect2 id="method-gdkevent--put"> - <title>gtk.gdk.Event.put</title> - - <programlisting><methodsynopsis language="python"> - <methodname>put</methodname> - <methodparam></methodparam> </methodsynopsis></programlisting> - - <para>The <methodname>put</methodname>() method appends a copy of the -given event onto the tail of the event queue.</para> - - </refsect2> - - <refsect2 id="method-gdkevent--copy"> - <title>gtk.gdk.Event.copy</title> - - <programlisting><methodsynopsis language="python"> - <methodname>copy</methodname> - <methodparam></methodparam> </methodsynopsis></programlisting> - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>a copy of the event</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <methodname>copy</methodname>() method copies the event, - copying or incrementing the reference count of the resources - associated with it (e.g. windows and strings).</para> - - </refsect2> - - <refsect2 id="method-gdkevent--free"> - <title>gtk.gdk.Event.free</title> - - <programlisting><methodsynopsis language="python"> - <methodname>free</methodname> - <methodparam></methodparam> </methodsynopsis></programlisting> - - <warning> - <para>This method is deprecated and should not be used since it may -crash your application.</para> - </warning> - - <para>The <methodname>free</methodname>() method frees the event, -freeing or decrementing any resources associated with it. Note that this -method should only be called on <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> objects -returned from methods or functions such as <link -linkend="function-gdk--event-peek"><methodname>gtk.gdk.event_peek</methodname>()</link>, -<link -linkend="function-gdk--event-get"><methodname>gtk.gdk.event_get</methodname>()</link>, -<link -linkend="function-gdk--event-get-graphics-expose"><methodname>gtk.gdk.event_get_graphics_expose</methodname>()</link> -and <link -linkend="method-gdkevent--copy"><methodname>copy</methodname>()</link>.</para> - - </refsect2> - - <refsect2 id="method-gdkevent--get-time"> - <title>gtk.gdk.Event.get_time</title> - - <programlisting><methodsynopsis language="python"> - <methodname>get_time</methodname> - <methodparam></methodparam> </methodsynopsis></programlisting> - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>the time stamp field from the -event</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <methodname>get_time</methodname>() method returns the time -stamp from the event, if there is one; otherwise returns 0.</para> - - </refsect2> - - <refsect2 id="method-gdkevent--get-state"> - <title>gtk.gdk.Event.get_state</title> - - <programlisting><methodsynopsis language="python"> - <methodname>get_state</methodname> - <methodparam></methodparam> - </methodsynopsis></programlisting> - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>the modifier state</simpara></listitem> - </varlistentry> - </variablelist> - - <note> - <para>This method is available in PyGTK 2.4 and above.</para> - </note> - - <para>The <methodname>get_state</methodname>() method returns the - value of the modifier "state" field. If the event has no "state" field - the empty state value (0) is returned. The "state" field contains a - modifier type: a combination of the <xref - linkend="gdk-modifier-constants" - endterm="gdk-modifier-constants-title"></xref>.</para> - - </refsect2> - - <refsect2> - <title><literal>gtk.gdk.NOTHING</literal></title> - <title><literal>gtk.gdk.DELETE</literal></title> - <title><literal>gtk.gdk.DESTROY</literal></title> - <title><literal>gtk.gdk.MAP</literal></title> - <title><literal>gtk.gdk.UNMAP</literal></title> - <title><literal>gtk.gdk.NO_EXPOSE</literal></title> - - <blockquote> - <para>These events do not have any additional attributes.</para> - </blockquote> - </refsect2> - - <refsect2 id="method-gdkevent--get-coords"> - <title>gtk.gdk.Event.get_coords</title> - - <programlisting><methodsynopsis language="python"> - <methodname>get_coords</methodname> - <methodparam></methodparam> - </methodsynopsis></programlisting> - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>a tuple containing the event window x and y -coordinates or an empty tuple if the event did not deliver event window -coordinates</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <methodname>get_coords</methodname>() method returns a tuple -containing the x and y coordinates of an event relative to the event <link -linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> or an -empty tuple if the event did not deliver event window coordinates.</para> - - </refsect2> - - <refsect2 id="method-gdkevent--get-root-coords"> - <title>gtk.gdk.Event.get_root_coords</title> - - <programlisting><methodsynopsis language="python"> - <methodname>get_root_coords</methodname> - <methodparam></methodparam> - </methodsynopsis></programlisting> - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>a tuple containing the root window x and y -coordinates or an empty tuple if the event did not deliver root window -coordinates</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <methodname>get_root_coords</methodname>() method returns a -tuple containing the x and y coordinates from an event relative to the root -window or an empty tuple if the event did not deliver root window -coordinates.</para> - - </refsect2> - - <refsect2 id="method-gdkevent--get-axis"> - <title>gtk.gdk.Event.get_axis</title> - - <programlisting><methodsynopsis language="python"> - <methodname>get_axis</methodname> - <methodparam><parameter>axis_use</parameter></methodparam> - </methodsynopsis></programlisting> - <variablelist> - <varlistentry> - <term><parameter>axis_use</parameter> :</term> - <listitem><simpara>the axis use to look for</simpara></listitem> - </varlistentry> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>the value found or <literal>None</literal> if -the axis was not found.</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <methodname>get_axis</methodname>() method returns the axis -value for the axis use specified by <parameter>axis_use</parameter> from an -event structure. The value of <parameter>axis_use</parameter> must be one -of:</para> - - <variablelist> - <varlistentry> - <term><literal>gtk.gdk.AXIS_IGNORE</literal></term> - <listitem> - <simpara>the axis is ignored.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.AXIS_X</literal></term> - <listitem> - <simpara>the axis is used as the x axis.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.AXIS_Y</literal></term> - <listitem> - <simpara>the axis is used as the y axis.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.AXIS_PRESSURE</literal></term> - <listitem> - <simpara>the axis is used for pressure information.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.AXIS_XTILT</literal></term> - <listitem> - <simpara>the axis is used for x tilt information.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.AXIS_YTILT</literal></term> - <listitem> - <simpara>the axis is used for y tilt information.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.AXIS_WHEEL</literal></term> - <listitem> - <simpara>the axis is used for wheel information.</simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>gtk.gdk.AXIS_LAST</literal></term> - <listitem> - <simpara>a constant equal to the numerically highest axis -value.</simpara> - </listitem> - </varlistentry> - </variablelist> - - <para>If an axis with the specified axis use is not found, this method -returns <literal>None</literal>.</para> - - </refsect2> - - <refsect2 id="method-gdkevent--set-screen"> - <title>gtk.gdk.Event.set_screen</title> - - <programlisting><methodsynopsis language="python"> - <methodname>set_screen</methodname> - <methodparam><parameter role="keyword">screen</parameter></methodparam> - </methodsynopsis></programlisting> - <variablelist> - <varlistentry> - <term><parameter role="keyword">screen</parameter> :</term> - <listitem><simpara>a <link - linkend="class-gdkscreen"><classname>gtk.gdk.Screen</classname></link></simpara></listitem> - </varlistentry> - </variablelist> - - <note> - <para>This method is available in PyGTK 2.2 and above.</para> - </note> - - <para>The <methodname>set_screen</methodname>() method sets the <link -linkend="class-gdkscreen"><classname>gtk.gdk.Screen</classname></link> to -the value of <parameter>screen</parameter>. The event must have been -allocated by <literal>PyGTK</literal>, for instance, by the <link -linkend="method-gdkevent--copy"><methodname>gtk.gdk.Event.copy()</methodname></link> -method.</para> - - </refsect2> - - <refsect2 id="method-gdkevent--get-screen"> - <title>gtk.gdk.Event.get_screen</title> - - <programlisting><methodsynopsis language="python"> - <methodname>get_screen</methodname> - <methodparam></methodparam> - </methodsynopsis></programlisting> - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>the screen for the event</simpara></listitem> - </varlistentry> - </variablelist> - - <note> - <para>This method is available in PyGTK 2.2 and above.</para> - </note> - - <para>The <methodname>get_screen</methodname>() method returns the -<link linkend="class-gdkscreen"><classname>gtk.gdk.Screen</classname></link> -for the event. The screen is typically the screen for the event window, but -for events such as mouse events, it is the screen where the the pointer was -when the event occurs - that is, the screen that has the root window for the -event.</para> - - </refsect2> - - </refsect1> - - <refsect1> - <title>Functions</title> - - <refsect2 id="function-gdk--events-pending"> - <title>gtk.gdk.events_pending</title> - - <programlisting><methodsynopsis language="python"> - <methodname>gtk.gdk.events_pending</methodname> - <methodparam></methodparam> - </methodsynopsis></programlisting> - - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara><literal>True</literal> if any events are -pending</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <function>gtk.gdk.events_pending</function>() function -returns <literal>True</literal> if any events are ready to be -processed.</para> - - </refsect2> - - <refsect2 id="function-gdk--event-peek"> - <title>gtk.gdk.event_peek</title> - - <programlisting><methodsynopsis language="python"> - <methodname>gtk.gdk.event_peek</methodname> - <methodparam></methodparam> - </methodsynopsis></programlisting> - - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>a copy of the first <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> on the -event queue or <literal>None</literal> if there is no event in the -queue.</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <function>gtk.gdk.event_peek</function>() function returns a -copy of the first <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> on the -event queue or <literal>None</literal> if there is no event on the event -queue.</para> - - </refsect2> - - <refsect2 id="function-gdk--event-get"> - <title>gtk.gdk.event_get</title> - - <programlisting><methodsynopsis language="python"> - <methodname>gtk.gdk.event_get</methodname> - <methodparam></methodparam> - </methodsynopsis></programlisting> - - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>the next <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> to be -processed, or <literal>None</literal> if no events are -pending.</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <function>gtk.gdk.event_get</function>() function returns -the next <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> to be -processed or <literal>None</literal> if no events are available.</para> - - </refsect2> - - <refsect2 id="function-gdk--event-get-graphics-expose"> - <title>gtk.gdk.event_get_graphics_expose</title> - - <programlisting><methodsynopsis language="python"> - <methodname>gtk.gdk.event_get_graphics_expose</methodname> - <methodparam><parameter - role="keyword">window</parameter></methodparam> - </methodsynopsis></programlisting> - - <variablelist> - <varlistentry> - <term><parameter role="keyword">window</parameter> :</term> - <listitem><simpara>a <link - linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link></simpara></listitem> - </varlistentry> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara>an expose <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> if a -<literal>GraphicsExpose</literal> was received, or <literal>None</literal> -if a <literal>NoExpose</literal> event was received.</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <function>gtk.gdk.event_get_graphics_expose</function>() -function waits for and returns returns an expose <link -linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> if a -<literal>GraphicsExpose</literal> was received, or <literal>None</literal> -if a <literal>NoExpose</literal> event was received.</para> - - </refsect2> - - <refsect2 id="function-gdk--set-show-events"> - <title>gtk.gdk.set_show_events</title> - - <programlisting><methodsynopsis language="python"> - <methodname>gtk.gdk.set_show_events</methodname> - <methodparam><parameter - role="keyword">show_events</parameter></methodparam> - </methodsynopsis></programlisting> - - <variablelist> - <varlistentry> - <term><parameter -role="keyword">show_events</parameter> :</term> - <listitem><simpara>if <literal>True</literal> output event debug -information</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <function>gtk.gdk.set_show_events</function>() function sets -the debug events flag if <parameter>show_events</parameter> is -<literal>True</literal>. Otherwise the debug events flag is unset.</para> - - </refsect2> - - <refsect2 id="function-gdk--get-show-events"> - <title>gtk.gdk.get_show_events</title> - - <programlisting><methodsynopsis language="python"> - <methodname>gtk.gdk.get_show_events</methodname> - <methodparam></methodparam> - </methodsynopsis></programlisting> - - <variablelist> - <varlistentry> - <term><emphasis>Returns</emphasis> :</term> - <listitem><simpara><literal>True</literal> if the debug events -flag is set.</simpara></listitem> - </varlistentry> - </variablelist> - - <para>The <function>gtk.gdk.get_show_events</function>() function -returns the setting of the internal debug events flag.</para> - - </refsect2> - - <refsect2 id="function-gdk--event-handler-set"> - <title>gtk.gdk.event_handler_set</title> - - <programlisting><methodsynopsis language="python"> - <methodname>gtk.gdk.event_handler_set</methodname> - <methodparam><parameter>func</parameter></methodparam> - <methodparam><parameter>data</parameter><initializer>None</initializer></methodparam> - </methodsynopsis></programlisting> - - <variablelist> - <varlistentry> - <term><parameter>func</parameter> :</term> - <listitem><simpara> the function to call to handle events from GDK - or <literal>None</literal>.</simpara></listitem> - </varlistentry> - <varlistentry> - <term><parameter>data</parameter> :</term> - <listitem><simpara> user data to pass to the function.</simpara></listitem> - </varlistentry> - </variablelist> - - <note> - <para>This function is available in PyGTK 2.10 and above.</para> - </note> - - <para>The <function>gtk.gdk.event_handler_set</function>() function - specifies <parameter>func</parameter> as the function to call to - handle all events from GDK. <parameter>data</parameter> is the - optional user data to pass to <parameter>func</parameter>.</para> - - <para>The signature of <parameter>func</parameter> is:</para> - - <programlisting> - def func(event, user_data): - </programlisting> - - <para>where <parameter>event</parameter> is the <link - linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> - and <parameter>user_data</parameter> is - <parameter>data</parameter>.</para> - - </refsect2> - - </refsect1> - -</refentry> |