📄 gappinfo.html
字号:
Note that the returned ID may be <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, depending on howthe <em class="parameter"><code>appinfo</code></em> has been constructed.</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 string containing the application's ID.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3211691"></a><h3><a name="g-app-info-get-name"></a>g_app_info_get_name ()</h3><a class="indexterm" name="id3211703"></a><pre class="programlisting">const char* g_app_info_get_name (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo);</pre><p>Gets the installed name of the 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>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> the name of the application for <em class="parameter"><code>appinfo</code></em>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3211779"></a><h3><a name="g-app-info-get-description"></a>g_app_info_get_description ()</h3><a class="indexterm" name="id3211790"></a><pre class="programlisting">const char* g_app_info_get_description (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo);</pre><p>Gets a human-readable description of an installed 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>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 string containing a description of the application <em class="parameter"><code>appinfo</code></em>, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3211876"></a><h3><a name="g-app-info-get-executable"></a>g_app_info_get_executable ()</h3><a class="indexterm" name="id3211888"></a><pre class="programlisting">const char* g_app_info_get_executable (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo);</pre><p>Gets the executable's name for the installed 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>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 string containing the <em class="parameter"><code>appinfo</code></em>'s application binary's name.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3211963"></a><h3><a name="g-app-info-get-icon"></a>g_app_info_get_icon ()</h3><a class="indexterm" name="id3211976"></a><pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon">GIcon</a>* g_app_info_get_icon (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo);</pre><p>Gets the icon for the 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>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> the default <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> for <em class="parameter"><code>appinfo</code></em>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3212056"></a><h3><a name="g-app-info-launch"></a>g_app_info_launch ()</h3><a class="indexterm" name="id3212069"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_app_info_launch (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo, <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a> *files, <a class="link" href="GAppInfo.html#GAppLaunchContext">GAppLaunchContext</a> *launch_context, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Launches the application. Passes <em class="parameter"><code>files</code></em> to the launched application as arguments, using the optional <em class="parameter"><code>launch_context</code></em> to get informationabout the details of the launcher (like what screen it is on).On error, <em class="parameter"><code>error</code></em> will be set accordingly.</p><p>To lauch the application without arguments pass a <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>files</code></em> list.</p><p>Note that even if the launch is successful the application launchedcan fail to start if it runs into problems during startup. There isno way to detect this.</p><p>Some URIs can be changed when passed through a GFile (for instanceunsupported uris with strange formats like mailto:), so if you havea textual uri you want to pass in as argument, consider using<a class="link" href="GAppInfo.html#g-app-info-launch-uris"><code class="function">g_app_info_launch_uris()</code></a> 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>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"><em class="parameter"><code>files</code></em> :</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> objects.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td><td> a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</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>.</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> on successful launch, <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="id3212310"></a><h3><a name="g-app-info-supports-files"></a>g_app_info_supports_files ()</h3><a class="indexterm" name="id3212321"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_app_info_supports_files (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo);</pre><p>Checks if the application accepts files as arguments.</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> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>appinfo</code></em> supports files.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3216260"></a><h3><a name="g-app-info-supports-uris"></a>g_app_info_supports_uris ()</h3><a class="indexterm" name="id3216270"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_app_info_supports_uris (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo);</pre><p>Checks if the application supports reading files and directories from URIs.</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> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <em class="parameter"><code>appinfo</code></em> supports URIs.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3216345"></a><h3><a name="g-app-info-launch-uris"></a>g_app_info_launch_uris ()</h3><a class="indexterm" name="id3216355"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_app_info_launch_uris (<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a> *appinfo, <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a> *uris, <a class="link" href="GAppInfo.html#GAppLaunchContext">GAppLaunchContext</a> *launch_context, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Launches the application. Passes <em class="parameter"><code>uris</code></em> to the launched application as arguments, using the optional <em class="parameter"><code>launch_context</code></em> to get informationabout the details of the launcher (like what screen it is on).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -