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

📄 gtk-selections.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></p></td><td> a table of targets to add</td></tr><tr><td><p><span class="term"><em class="parameter"><code>ntargets</code></em>&#160;:</span></p></td><td>  number of entries in <em class="parameter"><code>targets</code></em></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3318768"></a><h3><a name="gtk-selection-clear-targets"></a>gtk_selection_clear_targets ()</h3><a class="indexterm" name="id3318782"></a><pre class="programlisting">void                gtk_selection_clear_targets         (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> selection);</pre><p>Remove all targets registered for the given selection for thewidget.</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>widget</code></em>&#160;:</span></p></td><td>    a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>selection</code></em>&#160;:</span></p></td><td> an atom representing a selection</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3318863"></a><h3><a name="gtk-selection-convert"></a>gtk_selection_convert ()</h3><a class="indexterm" name="id3318876"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_selection_convert               (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> selection,                                                         <ahref="/usr/share/gtk-doc/html/gdk/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>Requests the contents of a selection. When received, a "selection_received" signal will be generated.</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>widget</code></em>&#160;:</span></p></td><td> The widget which acts as requestor</td></tr><tr><td><p><span class="term"><em class="parameter"><code>selection</code></em>&#160;:</span></p></td><td> Which selection to get</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target</code></em>&#160;:</span></p></td><td> Form of information desired (e.g., STRING)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>time_</code></em>&#160;:</span></p></td><td> Time of request (usually of triggering event)       In emergency, you could use <ahref="/usr/share/gtk-doc/html/gdk/gdk-Events.html#GDK-CURRENT-TIME:CAPS"><span class="type">GDK_CURRENT_TIME</span></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 requested succeeded. <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if we could not process         request. (e.g., there was already a request in process for         this widget).</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3319036"></a><h3><a name="gtk-selection-data-set"></a>gtk_selection_data_set ()</h3><a class="indexterm" name="id3319050"></a><pre class="programlisting">void                gtk_selection_data_set              (<a class="link" href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> type,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> format,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar">guchar</a> *data,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> length);</pre><p>Stores new data into a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> object. Should<span class="emphasis"><em>only</em></span> be called from a selection handler callback.Zero-terminates the stored data.</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>selection_data</code></em>&#160;:</span></p></td><td> a pointer to a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> structure.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></p></td><td> the type of selection data</td></tr><tr><td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td><td> format (number of bits in a unit)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td><td> pointer to the data (will be copied)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>length</code></em>&#160;:</span></p></td><td> length of the data</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3319211"></a><h3><a name="gtk-selection-data-set-text"></a>gtk_selection_data_set_text ()</h3><a class="indexterm" name="id3319225"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_selection_data_set_text         (<a class="link" href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *str,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> len);</pre><p>Sets the contents of the selection from a UTF-8 encoded string.The string is converted to the form determined by<em class="parameter"><code>selection_data-&gt;target</code></em>.</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>selection_data</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></p></td><td> a UTF-8 string</td></tr><tr><td><p><span class="term"><em class="parameter"><code>len</code></em>&#160;:</span></p></td><td> the length of <em class="parameter"><code>str</code></em>, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.</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 selection was successfully set,  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="id3319377"></a><h3><a name="gtk-selection-data-get-text"></a>gtk_selection_data_get_text ()</h3><a class="indexterm" name="id3319391"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar">guchar</a>*             gtk_selection_data_get_text         (<a class="link" href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);</pre><p>Gets the contents of the selection data as a UTF-8 string.</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>selection_data</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> if the selection data contained a recognized  text type and it could be converted to UTF-8, a newly allocated  string containing the converted text, otherwise <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.  If the result is non-<ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> it must be freed with <ahref="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3319494"></a><h3><a name="gtk-selection-data-set-pixbuf"></a>gtk_selection_data_set_pixbuf ()</h3><a class="indexterm" name="id3319510"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_selection_data_set_pixbuf       (<a class="link" href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data,                                                         <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a> *pixbuf);</pre><p>Sets the contents of the selection from a <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span c

⌨️ 快捷键说明

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