| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>GAppInfo</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
| <link rel="home" href="index.html" title="GIO Reference Manual"> |
| <link rel="up" href="types.html" title="File types and applications"> |
| <link rel="prev" href="gio-GContentType.html" title="GContentType"> |
| <link rel="next" href="gio-Desktop-file-based-GAppInfo.html" title="Desktop file based GAppInfo"> |
| <meta name="generator" content="GTK-Doc V1.14 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| <tr valign="middle"> |
| <td><a accesskey="p" href="gio-GContentType.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| <td><a accesskey="u" href="types.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| <th width="100%" align="center">GIO Reference Manual</th> |
| <td><a accesskey="n" href="gio-Desktop-file-based-GAppInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| </tr> |
| <tr><td colspan="5" class="shortcuts"> |
| <a href="#GAppInfo.synopsis" class="shortcut">Top</a> |
| | |
| <a href="#GAppInfo.description" class="shortcut">Description</a> |
| | |
| <a href="#GAppInfo.object-hierarchy" class="shortcut">Object Hierarchy</a> |
| | |
| <a href="#GAppInfo.prerequisites" class="shortcut">Prerequisites</a> |
| | |
| <a href="#GAppInfo.implementations" class="shortcut">Known Implementations</a> |
| </td></tr> |
| </table> |
| <div class="refentry" title="GAppInfo"> |
| <a name="GAppInfo"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="GAppInfo.top_of_page"></a>GAppInfo</span></h2> |
| <p>GAppInfo — Application information and launch contexts</p> |
| </td> |
| <td valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsynopsisdiv" title="Synopsis"> |
| <a name="GAppInfo.synopsis"></a><h2>Synopsis</h2> |
| <a name="GAppLaunchContext"></a><pre class="synopsis"> |
| #include <gio/gio.h> |
| |
| enum <a class="link" href="GAppInfo.html#GAppInfoCreateFlags" title="enum GAppInfoCreateFlags">GAppInfoCreateFlags</a>; |
| <a class="link" href="GAppInfo.html#GAppInfo-struct" title="GAppInfo">GAppInfo</a>; |
| <a class="link" href="GAppInfo.html#GAppInfoIface" title="GAppInfoIface">GAppInfoIface</a>; |
| <a class="link" href="GAppInfo.html#GAppLaunchContext-struct" title="GAppLaunchContext">GAppLaunchContext</a>; |
| <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> * <a class="link" href="GAppInfo.html#g-app-info-create-from-commandline" title="g_app_info_create_from_commandline ()">g_app_info_create_from_commandline</a> (<em class="parameter"><code>const <span class="type">char</span> *commandline</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *application_name</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppInfoCreateFlags" title="enum GAppInfoCreateFlags"><span class="type">GAppInfoCreateFlags</span></a> flags</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> * <a class="link" href="GAppInfo.html#g-app-info-dup" title="g_app_info_dup ()">g_app_info_dup</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-equal" title="g_app_info_equal ()">g_app_info_equal</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo1</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo2</code></em>); |
| const <span class="returnvalue">char</span> * <a class="link" href="GAppInfo.html#g-app-info-get-id" title="g_app_info_get_id ()">g_app_info_get_id</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| const <span class="returnvalue">char</span> * <a class="link" href="GAppInfo.html#g-app-info-get-name" title="g_app_info_get_name ()">g_app_info_get_name</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| const <span class="returnvalue">char</span> * <a class="link" href="GAppInfo.html#g-app-info-get-display-name" title="g_app_info_get_display_name ()">g_app_info_get_display_name</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| const <span class="returnvalue">char</span> * <a class="link" href="GAppInfo.html#g-app-info-get-description" title="g_app_info_get_description ()">g_app_info_get_description</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| const <span class="returnvalue">char</span> * <a class="link" href="GAppInfo.html#g-app-info-get-executable" title="g_app_info_get_executable ()">g_app_info_get_executable</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| const <span class="returnvalue">char</span> * <a class="link" href="GAppInfo.html#g-app-info-get-commandline" title="g_app_info_get_commandline ()">g_app_info_get_commandline</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| <a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> * <a class="link" href="GAppInfo.html#g-app-info-get-icon" title="g_app_info_get_icon ()">g_app_info_get_icon</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-launch" title="g_app_info_launch ()">g_app_info_launch</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-supports-files" title="g_app_info_supports_files ()">g_app_info_supports_files</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-supports-uris" title="g_app_info_supports_uris ()">g_app_info_supports_uris</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-launch-uris" title="g_app_info_launch_uris ()">g_app_info_launch_uris</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *uris</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-should-show" title="g_app_info_should_show ()">g_app_info_should_show</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-can-delete" title="g_app_info_can_delete ()">g_app_info_can_delete</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-delete" title="g_app_info_delete ()">g_app_info_delete</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| <span class="returnvalue">void</span> <a class="link" href="GAppInfo.html#g-app-info-reset-type-associations" title="g_app_info_reset_type_associations ()">g_app_info_reset_type_associations</a> (<em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-set-as-default-for-type" title="g_app_info_set_as_default_for_type ()">g_app_info_set_as_default_for_type</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-set-as-default-for-extension" title="g_app_info_set_as_default_for_extension ()">g_app_info_set_as_default_for_extension</a> |
| (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *extension</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-add-supports-type" title="g_app_info_add_supports_type ()">g_app_info_add_supports_type</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-can-remove-supports-type" title="g_app_info_can_remove_supports_type ()">g_app_info_can_remove_supports_type</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-remove-supports-type" title="g_app_info_remove_supports_type ()">g_app_info_remove_supports_type</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="GAppInfo.html#g-app-info-get-all" title="g_app_info_get_all ()">g_app_info_get_all</a> (<em class="parameter"><code><span class="type">void</span></code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="GAppInfo.html#g-app-info-get-all-for-type" title="g_app_info_get_all_for_type ()">g_app_info_get_all_for_type</a> (<em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>); |
| <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> * <a class="link" href="GAppInfo.html#g-app-info-get-default-for-type" title="g_app_info_get_default_for_type ()">g_app_info_get_default_for_type</a> (<em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> must_support_uris</code></em>); |
| <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> * <a class="link" href="GAppInfo.html#g-app-info-get-default-for-uri-scheme" title="g_app_info_get_default_for_uri_scheme ()">g_app_info_get_default_for_uri_scheme</a> |
| (<em class="parameter"><code>const <span class="type">char</span> *uri_scheme</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAppInfo.html#g-app-info-launch-default-for-uri" title="g_app_info_launch_default_for_uri ()">g_app_info_launch_default_for_uri</a> (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <span class="returnvalue">char</span> * <a class="link" href="GAppInfo.html#g-app-launch-context-get-display" title="g_app_launch_context_get_display ()">g_app_launch_context_get_display</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *info</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>); |
| <span class="returnvalue">char</span> * <a class="link" href="GAppInfo.html#g-app-launch-context-get-startup-notify-id" title="g_app_launch_context_get_startup_notify_id ()">g_app_launch_context_get_startup_notify_id</a> |
| (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *info</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>); |
| <span class="returnvalue">void</span> <a class="link" href="GAppInfo.html#g-app-launch-context-launch-failed" title="g_app_launch_context_launch_failed ()">g_app_launch_context_launch_failed</a> (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *startup_notify_id</code></em>); |
| <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="returnvalue">GAppLaunchContext</span></a> * <a class="link" href="GAppInfo.html#g-app-launch-context-new" title="g_app_launch_context_new ()">g_app_launch_context_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>); |
| </pre> |
| </div> |
| <div class="refsect1" title="Object Hierarchy"> |
| <a name="GAppInfo.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| <pre class="synopsis"> |
| GInterface |
| +----GAppInfo |
| </pre> |
| <pre class="synopsis"> |
| <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> |
| +----GAppLaunchContext |
| </pre> |
| </div> |
| <div class="refsect1" title="Prerequisites"> |
| <a name="GAppInfo.prerequisites"></a><h2>Prerequisites</h2> |
| <p> |
| GAppInfo requires |
| <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p> |
| </div> |
| <div class="refsect1" title="Known Implementations"> |
| <a name="GAppInfo.implementations"></a><h2>Known Implementations</h2> |
| <p> |
| GAppInfo is implemented by |
| <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo">GDesktopAppInfo</a>.</p> |
| </div> |
| <div class="refsect1" title="Description"> |
| <a name="GAppInfo.description"></a><h2>Description</h2> |
| <p> |
| <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> and <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> are used for describing and launching |
| applications installed on the system. |
| </p> |
| <p> |
| As of GLib 2.20, URIs will always be converted to POSIX paths |
| (using <a class="link" href="GFile.html#g-file-get-path" title="g_file_get_path ()"><code class="function">g_file_get_path()</code></a>) when using <a class="link" href="GAppInfo.html#g-app-info-launch" title="g_app_info_launch ()"><code class="function">g_app_info_launch()</code></a> even if |
| the application requested an URI and not a POSIX path. For example |
| for an desktop-file based application with Exec key <code class="literal">totem |
| %<code class="literal">U</code></code> and a single URI, |
| <code class="literal">sftp://foo/file.avi</code>, then |
| <code class="literal">/home/user/.gvfs/sftp on foo/file.avi</code> will be |
| passed. This will only work if a set of suitable GIO extensions |
| (such as gvfs 2.26 compiled with FUSE support), is available and |
| operational; if this is not the case, the URI will be passed |
| unmodified to the application. Some URIs, such as |
| <code class="literal">mailto:</code>, of course cannot be mapped to a POSIX |
| path (in gvfs there's no FUSE mount for it); such URIs will be |
| passed unmodified to the application. |
| </p> |
| <p> |
| Specifically for gvfs 2.26 and later, the POSIX URI will be mapped |
| back to the GIO URI in the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> constructors (since gvfs |
| implements the <a class="link" href="GVfs.html" title="GVfs"><span class="type">GVfs</span></a> extension point). As such, if the application |
| needs to examine the URI, it needs to use <a class="link" href="GFile.html#g-file-get-uri" title="g_file_get_uri ()"><code class="function">g_file_get_uri()</code></a> or |
| similar on <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>. In other words, an application cannot assume |
| that the URI passed to e.g. <a class="link" href="GFile.html#g-file-new-for-commandline-arg" title="g_file_new_for_commandline_arg ()"><code class="function">g_file_new_for_commandline_arg()</code></a> is |
| equal to the result of <a class="link" href="GFile.html#g-file-get-uri" title="g_file_get_uri ()"><code class="function">g_file_get_uri()</code></a>. The following snippet |
| illustrates this: |
| </p> |
| <p> |
| </p> |
| <pre class="programlisting"> |
| GFile *f; |
| char *uri; |
| |
| file = g_file_new_for_commandline_arg (uri_from_commandline); |
| |
| uri = g_file_get_uri (file); |
| strcmp (uri, uri_from_commandline) == 0; // FALSE |
| g_free (uri); |
| |
| if (g_file_has_uri_scheme (file, "cdda")) |
| { |
| // do something special with uri |
| } |
| g_object_unref (file); |
| </pre> |
| <p> |
| </p> |
| <p> |
| This code will work when both <code class="literal">cdda://sr0/Track |
| 1.wav</code> and <code class="literal">/home/user/.gvfs/cdda on sr0/Track |
| 1.wav</code> is passed to the application. It should be noted |
| that it's generally not safe for applications to rely on the format |
| of a particular URIs. Different launcher applications (e.g. file |
| managers) may have different ideas of what a given URI means. |
| </p> |
| </div> |
| <div class="refsect1" title="Details"> |
| <a name="GAppInfo.details"></a><h2>Details</h2> |
| <div class="refsect2" title="enum GAppInfoCreateFlags"> |
| <a name="GAppInfoCreateFlags"></a><h3>enum GAppInfoCreateFlags</h3> |
| <pre class="programlisting">typedef enum { |
| G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/ |
| G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0), /*< nick=needs-terminal >*/ |
| G_APP_INFO_CREATE_SUPPORTS_URIS = (1 << 1) /*< nick=supports-uris >*/ |
| } GAppInfoCreateFlags; |
| </pre> |
| <p> |
| Flags used when creating a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><a name="G-APP-INFO-CREATE-NONE:CAPS"></a><span class="term"><code class="literal">G_APP_INFO_CREATE_NONE</code></span></p></td> |
| <td>No flags. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="G-APP-INFO-CREATE-NEEDS-TERMINAL:CAPS"></a><span class="term"><code class="literal">G_APP_INFO_CREATE_NEEDS_TERMINAL</code></span></p></td> |
| <td>Application opens in a terminal window. |
| </td> |
| </tr> |
| <tr> |
| <td><p><a name="G-APP-INFO-CREATE-SUPPORTS-URIS:CAPS"></a><span class="term"><code class="literal">G_APP_INFO_CREATE_SUPPORTS_URIS</code></span></p></td> |
| <td>Application supports URI arguments. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="GAppInfo"> |
| <a name="GAppInfo-struct"></a><h3>GAppInfo</h3> |
| <pre class="programlisting">typedef struct _GAppInfo GAppInfo;</pre> |
| <p> |
| Information about an installed application and methods to launch |
| it (with file arguments). |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="GAppInfoIface"> |
| <a name="GAppInfoIface"></a><h3>GAppInfoIface</h3> |
| <pre class="programlisting">typedef struct { |
| GTypeInterface g_iface; |
| |
| /* Virtual Table */ |
| |
| GAppInfo * (* dup) (GAppInfo *appinfo); |
| gboolean (* equal) (GAppInfo *appinfo1, |
| GAppInfo *appinfo2); |
| const char * (* get_id) (GAppInfo *appinfo); |
| const char * (* get_name) (GAppInfo *appinfo); |
| const char * (* get_description) (GAppInfo *appinfo); |
| const char * (* get_executable) (GAppInfo *appinfo); |
| GIcon * (* get_icon) (GAppInfo *appinfo); |
| gboolean (* launch) (GAppInfo *appinfo, |
| 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); |
| gboolean (* can_delete) (GAppInfo *appinfo); |
| gboolean (* do_delete) (GAppInfo *appinfo); |
| const char * (* get_commandline) (GAppInfo *appinfo); |
| const char * (* get_display_name) (GAppInfo *appinfo); |
| } GAppInfoIface; |
| </pre> |
| <p> |
| Application Information interface, for operating system portability. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GAppInfoIface.g-iface"></a>g_iface</code></em>;</span></p></td> |
| <td>The parent interface. |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.dup"></a>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><a name="GAppInfoIface.equal"></a>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><a name="GAppInfoIface.get-id"></a>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><a name="GAppInfoIface.get-name"></a>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><a name="GAppInfoIface.get-description"></a>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><a name="GAppInfoIface.get-executable"></a>get_executable</code></em> ()</span></p></td> |
| <td>Gets the executable 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><a name="GAppInfoIface.get-icon"></a>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><a name="GAppInfoIface.launch"></a>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><a name="GAppInfoIface.supports-uris"></a>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><a name="GAppInfoIface.supports-files"></a>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><a name="GAppInfoIface.launch-uris"></a>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><a name="GAppInfoIface.should-show"></a>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><a name="GAppInfoIface.set-as-default-for-type"></a>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><a name="GAppInfoIface.set-as-default-for-extension"></a>set_as_default_for_extension</code></em> ()</span></p></td> |
| <td>Sets an application as default for a given file extension. |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.add-supports-type"></a>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><a name="GAppInfoIface.can-remove-supports-type"></a>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><a name="GAppInfoIface.remove-supports-type"></a>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> |
| <tr> |
| <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.can-delete"></a>can_delete</code></em> ()</span></p></td> |
| <td>Checks if a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> can be deleted. Since 2.20 |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.do-delete"></a>do_delete</code></em> ()</span></p></td> |
| <td>Deletes a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>. Since 2.20 |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.get-commandline"></a>get_commandline</code></em> ()</span></p></td> |
| <td>Gets the commandline for the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>. Since 2.20 |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.get-display-name"></a>get_display_name</code></em> ()</span></p></td> |
| <td>Gets the display name for the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>. Since 2.24 |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="GAppLaunchContext"> |
| <a name="GAppLaunchContext-struct"></a><h3>GAppLaunchContext</h3> |
| <pre class="programlisting">typedef struct _GAppLaunchContext GAppLaunchContext;</pre> |
| <p> |
| Integrating the launch with the launching application. This is used to |
| handle for instance startup notification and launching the new application |
| on the same screen as the launching window. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_create_from_commandline ()"> |
| <a name="g-app-info-create-from-commandline"></a><h3>g_app_info_create_from_commandline ()</h3> |
| <pre class="programlisting"><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> * g_app_info_create_from_commandline (<em class="parameter"><code>const <span class="type">char</span> *commandline</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *application_name</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppInfoCreateFlags" title="enum GAppInfoCreateFlags"><span class="type">GAppInfoCreateFlags</span></a> flags</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Creates a new <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> from the given information. |
| </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 <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.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 <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occuring, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.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" title="g_app_info_dup ()"> |
| <a name="g-app-info-dup"></a><h3>g_app_info_dup ()</h3> |
| <pre class="programlisting"><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> * g_app_info_dup (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Creates a duplicate of a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>. |
| </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" title="g_app_info_equal ()"> |
| <a name="g-app-info-equal"></a><h3>g_app_info_equal ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_equal (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo1</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo2</code></em>);</pre> |
| <p> |
| Checks if two <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>s are equal. |
| </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> <a href="/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>. <a href="/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" title="g_app_info_get_id ()"> |
| <a name="g-app-info-get-id"></a><h3>g_app_info_get_id ()</h3> |
| <pre class="programlisting">const <span class="returnvalue">char</span> * g_app_info_get_id (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Gets the ID of an application. An id is a string that |
| identifies the application. The exact format of the id is |
| platform dependent. For instance, on Unix this is the |
| desktop file id from the xdg menu specification. |
| </p> |
| <p> |
| Note that the returned ID may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, depending on how |
| the <em class="parameter"><code>appinfo</code></em> has been constructed. |
| </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" title="g_app_info_get_name ()"> |
| <a name="g-app-info-get-name"></a><h3>g_app_info_get_name ()</h3> |
| <pre class="programlisting">const <span class="returnvalue">char</span> * g_app_info_get_name (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Gets the installed name of the application. |
| </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" title="g_app_info_get_display_name ()"> |
| <a name="g-app-info-get-display-name"></a><h3>g_app_info_get_display_name ()</h3> |
| <pre class="programlisting">const <span class="returnvalue">char</span> * g_app_info_get_display_name (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Gets the display name of the application. The display name is often more |
| descriptive to the user than the name itself. |
| </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 display name of the application for <em class="parameter"><code>appinfo</code></em>, or the name if |
| no display name is available. |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.24</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_get_description ()"> |
| <a name="g-app-info-get-description"></a><h3>g_app_info_get_description ()</h3> |
| <pre class="programlisting">const <span class="returnvalue">char</span> * g_app_info_get_description (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Gets a human-readable description of an installed application. |
| </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 <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_get_executable ()"> |
| <a name="g-app-info-get-executable"></a><h3>g_app_info_get_executable ()</h3> |
| <pre class="programlisting">const <span class="returnvalue">char</span> * g_app_info_get_executable (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Gets the executable's name for the installed application. |
| </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 |
| binaries name |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_get_commandline ()"> |
| <a name="g-app-info-get-commandline"></a><h3>g_app_info_get_commandline ()</h3> |
| <pre class="programlisting">const <span class="returnvalue">char</span> * g_app_info_get_commandline (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Gets the commandline with which the application will be |
| started. |
| </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 commandline, |
| or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if this information is not available |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.20</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_get_icon ()"> |
| <a name="g-app-info-get-icon"></a><h3>g_app_info_get_icon ()</h3> |
| <pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> * g_app_info_get_icon (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Gets the icon for the application. |
| </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" title="g_app_info_launch ()"> |
| <a name="g-app-info-launch"></a><h3>g_app_info_launch ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_launch (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</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 information |
| about 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 <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.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 launched |
| can fail to start if it runs into problems during startup. There is |
| no way to detect this. |
| </p> |
| <p> |
| Some URIs can be changed when passed through a GFile (for instance |
| unsupported uris with strange formats like mailto:), so if you have |
| a textual uri you want to pass in as argument, consider using |
| <a class="link" href="GAppInfo.html#g-app-info-launch-uris" title="g_app_info_launch_uris ()"><code class="function">g_app_info_launch_uris()</code></a> instead. |
| </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 <a href="/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> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>a <a href="/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> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on successful launch, <a href="/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" title="g_app_info_supports_files ()"> |
| <a name="g-app-info-supports-files"></a><h3>g_app_info_supports_files ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_supports_files (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Checks if the application accepts files as arguments. |
| </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 href="/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" title="g_app_info_supports_uris ()"> |
| <a name="g-app-info-supports-uris"></a><h3>g_app_info_supports_uris ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_supports_uris (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Checks if the application supports reading files and directories from URIs. |
| </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 href="/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" title="g_app_info_launch_uris ()"> |
| <a name="g-app-info-launch-uris"></a><h3>g_app_info_launch_uris ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_launch_uris (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *uris</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</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 information |
| about 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 <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>uris</code></em> list. |
| </p> |
| <p> |
| Note that even if the launch is successful the application launched |
| can fail to start if it runs into problems during startup. There is |
| no way to detect this. |
| </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>uris</code></em> :</span></p></td> |
| <td>a <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> containing URIs to launch. |
| </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> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>a <a href="/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> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on successful launch, <a href="/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" title="g_app_info_should_show ()"> |
| <a name="g-app-info-should-show"></a><h3>g_app_info_should_show ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_should_show (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Checks if the application info should be shown in menus that |
| list available applications. |
| </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 href="/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> should be shown, <a href="/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" title="g_app_info_can_delete ()"> |
| <a name="g-app-info-can-delete"></a><h3>g_app_info_can_delete ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_can_delete (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Obtains the information whether the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> can be deleted. |
| See <a class="link" href="GAppInfo.html#g-app-info-delete" title="g_app_info_delete ()"><code class="function">g_app_info_delete()</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>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 href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>appinfo</code></em> can be deleted |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.20</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_delete ()"> |
| <a name="g-app-info-delete"></a><h3>g_app_info_delete ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_delete (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Tries to delete a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>. |
| </p> |
| <p> |
| On some platforms, there may be a difference between user-defined |
| <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>s which can be deleted, and system-wide ones which |
| cannot. See <a class="link" href="GAppInfo.html#g-app-info-can-delete" title="g_app_info_can_delete ()"><code class="function">g_app_info_can_delete()</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>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 href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>appinfo</code></em> has been deleted |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.20</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_reset_type_associations ()"> |
| <a name="g-app-info-reset-type-associations"></a><h3>g_app_info_reset_type_associations ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> g_app_info_reset_type_associations (<em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>);</pre> |
| <p> |
| Removes all changes to the type associations done by |
| <a class="link" href="GAppInfo.html#g-app-info-set-as-default-for-type" title="g_app_info_set_as_default_for_type ()"><code class="function">g_app_info_set_as_default_for_type()</code></a>, |
| <a class="link" href="GAppInfo.html#g-app-info-set-as-default-for-extension" title="g_app_info_set_as_default_for_extension ()"><code class="function">g_app_info_set_as_default_for_extension()</code></a>, |
| <a class="link" href="GAppInfo.html#g-app-info-add-supports-type" title="g_app_info_add_supports_type ()"><code class="function">g_app_info_add_supports_type()</code></a> or <a class="link" href="GAppInfo.html#g-app-info-remove-supports-type" title="g_app_info_remove_supports_type ()"><code class="function">g_app_info_remove_supports_type()</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>content_type</code></em> :</span></p></td> |
| <td>a content type |
| </td> |
| </tr></tbody> |
| </table></div> |
| <p class="since">Since 2.20</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_set_as_default_for_type ()"> |
| <a name="g-app-info-set-as-default-for-type"></a><h3>g_app_info_set_as_default_for_type ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_set_as_default_for_type (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Sets the application as the default handler for a given type. |
| </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>content_type</code></em> :</span></p></td> |
| <td>the content type. |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>a <a href="/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> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_set_as_default_for_extension ()"> |
| <a name="g-app-info-set-as-default-for-extension"></a><h3>g_app_info_set_as_default_for_extension ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_set_as_default_for_extension |
| (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *extension</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Sets the application as the default handler for the given file extension. |
| </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>extension</code></em> :</span></p></td> |
| <td>a string containing the file extension (without the dot). |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>a <a href="/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> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_add_supports_type ()"> |
| <a name="g-app-info-add-supports-type"></a><h3>g_app_info_add_supports_type ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_add_supports_type (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Adds a content type to the application information to indicate the |
| application is capable of opening files with the given content type. |
| </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>content_type</code></em> :</span></p></td> |
| <td>a string. |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>a <a href="/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> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_can_remove_supports_type ()"> |
| <a name="g-app-info-can-remove-supports-type"></a><h3>g_app_info_can_remove_supports_type ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_can_remove_supports_type (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>);</pre> |
| <p> |
| Checks if a supported content type can be removed from an application. |
| </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 href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if it is possible to remove supported |
| content types from a given <em class="parameter"><code>appinfo</code></em>, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_remove_supports_type ()"> |
| <a name="g-app-info-remove-supports-type"></a><h3>g_app_info_remove_supports_type ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_remove_supports_type (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Removes a supported type from an application, if possible. |
| </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>content_type</code></em> :</span></p></td> |
| <td>a string. |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>a <a href="/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> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_get_all ()"> |
| <a name="g-app-info-get-all"></a><h3>g_app_info_get_all ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * g_app_info_get_all (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| <p> |
| Gets a list of all of the applications currently registered |
| on this system. |
| </p> |
| <p> |
| For desktop files, this includes applications that have |
| <code class="literal">NoDisplay=true</code> set or are excluded from |
| display by means of <code class="literal">OnlyShowIn</code> or |
| <code class="literal">NotShowIn</code>. See <a class="link" href="GAppInfo.html#g-app-info-should-show" title="g_app_info_should_show ()"><code class="function">g_app_info_should_show()</code></a>. |
| The returned list does not include applications which have |
| the <code class="literal">Hidden</code> key set. |
| </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 newly allocated <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of references to <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>s. |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_get_all_for_type ()"> |
| <a name="g-app-info-get-all-for-type"></a><h3>g_app_info_get_all_for_type ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * g_app_info_get_all_for_type (<em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>);</pre> |
| <p> |
| Gets a list of all <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>s for a given content type. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td> |
| <td>the content type to find a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>s for given <em class="parameter"><code>content_type</code></em> |
| or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_get_default_for_type ()"> |
| <a name="g-app-info-get-default-for-type"></a><h3>g_app_info_get_default_for_type ()</h3> |
| <pre class="programlisting"><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> * g_app_info_get_default_for_type (<em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> must_support_uris</code></em>);</pre> |
| <p> |
| Gets the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> that corresponds to a given content type. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td> |
| <td>the content type to find a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>must_support_uris</code></em> :</span></p></td> |
| <td>if <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> is expected to |
| support URIs |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for given <em class="parameter"><code>content_type</code></em> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_get_default_for_uri_scheme ()"> |
| <a name="g-app-info-get-default-for-uri-scheme"></a><h3>g_app_info_get_default_for_uri_scheme ()</h3> |
| <pre class="programlisting"><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="returnvalue">GAppInfo</span></a> * g_app_info_get_default_for_uri_scheme |
| (<em class="parameter"><code>const <span class="type">char</span> *uri_scheme</code></em>);</pre> |
| <p> |
| Gets the default application for launching applications |
| using this URI scheme. A URI scheme is the initial part |
| of the URI, up to but not including the ':', e.g. "http", |
| "ftp" or "sip". |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>uri_scheme</code></em> :</span></p></td> |
| <td>a string containing a URI scheme. |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for given <em class="parameter"><code>uri_scheme</code></em> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_info_launch_default_for_uri ()"> |
| <a name="g-app-info-launch-default-for-uri"></a><h3>g_app_info_launch_default_for_uri ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_app_info_launch_default_for_uri (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Utility function that launches the default application |
| registered to handle the specified uri. Synchronous I/O |
| is done on the uri to detect the type of the file if |
| required. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td> |
| <td>the uri to show |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td> |
| <td>an optional <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 <a href="/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> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_launch_context_get_display ()"> |
| <a name="g-app-launch-context-get-display"></a><h3>g_app_launch_context_get_display ()</h3> |
| <pre class="programlisting"><span class="returnvalue">char</span> * g_app_launch_context_get_display (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *info</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>);</pre> |
| <p> |
| Gets the display string for the display. This is used to ensure new |
| applications are started on the same display as the launching |
| application. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>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>info</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 <a href="/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"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> a display string for the display. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_launch_context_get_startup_notify_id ()"> |
| <a name="g-app-launch-context-get-startup-notify-id"></a><h3>g_app_launch_context_get_startup_notify_id ()</h3> |
| <pre class="programlisting"><span class="returnvalue">char</span> * g_app_launch_context_get_startup_notify_id |
| (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>, |
| <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *info</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>);</pre> |
| <p> |
| Initiates startup notification for the application and returns the |
| DESKTOP_STARTUP_ID for the launched operation, if supported. |
| </p> |
| <p> |
| Startup notification IDs are defined in the <a class="ulink" href="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt" target="_top"> |
| FreeDesktop.Org Startup Notifications standard</a>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>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>info</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 <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of of <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> objects |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> a startup notification ID for the application, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if |
| not supported. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_launch_context_launch_failed ()"> |
| <a name="g-app-launch-context-launch-failed"></a><h3>g_app_launch_context_launch_failed ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> g_app_launch_context_launch_failed (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>, |
| <em class="parameter"><code>const <span class="type">char</span> *startup_notify_id</code></em>);</pre> |
| <p> |
| Called when an application has failed to launch, so that it can cancel |
| the application startup notification started in <a class="link" href="GAppInfo.html#g-app-launch-context-get-startup-notify-id" title="g_app_launch_context_get_startup_notify_id ()"><code class="function">g_app_launch_context_get_startup_notify_id()</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>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>startup_notify_id</code></em> :</span></p></td> |
| <td>the startup notification id that was returned by <a class="link" href="GAppInfo.html#g-app-launch-context-get-startup-notify-id" title="g_app_launch_context_get_startup_notify_id ()"><code class="function">g_app_launch_context_get_startup_notify_id()</code></a>. |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_app_launch_context_new ()"> |
| <a name="g-app-launch-context-new"></a><h3>g_app_launch_context_new ()</h3> |
| <pre class="programlisting"><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="returnvalue">GAppLaunchContext</span></a> * g_app_launch_context_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| <p> |
| Creates a new application launch context. This is not normally used, |
| instead you instantiate a subclass of this, such as <a href="http://library.gnome.org/devel/gdk/unstable/gdk-Application-launching.html#GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a>. |
| </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 <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a>. |
| </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr> |
| Generated by GTK-Doc V1.14</div> |
| </body> |
| </html> |