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

📄 gdk-general.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 4 页
字号:
grabbed by this application.</p><p>Note that this does not take the inmplicit pointer grab on buttonpresses into account.</p><p></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> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the pointer is currently grabbed by this application.* </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3047359"></a><h3><a name="gdk-set-double-click-time"></a>gdk_set_double_click_time ()</h3><a class="indexterm" name="id3047370"></a><pre class="programlisting">void                gdk_set_double_click_time           (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> msec);</pre><p>Set the double click time for the default display. See<a class="link" href="GdkDisplay.html#gdk-display-set-double-click-time"><code class="function">gdk_display_set_double_click_time()</code></a>. See also <a class="link" href="GdkDisplay.html#gdk-display-set-double-click-distance"><code class="function">gdk_display_set_double_click_distance()</code></a>.Applications should <span class="emphasis"><em>not</em></span> set this, it is a global user-configured setting.</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>msec</code></em>&#160;:</span></p></td><td> double click time in milliseconds (thousandths of a second)</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3047442"></a><h3><a name="gdk-keyboard-grab"></a>gdk_keyboard_grab ()</h3><a class="indexterm" name="id3047452"></a><pre class="programlisting"><a class="link" href="gdk-General.html#GdkGrabStatus">GdkGrabStatus</a>       gdk_keyboard_grab                   (<a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> owner_events,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> time_);</pre><p>Grabs the keyboard so that all events are passed to thisapplication until the keyboard is ungrabbed with <a class="link" href="gdk-General.html#gdk-keyboard-ungrab"><code class="function">gdk_keyboard_ungrab()</code></a>.This overrides any previous keyboard grab by this client.</p><p>If you set up anything at the time you take the grab that needs to be cleanedup when the grab ends, you should handle the <a class="link" href="gdk-Event-Structures.html#GdkEventGrabBroken"><span class="type">GdkEventGrabBroken</span></a> events thatare emitted when the grab ends unvoluntarily.</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>the <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> which will own the grab (the grab window).</td></tr><tr><td><p><span class="term"><em class="parameter"><code>owner_events</code></em>&#160;:</span></p></td><td>if <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> then all keyboard events are reported with respect to<em class="parameter"><code>window</code></em>. If <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> then keyboard events for this application are reported asnormal, but keyboard events outside this application are reported with respectto <em class="parameter"><code>window</code></em>. Both key press and key release events are always reported,independant of the event mask set by the application.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>time_</code></em>&#160;:</span></p></td><td>a timestamp from a <a class="link" href="gdk-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a>, or <a class="link" href="gdk-Events.html#GDK-CURRENT-TIME:CAPS"><code class="literal">GDK_CURRENT_TIME</code></a> if no timestamp isavailable.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td><a class="link" href="gdk-General.html#GDK-GRAB-SUCCESS:CAPS"><code class="literal">GDK_GRAB_SUCCESS</code></a> if the grab was successful.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3047627"></a><h3><a name="gdk-keyboard-ungrab"></a>gdk_keyboard_ungrab ()</h3><a class="indexterm" name="id3047638"></a><pre class="programlisting">void                gdk_keyboard_ungrab                 (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> time_);</pre><p>Ungrabs the keyboard on the default display, if it is grabbed by this application.</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>time_</code></em>&#160;:</span></p></td><td> a timestamp from a <a class="link" href="gdk-Event-Structures.html#GdkEvent"><span class="type">GdkEvent</span></a>, or <a class="link" href="gdk-Events.html#GDK-CURRENT-TIME:CAPS"><code class="literal">GDK_CURRENT_TIME</code></a> if no       timestamp is available.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3047699"></a><h3><a name="gdk-beep"></a>gdk_beep ()</h3><a class="indexterm" name="id3047709"></a><pre class="programlisting">void                gdk_beep                            (void);</pre><p>Emits a short beep on the default display.</p><p></p></div><hr><div class="refsect2" lang="en"><a name="id3047732"></a><h3><a name="gdk-get-use-xshm"></a>gdk_get_use_xshm ()</h3><a class="indexterm" name="id3047744"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gdk_get_use_xshm                    (void);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_get_use_xshm</code> is deprecated and should not be used in newly-written code.</p></div><p>Returns <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if GDK will attempt to use the MIT-SHM shared memory extension.</p><p>The shared memory extension is used for <a class="link" href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, and consequently for<a class="link" href="gdk-GdkRGB.html" title="GdkRGB">GdkRGB</a>.It enables much faster drawing by communicating with the X server throughSYSV shared memory calls. However, it can only be used if the X client andserver are on the same machine and the server supports it.</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><ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if use of the MIT shared memory extension will be attempted.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3047825"></a><h3><a name="gdk-set-use-xshm"></a>gdk_set_use_xshm ()</h3><a class="indexterm" name="id3047838"></a><pre class="programlisting">void                gdk_set_use_xshm                    (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> use_xshm);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_set_use_xshm</code> is deprecated and should not be used in newly-written code.</p></div><p>Sets whether the use of the MIT shared memory extension should be attempted.This function is mainly for internal use. It is only safe for an applicationto set this to <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, since if it is set to <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> and the server does notsupport the extension it may cause warning messages to be output.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>use_xshm</code></em>&#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 use of the MIT shared memory extension should be attempted.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3047920"></a><h3><a name="gdk-error-trap-push"></a>gdk_error_trap_push ()</h3><a class="indexterm" name="id3047930"></a><pre class="programlisting">void                gdk_error_trap_push                 (void);</pre><p>This function allows X errors to be trapped instead of the normal behaviorof exiting the application. It should only be used if it is not possible toavoid the X error in any other way.</p><div class="example"><a name="id3047952"></a><p class="title"><b>Example&#160;1.&#160;Trapping an X error</b></p><div class="example-contents"><pre class="programlisting">  gdk_error_trap_push ();  /* ... Call the X function which may cause an error here ... */  /* Flush the X queue to catch errors now. */  gdk_flush ();  if (gdk_error_trap_pop ())    {      /* ... Handle the error here ... */    }</pre></div></div><br class="example-break"></div><hr><div class="refsect2" lang="en"><a name="id3047974"></a><h3><a name="gdk-error-trap-pop"></a>gdk_error_trap_pop ()</h3><a class="indexterm" name="id3047985"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                gdk_error_trap_pop                  (void);</pre><p>Removes the X error trap installed with <a class="link" href="gdk-General.html#gdk-error-trap-push"><code class="function">gdk_error_trap_push()</code></a>.</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 X error code, or 0 if no error occurred.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3048027"></a><h3><a name="GDK-WINDOWING-X11:CAPS"></a>GDK_WINDOWING_X11</h3><a class="indexterm" name="id3048038"></a><pre class="programlisting">#define GDK_WINDOWING_X11</pre><p>This macro is defined if GDK is configured to use the X backend.</p></div><hr><div class="refsect2" lang="en"><a name="id3048052"></a><h3><a name="GDK-WINDOWING-WIN32:CAPS"></a>GDK_WINDOWING_WIN32</h3><a class="indexterm" name="id3048063"></a><pre class="programlisting">#define GDK_WINDOWING_WIN32</pre><p>This macro is defined if GDK is configured to use the Win32 backend.</p></div></div><div class="refsect1" lang="en"><a name="id3048079"></a><div class="refsect2" lang="en"><a name="id3048080"></a></div><hr><div class="refsect2" lang="en"><a name="id3048082"></a></div></div></div></body></html>

⌨️ 快捷键说明

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