gdk-selections.html
来自「最新gtk中文资料集」· HTML 代码 · 共 837 行 · 第 1/3 页
HTML
837 行
</tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3261314"></a><h3><a name="gdk-selection-owner-get-for-display"></a>gdk_selection_owner_get_for_display ()</h3><a class="indexterm" name="id3261331"></a><pre class="programlisting"><a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a>* gdk_selection_owner_get_for_display (<a class="link" href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> selection);</pre><p>Determine the owner of the given selection.</p><p>Note that the return value may be owned by a different process if a foreign window was previously created for thatwindow, but a new foreign window will never be created by this call.</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>display</code></em> :</span></p></td><td> a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td><td> an atom indentifying a selection.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> if there is a selection owner for this window, and it is a window known to the current process, the <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> that owns the selection, otherwise <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td></tr></tbody></table></div><p class="since">Since 2.2</p></div><hr><div class="refsect2" lang="en"><a name="id3261455"></a><h3><a name="gdk-selection-convert"></a>gdk_selection_convert ()</h3><a class="indexterm" name="id3261468"></a><pre class="programlisting">void gdk_selection_convert (<a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *requestor, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> selection, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> target, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> time_);</pre><p>Retrieves the contents of a selection in a givenform.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>requestor</code></em> :</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>selection</code></em> :</span></p></td><td>an atom identifying the selection to get the contents of.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td><td>the form in which to retrieve the selection.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td><td>the timestamp to use when retrieving the selection. The selection owner may refuse the request if it did not own the selection at the time indicated by the timestamp.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3261593"></a><h3><a name="gdk-selection-property-get"></a>gdk_selection_property_get ()</h3><a class="indexterm" name="id3261607"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gdk_selection_property_get (<a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *requestor, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar">guchar</a> **data, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> *prop_type, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> *prop_format);</pre><p>Retrieves selection data that was stored by the selectiondata in response to a call to <a class="link" href="gdk-Selections.html#gdk-selection-convert"><code class="function">gdk_selection_convert()</code></a>. This functionwill not be used by applications, who should use the <ahref="/usr/share/gtk-doc/html/gtk/gtk-Clipboards.html#GtkClipboard"><span class="type">GtkClipboard</span></a>API instead.</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>requestor</code></em> :</span></p></td><td> the window on which the data is stored</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td> location to store a pointer to the retrieved data. If the retrieval failed, <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> we be stored here, otherwise, it will be non-<ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> and the returned data should be freed with <ahref="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when you are finished using it. The length of the allocated memory is one more than the length of the returned data, and the final byte will always be zero, to ensure nul-termination of strings.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>prop_type</code></em> :</span></p></td><td> location to store the type of the property.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>prop_format</code></em> :</span></p></td><td> location to store the format of the property.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the length of the retrieved data.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3261795"></a><h3><a name="gdk-selection-send-notify"></a>gdk_selection_send_notify ()</h3><a class="indexterm" name="id3261809"></a><pre class="programlisting">void gdk_selection_send_notify (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> requestor, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> selection, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> target, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> property, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> time_);</pre><p>Sends a response to SelectionRequest event.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>requestor</code></em> :</span></p></td><td>window to which to deliver response.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td><td>selection that was requested.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td><td>target that was selected.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td><td>property in which the selection owner stored the data, or <a class="link" href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS"><code class="literal">GDK_NONE</code></a> to indicate that the request was rejected.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td><td>timestamp.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3261958"></a><h3><a name="gdk-selection-send-notify-for-display"></a>gdk_selection_send_notify_for_display ()</h3><a class="indexterm" name="id3261974"></a><pre class="programlisting">void gdk_selection_send_notify_for_display (<a class="link" href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> requestor, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> selection, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> target, <a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> property, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> time_);</pre><p>Send a response to SelectionRequest event.</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>display</code></em> :</span></p></td><td> the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> where <em class="parameter"><code>requestor</code></em> is realized</td></tr><tr><td><p><span class="term"><em class="parameter"><code>requestor</code></em> :</span></p></td><td> window to which to deliver response.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td><td> selection that was requested.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td><td> target that was selected.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>property</code></em> :</span></p></td><td> property in which the selection owner stored the data, or <a class="link" href="gdk-Properties-and-Atoms.html#GDK-NONE:CAPS"><code class="literal">GDK_NONE</code></a> to indicate that the request was rejected.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td><td> timestamp. </td></tr></tbody></table></div><p class="since">Since 2.2</p></div></div><div class="refsect1" lang="en"><a name="id3262170"></a><div class="refsect2" lang="en"><a name="id3262171"></a></div><hr><div class="refsect2" lang="en"><a name="id3262172"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?