📄 gdk-event-structures.html
字号:
Generated when the pointer moves.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="gdk-Events.html#GdkEventType">GdkEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td><td>the type of the event.</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *<em class="structfield"><code>window</code></em>;</span></p></td><td>the window which received the event.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint8">gint8</a> <em class="structfield"><code>send_event</code></em>;</span></p></td><td><ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event was sent explicitly (e.g. using <code class="function">XSendEvent</code>).</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> <em class="structfield"><code>time</code></em>;</span></p></td><td>the time of the event in milliseconds.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> <em class="structfield"><code>x</code></em>;</span></p></td><td>the x coordinate of the pointer relative to the window.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> <em class="structfield"><code>y</code></em>;</span></p></td><td>the y coordinate of the pointer relative to the window.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> *<em class="structfield"><code>axes</code></em>;</span></p></td><td><em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> translated to the axes of <em class="parameter"><code>device</code></em>, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>device</code></em> is the mouse.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> <em class="structfield"><code>state</code></em>;</span></p></td><td>a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See <a class="link" href="gdk-Windows.html#GdkModifierType"><span class="type">GdkModifierType</span></a>.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint16">gint16</a> <em class="structfield"><code>is_hint</code></em>;</span></p></td><td>set to 1 if this event is just a hint, see the <a class="link" href="gdk-Events.html#GDK-POINTER-MOTION-HINT-MASK:CAPS"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></a> value of <a class="link" href="gdk-Events.html#GdkEventMask"><span class="type">GdkEventMask</span></a>.</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Input-Devices.html#GdkDevice">GdkDevice</a> *<em class="structfield"><code>device</code></em>;</span></p></td><td>the device where the event originated.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> <em class="structfield"><code>x_root</code></em>;</span></p></td><td>the x coordinate of the pointer relative to the root of the screen.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> <em class="structfield"><code>y_root</code></em>;</span></p></td><td>the y coordinate of the pointer relative to the root of the screen.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3240586"></a><h3><a name="GdkEventExpose"></a>GdkEventExpose</h3><a class="indexterm" name="id3240599"></a><pre class="programlisting">typedef struct { GdkEventType type; GdkWindow *window; gint8 send_event; GdkRectangle area; GdkRegion *region; gint count; /* If non-zero, how many more events follow. */} GdkEventExpose;</pre><p>Generated when all or part of a window becomes visible and needs to beredrawn.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="gdk-Events.html#GdkEventType">GdkEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td><td>the type of the event (<a class="link" href="gdk-Events.html#GDK-EXPOSE:CAPS"><code class="literal">GDK_EXPOSE</code></a>).</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *<em class="structfield"><code>window</code></em>;</span></p></td><td>the window which received the event.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint8">gint8</a> <em class="structfield"><code>send_event</code></em>;</span></p></td><td><ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event was sent explicitly (e.g. using <code class="function">XSendEvent</code>).</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle">GdkRectangle</a> <em class="structfield"><code>area</code></em>;</span></p></td><td>bounding box of <em class="parameter"><code>region</code></em>.</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *<em class="structfield"><code>region</code></em>;</span></p></td><td>the region that needs to be redrawn.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>count</code></em>;</span></p></td><td>the number of contiguous <a class="link" href="gdk-Events.html#GDK-EXPOSE:CAPS"><code class="literal">GDK_EXPOSE</code></a> events following this one.The only use for this is "exposure compression", i.e. handling all contiguous<a class="link" href="gdk-Events.html#GDK-EXPOSE:CAPS"><code class="literal">GDK_EXPOSE</code></a> events in one go, though GDK performs some exposure compressionso this is not normally needed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3240804"></a><h3><a name="GdkEventVisibility"></a>GdkEventVisibility</h3><a class="indexterm" name="id3240817"></a><pre class="programlisting">typedef struct { GdkEventType type; GdkWindow *window; gint8 send_event; GdkVisibilityState state;} GdkEventVisibility;</pre><p>Generated when the window visibility status has changed.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="gdk-Events.html#GdkEventType">GdkEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td><td>the type of the event (<a class="link" href="gdk-Events.html#GDK-VISIBILITY-NOTIFY:CAPS"><code class="literal">GDK_VISIBILITY_NOTIFY</code></a>).</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *<em class="structfield"><code>window</code></em>;</span></p></td><td>the window which received the event.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint8">gint8</a> <em class="structfield"><code>send_event</code></em>;</span></p></td><td><ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event was sent explicitly (e.g. using <code class="function">XSendEvent</code>).</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Event-Structures.html#GdkVisibilityState">GdkVisibilityState</a> <em class="structfield"><code>state</code></em>;</span></p></td><td>the new visibility state (<a class="link" href="gdk-Event-Structures.html#GDK-VISIBILITY-FULLY-OBSCURED:CAPS"><code class="literal">GDK_VISIBILITY_FULLY_OBSCURED</code></a>,<a class="link" href="gdk-Event-Structures.html#GDK-VISIBILITY-PARTIAL:CAPS"><code class="literal">GDK_VISIBILITY_PARTIAL</code></a> or <a class="link" href="gdk-Event-Structures.html#GDK-VISIBILITY-UNOBSCURED:CAPS"><code class="literal">GDK_VISIBILITY_UNOBSCURED</code></a>).</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3240988"></a><h3><a name="GdkEventCrossing"></a>GdkEventCrossing</h3><a class="indexterm" name="id3241001"></a><pre class="programlisting">typedef struct { GdkEventType type; GdkWindow *window; gint8 send_event; GdkWindow *subwindow; guint32 time; gdouble x; gdouble y; gdouble x_root; gdouble y_root; GdkCrossingMode mode; GdkNotifyType detail; gboolean focus; guint state;} GdkEventCrossing;</pre><p>Generated when the pointer enters or leaves a window.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="gdk-Events.html#GdkEventType">GdkEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td><td>the type of the event (<a class="link" href="gdk-Events.html#GDK-ENTER-NOTIFY:CAPS"><code class="literal">GDK_ENTER_NOTIFY</code></a> or <a class="link" href="gdk-Events.html#GDK-LEAVE-NOTIFY:CAPS"><code class="literal">GDK_LEAVE_NOTIFY</code></a>).</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *<em class="structfield"><code>window</code></em>;</span></p></td><td>the window which received the event.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint8">gint8</a> <em class="structfield"><code>send_event</code></em>;</span></p></td><td><ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event was sent explicitly (e.g. using <code class="function">XSendEvent</code>).</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *<em class="structfield"><code>subwindow</code></em>;</span></p></td><td>the window that was entered or left.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> <em class="structfield"><code>time</code></em>;</span></p></td><td>the time of the event in milliseconds.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> <em class="structfield"><code>x</code></em>;</span></p></td><td>the x coordinate of the pointer relative to the window.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> <em class="structfield"><code>y</code></em>;</span></p></td><td>the y coordinate of the pointer relative to the window.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> <em class="structfield"><code>x_root</code></em>;</span></p></td><td>the x coordinate of the pointer relative to the root of the screen.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> <em class="structfield"><code>y_root</code></em>;</span></p></td><td>the y coordinate of the pointer relative to the root of the screen.</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Event-Structures.html#GdkCrossingMode">GdkCrossingMode</a> <em class="structfield"><code>mode</code></em>;</span></p></td><td>the crossing mode (<a class="link" href="gdk-Event-Structures.html#GDK-CROSSING-NORMAL:CAPS"><code class="literal">GDK_CROSSING_NORMAL</code></a>, <a class="link" href="gdk-Event-Structures.html#GDK-CROSSING-GRAB:CAPS"><code class="literal">GDK_CROSSING_GRAB</code></a> or <a class="link" href="gdk-Event-Structures.html#GDK-CROSSING-UNGRAB:CAPS"><code class="literal">GDK_CROSSING_UNGRAB</code></a>).</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Event-Structures.html#GdkNotifyType">GdkNotifyType</a> <em class="structfield"><code>detail</code></em>;</span></p></td><td>the kind of crossing that happened (<a class="link" href="gdk-Event-Structures.html#GDK-NOTIFY-INFERIOR:CAPS"><code class="literal">GDK_NOTIFY_INFERIOR</code></a>, <a class="link" href="gdk-Event-Structures.html#GDK-NOTIFY-ANCESTOR:CAPS"><code class="literal">GDK_NOTIFY_ANCESTOR</code></a>, <a class="link" href="gdk-Event-Structures.html#GDK-NOTIFY-VIRTUAL:CAPS"><code class="literal">GDK_NOTIFY_VIRTUAL</code></a>, <a class="link" href="gdk-Event-Structures.html#GDK-NOTIFY-NONLINEAR:CAPS"><code class="literal">GDK_NOTIFY_NONLINEAR</code></a> or <a class="link" href="gdk-Event-Structures.html#GDK-NOTIFY-NONLINEAR-VIRTUAL:CAPS"><code class="literal">GDK_NOTIFY_NONLINEAR_VIRTUAL</code></a>).</td></tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -