📄 gtkrecentfilter.html
字号:
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4443906"></a><h3><a name="GtkRecentFilterFlags"></a>enum GtkRecentFilterFlags</h3><a class="indexterm" name="id4443919"></a><pre class="programlisting">typedef enum { GTK_RECENT_FILTER_URI = 1 << 0, GTK_RECENT_FILTER_DISPLAY_NAME = 1 << 1, GTK_RECENT_FILTER_MIME_TYPE = 1 << 2, GTK_RECENT_FILTER_APPLICATION = 1 << 3, GTK_RECENT_FILTER_GROUP = 1 << 4, GTK_RECENT_FILTER_AGE = 1 << 5} GtkRecentFilterFlags;</pre><p>These flags indicate what parts of a <a class="link" href="GtkRecentFilter.html#GtkRecentFilterInfo"><span class="type">GtkRecentFilterInfo</span></a> structare filled or need to be filled.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GTK-RECENT-FILTER-URI:CAPS"></a><code class="literal">GTK_RECENT_FILTER_URI</code></span></p></td><td>the URI of the file being tested</td></tr><tr><td><p><span class="term"><a name="GTK-RECENT-FILTER-DISPLAY-NAME:CAPS"></a><code class="literal">GTK_RECENT_FILTER_DISPLAY_NAME</code></span></p></td><td>the string that will be used to display the file in the recent chooser</td></tr><tr><td><p><span class="term"><a name="GTK-RECENT-FILTER-MIME-TYPE:CAPS"></a><code class="literal">GTK_RECENT_FILTER_MIME_TYPE</code></span></p></td><td>the mime type of the file</td></tr><tr><td><p><span class="term"><a name="GTK-RECENT-FILTER-APPLICATION:CAPS"></a><code class="literal">GTK_RECENT_FILTER_APPLICATION</code></span></p></td><td>the list of applications that have registered the file</td></tr><tr><td><p><span class="term"><a name="GTK-RECENT-FILTER-GROUP:CAPS"></a><code class="literal">GTK_RECENT_FILTER_GROUP</code></span></p></td><td>the groups to which the file belongs to</td></tr><tr><td><p><span class="term"><a name="GTK-RECENT-FILTER-AGE:CAPS"></a><code class="literal">GTK_RECENT_FILTER_AGE</code></span></p></td><td>the number of days elapsed since the file has been registered</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4444095"></a><h3><a name="GtkRecentFilterFunc"></a>GtkRecentFilterFunc ()</h3><a class="indexterm" name="id4444108"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> (*GtkRecentFilterFunc) (const <a class="link" href="GtkRecentFilter.html#GtkRecentFilterInfo">GtkRecentFilterInfo</a> *filter_info, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre><p>The type of function that is used with custom filters,see <a class="link" href="GtkRecentFilter.html#gtk-recent-filter-add-custom"><code class="function">gtk_recent_filter_add_custom()</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>filter_info</code></em> :</span></p></td><td>a <a class="link" href="GtkRecentFilter.html#GtkRecentFilterInfo"><span class="type">GtkRecentFilterInfo</span></a> that is filled according to the <em class="parameter"><code>needed</code></em> flags passed to <a class="link" href="GtkRecentFilter.html#gtk-recent-filter-add-custom"><code class="function">gtk_recent_filter_add_custom()</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>user data passed to <a class="link" href="GtkRecentFilter.html#gtk-recent-filter-add-custom"><code class="function">gtk_recent_filter_add_custom()</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</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 file should be displayed</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4444245"></a><h3><a name="gtk-recent-filter-new"></a>gtk_recent_filter_new ()</h3><a class="indexterm" name="id4444261"></a><pre class="programlisting"><a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter">GtkRecentFilter</a>* gtk_recent_filter_new (void);</pre><p>Creates a new <a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter"><span class="type">GtkRecentFilter</span></a> with no rules added to it.Such filter does not accept any recently used resources, so is notparticularly useful until you add rules with<a class="link" href="GtkRecentFilter.html#gtk-recent-filter-add-pattern"><code class="function">gtk_recent_filter_add_pattern()</code></a>, <a class="link" href="GtkRecentFilter.html#gtk-recent-filter-add-mime-type"><code class="function">gtk_recent_filter_add_mime_type()</code></a>,<a class="link" href="GtkRecentFilter.html#gtk-recent-filter-add-application"><code class="function">gtk_recent_filter_add_application()</code></a>, <a class="link" href="GtkRecentFilter.html#gtk-recent-filter-add-age"><code class="function">gtk_recent_filter_add_age()</code></a>.To create a filter that accepts any recently used resource, use:</p><p></p><div class="informalexample"><pre class="programlisting">GtkRecentFilter *filter = gtk_recent_filter_new ();gtk_recent_filter_add_pattern (filter, "*");</pre></div><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> :</span></p></td><td> a new <a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter"><span class="type">GtkRecentFilter</span></a></td></tr></tbody></table></div><p class="since">Since 2.10</p></div><hr><div class="refsect2" lang="en"><a name="id4444386"></a><h3><a name="gtk-recent-filter-get-name"></a>gtk_recent_filter_get_name ()</h3><a class="indexterm" name="id4444402"></a><pre class="programlisting">const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a>* gtk_recent_filter_get_name (<a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter">GtkRecentFilter</a> *filter);</pre><p>Gets the human-readable name for the filter.See <a class="link" href="GtkRecentFilter.html#gtk-recent-filter-set-name"><code class="function">gtk_recent_filter_set_name()</code></a>.</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>filter</code></em> :</span></p></td><td> a <a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter"><span class="type">GtkRecentFilter</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the name of the filter, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. The returned string is owned by the filter object and should not be freed.</td></tr></tbody></table></div><p class="since">Since 2.10</p></div><hr><div class="refsect2" lang="en"><a name="id4444502"></a><h3><a name="gtk-recent-filter-set-name"></a>gtk_recent_filter_set_name ()</h3><a class="indexterm" name="id4444518"></a><pre class="programlisting">void gtk_recent_filter_set_name (<a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter">GtkRecentFilter</a> *filter, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *name);</pre><p>Sets the human-readable name of the filter; this is the stringthat will be displayed in the recently used resources selectoruser interface if there is a selectable list of filters.</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>filter</code></em> :</span></p></td><td> a <a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter"><span class="type">GtkRecentFilter</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td><td> then human readable name of <em class="parameter"><code>filter</code></em></td></tr></tbody></table></div><p class="since">Since 2.10</p></div><hr><div class="refsect2" lang="en"><a name="id4444614"></a><h3><a name="gtk-recent-filter-add-mime-type"></a>gtk_recent_filter_add_mime_type ()</h3><a class="indexterm" name="id4444630"></a><pre class="programlisting">void gtk_recent_filter_add_mime_type (<a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter">GtkRecentFilter</a> *filter, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *mime_type);</pre><p>Adds a rule that allows resources based on their registered MIME type.</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>filter</code></em> :</span></p></td><td> a <a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter"><span class="type">GtkRecentFilter</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td><td> a MIME type</td></tr></tbody></table></div><p class="since">Since 2.10</p></div><hr><div class="refsect2" lang="en"><a name="id4444718"></a><h3><a name="gtk-recent-filter-add-pattern"></a>gtk_recent_filter_add_pattern ()</h3><a class="indexterm" name="id4444734"></a><pre class="programlisting">void gtk_recent_filter_add_pattern (<a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter">GtkRecentFilter</a> *filter, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *pattern);</pre><p>Adds a rule that allows resources based on a pattern matching theirdisplay name.</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>filter</code></em> :</span></p></td><td> a <a class="link" href="GtkRecentFilter.html" title="GtkRecentFilter"><span class="type">GtkRecentFilter</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td><td> a file pattern</td></tr></tbody></table></div><p class="since">Since 2.10</p></div><hr><div class="refsect2" lang="en"><a name="id4444823"></a><h3><a name="gtk-recent-filter-add-pixbuf-formats"></a>gtk_recent_filter_add_pixbuf_formats ()</h3><a class="indexterm" name="id4444839"></a><pre class="programlisting">void gtk_recent_filter_add_pixbuf_formats
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -