📄 gappinfo.html
字号:
GList *filenames, GAppLaunchContext *launch_context, GError **error); gboolean (*supports_uris) (GAppInfo *appinfo); gboolean (*supports_files) (GAppInfo *appinfo); gboolean (*launch_uris) (GAppInfo *appinfo, GList *uris, GAppLaunchContext *launch_context, GError **error); gboolean (*should_show) (GAppInfo *appinfo); /* For changing associations */ gboolean (*set_as_default_for_type) (GAppInfo *appinfo, const char *content_type, GError **error); gboolean (*set_as_default_for_extension) (GAppInfo *appinfo, const char *extension, GError **error); gboolean (*add_supports_type) (GAppInfo *appinfo, const char *content_type, GError **error); gboolean (*can_remove_supports_type) (GAppInfo *appinfo); gboolean (*remove_supports_type) (GAppInfo *appinfo, const char *content_type, GError **error);} GAppInfoIface;</pre><p>Application Information interface, for operating system portability.</p><p></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/gobject/gobject-Type-Information.html#GTypeInterface">GTypeInterface</a> <em class="structfield"><code>g_iface</code></em>;</span></p></td><td> The parent interface.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>dup</code></em> ()</span></p></td><td> Copies a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>equal</code></em> ()</span></p></td><td> Checks two <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>s for equality.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>get_id</code></em> ()</span></p></td><td> Gets a string identifier for a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>get_name</code></em> ()</span></p></td><td> Gets the name of the application for a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>get_description</code></em> ()</span></p></td><td> Gets a short description for the application described by the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>get_executable</code></em> ()</span></p></td><td> Gets the execuable name for the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>get_icon</code></em> ()</span></p></td><td> Gets the <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> for the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>launch</code></em> ()</span></p></td><td> Launches an application specified by the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>supports_uris</code></em> ()</span></p></td><td> Indicates whether the application specified supports launching URIs.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>supports_files</code></em> ()</span></p></td><td> Indicates whether the application specified accepts filename arguments.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>launch_uris</code></em> ()</span></p></td><td> Launches an application with a list of URIs.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>should_show</code></em> ()</span></p></td><td> Returns whether an application should be shown (e.g. when getting a list of installed applications).<a class="ulink" href="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt" target="_top"><em class="citetitle">FreeDesktop.Org Startup Notification Specification</em></a>.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>set_as_default_for_type</code></em> ()</span></p></td><td> Sets an application as default for a given content type.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>set_as_default_for_extension</code></em> ()</span></p></td><td> Sets an application as default for a given file extention.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>add_supports_type</code></em> ()</span></p></td><td> Adds to the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> information about supported file types.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>can_remove_supports_type</code></em> ()</span></p></td><td> Checks for support for removing supported file types from a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr><tr><td><p><span class="term"><em class="structfield"><code>remove_supports_type</code></em> ()</span></p></td><td> Removes a supported application type from a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3211094"></a><h3><a name="GAppLaunchContext"></a>GAppLaunchContext</h3><a class="indexterm" name="id3211106"></a><pre class="programlisting">typedef struct { GObject parent_instance;} GAppLaunchContext;</pre><p>Integrating the launch with the launching application. This is used tohandle for instance startup notification and launching the new applicationon the same screen as the launching window.</p><p></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/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> <em class="structfield"><code>parent_instance</code></em>;</span></p></td><td> The parent instance.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3211155"></a><h3><a name="g-app-info-create-from-commandline"></a>g_app_info_create_from_commandline ()</h3><a class="indexterm" name="id3211169"></a><pre class="programlisting"><a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a>* g_app_info_create_from_commandline (const char *commandline, const char *application_name, <a class="link" href="GAppInfo.html#GAppInfoCreateFlags">GAppInfoCreateFlags</a> flags, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Creates a new <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> from the given information.</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>commandline</code></em> :</span></p></td><td> the commandline to use</td></tr><tr><td><p><span class="term"><em class="parameter"><code>application_name</code></em> :</span></p></td><td> the application name, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to use <em class="parameter"><code>commandline</code></em></td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td><td> flags that can specify details of the created <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occuring, <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> new <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for given command.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3211348"></a><h3><a name="g-app-info-dup"></a>g_app_info_dup ()</h3><a class="indexterm" name="id3211360"></a><pre class="programlisting"><a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a>* g_app_info_dup (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo);</pre><p>Creates a duplicate of a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></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>appinfo</code></em> :</span></p></td><td> a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a duplicate of <em class="parameter"><code>appinfo</code></em>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3211440"></a><h3><a name="g-app-info-equal"></a>g_app_info_equal ()</h3><a class="indexterm" name="id3211453"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_app_info_equal (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo1, <a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo2);</pre><p>Checks if two <span class="type">GAppInfos</span> are equal.</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>appinfo1</code></em> :</span></p></td><td> the first <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>. </td></tr><tr><td><p><span class="term"><em class="parameter"><code>appinfo2</code></em> :</span></p></td><td> the second <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></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 <em class="parameter"><code>appinfo1</code></em> is equal to <em class="parameter"><code>appinfo2</code></em>. <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3211587"></a><h3><a name="g-app-info-get-id"></a>g_app_info_get_id ()</h3><a class="indexterm" name="id3211599"></a><pre class="programlisting">const char* g_app_info_get_id (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo);</pre><p>Gets the ID of an application. An id is a string thatidentifies the application. The exact format of the id isplatform dependent. For instance, on Unix this is thedesktop file id from the xdg menu specification.</p><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -