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

📄 gdk-input-devices.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3288222"></a><h3><a name="GdkInputMode"></a>enum GdkInputMode</h3><a class="indexterm" name="id3288235"></a><pre class="programlisting">typedef enum{  GDK_MODE_DISABLED,  GDK_MODE_SCREEN,  GDK_MODE_WINDOW} GdkInputMode;</pre><p>An enumeration that describes the mode of an input device.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GDK-MODE-DISABLED:CAPS"></a><code class="literal">GDK_MODE_DISABLED</code></span></p></td><td>the device is disabled and will not report any events.</td></tr><tr><td><p><span class="term"><a name="GDK-MODE-SCREEN:CAPS"></a><code class="literal">GDK_MODE_SCREEN</code></span></p></td><td>the device is enabled. The device's coordinate space                    maps to the entire screen.</td></tr><tr><td><p><span class="term"><a name="GDK-MODE-WINDOW:CAPS"></a><code class="literal">GDK_MODE_WINDOW</code></span></p></td><td>the device is enabled. The device's coordinate space                    is mapped to a single window. The manner in which this window                    is chosen is undefined, but it will typically be the same                    way in which the focus window for key events is determined.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3288332"></a><h3><a name="GdkDeviceKey"></a>GdkDeviceKey</h3><a class="indexterm" name="id3288344"></a><pre class="programlisting">typedef struct {  guint keyval;  GdkModifierType modifiers;} GdkDeviceKey;</pre><p>The <span class="structname">GdkDeviceKey</span> structure contains informationabout the mapping of one device macro button onto a normal X key event. It has 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#guint">guint</a>&#160;<em class="structfield"><code>keyval</code></em>;</span></p></td><td>the keyval to generate when the macro button is pressed.         If this is 0, no keypress will be generated.</td></tr><tr><td><p><span class="term"><a class="link" href="gdk-Windows.html#GdkModifierType">GdkModifierType</a>&#160;<em class="structfield"><code>modifiers</code></em>;</span></p></td><td>the modifiers set for the generated key event.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3288414"></a><h3><a name="GdkDeviceAxis"></a>GdkDeviceAxis</h3><a class="indexterm" name="id3288427"></a><pre class="programlisting">typedef struct {  GdkAxisUse use;  gdouble    min;  gdouble    max;} GdkDeviceAxis;</pre><p>The <span class="structname">GdkDeviceAxis</span> structure contains informationabout the range and mapping of a device axis.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="gdk-Input-Devices.html#GdkAxisUse">GdkAxisUse</a>&#160;<em class="structfield"><code>use</code></em>;</span></p></td><td>specifies how the axis is used.</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>min</code></em>;</span></p></td><td>the minimal value that will be reported by this axis.</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>max</code></em>;</span></p></td><td>the maximal value that will be reported by this axis.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3288517"></a><h3><a name="GdkAxisUse"></a>enum GdkAxisUse</h3><a class="indexterm" name="id3288529"></a><pre class="programlisting">typedef enum{  GDK_AXIS_IGNORE,  GDK_AXIS_X,  GDK_AXIS_Y,  GDK_AXIS_PRESSURE,  GDK_AXIS_XTILT,  GDK_AXIS_YTILT,  GDK_AXIS_WHEEL,  GDK_AXIS_LAST} GdkAxisUse;</pre><p>An enumeration describing the way in which a deviceaxis (valuator) maps onto the predefined valuatortypes that GTK+ understands.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GDK-AXIS-IGNORE:CAPS"></a><code class="literal">GDK_AXIS_IGNORE</code></span></p></td><td>the axis is ignored.</td></tr><tr><td><p><span class="term"><a name="GDK-AXIS-X:CAPS"></a><code class="literal">GDK_AXIS_X</code></span></p></td><td>the axis is used as the x axis.</td></tr><tr><td><p><span class="term"><a name="GDK-AXIS-Y:CAPS"></a><code class="literal">GDK_AXIS_Y</code></span></p></td><td>the axis is used as the y axis.</td></tr><tr><td><p><span class="term"><a name="GDK-AXIS-PRESSURE:CAPS"></a><code class="literal">GDK_AXIS_PRESSURE</code></span></p></td><td>the axis is used for pressure information.</td></tr><tr><td><p><span class="term"><a name="GDK-AXIS-XTILT:CAPS"></a><code class="literal">GDK_AXIS_XTILT</code></span></p></td><td>the axis is used for x tilt information.</td></tr><tr><td><p><span class="term"><a name="GDK-AXIS-YTILT:CAPS"></a><code class="literal">GDK_AXIS_YTILT</code></span></p></td><td>the axis is used for x tilt information.</td></tr><tr><td><p><span class="term"><a name="GDK-AXIS-WHEEL:CAPS"></a><code class="literal">GDK_AXIS_WHEEL</code></span></p></td><td>the axis is used for wheel information.</td></tr><tr><td><p><span class="term"><a name="GDK-AXIS-LAST:CAPS"></a><code class="literal">GDK_AXIS_LAST</code></span></p></td><td>a constant equal to the numerically highest axis value.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3288736"></a><h3><a name="gdk-devices-list"></a>gdk_devices_list ()</h3><a class="indexterm" name="id3288749"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a>*              gdk_devices_list                    (void);</pre><p>Returns the list of available input devices for the default display.The list is statically allocated and should not be freed.</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> a list of <a class="link" href="gdk-Input-Devices.html#GdkDevice"><span class="type">GdkDevice</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3288798"></a><h3><a name="gdk-device-set-source"></a>gdk_device_set_source ()</h3><a class="indexterm" name="id3288812"></a><pre class="programlisting">void                gdk_device_set_source               (<a class="link" href="gdk-Input-Devices.html#GdkDevice">GdkDevice</a> *device,                                                         <a class="link" href="gdk-Input-Devices.html#GdkInputSource">GdkInputSource</a> source);</pre><p>Sets the source type for an input 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>source</code></em>&#160;:</span></p></td><td>the source type.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3288888"></a><h3><a name="gdk-device-set-mode"></a>gdk_device_set_mode ()</h3><a class="indexterm" name="id3288902"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gdk_device_set_mode                 (<a class="link" href="gdk-Input-Devices.html#GdkDevice">GdkDevice</a> *device,                                                         <a class="link" href="gdk-Input-Devices.html#GdkInputMode">GdkInputMode</a> mode);</pre><p>Sets a the mode of an input device. The mode controls if the device is active and whether the device's range is mapped to theentire screen or to a single window.</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>mode</code></em>&#160;:</span></p></td><td>the input mode.</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 mode was successfully changed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3289000"></a><h3><a name="gdk-device-set-key"></a>gdk_device_set_key ()</h3><a class="indexterm" name="id3289014"></a><pre class="programlisting">void                gdk_device_set_key                  (<a class="link" href="gdk-Input-Devices.html#GdkDevice">GdkDevice</a> *device,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> index_,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> keyval,                                                         <a class="link" href="gdk-Windows.html#GdkModifierType">GdkModifierType</a> modifiers);</pre><p>Specifies the X key event to generate when a macro button of a deviceis pressed.</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>index_</code></em>&#160;:</span></p></td><td>the index of the macro button to set.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>keyval</code></em>&#160;:</span></p></td><td>the keyval to generate.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>modifiers</code></em>&#160;:</span></p></td><td>the modifiers to set.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3289135"></a><h3><a name="gdk-device-set-axis-use"></a>gdk_device_set_axis_use ()</h3><a class="indexterm" name="id3289148"></a><pre class="programlisting">void                gdk_device_set_axis_use             (<a class="link" href="gdk-Input-Devices.html#GdkDevice">GdkDevice</a> *device,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> index_,                                                         <a class="link" href="gdk-Input-Devices.html#GdkAxisUse">GdkAxisUse</a> use);</pre><p>Specifies how an axis of a device is used.</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>index_</code></em>&#160;:</span></p></td><td>the index of the axis.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>use</code></em>&#160;:</span></p></td><td>specifies how the axis is used.</td></tr>

⌨️ 快捷键说明

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