⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gdk-input-devices.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3289246"></a><h3><a name="gdk-device-get-core-pointer"></a>gdk_device_get_core_pointer ()</h3><a class="indexterm" name="id3289260"></a><pre class="programlisting"><a class="link" href="gdk-Input-Devices.html#GdkDevice">GdkDevice</a>*          gdk_device_get_core_pointer         (void);</pre><p>Returns the core pointer device for the default display.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the core pointer device; this is owned by the  display and should not be freed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3289302"></a><h3><a name="gdk-device-get-state"></a>gdk_device_get_state ()</h3><a class="indexterm" name="id3289315"></a><pre class="programlisting">void                gdk_device_get_state                (<a class="link" href="gdk-Input-Devices.html#GdkDevice">GdkDevice</a> *device,                                                         <a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> *axes,                                                         <a class="link" href="gdk-Windows.html#GdkModifierType">GdkModifierType</a> *mask);</pre><p>Gets the current state of a device.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td><td>a <a class="link" href="gdk-Input-Devices.html#GdkDevice"><span class="type">GdkDevice</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>window</code></em>&#160;:</span></p></td><td>a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>axes</code></em>&#160;:</span></p></td><td>an array of doubles to store the values of the axes of <em class="parameter"><code>device</code></em> in,   or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></p></td><td>location to store the modifiers, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3289470"></a><h3><a name="gdk-device-get-history"></a>gdk_device_get_history ()</h3><a class="indexterm" name="id3289483"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gdk_device_get_history              (<a class="link" href="gdk-Input-Devices.html#GdkDevice">GdkDevice</a> *device,                                                         <a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> start,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> stop,                                                         <a class="link" href="gdk-Input-Devices.html#GdkTimeCoord">GdkTimeCoord</a> ***events,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> *n_events);</pre><p>Obtains the motion history for a device; given a starting andending timestamp, return all events in the motion history forthe device in the given range of time. Some windowing systemsdo not support motion history, in which case, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> willbe returned. (This is not distinguishable from the case wheremotion history is supported and no events were found.)</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td><td> a <a class="link" href="gdk-Input-Devices.html#GdkDevice"><span class="type">GdkDevice</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>window</code></em>&#160;:</span></p></td><td> the window with respect to which which the event coordinates will be reported</td></tr><tr><td><p><span class="term"><em class="parameter"><code>start</code></em>&#160;:</span></p></td><td> starting timestamp for range of events to return</td></tr><tr><td><p><span class="term"><em class="parameter"><code>stop</code></em>&#160;:</span></p></td><td> ending timestamp for the range of events to return</td></tr><tr><td><p><span class="term"><em class="parameter"><code>events</code></em>&#160;:</span></p></td><td> location to store a newly-allocated array of <a class="link" href="gdk-Input-Devices.html#GdkTimeCoord"><span class="type">GdkTimeCoord</span></a>, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_events</code></em>&#160;:</span></p></td><td> location to store the length of <em class="parameter"><code>events</code></em>, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</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 windowing system supports motion history and at least one event was found.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3289725"></a><h3><a name="gdk-device-free-history"></a>gdk_device_free_history ()</h3><a class="indexterm" name="id3289738"></a><pre class="programlisting">void                gdk_device_free_history             (<a class="link" href="gdk-Input-Devices.html#GdkTimeCoord">GdkTimeCoord</a> **events,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> n_events);</pre><p>Frees an array of <a class="link" href="gdk-Input-Devices.html#GdkTimeCoord"><span class="type">GdkTimeCoord</span></a> that was returned by <a class="link" href="gdk-Input-Devices.html#gdk-device-get-history"><code class="function">gdk_device_get_history()</code></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>events</code></em>&#160;:</span></p></td><td>an array of <a class="link" href="gdk-Input-Devices.html#GdkTimeCoord"><span class="type">GdkTimeCoord</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_events</code></em>&#160;:</span></p></td><td>the length of the array.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3289835"></a><h3><a name="GdkTimeCoord"></a>GdkTimeCoord</h3><a class="indexterm" name="id3289848"></a><pre class="programlisting">typedef struct {  guint32 time;  gdouble axes[GDK_MAX_TIMECOORD_AXES];} GdkTimeCoord;</pre><p>The <a class="link" href="gdk-Input-Devices.html#GdkTimeCoord"><span class="type">GdkTimeCoord</span></a> structure stores a single event in amotion history. It contains the following fields:</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a>&#160;<em class="structfield"><code>time</code></em>;</span></p></td><td>The timestamp for this event.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a>&#160;<em class="structfield"><code>axes</code></em>[GDK_MAX_TIMECOORD_AXES];</span></p></td><td>the values of the device's axes.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3289921"></a><h3><a name="gdk-device-get-axis"></a>gdk_device_get_axis ()</h3><a class="indexterm" name="id3289934"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gdk_device_get_axis                 (<a class="link" href="gdk-Input-Devices.html#GdkDevice">GdkDevice</a> *device,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> *axes,                                                         <a class="link" href="gdk-Input-Devices.html#GdkAxisUse">GdkAxisUse</a> use,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> *value);</pre><p>Interprets an array of double as axis values for a given device,and locates the value in the array for a given axis use.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>device</code></em>&#160;:</span></p></td><td> a <a class="link" href="gdk-Input-Devices.html#GdkDevice"><span class="type">GdkDevice</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>axes</code></em>&#160;:</span></p></td><td> pointer to an array of axes</td></tr><tr><td><p><span class="term"><em class="parameter"><code>use</code></em>&#160;:</span></p></td><td> the use to look for</td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td><td> location to store the found value.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</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 given axis use was found, otherwise <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3290090"></a><h3><a name="gdk-input-set-extension-events"></a>gdk_input_set_extension_events ()</h3><a class="indexterm" name="id3290104"></a><pre class="programlisting">void                gdk_input_set_extension_events      (<a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> mask,                                                         <a class="link" href="gdk-Input-Devices.html#GdkExtensionMode">GdkExtensionMode</a> mode);</pre><p>Turns extension events on or off for a particular window,and specifies the event mask for extension events.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>window</code></em>&#160;:</span></p></td><td>a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></p></td><td>the event mask</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mode</code></em>&#160;:</span></p></td><td>the type of extension events that are desired.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3290204"></a><h3><a name="GdkExtensionMode"></a>enum GdkExtensionMode</h3><a class="indexterm" name="id3290218"></a><pre class="programlisting">typedef enum{  GDK_EXTENSION_EVENTS_NONE,  GDK_EXTENSION_EVENTS_ALL,  GDK_EXTENSION_EVENTS_CURSOR} GdkExtensionMode;</pre><p>An enumeration used to specify which extension eventsare desired for a particular widget.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GDK-EXTENSION-EVENTS-NONE:CAPS"></a><code class="literal">GDK_EXTENSION_EVENTS_NONE</code></span></p></td><td>no extension events are desired.</td></tr><tr><td><p><span class="term"><a name="GDK-EXTENSION-EVENTS-ALL:CAPS"></a><code class="literal">GDK_EXTENSION_EVENTS_ALL</code></span></p></td><td>all extension events are desired.</td></tr><tr><td><p><span class="term"><a name="GDK-EXTENSION-EVENTS-CURSOR:CAPS"></a><code class="literal">GDK_EXTENSION_EVENTS_CURSOR</code></span></p></td><td>extension events are desired only if a cursor                              will be displayed for the device.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3290313"></a><div class="refsect2" lang="en"><a name="id3290314"></a></div><hr><div class="refsect2" lang="en"><a name="id3290315"></a></div></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -