Moving files to packaging and extracing new tarball.
[profile/ivi/glib2.git] / docs / reference / gio / html / GAppInfo.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GAppInfo</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="types.html" title="File types and applications">
9 <link rel="prev" href="gio-GContentType.html" title="GContentType">
10 <link rel="next" href="gio-Desktop-file-based-GAppInfo.html" title="GDesktopAppInfo">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="gio-GContentType.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="types.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GIO Reference Manual</th>
21 <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>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GAppInfo.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GAppInfo.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GAppInfo.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GAppInfo.prerequisites" class="shortcut">Prerequisites</a>
31                    | 
32                   <a href="#GAppInfo.implementations" class="shortcut">Known Implementations</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="GAppInfo"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="GAppInfo.top_of_page"></a>GAppInfo</span></h2>
40 <p>GAppInfo — Application information and launch contexts</p>
41 </td>
42 <td valign="top" align="right"></td>
43 </tr></table></div>
44 <div class="refsynopsisdiv">
45 <a name="GAppInfo.synopsis"></a><h2>Synopsis</h2>
46 <a name="GAppLaunchContext"></a><pre class="synopsis">
47 #include &lt;gio/gio.h&gt;
48
49 enum                <a class="link" href="GAppInfo.html#GAppInfoCreateFlags" title="enum GAppInfoCreateFlags">GAppInfoCreateFlags</a>;
50                     <a class="link" href="GAppInfo.html#GAppInfo-struct" title="GAppInfo">GAppInfo</a>;
51 struct              <a class="link" href="GAppInfo.html#GAppInfoIface" title="struct GAppInfoIface">GAppInfoIface</a>;
52                     <a class="link" href="GAppInfo.html#GAppLaunchContext-struct" title="GAppLaunchContext">GAppLaunchContext</a>;
53 <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>,
54                                                          <em class="parameter"><code>const <span class="type">char</span> *application_name</code></em>,
55                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppInfoCreateFlags" title="enum GAppInfoCreateFlags"><span class="type">GAppInfoCreateFlags</span></a> flags</code></em>,
56                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
57 <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>);
58 <a href="./../glib/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>,
59                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo2</code></em>);
60 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>);
61 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>);
62 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>);
63 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>);
64 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>);
65 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>);
66 <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>);
67 <a href="./../glib/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>,
68                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>,
69                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>,
70                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
71 <a href="./../glib/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>);
72 <a href="./../glib/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>);
73 <a href="./../glib/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>,
74                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *uris</code></em>,
75                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>,
76                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
77 <a href="./../glib/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>);
78 <a href="./../glib/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>);
79 <a href="./../glib/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>);
80 <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>);
81 <a href="./../glib/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>,
82                                                          <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
83                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
84 <a href="./../glib/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>
85                                                         (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>,
86                                                          <em class="parameter"><code>const <span class="type">char</span> *extension</code></em>,
87                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
88 <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GAppInfo.html#g-app-info-set-as-last-used-for-type" title="g_app_info_set_as_last_used_for_type ()">g_app_info_set_as_last_used_for_type</a>
89                                                         (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>,
90                                                          <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
91                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
92 <a href="./../glib/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>,
93                                                          <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
94                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
95 <a href="./../glib/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>);
96 <a href="./../glib/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>,
97                                                          <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
98                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
99 <a href="./../glib/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>);
100 <a href="./../glib/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>);
101 <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>,
102                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> must_support_uris</code></em>);
103 <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>
104                                                         (<em class="parameter"><code>const <span class="type">char</span> *uri_scheme</code></em>);
105 <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GAppInfo.html#g-app-info-get-fallback-for-type" title="g_app_info_get_fallback_for_type ()">g_app_info_get_fallback_for_type</a>    (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *content_type</code></em>);
106 <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="GAppInfo.html#g-app-info-get-recommended-for-type" title="g_app_info_get_recommended_for_type ()">g_app_info_get_recommended_for_type</a> (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *content_type</code></em>);
107 <a href="./../glib/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>,
108                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>,
109                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
110 <span class="returnvalue">void</span>                <a class="link" href="GAppInfo.html#g-app-launch-context-setenv" title="g_app_launch_context_setenv ()">g_app_launch_context_setenv</a>         (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>,
111                                                          <em class="parameter"><code>const <span class="type">char</span> *variable</code></em>,
112                                                          <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);
113 <span class="returnvalue">void</span>                <a class="link" href="GAppInfo.html#g-app-launch-context-unsetenv" title="g_app_launch_context_unsetenv ()">g_app_launch_context_unsetenv</a>       (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>,
114                                                          <em class="parameter"><code>const <span class="type">char</span> *variable</code></em>);
115 <span class="returnvalue">char</span> **             <a class="link" href="GAppInfo.html#g-app-launch-context-get-environment" title="g_app_launch_context_get_environment ()">g_app_launch_context_get_environment</a>
116                                                         (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>);
117 <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>,
118                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *info</code></em>,
119                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>);
120 <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>
121                                                         (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>,
122                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *info</code></em>,
123                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>);
124 <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>,
125                                                          <em class="parameter"><code>const <span class="type">char</span> *startup_notify_id</code></em>);
126 <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>);
127 </pre>
128 </div>
129 <div class="refsect1">
130 <a name="GAppInfo.object-hierarchy"></a><h2>Object Hierarchy</h2>
131 <pre class="synopsis">
132   GInterface
133    +----GAppInfo
134 </pre>
135 <pre class="synopsis">
136   <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
137    +----GAppLaunchContext
138 </pre>
139 </div>
140 <div class="refsect1">
141 <a name="GAppInfo.prerequisites"></a><h2>Prerequisites</h2>
142 <p>
143 GAppInfo requires
144  <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
145 </div>
146 <div class="refsect1">
147 <a name="GAppInfo.implementations"></a><h2>Known Implementations</h2>
148 <p>
149 GAppInfo is implemented by
150  <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo">GDesktopAppInfo</a>.</p>
151 </div>
152 <div class="refsect1">
153 <a name="GAppInfo.description"></a><h2>Description</h2>
154 <p>
155 <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
156 applications installed on the system.
157 </p>
158 <p>
159 As of GLib 2.20, URIs will always be converted to POSIX paths
160 (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
161 the application requested an URI and not a POSIX path. For example
162 for an desktop-file based application with Exec key <code class="literal">totem
163 %U</code> and a single URI,
164 <code class="literal">sftp://foo/file.avi</code>, then
165 <code class="literal">/home/user/.gvfs/sftp on foo/file.avi</code> will be
166 passed. This will only work if a set of suitable GIO extensions
167 (such as gvfs 2.26 compiled with FUSE support), is available and
168 operational; if this is not the case, the URI will be passed
169 unmodified to the application. Some URIs, such as
170 <code class="literal">mailto:</code>, of course cannot be mapped to a POSIX
171 path (in gvfs there's no FUSE mount for it); such URIs will be
172 passed unmodified to the application.
173 </p>
174 <p>
175 Specifically for gvfs 2.26 and later, the POSIX URI will be mapped
176 back to the GIO URI in the <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> constructors (since gvfs
177 implements the <a class="link" href="GVfs.html" title="GVfs"><span class="type">GVfs</span></a> extension point). As such, if the application
178 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
179 similar on <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>. In other words, an application cannot assume
180 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
181 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
182 illustrates this:
183 </p>
184 <p>
185 </p>
186 <pre class="programlisting">
187 GFile *f;
188 char *uri;
189
190 file = g_file_new_for_commandline_arg (uri_from_commandline);
191
192 uri = g_file_get_uri (file);
193 strcmp (uri, uri_from_commandline) == 0; // FALSE
194 g_free (uri);
195
196 if (g_file_has_uri_scheme (file, "cdda"))
197   {
198     // do something special with uri
199   }
200 g_object_unref (file);
201 </pre>
202 <p>
203 </p>
204 <p>
205 This code will work when both <code class="literal">cdda://sr0/Track
206 1.wav</code> and <code class="literal">/home/user/.gvfs/cdda on sr0/Track
207 1.wav</code> is passed to the application. It should be noted
208 that it's generally not safe for applications to rely on the format
209 of a particular URIs. Different launcher applications (e.g. file
210 managers) may have different ideas of what a given URI means.
211 </p>
212 </div>
213 <div class="refsect1">
214 <a name="GAppInfo.details"></a><h2>Details</h2>
215 <div class="refsect2">
216 <a name="GAppInfoCreateFlags"></a><h3>enum GAppInfoCreateFlags</h3>
217 <pre class="programlisting">typedef enum {
218   G_APP_INFO_CREATE_NONE                           = 0,         /*&lt; nick=none &gt;*/
219   G_APP_INFO_CREATE_NEEDS_TERMINAL                 = (1 &lt;&lt; 0),  /*&lt; nick=needs-terminal &gt;*/
220   G_APP_INFO_CREATE_SUPPORTS_URIS                  = (1 &lt;&lt; 1),  /*&lt; nick=supports-uris &gt;*/
221   G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION  = (1 &lt;&lt; 2)   /*&lt; nick=supports-startup-notification &gt;*/
222 } GAppInfoCreateFlags;
223 </pre>
224 <p>
225 Flags used when creating a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.
226 </p>
227 <div class="variablelist"><table border="0">
228 <col align="left" valign="top">
229 <tbody>
230 <tr>
231 <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>
232 <td>No flags.
233 </td>
234 </tr>
235 <tr>
236 <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>
237 <td>Application opens in a terminal window.
238 </td>
239 </tr>
240 <tr>
241 <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>
242 <td>Application supports URI arguments.
243 </td>
244 </tr>
245 <tr>
246 <td><p><a name="G-APP-INFO-CREATE-SUPPORTS-STARTUP-NOTIFICATION:CAPS"></a><span class="term"><code class="literal">G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION</code></span></p></td>
247 <td>Application supports startup notification. Since 2.26
248 </td>
249 </tr>
250 </tbody>
251 </table></div>
252 </div>
253 <hr>
254 <div class="refsect2">
255 <a name="GAppInfo-struct"></a><h3>GAppInfo</h3>
256 <pre class="programlisting">typedef struct _GAppInfo GAppInfo;</pre>
257 <p>
258 Information about an installed application and methods to launch
259 it (with file arguments).
260 </p>
261 </div>
262 <hr>
263 <div class="refsect2">
264 <a name="GAppInfoIface"></a><h3>struct GAppInfoIface</h3>
265 <pre class="programlisting">struct GAppInfoIface {
266   GTypeInterface g_iface;
267
268   /* Virtual Table */
269
270   GAppInfo *   (* dup)                          (GAppInfo           *appinfo);
271   gboolean     (* equal)                        (GAppInfo           *appinfo1,
272                                                  GAppInfo           *appinfo2);
273   const char * (* get_id)                       (GAppInfo           *appinfo);
274   const char * (* get_name)                     (GAppInfo           *appinfo);
275   const char * (* get_description)              (GAppInfo           *appinfo);
276   const char * (* get_executable)               (GAppInfo           *appinfo);
277   GIcon *      (* get_icon)                     (GAppInfo           *appinfo);
278   gboolean     (* launch)                       (GAppInfo           *appinfo,
279                                                  GList              *files,
280                                                  GAppLaunchContext  *launch_context,
281                                                  GError            **error);
282   gboolean     (* supports_uris)                (GAppInfo           *appinfo);
283   gboolean     (* supports_files)               (GAppInfo           *appinfo);
284   gboolean     (* launch_uris)                  (GAppInfo           *appinfo,
285                                                  GList              *uris,
286                                                  GAppLaunchContext  *launch_context,
287                                                  GError            **error);
288   gboolean     (* should_show)                  (GAppInfo           *appinfo);
289
290   /* For changing associations */
291   gboolean     (* set_as_default_for_type)      (GAppInfo           *appinfo,
292                                                  const char         *content_type,
293                                                  GError            **error);
294   gboolean     (* set_as_default_for_extension) (GAppInfo           *appinfo,
295                                                  const char         *extension,
296                                                  GError            **error);
297   gboolean     (* add_supports_type)            (GAppInfo           *appinfo,
298                                                  const char         *content_type,
299                                                  GError            **error);
300   gboolean     (* can_remove_supports_type)     (GAppInfo           *appinfo);
301   gboolean     (* remove_supports_type)         (GAppInfo           *appinfo,
302                                                  const char         *content_type,
303                                                  GError            **error);
304   gboolean     (* can_delete)                   (GAppInfo           *appinfo);
305   gboolean     (* do_delete)                    (GAppInfo           *appinfo);
306   const char * (* get_commandline)              (GAppInfo           *appinfo);
307   const char * (* get_display_name)             (GAppInfo           *appinfo);
308   gboolean     (* set_as_last_used_for_type)    (GAppInfo           *appinfo,
309                                                  const char         *content_type,
310                                                  GError            **error);
311 };
312 </pre>
313 <p>
314 Application Information interface, for operating system portability.
315 </p>
316 <div class="variablelist"><table border="0">
317 <col align="left" valign="top">
318 <tbody>
319 <tr>
320 <td><p><span class="term"><a href="./../gobject/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>
321 <td>The parent interface.</td>
322 </tr>
323 <tr>
324 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.dup"></a>dup</code></em> ()</span></p></td>
325 <td>Copies a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
326 </tr>
327 <tr>
328 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.equal"></a>equal</code></em> ()</span></p></td>
329 <td>Checks two <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>s for equality.</td>
330 </tr>
331 <tr>
332 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.get-id"></a>get_id</code></em> ()</span></p></td>
333 <td>Gets a string identifier for a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
334 </tr>
335 <tr>
336 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.get-name"></a>get_name</code></em> ()</span></p></td>
337 <td>Gets the name of the application for a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
338 </tr>
339 <tr>
340 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.get-description"></a>get_description</code></em> ()</span></p></td>
341 <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>
342 </tr>
343 <tr>
344 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.get-executable"></a>get_executable</code></em> ()</span></p></td>
345 <td>Gets the executable name for the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
346 </tr>
347 <tr>
348 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.get-icon"></a>get_icon</code></em> ()</span></p></td>
349 <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>
350 </tr>
351 <tr>
352 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.launch"></a>launch</code></em> ()</span></p></td>
353 <td>Launches an application specified by the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
354 </tr>
355 <tr>
356 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.supports-uris"></a>supports_uris</code></em> ()</span></p></td>
357 <td>Indicates whether the application specified supports launching URIs.</td>
358 </tr>
359 <tr>
360 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.supports-files"></a>supports_files</code></em> ()</span></p></td>
361 <td>Indicates whether the application specified accepts filename arguments.</td>
362 </tr>
363 <tr>
364 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.launch-uris"></a>launch_uris</code></em> ()</span></p></td>
365 <td>Launches an application with a list of URIs.</td>
366 </tr>
367 <tr>
368 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.should-show"></a>should_show</code></em> ()</span></p></td>
369 <td>Returns whether an application should be shown (e.g. when getting a list of installed applications).
370 <a class="ulink" href="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt" target="_top">
371 <em class="citetitle">FreeDesktop.Org Startup Notification Specification</em></a>.</td>
372 </tr>
373 <tr>
374 <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>
375 <td>Sets an application as default for a given content type.</td>
376 </tr>
377 <tr>
378 <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>
379 <td>Sets an application as default for a given file extension.</td>
380 </tr>
381 <tr>
382 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.add-supports-type"></a>add_supports_type</code></em> ()</span></p></td>
383 <td>Adds to the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> information about supported file types.</td>
384 </tr>
385 <tr>
386 <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>
387 <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>
388 </tr>
389 <tr>
390 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.remove-supports-type"></a>remove_supports_type</code></em> ()</span></p></td>
391 <td>Removes a supported application type from a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
392 </tr>
393 <tr>
394 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.can-delete"></a>can_delete</code></em> ()</span></p></td>
395 <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>
396 </tr>
397 <tr>
398 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.do-delete"></a>do_delete</code></em> ()</span></p></td>
399 <td>Deletes a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>. Since 2.20</td>
400 </tr>
401 <tr>
402 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.get-commandline"></a>get_commandline</code></em> ()</span></p></td>
403 <td>Gets the commandline for the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>. Since 2.20</td>
404 </tr>
405 <tr>
406 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.get-display-name"></a>get_display_name</code></em> ()</span></p></td>
407 <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>
408 </tr>
409 <tr>
410 <td><p><span class="term"><em class="structfield"><code><a name="GAppInfoIface.set-as-last-used-for-type"></a>set_as_last_used_for_type</code></em> ()</span></p></td>
411 <td>Sets the application as the last used. See <a class="link" href="GAppInfo.html#g-app-info-set-as-last-used-for-type" title="g_app_info_set_as_last_used_for_type ()"><code class="function">g_app_info_set_as_last_used_for_type()</code></a>.</td>
412 </tr>
413 </tbody>
414 </table></div>
415 </div>
416 <hr>
417 <div class="refsect2">
418 <a name="GAppLaunchContext-struct"></a><h3>GAppLaunchContext</h3>
419 <pre class="programlisting">typedef struct _GAppLaunchContext GAppLaunchContext;</pre>
420 <p>
421 Integrating the launch with the launching application. This is used to
422 handle for instance startup notification and launching the new application
423 on the same screen as the launching window.
424 </p>
425 </div>
426 <hr>
427 <div class="refsect2">
428 <a name="g-app-info-create-from-commandline"></a><h3>g_app_info_create_from_commandline ()</h3>
429 <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>,
430                                                          <em class="parameter"><code>const <span class="type">char</span> *application_name</code></em>,
431                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppInfoCreateFlags" title="enum GAppInfoCreateFlags"><span class="type">GAppInfoCreateFlags</span></a> flags</code></em>,
432                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
433 <p>
434 Creates a new <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> from the given information.
435 </p>
436 <div class="variablelist"><table border="0">
437 <col align="left" valign="top">
438 <tbody>
439 <tr>
440 <td><p><span class="term"><em class="parameter"><code>commandline</code></em> :</span></p></td>
441 <td>the commandline to use</td>
442 </tr>
443 <tr>
444 <td><p><span class="term"><em class="parameter"><code>application_name</code></em> :</span></p></td>
445 <td>the application name, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use <em class="parameter"><code>commandline</code></em>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
446 </td>
447 </tr>
448 <tr>
449 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
450 <td>flags that can specify details of the created <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>
451 </td>
452 </tr>
453 <tr>
454 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
455 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
456 </tr>
457 <tr>
458 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
459 <td>new <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for given command. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
460 </td>
461 </tr>
462 </tbody>
463 </table></div>
464 </div>
465 <hr>
466 <div class="refsect2">
467 <a name="g-app-info-dup"></a><h3>g_app_info_dup ()</h3>
468 <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>
469 <p>
470 Creates a duplicate of a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.
471 </p>
472 <div class="variablelist"><table border="0">
473 <col align="left" valign="top">
474 <tbody>
475 <tr>
476 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
477 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
478 </tr>
479 <tr>
480 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
481 <td>a duplicate of <em class="parameter"><code>appinfo</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
482 </td>
483 </tr>
484 </tbody>
485 </table></div>
486 </div>
487 <hr>
488 <div class="refsect2">
489 <a name="g-app-info-equal"></a><h3>g_app_info_equal ()</h3>
490 <pre class="programlisting"><a href="./../glib/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>,
491                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo2</code></em>);</pre>
492 <p>
493 Checks if two <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>s are equal.
494 </p>
495 <div class="variablelist"><table border="0">
496 <col align="left" valign="top">
497 <tbody>
498 <tr>
499 <td><p><span class="term"><em class="parameter"><code>appinfo1</code></em> :</span></p></td>
500 <td>the first <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
501 </tr>
502 <tr>
503 <td><p><span class="term"><em class="parameter"><code>appinfo2</code></em> :</span></p></td>
504 <td>the second <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
505 </tr>
506 <tr>
507 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
508 <td>
509 <a href="./../glib/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="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
510 </tr>
511 </tbody>
512 </table></div>
513 </div>
514 <hr>
515 <div class="refsect2">
516 <a name="g-app-info-get-id"></a><h3>g_app_info_get_id ()</h3>
517 <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>
518 <p>
519 Gets the ID of an application. An id is a string that
520 identifies the application. The exact format of the id is
521 platform dependent. For instance, on Unix this is the
522 desktop file id from the xdg menu specification.
523 </p>
524 <p>
525 Note that the returned ID may be <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, depending on how
526 the <em class="parameter"><code>appinfo</code></em> has been constructed.
527 </p>
528 <div class="variablelist"><table border="0">
529 <col align="left" valign="top">
530 <tbody>
531 <tr>
532 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
533 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
534 </tr>
535 <tr>
536 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
537 <td>a string containing the application's ID.</td>
538 </tr>
539 </tbody>
540 </table></div>
541 </div>
542 <hr>
543 <div class="refsect2">
544 <a name="g-app-info-get-name"></a><h3>g_app_info_get_name ()</h3>
545 <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>
546 <p>
547 Gets the installed name of the application.
548 </p>
549 <div class="variablelist"><table border="0">
550 <col align="left" valign="top">
551 <tbody>
552 <tr>
553 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
554 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
555 </tr>
556 <tr>
557 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
558 <td>the name of the application for <em class="parameter"><code>appinfo</code></em>.</td>
559 </tr>
560 </tbody>
561 </table></div>
562 </div>
563 <hr>
564 <div class="refsect2">
565 <a name="g-app-info-get-display-name"></a><h3>g_app_info_get_display_name ()</h3>
566 <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>
567 <p>
568 Gets the display name of the application. The display name is often more
569 descriptive to the user than the name itself.
570 </p>
571 <div class="variablelist"><table border="0">
572 <col align="left" valign="top">
573 <tbody>
574 <tr>
575 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
576 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
577 </tr>
578 <tr>
579 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
580 <td>the display name of the application for <em class="parameter"><code>appinfo</code></em>, or the name if
581 no display name is available.</td>
582 </tr>
583 </tbody>
584 </table></div>
585 <p class="since">Since 2.24</p>
586 </div>
587 <hr>
588 <div class="refsect2">
589 <a name="g-app-info-get-description"></a><h3>g_app_info_get_description ()</h3>
590 <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>
591 <p>
592 Gets a human-readable description of an installed application.
593 </p>
594 <div class="variablelist"><table border="0">
595 <col align="left" valign="top">
596 <tbody>
597 <tr>
598 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
599 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
600 </tr>
601 <tr>
602 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
603 <td>a string containing a description of the
604 application <em class="parameter"><code>appinfo</code></em>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none.</td>
605 </tr>
606 </tbody>
607 </table></div>
608 </div>
609 <hr>
610 <div class="refsect2">
611 <a name="g-app-info-get-executable"></a><h3>g_app_info_get_executable ()</h3>
612 <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>
613 <p>
614 Gets the executable's name for the installed application.
615 </p>
616 <div class="variablelist"><table border="0">
617 <col align="left" valign="top">
618 <tbody>
619 <tr>
620 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
621 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>
622 </td>
623 </tr>
624 <tr>
625 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
626 <td>a string containing the <em class="parameter"><code>appinfo</code></em>'s application
627 binaries name</td>
628 </tr>
629 </tbody>
630 </table></div>
631 </div>
632 <hr>
633 <div class="refsect2">
634 <a name="g-app-info-get-commandline"></a><h3>g_app_info_get_commandline ()</h3>
635 <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>
636 <p>
637 Gets the commandline with which the application will be
638 started.
639 </p>
640 <div class="variablelist"><table border="0">
641 <col align="left" valign="top">
642 <tbody>
643 <tr>
644 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
645 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>
646 </td>
647 </tr>
648 <tr>
649 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
650 <td>a string containing the <em class="parameter"><code>appinfo</code></em>'s commandline,
651 or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if this information is not available</td>
652 </tr>
653 </tbody>
654 </table></div>
655 <p class="since">Since 2.20</p>
656 </div>
657 <hr>
658 <div class="refsect2">
659 <a name="g-app-info-get-icon"></a><h3>g_app_info_get_icon ()</h3>
660 <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>
661 <p>
662 Gets the icon for the application.
663 </p>
664 <div class="variablelist"><table border="0">
665 <col align="left" valign="top">
666 <tbody>
667 <tr>
668 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
669 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
670 </tr>
671 <tr>
672 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
673 <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> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
674 if there is no default icon. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
675 </td>
676 </tr>
677 </tbody>
678 </table></div>
679 </div>
680 <hr>
681 <div class="refsect2">
682 <a name="g-app-info-launch"></a><h3>g_app_info_launch ()</h3>
683 <pre class="programlisting"><a href="./../glib/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>,
684                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>,
685                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>,
686                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
687 <p>
688 Launches the application. Passes <em class="parameter"><code>files</code></em> to the launched application
689 as arguments, using the optional <em class="parameter"><code>launch_context</code></em> to get information
690 about the details of the launcher (like what screen it is on).
691 On error, <em class="parameter"><code>error</code></em> will be set accordingly.
692 </p>
693 <p>
694 To launch the application without arguments pass a <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>files</code></em> list.
695 </p>
696 <p>
697 Note that even if the launch is successful the application launched
698 can fail to start if it runs into problems during startup. There is
699 no way to detect this.
700 </p>
701 <p>
702 Some URIs can be changed when passed through a GFile (for instance
703 unsupported URIs with strange formats like mailto:), so if you have
704 a textual URI you want to pass in as argument, consider using
705 <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.
706 </p>
707 <p>
708 The launched application inherits the environment of the launching
709 process, but it can be modified with <a class="link" href="GAppInfo.html#g-app-launch-context-setenv" title="g_app_launch_context_setenv ()"><code class="function">g_app_launch_context_setenv()</code></a> and
710 <a class="link" href="GAppInfo.html#g-app-launch-context-unsetenv" title="g_app_launch_context_unsetenv ()"><code class="function">g_app_launch_context_unsetenv()</code></a>.
711 </p>
712 <p>
713 On UNIX, this function sets the <code class="envar">GIO_LAUNCHED_DESKTOP_FILE</code>
714 environment variable with the path of the launched desktop file and
715 <code class="envar">GIO_LAUNCHED_DESKTOP_FILE_PID</code> to the process
716 id of the launched process. This can be used to ignore
717 <code class="envar">GIO_LAUNCHED_DESKTOP_FILE</code>, should it be inherited
718 by further processes. The <code class="envar">DISPLAY</code> and
719 <code class="envar">DESKTOP_STARTUP_ID</code> environment variables are also
720 set, based on information provided in <em class="parameter"><code>launch_context</code></em>.
721 </p>
722 <div class="variablelist"><table border="0">
723 <col align="left" valign="top">
724 <tbody>
725 <tr>
726 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
727 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>
728 </td>
729 </tr>
730 <tr>
731 <td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td>
732 <td>a <a href="./../glib/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. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GFile]</span>
733 </td>
734 </tr>
735 <tr>
736 <td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td>
737 <td>a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
738 </td>
739 </tr>
740 <tr>
741 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
742 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>
743 </td>
744 </tr>
745 <tr>
746 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
747 <td>
748 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on successful launch, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
749 </tr>
750 </tbody>
751 </table></div>
752 </div>
753 <hr>
754 <div class="refsect2">
755 <a name="g-app-info-supports-files"></a><h3>g_app_info_supports_files ()</h3>
756 <pre class="programlisting"><a href="./../glib/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>
757 <p>
758 Checks if the application accepts files as arguments.
759 </p>
760 <div class="variablelist"><table border="0">
761 <col align="left" valign="top">
762 <tbody>
763 <tr>
764 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
765 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
766 </tr>
767 <tr>
768 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
769 <td>
770 <a href="./../glib/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>
771 </tr>
772 </tbody>
773 </table></div>
774 </div>
775 <hr>
776 <div class="refsect2">
777 <a name="g-app-info-supports-uris"></a><h3>g_app_info_supports_uris ()</h3>
778 <pre class="programlisting"><a href="./../glib/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>
779 <p>
780 Checks if the application supports reading files and directories from URIs.
781 </p>
782 <div class="variablelist"><table border="0">
783 <col align="left" valign="top">
784 <tbody>
785 <tr>
786 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
787 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
788 </tr>
789 <tr>
790 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
791 <td>
792 <a href="./../glib/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>
793 </tr>
794 </tbody>
795 </table></div>
796 </div>
797 <hr>
798 <div class="refsect2">
799 <a name="g-app-info-launch-uris"></a><h3>g_app_info_launch_uris ()</h3>
800 <pre class="programlisting"><a href="./../glib/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>,
801                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *uris</code></em>,
802                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>,
803                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
804 <p>
805 Launches the application. This passes the <em class="parameter"><code>uris</code></em> to the launched application
806 as arguments, using the optional <em class="parameter"><code>launch_context</code></em> to get information
807 about the details of the launcher (like what screen it is on).
808 On error, <em class="parameter"><code>error</code></em> will be set accordingly.
809 </p>
810 <p>
811 To launch the application without arguments pass a <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>uris</code></em> list.
812 </p>
813 <p>
814 Note that even if the launch is successful the application launched
815 can fail to start if it runs into problems during startup. There is
816 no way to detect this.
817 </p>
818 <div class="variablelist"><table border="0">
819 <col align="left" valign="top">
820 <tbody>
821 <tr>
822 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
823 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>
824 </td>
825 </tr>
826 <tr>
827 <td><p><span class="term"><em class="parameter"><code>uris</code></em> :</span></p></td>
828 <td>a <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> containing URIs to launch. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8]</span>
829 </td>
830 </tr>
831 <tr>
832 <td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td>
833 <td>a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
834 </td>
835 </tr>
836 <tr>
837 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
838 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>
839 </td>
840 </tr>
841 <tr>
842 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
843 <td>
844 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on successful launch, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
845 </tr>
846 </tbody>
847 </table></div>
848 </div>
849 <hr>
850 <div class="refsect2">
851 <a name="g-app-info-should-show"></a><h3>g_app_info_should_show ()</h3>
852 <pre class="programlisting"><a href="./../glib/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>
853 <p>
854 Checks if the application info should be shown in menus that 
855 list available applications.
856 </p>
857 <div class="variablelist"><table border="0">
858 <col align="left" valign="top">
859 <tbody>
860 <tr>
861 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
862 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
863 </tr>
864 <tr>
865 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
866 <td>
867 <a href="./../glib/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="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
868 </tr>
869 </tbody>
870 </table></div>
871 </div>
872 <hr>
873 <div class="refsect2">
874 <a name="g-app-info-can-delete"></a><h3>g_app_info_can_delete ()</h3>
875 <pre class="programlisting"><a href="./../glib/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>
876 <p>
877 Obtains the information whether the <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> can be deleted.
878 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>.
879 </p>
880 <div class="variablelist"><table border="0">
881 <col align="left" valign="top">
882 <tbody>
883 <tr>
884 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
885 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>
886 </td>
887 </tr>
888 <tr>
889 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
890 <td>
891 <a href="./../glib/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>
892 </tr>
893 </tbody>
894 </table></div>
895 <p class="since">Since 2.20</p>
896 </div>
897 <hr>
898 <div class="refsect2">
899 <a name="g-app-info-delete"></a><h3>g_app_info_delete ()</h3>
900 <pre class="programlisting"><a href="./../glib/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>
901 <p>
902 Tries to delete a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.
903 </p>
904 <p>
905 On some platforms, there may be a difference between user-defined
906 <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>s which can be deleted, and system-wide ones which
907 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>.
908 </p>
909 <p>
910 Virtual: do_delete
911 </p>
912 <div class="variablelist"><table border="0">
913 <col align="left" valign="top">
914 <tbody>
915 <tr>
916 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
917 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>
918 </td>
919 </tr>
920 <tr>
921 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
922 <td>
923 <a href="./../glib/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>
924 </tr>
925 </tbody>
926 </table></div>
927 <p class="since">Since 2.20</p>
928 </div>
929 <hr>
930 <div class="refsect2">
931 <a name="g-app-info-reset-type-associations"></a><h3>g_app_info_reset_type_associations ()</h3>
932 <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>
933 <p>
934 Removes all changes to the type associations done by
935 <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>,
936 <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>,
937 <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
938 <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>.
939 </p>
940 <div class="variablelist"><table border="0">
941 <col align="left" valign="top">
942 <tbody><tr>
943 <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
944 <td>a content type</td>
945 </tr></tbody>
946 </table></div>
947 <p class="since">Since 2.20</p>
948 </div>
949 <hr>
950 <div class="refsect2">
951 <a name="g-app-info-set-as-default-for-type"></a><h3>g_app_info_set_as_default_for_type ()</h3>
952 <pre class="programlisting"><a href="./../glib/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>,
953                                                          <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
954                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
955 <p>
956 Sets the application as the default handler for a given type.
957 </p>
958 <div class="variablelist"><table border="0">
959 <col align="left" valign="top">
960 <tbody>
961 <tr>
962 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
963 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
964 </tr>
965 <tr>
966 <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
967 <td>the content type.</td>
968 </tr>
969 <tr>
970 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
971 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
972 </tr>
973 <tr>
974 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
975 <td>
976 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</td>
977 </tr>
978 </tbody>
979 </table></div>
980 </div>
981 <hr>
982 <div class="refsect2">
983 <a name="g-app-info-set-as-default-for-extension"></a><h3>g_app_info_set_as_default_for_extension ()</h3>
984 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_app_info_set_as_default_for_extension
985                                                         (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>,
986                                                          <em class="parameter"><code>const <span class="type">char</span> *extension</code></em>,
987                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
988 <p>
989 Sets the application as the default handler for the given file extension.
990 </p>
991 <div class="variablelist"><table border="0">
992 <col align="left" valign="top">
993 <tbody>
994 <tr>
995 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
996 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
997 </tr>
998 <tr>
999 <td><p><span class="term"><em class="parameter"><code>extension</code></em> :</span></p></td>
1000 <td>a string containing the file extension (without the dot).</td>
1001 </tr>
1002 <tr>
1003 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1004 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
1005 </tr>
1006 <tr>
1007 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1008 <td>
1009 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</td>
1010 </tr>
1011 </tbody>
1012 </table></div>
1013 </div>
1014 <hr>
1015 <div class="refsect2">
1016 <a name="g-app-info-set-as-last-used-for-type"></a><h3>g_app_info_set_as_last_used_for_type ()</h3>
1017 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_app_info_set_as_last_used_for_type
1018                                                         (<em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *appinfo</code></em>,
1019                                                          <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
1020                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1021 <p>
1022 Sets the application as the last used application for a given type.
1023 This will make the application appear as first in the list returned
1024 by <a class="link" href="GAppInfo.html#g-app-info-get-recommended-for-type" title="g_app_info_get_recommended_for_type ()"><code class="function">g_app_info_get_recommended_for_type()</code></a>, regardless of the default
1025 application for that content type.
1026 </p>
1027 <div class="variablelist"><table border="0">
1028 <col align="left" valign="top">
1029 <tbody>
1030 <tr>
1031 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
1032 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
1033 </tr>
1034 <tr>
1035 <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
1036 <td>the content type.</td>
1037 </tr>
1038 <tr>
1039 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1040 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
1041 </tr>
1042 <tr>
1043 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1044 <td>
1045 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</td>
1046 </tr>
1047 </tbody>
1048 </table></div>
1049 </div>
1050 <hr>
1051 <div class="refsect2">
1052 <a name="g-app-info-add-supports-type"></a><h3>g_app_info_add_supports_type ()</h3>
1053 <pre class="programlisting"><a href="./../glib/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>,
1054                                                          <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
1055                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1056 <p>
1057 Adds a content type to the application information to indicate the 
1058 application is capable of opening files with the given content type.
1059 </p>
1060 <div class="variablelist"><table border="0">
1061 <col align="left" valign="top">
1062 <tbody>
1063 <tr>
1064 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
1065 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
1066 </tr>
1067 <tr>
1068 <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
1069 <td>a string.</td>
1070 </tr>
1071 <tr>
1072 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1073 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
1074 </tr>
1075 <tr>
1076 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1077 <td>
1078 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</td>
1079 </tr>
1080 </tbody>
1081 </table></div>
1082 </div>
1083 <hr>
1084 <div class="refsect2">
1085 <a name="g-app-info-can-remove-supports-type"></a><h3>g_app_info_can_remove_supports_type ()</h3>
1086 <pre class="programlisting"><a href="./../glib/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>
1087 <p>
1088 Checks if a supported content type can be removed from an application.
1089 </p>
1090 <div class="variablelist"><table border="0">
1091 <col align="left" valign="top">
1092 <tbody>
1093 <tr>
1094 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
1095 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
1096 </tr>
1097 <tr>
1098 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1099 <td>
1100 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if it is possible to remove supported
1101 content types from a given <em class="parameter"><code>appinfo</code></em>, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</td>
1102 </tr>
1103 </tbody>
1104 </table></div>
1105 </div>
1106 <hr>
1107 <div class="refsect2">
1108 <a name="g-app-info-remove-supports-type"></a><h3>g_app_info_remove_supports_type ()</h3>
1109 <pre class="programlisting"><a href="./../glib/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>,
1110                                                          <em class="parameter"><code>const <span class="type">char</span> *content_type</code></em>,
1111                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1112 <p>
1113 Removes a supported type from an application, if possible.
1114 </p>
1115 <div class="variablelist"><table border="0">
1116 <col align="left" valign="top">
1117 <tbody>
1118 <tr>
1119 <td><p><span class="term"><em class="parameter"><code>appinfo</code></em> :</span></p></td>
1120 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>.</td>
1121 </tr>
1122 <tr>
1123 <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
1124 <td>a string.</td>
1125 </tr>
1126 <tr>
1127 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1128 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
1129 </tr>
1130 <tr>
1131 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1132 <td>
1133 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</td>
1134 </tr>
1135 </tbody>
1136 </table></div>
1137 </div>
1138 <hr>
1139 <div class="refsect2">
1140 <a name="g-app-info-get-all"></a><h3>g_app_info_get_all ()</h3>
1141 <pre class="programlisting"><a href="./../glib/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>
1142 <p>
1143 Gets a list of all of the applications currently registered 
1144 on this system.
1145 </p>
1146 <p>
1147 For desktop files, this includes applications that have 
1148 <code class="literal">NoDisplay=true</code> set or are excluded from 
1149 display by means of <code class="literal">OnlyShowIn</code> or
1150 <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>.
1151 The returned list does not include applications which have
1152 the <code class="literal">Hidden</code> key set.
1153 </p>
1154 <div class="variablelist"><table border="0">
1155 <col align="left" valign="top">
1156 <tbody><tr>
1157 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1158 <td>a newly allocated <a href="./../glib/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. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GAppInfo][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1159 </td>
1160 </tr></tbody>
1161 </table></div>
1162 </div>
1163 <hr>
1164 <div class="refsect2">
1165 <a name="g-app-info-get-all-for-type"></a><h3>g_app_info_get_all_for_type ()</h3>
1166 <pre class="programlisting"><a href="./../glib/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>
1167 <p>
1168 Gets a list of all <a href="GAppInfo.html"><span class="type">GAppInfos</span></a> for a given content type,
1169 including the recommended and fallback <a href="GAppInfo.html"><span class="type">GAppInfos</span></a>. See
1170 <a class="link" href="GAppInfo.html#g-app-info-get-recommended-for-type" title="g_app_info_get_recommended_for_type ()"><code class="function">g_app_info_get_recommended_for_type()</code></a> and
1171 <a class="link" href="GAppInfo.html#g-app-info-get-fallback-for-type" title="g_app_info_get_fallback_for_type ()"><code class="function">g_app_info_get_fallback_for_type()</code></a>.
1172 </p>
1173 <div class="variablelist"><table border="0">
1174 <col align="left" valign="top">
1175 <tbody>
1176 <tr>
1177 <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
1178 <td>the content type to find a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for</td>
1179 </tr>
1180 <tr>
1181 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1182 <td>
1183 <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="GAppInfo.html"><span class="type">GAppInfos</span></a>
1184 for given <em class="parameter"><code>content_type</code></em> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GAppInfo][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1185 </td>
1186 </tr>
1187 </tbody>
1188 </table></div>
1189 </div>
1190 <hr>
1191 <div class="refsect2">
1192 <a name="g-app-info-get-default-for-type"></a><h3>g_app_info_get_default_for_type ()</h3>
1193 <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>,
1194                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> must_support_uris</code></em>);</pre>
1195 <p>
1196 Gets the default <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for a given content type.
1197 </p>
1198 <div class="variablelist"><table border="0">
1199 <col align="left" valign="top">
1200 <tbody>
1201 <tr>
1202 <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
1203 <td>the content type to find a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for</td>
1204 </tr>
1205 <tr>
1206 <td><p><span class="term"><em class="parameter"><code>must_support_uris</code></em> :</span></p></td>
1207 <td>if <a href="./../glib/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
1208 support URIs</td>
1209 </tr>
1210 <tr>
1211 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1212 <td>
1213 <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
1214 <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1215 </td>
1216 </tr>
1217 </tbody>
1218 </table></div>
1219 </div>
1220 <hr>
1221 <div class="refsect2">
1222 <a name="g-app-info-get-default-for-uri-scheme"></a><h3>g_app_info_get_default_for_uri_scheme ()</h3>
1223 <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
1224                                                         (<em class="parameter"><code>const <span class="type">char</span> *uri_scheme</code></em>);</pre>
1225 <p>
1226 Gets the default application for handling URIs with
1227 the given URI scheme. A URI scheme is the initial part
1228 of the URI, up to but not including the ':', e.g. "http",
1229 "ftp" or "sip".
1230 </p>
1231 <div class="variablelist"><table border="0">
1232 <col align="left" valign="top">
1233 <tbody>
1234 <tr>
1235 <td><p><span class="term"><em class="parameter"><code>uri_scheme</code></em> :</span></p></td>
1236 <td>a string containing a URI scheme.</td>
1237 </tr>
1238 <tr>
1239 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1240 <td>
1241 <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="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1242 </td>
1243 </tr>
1244 </tbody>
1245 </table></div>
1246 </div>
1247 <hr>
1248 <div class="refsect2">
1249 <a name="g-app-info-get-fallback-for-type"></a><h3>g_app_info_get_fallback_for_type ()</h3>
1250 <pre class="programlisting"><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_app_info_get_fallback_for_type    (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *content_type</code></em>);</pre>
1251 <p>
1252 Gets a list of fallback <a href="GAppInfo.html"><span class="type">GAppInfos</span></a> for a given content type, i.e.
1253 those applications which claim to support the given content type
1254 by MIME type subclassing and not directly.
1255 </p>
1256 <div class="variablelist"><table border="0">
1257 <col align="left" valign="top">
1258 <tbody>
1259 <tr>
1260 <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
1261 <td>the content type to find a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for</td>
1262 </tr>
1263 <tr>
1264 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1265 <td>
1266 <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="GAppInfo.html"><span class="type">GAppInfos</span></a>
1267 for given <em class="parameter"><code>content_type</code></em> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GAppInfo][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1268 </td>
1269 </tr>
1270 </tbody>
1271 </table></div>
1272 <p class="since">Since 2.28</p>
1273 </div>
1274 <hr>
1275 <div class="refsect2">
1276 <a name="g-app-info-get-recommended-for-type"></a><h3>g_app_info_get_recommended_for_type ()</h3>
1277 <pre class="programlisting"><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             g_app_info_get_recommended_for_type (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *content_type</code></em>);</pre>
1278 <p>
1279 Gets a list of recommended <a href="GAppInfo.html"><span class="type">GAppInfos</span></a> for a given content type, i.e.
1280 those applications which claim to support the given content type exactly,
1281 and not by MIME type subclassing.
1282 Note that the first application of the list is the last used one, i.e.
1283 the last one for which <a class="link" href="GAppInfo.html#g-app-info-set-as-last-used-for-type" title="g_app_info_set_as_last_used_for_type ()"><code class="function">g_app_info_set_as_last_used_for_type()</code></a> has been
1284 called.
1285 </p>
1286 <div class="variablelist"><table border="0">
1287 <col align="left" valign="top">
1288 <tbody>
1289 <tr>
1290 <td><p><span class="term"><em class="parameter"><code>content_type</code></em> :</span></p></td>
1291 <td>the content type to find a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for</td>
1292 </tr>
1293 <tr>
1294 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1295 <td>
1296 <a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a href="GAppInfo.html"><span class="type">GAppInfos</span></a>
1297 for given <em class="parameter"><code>content_type</code></em> or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GAppInfo][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1298 </td>
1299 </tr>
1300 </tbody>
1301 </table></div>
1302 <p class="since">Since 2.28</p>
1303 </div>
1304 <hr>
1305 <div class="refsect2">
1306 <a name="g-app-info-launch-default-for-uri"></a><h3>g_app_info_launch_default_for_uri ()</h3>
1307 <pre class="programlisting"><a href="./../glib/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>,
1308                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *launch_context</code></em>,
1309                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1310 <p>
1311 Utility function that launches the default application
1312 registered to handle the specified uri. Synchronous I/O
1313 is done on the uri to detect the type of the file if
1314 required.
1315 </p>
1316 <div class="variablelist"><table border="0">
1317 <col align="left" valign="top">
1318 <tbody>
1319 <tr>
1320 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1321 <td>the uri to show</td>
1322 </tr>
1323 <tr>
1324 <td><p><span class="term"><em class="parameter"><code>launch_context</code></em> :</span></p></td>
1325 <td>an optional <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
1326 </td>
1327 </tr>
1328 <tr>
1329 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1330 <td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
1331 </tr>
1332 <tr>
1333 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1334 <td>
1335 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</td>
1336 </tr>
1337 </tbody>
1338 </table></div>
1339 </div>
1340 <hr>
1341 <div class="refsect2">
1342 <a name="g-app-launch-context-setenv"></a><h3>g_app_launch_context_setenv ()</h3>
1343 <pre class="programlisting"><span class="returnvalue">void</span>                g_app_launch_context_setenv         (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>,
1344                                                          <em class="parameter"><code>const <span class="type">char</span> *variable</code></em>,
1345                                                          <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);</pre>
1346 <p>
1347 Arranges for <em class="parameter"><code>variable</code></em> to be set to <em class="parameter"><code>value</code></em> in the child's
1348 environment when <em class="parameter"><code>context</code></em> is used to launch an application.
1349 </p>
1350 <div class="variablelist"><table border="0">
1351 <col align="left" valign="top">
1352 <tbody>
1353 <tr>
1354 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
1355 <td>a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a>
1356 </td>
1357 </tr>
1358 <tr>
1359 <td><p><span class="term"><em class="parameter"><code>variable</code></em> :</span></p></td>
1360 <td>the environment variable to set</td>
1361 </tr>
1362 <tr>
1363 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
1364 <td>the value for to set the variable to.</td>
1365 </tr>
1366 </tbody>
1367 </table></div>
1368 <p class="since">Since 2.32</p>
1369 </div>
1370 <hr>
1371 <div class="refsect2">
1372 <a name="g-app-launch-context-unsetenv"></a><h3>g_app_launch_context_unsetenv ()</h3>
1373 <pre class="programlisting"><span class="returnvalue">void</span>                g_app_launch_context_unsetenv       (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>,
1374                                                          <em class="parameter"><code>const <span class="type">char</span> *variable</code></em>);</pre>
1375 <p>
1376 Arranges for <em class="parameter"><code>variable</code></em> to be unset in the child's environment
1377 when <em class="parameter"><code>context</code></em> is used to launch an application.
1378 </p>
1379 <div class="variablelist"><table border="0">
1380 <col align="left" valign="top">
1381 <tbody>
1382 <tr>
1383 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
1384 <td>a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a>
1385 </td>
1386 </tr>
1387 <tr>
1388 <td><p><span class="term"><em class="parameter"><code>variable</code></em> :</span></p></td>
1389 <td>the environment variable to remove</td>
1390 </tr>
1391 </tbody>
1392 </table></div>
1393 <p class="since">Since 2.32</p>
1394 </div>
1395 <hr>
1396 <div class="refsect2">
1397 <a name="g-app-launch-context-get-environment"></a><h3>g_app_launch_context_get_environment ()</h3>
1398 <pre class="programlisting"><span class="returnvalue">char</span> **             g_app_launch_context_get_environment
1399                                                         (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>);</pre>
1400 <p>
1401 Gets the complete environment variable list to be passed to
1402 the child process when <em class="parameter"><code>context</code></em> is used to launch an application.
1403 This is a <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings, where each string has
1404 the form <code class="literal">KEY=VALUE</code>.
1405 </p>
1406 <div class="variablelist"><table border="0">
1407 <col align="left" valign="top">
1408 <tbody>
1409 <tr>
1410 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
1411 <td>a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a>
1412 </td>
1413 </tr>
1414 <tr>
1415 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1416 <td>the
1417 child's environment. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1418 </td>
1419 </tr>
1420 </tbody>
1421 </table></div>
1422 <p class="since">Since 2.32</p>
1423 </div>
1424 <hr>
1425 <div class="refsect2">
1426 <a name="g-app-launch-context-get-display"></a><h3>g_app_launch_context_get_display ()</h3>
1427 <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>,
1428                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *info</code></em>,
1429                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>);</pre>
1430 <p>
1431 Gets the display string for the <em class="parameter"><code>context</code></em>. This is used to ensure new
1432 applications are started on the same display as the launching
1433 application, by setting the <code class="envar">DISPLAY</code> environment variable.
1434 </p>
1435 <div class="variablelist"><table border="0">
1436 <col align="left" valign="top">
1437 <tbody>
1438 <tr>
1439 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
1440 <td>a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a>
1441 </td>
1442 </tr>
1443 <tr>
1444 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
1445 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>
1446 </td>
1447 </tr>
1448 <tr>
1449 <td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td>
1450 <td>a <a href="./../glib/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. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GFile]</span>
1451 </td>
1452 </tr>
1453 <tr>
1454 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1455 <td>a display string for the display.</td>
1456 </tr>
1457 </tbody>
1458 </table></div>
1459 </div>
1460 <hr>
1461 <div class="refsect2">
1462 <a name="g-app-launch-context-get-startup-notify-id"></a><h3>g_app_launch_context_get_startup_notify_id ()</h3>
1463 <pre class="programlisting"><span class="returnvalue">char</span> *              g_app_launch_context_get_startup_notify_id
1464                                                         (<em class="parameter"><code><a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a> *context</code></em>,
1465                                                          <em class="parameter"><code><a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> *info</code></em>,
1466                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *files</code></em>);</pre>
1467 <p>
1468 Initiates startup notification for the application and returns the
1469 <code class="envar">DESKTOP_STARTUP_ID</code> for the launched operation,
1470 if supported.
1471 </p>
1472 <p>
1473 Startup notification IDs are defined in the <a class="ulink" href="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt" target="_top">
1474 FreeDesktop.Org Startup Notifications standard</a>.
1475 </p>
1476 <div class="variablelist"><table border="0">
1477 <col align="left" valign="top">
1478 <tbody>
1479 <tr>
1480 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
1481 <td>a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a>
1482 </td>
1483 </tr>
1484 <tr>
1485 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
1486 <td>a <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a>
1487 </td>
1488 </tr>
1489 <tr>
1490 <td><p><span class="term"><em class="parameter"><code>files</code></em> :</span></p></td>
1491 <td>a <a href="./../glib/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. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GFile]</span>
1492 </td>
1493 </tr>
1494 <tr>
1495 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1496 <td>a startup notification ID for the application, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
1497 not supported.</td>
1498 </tr>
1499 </tbody>
1500 </table></div>
1501 </div>
1502 <hr>
1503 <div class="refsect2">
1504 <a name="g-app-launch-context-launch-failed"></a><h3>g_app_launch_context_launch_failed ()</h3>
1505 <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>,
1506                                                          <em class="parameter"><code>const <span class="type">char</span> *startup_notify_id</code></em>);</pre>
1507 <p>
1508 Called when an application has failed to launch, so that it can cancel
1509 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>.
1510 </p>
1511 <div class="variablelist"><table border="0">
1512 <col align="left" valign="top">
1513 <tbody>
1514 <tr>
1515 <td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
1516 <td>a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a>.</td>
1517 </tr>
1518 <tr>
1519 <td><p><span class="term"><em class="parameter"><code>startup_notify_id</code></em> :</span></p></td>
1520 <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>
1521 </tr>
1522 </tbody>
1523 </table></div>
1524 </div>
1525 <hr>
1526 <div class="refsect2">
1527 <a name="g-app-launch-context-new"></a><h3>g_app_launch_context_new ()</h3>
1528 <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>
1529 <p>
1530 Creates a new application launch context. This is not normally used,
1531 instead you instantiate a subclass of this, such as <a href="http://library.gnome.org/devel/gdk/gdk3-Application-launching.html#GdkAppLaunchContext"><span class="type">GdkAppLaunchContext</span></a>.
1532 </p>
1533 <div class="variablelist"><table border="0">
1534 <col align="left" valign="top">
1535 <tbody><tr>
1536 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1537 <td>a <a class="link" href="GAppInfo.html#GAppLaunchContext"><span class="type">GAppLaunchContext</span></a>.</td>
1538 </tr></tbody>
1539 </table></div>
1540 </div>
1541 </div>
1542 </div>
1543 <div class="footer">
1544 <hr>
1545           Generated by GTK-Doc V1.18</div>
1546 </body>
1547 </html>