~ubuntu-branches/debian/jessie/glib2.0/jessie

« back to all changes in this revision

Viewing changes to docs/reference/gio/html/GApplication.html

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-09-23 10:12:15 UTC
  • mto: This revision was merged to the branch mainline in revision 120.
  • Revision ID: package-import@ubuntu.com-20140923101215-kg4894xy8gz996q1
Tags: upstream-2.42.0
Import upstream version 2.42.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
<tbody>
46
46
<tr>
47
47
<td class="function_type">
48
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
48
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
49
49
</td>
50
50
<td class="function_name">
51
51
<a class="link" href="GApplication.html#g-application-id-is-valid" title="g_application_id_is_valid ()">g_application_id_is_valid</a> <span class="c_punctuation">()</span>
60
60
</td>
61
61
</tr>
62
62
<tr>
63
 
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
63
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
64
64
</td>
65
65
<td class="function_name">
66
66
<a class="link" href="GApplication.html#g-application-get-application-id" title="g_application_get_application_id ()">g_application_get_application_id</a> <span class="c_punctuation">()</span>
76
76
</tr>
77
77
<tr>
78
78
<td class="function_type">
79
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
79
<a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
80
80
</td>
81
81
<td class="function_name">
82
82
<a class="link" href="GApplication.html#g-application-get-inactivity-timeout" title="g_application_get_inactivity_timeout ()">g_application_get_inactivity_timeout</a> <span class="c_punctuation">()</span>
107
107
</td>
108
108
</tr>
109
109
<tr>
110
 
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
110
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
111
111
</td>
112
112
<td class="function_name">
113
113
<a class="link" href="GApplication.html#g-application-get-resource-base-path" title="g_application_get_resource_base_path ()">g_application_get_resource_base_path</a> <span class="c_punctuation">()</span>
130
130
</td>
131
131
</tr>
132
132
<tr>
133
 
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
133
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
134
134
</td>
135
135
<td class="function_name">
136
136
<a class="link" href="GApplication.html#g-application-get-dbus-object-path" title="g_application_get_dbus_object_path ()">g_application_get_dbus_object_path</a> <span class="c_punctuation">()</span>
146
146
</tr>
147
147
<tr>
148
148
<td class="function_type">
149
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
149
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
150
150
</td>
151
151
<td class="function_name">
152
152
<a class="link" href="GApplication.html#g-application-get-is-registered" title="g_application_get_is_registered ()">g_application_get_is_registered</a> <span class="c_punctuation">()</span>
154
154
</tr>
155
155
<tr>
156
156
<td class="function_type">
157
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
157
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
158
158
</td>
159
159
<td class="function_name">
160
160
<a class="link" href="GApplication.html#g-application-get-is-remote" title="g_application_get_is_remote ()">g_application_get_is_remote</a> <span class="c_punctuation">()</span>
162
162
</tr>
163
163
<tr>
164
164
<td class="function_type">
165
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
165
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
166
166
</td>
167
167
<td class="function_name">
168
168
<a class="link" href="GApplication.html#g-application-register" title="g_application_register ()">g_application_register</a> <span class="c_punctuation">()</span>
308
308
</tr>
309
309
<tr>
310
310
<td class="property_type">
311
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
 
311
<a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
312
312
<td class="property_name"><a class="link" href="GApplication.html#GApplication--application-id" title="The “application-id” property">application-id</a></td>
313
313
<td class="property_flags">Read / Write / Construct</td>
314
314
</tr>
318
318
<td class="property_flags">Read / Write</td>
319
319
</tr>
320
320
<tr>
321
 
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
 
321
<td class="property_type"><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
322
322
<td class="property_name"><a class="link" href="GApplication.html#GApplication--inactivity-timeout" title="The “inactivity-timeout” property">inactivity-timeout</a></td>
323
323
<td class="property_flags">Read / Write</td>
324
324
</tr>
325
325
<tr>
326
 
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
 
326
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
327
327
<td class="property_name"><a class="link" href="GApplication.html#GApplication--is-registered" title="The “is-registered” property">is-registered</a></td>
328
328
<td class="property_flags">Read</td>
329
329
</tr>
330
330
<tr>
331
 
<td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
 
331
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
332
332
<td class="property_name"><a class="link" href="GApplication.html#GApplication--is-remote" title="The “is-remote” property">is-remote</a></td>
333
333
<td class="property_flags">Read</td>
334
334
</tr>
335
335
<tr>
336
336
<td class="property_type">
337
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
 
337
<a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
338
338
<td class="property_name"><a class="link" href="GApplication.html#GApplication--resource-base-path" title="The “resource-base-path” property">resource-base-path</a></td>
339
339
<td class="property_flags">Read / Write</td>
340
340
</tr>
356
356
<td class="signal_flags">Run Last</td>
357
357
</tr>
358
358
<tr>
359
 
<td class="signal_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a></td>
 
359
<td class="signal_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a></td>
360
360
<td class="signal_name"><a class="link" href="GApplication.html#GApplication-command-line" title="The “command-line” signal">command-line</a></td>
361
361
<td class="signal_flags">Run Last</td>
362
362
</tr>
363
363
<tr>
364
 
<td class="signal_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a></td>
 
364
<td class="signal_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a></td>
365
365
<td class="signal_name"><a class="link" href="GApplication.html#GApplication-handle-local-options" title="The “handle-local-options” signal">handle-local-options</a></td>
366
366
<td class="signal_flags">Run Last</td>
367
367
</tr>
408
408
</div>
409
409
<div class="refsect1">
410
410
<a name="GApplication.object-hierarchy"></a><h2>Object Hierarchy</h2>
411
 
<pre class="screen">    GFlags
 
411
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GFlags</a>
412
412
    <span class="lineart">╰──</span> GApplicationFlags
413
 
    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
 
413
    <a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
414
414
    <span class="lineart">╰──</span> GApplication
415
415
</pre>
416
416
</div>
430
430
<p>A <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> is the foundation of an application.  It wraps some
431
431
low-level platform-specific services and is intended to act as the
432
432
foundation for higher-level application classes such as
433
 
<a href="http://developer.gnome.org/gtk2/GtkApplication.html"><span class="type">GtkApplication</span></a> or <span class="type">MxApplication</span>.  In general, you should not use
 
433
<span class="type">GtkApplication</span> or <span class="type">MxApplication</span>.  In general, you should not use
434
434
this class outside of a higher level framework.</p>
435
435
<p>GApplication provides convenient life cycle management by maintaining
436
436
a "use count" for the primary application instance. The use count can
437
437
be changed using <a class="link" href="GApplication.html#g-application-hold" title="g_application_hold ()"><code class="function">g_application_hold()</code></a> and <a class="link" href="GApplication.html#g-application-release" title="g_application_release ()"><code class="function">g_application_release()</code></a>. If
438
438
it drops to zero, the application exits. Higher-level classes such as
439
 
<a href="http://developer.gnome.org/gtk2/GtkApplication.html"><span class="type">GtkApplication</span></a> employ the use count to ensure that the application
 
439
<span class="type">GtkApplication</span> employ the use count to ensure that the application
440
440
stays alive as long as it has any opened windows.</p>
441
441
<p>Another feature that GApplication (optionally) provides is process
442
442
uniqueness. Applications can make use of this functionality by
498
498
<p>Regardless of which of these entry points is used to start the
499
499
application, GApplication passes some "platform data from the
500
500
launching instance to the primary instance, in the form of a
501
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> dictionary mapping strings to variants. To use platform
 
501
<a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> dictionary mapping strings to variants. To use platform
502
502
data, override the <em class="parameter"><code>before_emit</code></em>
503
503
 or <em class="parameter"><code>after_emit</code></em>
504
504
 virtual functions
515
515
<a class="link" href="GApplication.html#G-APPLICATION-SEND-ENVIRONMENT:CAPS"><code class="literal">G_APPLICATION_SEND_ENVIRONMENT</code></a> flag is set. <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> subclasses
516
516
can add their own platform data by overriding the <em class="parameter"><code>add_platform_data</code></em>
517
517
 
518
 
virtual function. For instance, <a href="http://developer.gnome.org/gtk2/GtkApplication.html"><span class="type">GtkApplication</span></a> adds startup notification
 
518
virtual function. For instance, <span class="type">GtkApplication</span> adds startup notification
519
519
data in this way.</p>
520
520
<p>To parse commandline arguments you may handle the
521
521
<a class="link" href="GApplication.html#GApplication-command-line" title="The “command-line” signal"><span class="type">“command-line”</span></a> signal or override the <code class="function">local_command_line()</code>
532
532
<a name="GApplication.functions_details"></a><h2>Functions</h2>
533
533
<div class="refsect2">
534
534
<a name="g-application-id-is-valid"></a><h3>g_application_id_is_valid ()</h3>
535
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
536
 
g_application_id_is_valid (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_id</code></em>);</pre>
 
535
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
536
g_application_id_is_valid (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_id</code></em>);</pre>
537
537
<p>Checks if <em class="parameter"><code>application_id</code></em>
538
538
 is a valid application identifier.</p>
539
539
<p>A valid ID is required for calls to <a class="link" href="GApplication.html#g-application-new" title="g_application_new ()"><code class="function">g_application_new()</code></a> and
568
568
</div>
569
569
<div class="refsect3">
570
570
<a name="id-1.4.22.2.11.2.9"></a><h4>Returns</h4>
571
 
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>application_id</code></em>
 
571
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>application_id</code></em>
572
572
is valid</p>
573
573
<p></p>
574
574
</div>
577
577
<div class="refsect2">
578
578
<a name="g-application-new"></a><h3>g_application_new ()</h3>
579
579
<pre class="programlisting"><a class="link" href="GApplication.html" title="GApplication"><span class="returnvalue">GApplication</span></a> *
580
 
g_application_new (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_id</code></em>,
 
580
g_application_new (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_id</code></em>,
581
581
                   <em class="parameter"><code><a class="link" href="GApplication.html#GApplicationFlags" title="enum GApplicationFlags"><span class="type">GApplicationFlags</span></a> flags</code></em>);</pre>
582
582
<p>Creates a new <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> instance.</p>
583
 
<p>If non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the application id must be valid.  See
 
583
<p>If non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the application id must be valid.  See
584
584
<a class="link" href="GApplication.html#g-application-id-is-valid" title="g_application_id_is_valid ()"><code class="function">g_application_id_is_valid()</code></a>.</p>
585
585
<p>If no application ID is given then some features of <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a>
586
586
(most notably application uniqueness) will be disabled.</p>
615
615
<hr>
616
616
<div class="refsect2">
617
617
<a name="g-application-get-application-id"></a><h3>g_application_get_application_id ()</h3>
618
 
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
618
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
619
619
g_application_get_application_id (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>);</pre>
620
620
<p>Gets the unique identifier for <em class="parameter"><code>application</code></em>
621
621
.</p>
648
648
<a name="g-application-set-application-id"></a><h3>g_application_set_application_id ()</h3>
649
649
<pre class="programlisting"><span class="returnvalue">void</span>
650
650
g_application_set_application_id (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
651
 
                                  <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_id</code></em>);</pre>
 
651
                                  <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *application_id</code></em>);</pre>
652
652
<p>Sets the unique identifier for <em class="parameter"><code>application</code></em>
653
653
.</p>
654
654
<p>The application id can only be modified if <em class="parameter"><code>application</code></em>
655
655
 has not yet
656
656
been registered.</p>
657
 
<p>If non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the application id must be valid.  See
 
657
<p>If non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the application id must be valid.  See
658
658
<a class="link" href="GApplication.html#g-application-id-is-valid" title="g_application_id_is_valid ()"><code class="function">g_application_id_is_valid()</code></a>.</p>
659
659
<div class="refsect3">
660
660
<a name="id-1.4.22.2.11.5.7"></a><h4>Parameters</h4>
684
684
<hr>
685
685
<div class="refsect2">
686
686
<a name="g-application-get-inactivity-timeout"></a><h3>g_application_get_inactivity_timeout ()</h3>
687
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
687
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
688
688
g_application_get_inactivity_timeout (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>);</pre>
689
689
<p>Gets the current inactivity timeout for the application.</p>
690
690
<p>This is the amount of time (in milliseconds) after the last call to
716
716
<a name="g-application-set-inactivity-timeout"></a><h3>g_application_set_inactivity_timeout ()</h3>
717
717
<pre class="programlisting"><span class="returnvalue">void</span>
718
718
g_application_set_inactivity_timeout (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
719
 
                                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> inactivity_timeout</code></em>);</pre>
 
719
                                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> inactivity_timeout</code></em>);</pre>
720
720
<p>Sets the current inactivity timeout for the application.</p>
721
721
<p>This is the amount of time (in milliseconds) after the last call to
722
722
<a class="link" href="GApplication.html#g-application-release" title="g_application_release ()"><code class="function">g_application_release()</code></a> before the application stops running.</p>
818
818
<hr>
819
819
<div class="refsect2">
820
820
<a name="g-application-get-resource-base-path"></a><h3>g_application_get_resource_base_path ()</h3>
821
 
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
821
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
822
822
g_application_get_resource_base_path (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>);</pre>
823
823
<p>Gets the resource base path of <em class="parameter"><code>application</code></em>
824
824
.</p>
850
850
<a name="g-application-set-resource-base-path"></a><h3>g_application_set_resource_base_path ()</h3>
851
851
<pre class="programlisting"><span class="returnvalue">void</span>
852
852
g_application_set_resource_base_path (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
853
 
                                      <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *resource_base_path</code></em>);</pre>
 
853
                                      <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *resource_path</code></em>);</pre>
854
854
<p>Sets (or unsets) the base resource path of <em class="parameter"><code>application</code></em>
855
855
.</p>
856
856
<p>The path is used to automatically load various <GTKDOCLINK HREF="gresource">application
864
864
resource base path.</p>
865
865
<p>As an example, if the application has an ID of "org.example.app" then
866
866
the default resource base path will be "/org/example/app".  If this
867
 
is a <a href="http://developer.gnome.org/gtk2/GtkApplication.html"><span class="type">GtkApplication</span></a> (and you have not manually changed the path)
 
867
is a <span class="type">GtkApplication</span> (and you have not manually changed the path)
868
868
then Gtk will then search for the menus of the application at
869
869
"/org/example/app/gtk/menus.ui".</p>
870
870
<p>See <a class="link" href="gio-GResource.html#GResource" title="GResource"><span class="type">GResource</span></a> for more information about adding resources to your
871
871
application.</p>
872
872
<p>You can disable automatic resource loading functionality by setting
873
 
the path to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
 
873
the path to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
874
874
<p>Changing the resource base path once the application is running is
875
875
not recommended.  The point at which the resource path is consulted
876
876
for forming paths for various purposes is unspecified.</p>
903
903
<a name="g-application-get-dbus-connection"></a><h3>g_application_get_dbus_connection ()</h3>
904
904
<pre class="programlisting"><a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *
905
905
g_application_get_dbus_connection (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>);</pre>
906
 
<p>Gets the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> being used by the application, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
 
906
<p>Gets the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> being used by the application, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
907
907
<p>If <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> is using its D-Bus backend then this function will
908
908
return the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> being used for uniqueness and
909
909
communication with the desktop environment and other instances of the
910
910
application.</p>
911
911
<p>If <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> is not using D-Bus then this function will return
912
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.  This includes the situation where the D-Bus backend would
 
912
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.  This includes the situation where the D-Bus backend would
913
913
normally be in use but we were unable to connect to the bus.</p>
914
914
<p>This function must not be called before the application has been
915
915
registered.  See <a class="link" href="GApplication.html#g-application-get-is-registered" title="g_application_get_is_registered ()"><code class="function">g_application_get_is_registered()</code></a>.</p>
930
930
</div>
931
931
<div class="refsect3">
932
932
<a name="id-1.4.22.2.11.12.9"></a><h4>Returns</h4>
933
 
<p> a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
 
933
<p> a <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
934
934
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
935
935
</div>
936
936
<p class="since">Since 2.34</p>
938
938
<hr>
939
939
<div class="refsect2">
940
940
<a name="g-application-get-dbus-object-path"></a><h3>g_application_get_dbus_object_path ()</h3>
941
 
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
941
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
942
942
g_application_get_dbus_object_path (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>);</pre>
943
 
<p>Gets the D-Bus object path being used by the application, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
 
943
<p>Gets the D-Bus object path being used by the application, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
944
944
<p>If <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> is using its D-Bus backend then this function will
945
945
return the D-Bus object path that <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> is using.  If the
946
946
application is the primary instance then there is an object published
947
947
at this path.  If the application is not the primary instance then
948
948
the result of this function is undefined.</p>
949
949
<p>If <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> is not using D-Bus then this function will return
950
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.  This includes the situation where the D-Bus backend would
 
950
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.  This includes the situation where the D-Bus backend would
951
951
normally be in use but we were unable to connect to the bus.</p>
952
952
<p>This function must not be called before the application has been
953
953
registered.  See <a class="link" href="GApplication.html#g-application-get-is-registered" title="g_application_get_is_registered ()"><code class="function">g_application_get_is_registered()</code></a>.</p>
968
968
</div>
969
969
<div class="refsect3">
970
970
<a name="id-1.4.22.2.11.13.9"></a><h4>Returns</h4>
971
 
<p> the object path, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
 
971
<p> the object path, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
972
972
<p></p>
973
973
</div>
974
974
<p class="since">Since 2.34</p>
1006
1006
</tr>
1007
1007
<tr>
1008
1008
<td class="parameter_name"><p>action_group</p></td>
1009
 
<td class="parameter_description"><p> a <a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1009
<td class="parameter_description"><p> a <a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1010
1010
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1011
1011
</tr>
1012
1012
</tbody>
1017
1017
<hr>
1018
1018
<div class="refsect2">
1019
1019
<a name="g-application-get-is-registered"></a><h3>g_application_get_is_registered ()</h3>
1020
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
1020
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1021
1021
g_application_get_is_registered (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>);</pre>
1022
1022
<p>Checks if <em class="parameter"><code>application</code></em>
1023
1023
 is registered.</p>
1040
1040
</div>
1041
1041
<div class="refsect3">
1042
1042
<a name="id-1.4.22.2.11.15.7"></a><h4>Returns</h4>
1043
 
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>application</code></em>
 
1043
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>application</code></em>
1044
1044
is registered</p>
1045
1045
<p></p>
1046
1046
</div>
1049
1049
<hr>
1050
1050
<div class="refsect2">
1051
1051
<a name="g-application-get-is-remote"></a><h3>g_application_get_is_remote ()</h3>
1052
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
1052
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1053
1053
g_application_get_is_remote (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>);</pre>
1054
1054
<p>Checks if <em class="parameter"><code>application</code></em>
1055
1055
 is remote.</p>
1079
1079
</div>
1080
1080
<div class="refsect3">
1081
1081
<a name="id-1.4.22.2.11.16.8"></a><h4>Returns</h4>
1082
 
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>application</code></em>
 
1082
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>application</code></em>
1083
1083
is remote</p>
1084
1084
<p></p>
1085
1085
</div>
1088
1088
<hr>
1089
1089
<div class="refsect2">
1090
1090
<a name="g-application-register"></a><h3>g_application_register ()</h3>
1091
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
1091
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1092
1092
g_application_register (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
1093
1093
                        <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1094
 
                        <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
1094
                        <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1095
1095
<p>Attempts registration of the application.</p>
1096
1096
<p>This is the point at which the application discovers if it is the
1097
1097
primary instance or merely acting as a remote for an already-existing
1104
1104
dispatched at any time (even if a main loop is not running).  For
1105
1105
this reason, you must ensure that any object paths that you wish to
1106
1106
register are registered before calling this function.</p>
1107
 
<p>If the application has already been registered then <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is
 
1107
<p>If the application has already been registered then <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is
1108
1108
returned with no work performed.</p>
1109
1109
<p>The <a class="link" href="GApplication.html#GApplication-startup" title="The “startup” signal"><span class="type">“startup”</span></a> signal is emitted if registration succeeds
1110
1110
and <em class="parameter"><code>application</code></em>
1112
1112
case).</p>
1113
1113
<p>In the event of an error (such as <em class="parameter"><code>cancellable</code></em>
1114
1114
 being cancelled, or a
1115
 
failure to connect to the session bus), <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and <em class="parameter"><code>error</code></em>
 
1115
failure to connect to the session bus), <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and <em class="parameter"><code>error</code></em>
1116
1116
 
1117
1117
is set appropriately.</p>
1118
1118
<p>Note: the return value of this function is not an indicator that this
1134
1134
</tr>
1135
1135
<tr>
1136
1136
<td class="parameter_name"><p>cancellable</p></td>
1137
 
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1137
<td class="parameter_description"><p> a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1138
1138
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1139
1139
</tr>
1140
1140
<tr>
1141
1141
<td class="parameter_name"><p>error</p></td>
1142
 
<td class="parameter_description"><p>a pointer to a NULL <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
 
1142
<td class="parameter_description"><p>a pointer to a NULL <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1143
1143
<td class="parameter_annotations"> </td>
1144
1144
</tr>
1145
1145
</tbody>
1147
1147
</div>
1148
1148
<div class="refsect3">
1149
1149
<a name="id-1.4.22.2.11.17.13"></a><h4>Returns</h4>
1150
 
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if registration succeeded</p>
 
1150
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if registration succeeded</p>
1151
1151
<p></p>
1152
1152
</div>
1153
1153
<p class="since">Since 2.28</p>
1265
1265
<pre class="programlisting"><span class="returnvalue">void</span>
1266
1266
g_application_open (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
1267
1267
                    <em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> **files</code></em>,
1268
 
                    <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_files</code></em>,
1269
 
                    <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hint</code></em>);</pre>
 
1268
                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_files</code></em>,
 
1269
                    <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hint</code></em>);</pre>
1270
1270
<p>Opens the given files.</p>
1271
1271
<p>In essence, this results in the <a class="link" href="GApplication.html#GApplication-open" title="The “open” signal"><span class="type">“open”</span></a> signal being emitted
1272
1272
in the primary instance.</p>
1306
1306
</tr>
1307
1307
<tr>
1308
1308
<td class="parameter_name"><p>hint</p></td>
1309
 
<td class="parameter_description"><p>a hint (or ""), but never <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
 
1309
<td class="parameter_description"><p>a hint (or ""), but never <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1310
1310
<td class="parameter_annotations"> </td>
1311
1311
</tr>
1312
1312
</tbody>
1319
1319
<a name="g-application-send-notification"></a><h3>g_application_send_notification ()</h3>
1320
1320
<pre class="programlisting"><span class="returnvalue">void</span>
1321
1321
g_application_send_notification (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
1322
 
                                 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *id</code></em>,
 
1322
                                 <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *id</code></em>,
1323
1323
                                 <em class="parameter"><code><a class="link" href="gio-GNotification.html#GNotification" title="GNotification"><span class="type">GNotification</span></a> *notification</code></em>);</pre>
1324
1324
<p>Sends a notification on behalf of <em class="parameter"><code>application</code></em>
1325
1325
 to the desktop shell.
1344
1344
execution of the application, as long as <em class="parameter"><code>id</code></em>
1345
1345
 is the same string.</p>
1346
1346
<p><em class="parameter"><code>id</code></em>
1347
 
 may be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, but it is impossible to replace or withdraw
 
1347
 may be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, but it is impossible to replace or withdraw
1348
1348
notifications without an id.</p>
1349
1349
<p>If <em class="parameter"><code>notification</code></em>
1350
1350
 is no longer relevant, it can be withdrawn with
1365
1365
</tr>
1366
1366
<tr>
1367
1367
<td class="parameter_name"><p>id</p></td>
1368
 
<td class="parameter_description"><p> id of the notification, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1368
<td class="parameter_description"><p> id of the notification, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1369
1369
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1370
1370
</tr>
1371
1371
<tr>
1383
1383
<a name="g-application-withdraw-notification"></a><h3>g_application_withdraw_notification ()</h3>
1384
1384
<pre class="programlisting"><span class="returnvalue">void</span>
1385
1385
g_application_withdraw_notification (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
1386
 
                                     <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *id</code></em>);</pre>
 
1386
                                     <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *id</code></em>);</pre>
1387
1387
<p>Withdraws a notification that was sent with
1388
1388
<a class="link" href="GApplication.html#g-application-send-notification" title="g_application_send_notification ()"><code class="function">g_application_send_notification()</code></a>.</p>
1389
1389
<p>This call does nothing if a notification with <em class="parameter"><code>id</code></em>
1433
1433
the <em class="parameter"><code>argc</code></em>
1434
1434
, <em class="parameter"><code>argv</code></em>
1435
1435
 parameters from <code class="function">main()</code> to this function, it is possible
1436
 
to pass <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>argv</code></em>
 
1436
to pass <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>argv</code></em>
1437
1437
 is not available or commandline handling is not
1438
1438
required.  Note that on Windows, <em class="parameter"><code>argc</code></em>
1439
1439
 and <em class="parameter"><code>argv</code></em>
1440
1440
 are ignored, and
1441
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Windows-Compatibility-Functions.html#g-win32-get-command-line"><code class="function">g_win32_get_command_line()</code></a> is called internally (for proper support
 
1441
<a href="../glib/glib-Windows-Compatibility-Functions.html#g-win32-get-command-line"><code class="function">g_win32_get_command_line()</code></a> is called internally (for proper support
1442
1442
of Unicode commandline arguments).</p>
1443
1443
<p><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> will attempt to parse the commandline arguments.  You
1444
1444
can add commandline flags to the list of recognised options by way of
1445
1445
<a class="link" href="GApplication.html#g-application-add-main-option-entries" title="g_application_add_main_option_entries ()"><code class="function">g_application_add_main_option_entries()</code></a>.  After this, the
1446
1446
<a class="link" href="GApplication.html#GApplication-handle-local-options" title="The “handle-local-options” signal"><span class="type">“handle-local-options”</span></a> signal is emitted, from which the
1447
 
application can inspect the values of its <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntrys</span></a>.</p>
 
1447
application can inspect the values of its <a href="../glib/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntrys</span></a>.</p>
1448
1448
<p><a class="link" href="GApplication.html#GApplication-handle-local-options" title="The “handle-local-options” signal"><span class="type">“handle-local-options”</span></a> is a good place to handle options
1449
1449
such as <code class="literal">--version</code>, where an immediate reply from the local process is
1450
1450
desired (instead of communicating with an already-running instance).
1463
1463
<p>If you are interested in doing more complicated local handling of the
1464
1464
commandline then you should implement your own <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> subclass
1465
1465
and override <code class="function">local_command_line()</code>. In this case, you most likely want
1466
 
to return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> from your <code class="function">local_command_line()</code> implementation to
 
1466
to return <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> from your <code class="function">local_command_line()</code> implementation to
1467
1467
suppress the default handling. See
1468
1468
gapplication-example-cmdline2.c
1469
1469
for an example.</p>
1477
1477
if the use count falls to zero the application will exit immediately,
1478
1478
except in the case that <a class="link" href="GApplication.html#g-application-set-inactivity-timeout" title="g_application_set_inactivity_timeout ()"><code class="function">g_application_set_inactivity_timeout()</code></a> is in
1479
1479
use.</p>
1480
 
<p>This function sets the prgname (<a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-set-prgname"><code class="function">g_set_prgname()</code></a>), if not already set,
 
1480
<p>This function sets the prgname (<a href="../glib/glib-Miscellaneous-Utility-Functions.html#g-set-prgname"><code class="function">g_set_prgname()</code></a>), if not already set,
1481
1481
to the basename of argv[0].  Since 2.38, if <a class="link" href="GApplication.html#G-APPLICATION-IS-SERVICE:CAPS"><code class="literal">G_APPLICATION_IS_SERVICE</code></a>
1482
1482
is specified, the prgname is set to the application ID.  The main
1483
1483
impact of this is is that the wmclass of windows created by Gtk+ will
1516
1516
<tr>
1517
1517
<td class="parameter_name"><p>argc</p></td>
1518
1518
<td class="parameter_description"><p>the argc from <code class="function">main()</code> (or 0 if <em class="parameter"><code>argv</code></em>
1519
 
is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>)</p></td>
 
1519
is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>)</p></td>
1520
1520
<td class="parameter_annotations"> </td>
1521
1521
</tr>
1522
1522
<tr>
1523
1523
<td class="parameter_name"><p>argv</p></td>
1524
 
<td class="parameter_description"><p> the argv from <code class="function">main()</code>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1524
<td class="parameter_description"><p> the argv from <code class="function">main()</code>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1525
1525
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=argc][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1526
1526
</tr>
1527
1527
</tbody>
1539
1539
<a name="g-application-add-main-option-entries"></a><h3>g_application_add_main_option_entries ()</h3>
1540
1540
<pre class="programlisting"><span class="returnvalue">void</span>
1541
1541
g_application_add_main_option_entries (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
1542
 
                                       <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntry</span></a> *entries</code></em>);</pre>
 
1542
                                       <em class="parameter"><code>const <a href="../glib/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntry</span></a> *entries</code></em>);</pre>
1543
1543
<p>Adds main option entries to be handled by <em class="parameter"><code>application</code></em>
1544
1544
.</p>
1545
 
<p>This function is comparable to <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#g-option-context-add-main-entries"><code class="function">g_option_context_add_main_entries()</code></a>.</p>
 
1545
<p>This function is comparable to <a href="../glib/glib-Commandline-option-parser.html#g-option-context-add-main-entries"><code class="function">g_option_context_add_main_entries()</code></a>.</p>
1546
1546
<p>After the commandline arguments are parsed, the
1547
1547
<a class="link" href="GApplication.html#GApplication-handle-local-options" title="The “handle-local-options” signal"><span class="type">“handle-local-options”</span></a> signal will be emitted.  At this
1548
1548
point, the application can inspect the values pointed to by <em class="parameter"><code>arg_data</code></em>
1549
1549
 
1550
 
in the given <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntrys</span></a>.</p>
1551
 
<p>Unlike <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionContext"><span class="type">GOptionContext</span></a>, <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> supports giving a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
1550
in the given <a href="../glib/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntrys</span></a>.</p>
 
1551
<p>Unlike <a href="../glib/glib-Commandline-option-parser.html#GOptionContext"><span class="type">GOptionContext</span></a>, <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> supports giving a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1552
1552
<em class="parameter"><code>arg_data</code></em>
1553
 
 for a non-callback <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntry</span></a>.  This results in the
1554
 
argument in question being packed into a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariantDict"><span class="type">GVariantDict</span></a> which is also
 
1553
 for a non-callback <a href="../glib/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntry</span></a>.  This results in the
 
1554
argument in question being packed into a <a href="../glib/glib-GVariant.html#GVariantDict"><span class="type">GVariantDict</span></a> which is also
1555
1555
passed to <a class="link" href="GApplication.html#GApplication-handle-local-options" title="The “handle-local-options” signal"><span class="type">“handle-local-options”</span></a>, where it can be
1556
1556
inspected and modified.  If <a class="link" href="GApplication.html#G-APPLICATION-HANDLES-COMMAND-LINE:CAPS"><code class="literal">G_APPLICATION_HANDLES_COMMAND_LINE</code></a> is
1557
1557
set, then the resulting dictionary is sent to the primary instance,
1559
1559
This "packing" is done according to the type of the argument --
1560
1560
booleans for normal flags, strings for strings, bytestrings for
1561
1561
filenames, etc.  The packing only occurs if the flag is given (ie: we
1562
 
do not pack a "false" <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> in the case that a flag is missing).</p>
 
1562
do not pack a "false" <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> in the case that a flag is missing).</p>
1563
1563
<p>In general, it is recommended that all commandline arguments are
1564
1564
parsed locally.  The options dictionary should then be used to
1565
1565
transmit the result of the parsing to the primary instance, where
1566
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#g-variant-dict-lookup"><code class="function">g_variant_dict_lookup()</code></a> can be used.  For local options, it is
 
1566
<a href="../glib/glib-GVariant.html#g-variant-dict-lookup"><code class="function">g_variant_dict_lookup()</code></a> can be used.  For local options, it is
1567
1567
possible to either use <em class="parameter"><code>arg_data</code></em>
1568
1568
 in the usual way, or to consult (and
1569
1569
potentially remove) the option from the options dictionary.</p>
1575
1575
treated as errors.  Unrecognised options have never been ignored when
1576
1576
<a class="link" href="GApplication.html#G-APPLICATION-HANDLES-COMMAND-LINE:CAPS"><code class="literal">G_APPLICATION_HANDLES_COMMAND_LINE</code></a> is unset.</p>
1577
1577
<p>If <a class="link" href="GApplication.html#GApplication-handle-local-options" title="The “handle-local-options” signal"><span class="type">“handle-local-options”</span></a> needs to see the list of
1578
 
filenames, then the use of <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#G-OPTION-REMAINING:CAPS"><code class="literal">G_OPTION_REMAINING</code></a> is recommended.  If
 
1578
filenames, then the use of <a href="../glib/glib-Commandline-option-parser.html#G-OPTION-REMAINING:CAPS"><code class="literal">G_OPTION_REMAINING</code></a> is recommended.  If
1579
1579
<em class="parameter"><code>arg_data</code></em>
1580
 
 is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#G-OPTION-REMAINING:CAPS"><code class="literal">G_OPTION_REMAINING</code></a> can be used as a key into
1581
 
the options dictionary.  If you do use <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#G-OPTION-REMAINING:CAPS"><code class="literal">G_OPTION_REMAINING</code></a> then you
 
1580
 is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then <a href="../glib/glib-Commandline-option-parser.html#G-OPTION-REMAINING:CAPS"><code class="literal">G_OPTION_REMAINING</code></a> can be used as a key into
 
1581
the options dictionary.  If you do use <a href="../glib/glib-Commandline-option-parser.html#G-OPTION-REMAINING:CAPS"><code class="literal">G_OPTION_REMAINING</code></a> then you
1582
1582
need to handle these arguments for yourself because once they are
1583
1583
consumed, they will no longer be visible to the default handling
1584
1584
(which treats them as filenames to be opened).</p>
1599
1599
<tr>
1600
1600
<td class="parameter_name"><p>entries</p></td>
1601
1601
<td class="parameter_description"><p>(array zero-terminated=1) (element-type GOptionEntry) a
1602
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntrys</span></a></p></td>
 
1602
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of <a href="../glib/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntrys</span></a></p></td>
1603
1603
<td class="parameter_annotations"> </td>
1604
1604
</tr>
1605
1605
</tbody>
1614
1614
g_application_add_main_option (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
1615
1615
                               <em class="parameter"><code>const <span class="type">char</span> *long_name</code></em>,
1616
1616
                               <em class="parameter"><code><span class="type">char</span> short_name</code></em>,
1617
 
                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> flags</code></em>,
1618
 
                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionArg"><span class="type">GOptionArg</span></a> arg</code></em>,
 
1617
                               <em class="parameter"><code><a href="../glib/glib-Commandline-option-parser.html#GOptionFlags"><span class="type">GOptionFlags</span></a> flags</code></em>,
 
1618
                               <em class="parameter"><code><a href="../glib/glib-Commandline-option-parser.html#GOptionArg"><span class="type">GOptionArg</span></a> arg</code></em>,
1619
1619
                               <em class="parameter"><code>const <span class="type">char</span> *description</code></em>,
1620
1620
                               <em class="parameter"><code>const <span class="type">char</span> *arg_description</code></em>);</pre>
1621
1621
<p>Add an option to be handled by <em class="parameter"><code>application</code></em>
1622
1622
.</p>
1623
1623
<p>Calling this function is the equivalent of calling
1624
 
<a class="link" href="GApplication.html#g-application-add-main-option-entries" title="g_application_add_main_option_entries ()"><code class="function">g_application_add_main_option_entries()</code></a> with a single <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntry</span></a>
1625
 
that has its arg_data member set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1626
 
<p>The parsed arguments will be packed into a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariantDict"><span class="type">GVariantDict</span></a> which
 
1624
<a class="link" href="GApplication.html#g-application-add-main-option-entries" title="g_application_add_main_option_entries ()"><code class="function">g_application_add_main_option_entries()</code></a> with a single <a href="../glib/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntry</span></a>
 
1625
that has its arg_data member set to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
 
1626
<p>The parsed arguments will be packed into a <a href="../glib/glib-GVariant.html#GVariantDict"><span class="type">GVariantDict</span></a> which
1627
1627
is passed to <a class="link" href="GApplication.html#GApplication-handle-local-options" title="The “handle-local-options” signal"><span class="type">“handle-local-options”</span></a>. If
1628
1628
<a class="link" href="GApplication.html#G-APPLICATION-HANDLES-COMMAND-LINE:CAPS"><code class="literal">G_APPLICATION_HANDLES_COMMAND_LINE</code></a> is set, then it will also
1629
1629
be sent to the primary instance. See
1630
1630
<a class="link" href="GApplication.html#g-application-add-main-option-entries" title="g_application_add_main_option_entries ()"><code class="function">g_application_add_main_option_entries()</code></a> for more details.</p>
1631
 
<p>See <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntry</span></a> for more documentation of the arguments.</p>
 
1631
<p>See <a href="../glib/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntry</span></a> for more documentation of the arguments.</p>
1632
1632
<div class="refsect3">
1633
1633
<a name="id-1.4.22.2.11.27.8"></a><h4>Parameters</h4>
1634
1634
<div class="informaltable"><table width="100%" border="0">
1655
1655
</tr>
1656
1656
<tr>
1657
1657
<td class="parameter_name"><p>flags</p></td>
1658
 
<td class="parameter_description"><p>flags from <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionFlags"><span class="type">GOptionFlags</span></a></p></td>
 
1658
<td class="parameter_description"><p>flags from <a href="../glib/glib-Commandline-option-parser.html#GOptionFlags"><span class="type">GOptionFlags</span></a></p></td>
1659
1659
<td class="parameter_annotations"> </td>
1660
1660
</tr>
1661
1661
<tr>
1662
1662
<td class="parameter_name"><p>arg</p></td>
1663
 
<td class="parameter_description"><p>the type of the option, as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionArg"><span class="type">GOptionArg</span></a></p></td>
 
1663
<td class="parameter_description"><p>the type of the option, as a <a href="../glib/glib-Commandline-option-parser.html#GOptionArg"><span class="type">GOptionArg</span></a></p></td>
1664
1664
<td class="parameter_annotations"> </td>
1665
1665
</tr>
1666
1666
<tr>
1684
1684
<a name="g-application-add-option-group"></a><h3>g_application_add_option_group ()</h3>
1685
1685
<pre class="programlisting"><span class="returnvalue">void</span>
1686
1686
g_application_add_option_group (<em class="parameter"><code><a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application</code></em>,
1687
 
                                <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a> *group</code></em>);</pre>
1688
 
<p>Adds a <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a> to the commandline handling of <em class="parameter"><code>application</code></em>
 
1687
                                <em class="parameter"><code><a href="../glib/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a> *group</code></em>);</pre>
 
1688
<p>Adds a <a href="../glib/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a> to the commandline handling of <em class="parameter"><code>application</code></em>
1689
1689
.</p>
1690
 
<p>This function is comparable to <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#g-option-context-add-group"><code class="function">g_option_context_add_group()</code></a>.</p>
 
1690
<p>This function is comparable to <a href="../glib/glib-Commandline-option-parser.html#g-option-context-add-group"><code class="function">g_option_context_add_group()</code></a>.</p>
1691
1691
<p>Unlike <a class="link" href="GApplication.html#g-application-add-main-option-entries" title="g_application_add_main_option_entries ()"><code class="function">g_application_add_main_option_entries()</code></a>, this function does
1692
 
not deal with <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>arg_data</code></em>
 
1692
not deal with <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>arg_data</code></em>
1693
1693
 and never transmits options to the
1694
1694
primary instance.</p>
1695
1695
<p>The reason for that is because, by the time the options arrive at the
1699
1699
In the case that this is not the first-running instance of the
1700
1700
application, the existing instance may already have been running for
1701
1701
a very long time.</p>
1702
 
<p>This means that the options from <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a> are only really usable
 
1702
<p>This means that the options from <a href="../glib/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a> are only really usable
1703
1703
in the case that the instance of the application being run is the
1704
1704
first instance.  Passing options like <code class="literal">--display=</code> or <code class="literal">--gdk-debug=</code>
1705
1705
on future runs will have no effect on the existing primary instance.</p>
1723
1723
</tr>
1724
1724
<tr>
1725
1725
<td class="parameter_name"><p>group</p></td>
1726
 
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a></p></td>
 
1726
<td class="parameter_description"><p>a <a href="../glib/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a></p></td>
1727
1727
<td class="parameter_annotations"> </td>
1728
1728
</tr>
1729
1729
</tbody>
1742
1742
.  If
1743
1743
<em class="parameter"><code>application</code></em>
1744
1744
 is destroyed then the default application will revert
1745
 
back to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
 
1745
back to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1746
1746
<div class="refsect3">
1747
1747
<a name="id-1.4.22.2.11.29.6"></a><h4>Parameters</h4>
1748
1748
<div class="informaltable"><table width="100%" border="0">
1753
1753
</colgroup>
1754
1754
<tbody><tr>
1755
1755
<td class="parameter_name"><p>application</p></td>
1756
 
<td class="parameter_description"><p> the application to set as default, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
1756
<td class="parameter_description"><p> the application to set as default, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1757
1757
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1758
1758
</tr></tbody>
1759
1759
</table></div>
1769
1769
<p>Normally there is only one <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> per process and it becomes
1770
1770
the default when it is created.  You can exercise more control over
1771
1771
this by using <a class="link" href="GApplication.html#g-application-set-default" title="g_application_set_default ()"><code class="function">g_application_set_default()</code></a>.</p>
1772
 
<p>If there is no default application then <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</p>
 
1772
<p>If there is no default application then <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</p>
1773
1773
<div class="refsect3">
1774
1774
<a name="id-1.4.22.2.11.30.7"></a><h4>Returns</h4>
1775
 
<p> the default application for this process, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
 
1775
<p> the default application for this process, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
1776
1776
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
1777
1777
</div>
1778
1778
<p class="since">Since 2.32</p>
1995
1995
bus, that need to exist before the application tries to own the bus name.
1996
1996
The function is passed the <a class="link" href="GDBusConnection.html" title="GDBusConnection"><span class="type">GDBusConnection</span></a> to to session bus, and the
1997
1997
object path that <a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> will use to export is D-Bus API.
1998
 
If this function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, registration will proceed; otherwise
 
1998
If this function returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, registration will proceed; otherwise
1999
1999
registration will abort. Since: 2.34</p></td>
2000
2000
<td class="struct_member_annotations"> </td>
2001
2001
</tr>
2118
2118
<hr>
2119
2119
<div class="refsect2">
2120
2120
<a name="GApplication--application-id"></a><h3>The <code class="literal">“application-id”</code> property</h3>
2121
 
<pre class="programlisting">  “application-id”           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
 
2121
<pre class="programlisting">  “application-id”           <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
2122
2122
<p>The unique identifier for the application.</p>
2123
2123
<p>Flags: Read / Write / Construct</p>
2124
2124
<p>Default value: NULL</p>
2133
2133
<hr>
2134
2134
<div class="refsect2">
2135
2135
<a name="GApplication--inactivity-timeout"></a><h3>The <code class="literal">“inactivity-timeout”</code> property</h3>
2136
 
<pre class="programlisting">  “inactivity-timeout”       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
 
2136
<pre class="programlisting">  “inactivity-timeout”       <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
2137
2137
<p>Time (ms) to stay alive after becoming idle.</p>
2138
2138
<p>Flags: Read / Write</p>
2139
2139
<p>Default value: 0</p>
2141
2141
<hr>
2142
2142
<div class="refsect2">
2143
2143
<a name="GApplication--is-registered"></a><h3>The <code class="literal">“is-registered”</code> property</h3>
2144
 
<pre class="programlisting">  “is-registered”            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
 
2144
<pre class="programlisting">  “is-registered”            <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
2145
2145
<p>If g_application_register() has been called.</p>
2146
2146
<p>Flags: Read</p>
2147
2147
<p>Default value: FALSE</p>
2149
2149
<hr>
2150
2150
<div class="refsect2">
2151
2151
<a name="GApplication--is-remote"></a><h3>The <code class="literal">“is-remote”</code> property</h3>
2152
 
<pre class="programlisting">  “is-remote”                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
 
2152
<pre class="programlisting">  “is-remote”                <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
2153
2153
<p>If this application instance is remote.</p>
2154
2154
<p>Flags: Read</p>
2155
2155
<p>Default value: FALSE</p>
2157
2157
<hr>
2158
2158
<div class="refsect2">
2159
2159
<a name="GApplication--resource-base-path"></a><h3>The <code class="literal">“resource-base-path”</code> property</h3>
2160
 
<pre class="programlisting">  “resource-base-path”       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
 
2160
<pre class="programlisting">  “resource-base-path”       <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
2161
2161
<p>The base resource path for the application.</p>
2162
2162
<p>Flags: Read / Write</p>
2163
2163
<p>Default value: NULL</p>
2169
2169
<a name="GApplication-activate"></a><h3>The <code class="literal">“activate”</code> signal</h3>
2170
2170
<pre class="programlisting"><span class="returnvalue">void</span>
2171
2171
user_function (<a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application,
2172
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 
2172
               <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
2173
2173
<p>The ::activate signal is emitted on the primary instance when an
2174
2174
activation occurs. See <a class="link" href="GApplication.html#g-application-activate" title="g_application_activate ()"><code class="function">g_application_activate()</code></a>.</p>
2175
2175
<div class="refsect3">
2199
2199
<hr>
2200
2200
<div class="refsect2">
2201
2201
<a name="GApplication-command-line"></a><h3>The <code class="literal">“command-line”</code> signal</h3>
2202
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
 
2202
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
2203
2203
user_function (<a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a>            *application,
2204
2204
               <a class="link" href="GApplicationCommandLine.html" title="GApplicationCommandLine"><span class="type">GApplicationCommandLine</span></a> *command_line,
2205
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>                 user_data)</pre>
 
2205
               <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>                 user_data)</pre>
2206
2206
<p>The ::command-line signal is emitted on the primary instance when
2207
2207
a commandline is not handled locally. See <a class="link" href="GApplication.html#g-application-run" title="g_application_run ()"><code class="function">g_application_run()</code></a> and
2208
2208
the <a class="link" href="GApplicationCommandLine.html" title="GApplicationCommandLine"><span class="type">GApplicationCommandLine</span></a> documentation for more information.</p>
2245
2245
<hr>
2246
2246
<div class="refsect2">
2247
2247
<a name="GApplication-handle-local-options"></a><h3>The <code class="literal">“handle-local-options”</code> signal</h3>
2248
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
 
2248
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
2249
2249
user_function (<a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application,
2250
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariantDict"><span class="type">GVariantDict</span></a> *options,
2251
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 
2250
               <a href="../glib/glib-GVariant.html#GVariantDict"><span class="type">GVariantDict</span></a> *options,
 
2251
               <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
2252
2252
<p>The ::handle-local-options signal is emitted on the local instance
2253
2253
after the parsing of the commandline options has occurred.</p>
2254
2254
<p>You can add options to be recognised during commandline option
2257
2257
<p>Signal handlers can inspect <em class="parameter"><code>options</code></em>
2258
2258
 (along with values pointed to
2259
2259
from the <em class="parameter"><code>arg_data</code></em>
2260
 
 of an installed <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntrys</span></a>) in order to
 
2260
 of an installed <a href="../glib/glib-Commandline-option-parser.html#GOptionEntry"><span class="type">GOptionEntrys</span></a>) in order to
2261
2261
decide to perform certain actions, including direct local handling
2262
2262
(which may be useful for options like --version).</p>
2263
 
<p>If the options have been "handled" then a non-negative value should
2264
 
be returned.   In this case, the return value is the exit status: 0
2265
 
for success and a positive value for failure.  -1 means to continue
2266
 
normal processing.</p>
2267
2263
<p>In the event that the application is marked
2268
2264
<a class="link" href="GApplication.html#G-APPLICATION-HANDLES-COMMAND-LINE:CAPS"><code class="literal">G_APPLICATION_HANDLES_COMMAND_LINE</code></a> the "normal processing" will
2269
2265
send the <em class="parameter"><code>option</code></em>
2291
2287
capabilities than what is provided here, but this should not
2292
2288
normally be required.</p>
2293
2289
<div class="refsect3">
2294
 
<a name="id-1.4.22.2.14.4.13"></a><h4>Parameters</h4>
 
2290
<a name="id-1.4.22.2.14.4.12"></a><h4>Parameters</h4>
2295
2291
<div class="informaltable"><table width="100%" border="0">
2296
2292
<colgroup>
2297
2293
<col width="150px" class="parameters_name">
2317
2313
</tbody>
2318
2314
</table></div>
2319
2315
</div>
 
2316
<div class="refsect3">
 
2317
<a name="id-1.4.22.2.14.4.13"></a><h4>Returns</h4>
 
2318
<p> an exit code. If you have handled your options and want
 
2319
to exit the process, return a non-negative option, 0 for success,
 
2320
and a positive value for failure. To continue, return -1 to let
 
2321
the default option processing continue.</p>
 
2322
<p></p>
 
2323
</div>
2320
2324
<p>Flags: Run Last</p>
2321
2325
<p class="since">Since 2.40</p>
2322
2326
</div>
2325
2329
<a name="GApplication-open"></a><h3>The <code class="literal">“open”</code> signal</h3>
2326
2330
<pre class="programlisting"><span class="returnvalue">void</span>
2327
2331
user_function (<a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application,
2328
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      files,
2329
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>          n_files,
2330
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>        *hint,
2331
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 
2332
               <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      files,
 
2333
               <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a>          n_files,
 
2334
               <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>        *hint,
 
2335
               <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
2332
2336
<p>The ::open signal is emitted on the primary instance when there are
2333
2337
files to open. See <a class="link" href="GApplication.html#g-application-open" title="g_application_open ()"><code class="function">g_application_open()</code></a> for more information.</p>
2334
2338
<div class="refsect3">
2376
2380
<a name="GApplication-shutdown"></a><h3>The <code class="literal">“shutdown”</code> signal</h3>
2377
2381
<pre class="programlisting"><span class="returnvalue">void</span>
2378
2382
user_function (<a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application,
2379
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 
2383
               <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
2380
2384
<p>The ::shutdown signal is emitted only on the registered primary instance
2381
2385
immediately after the main loop terminates.</p>
2382
2386
<div class="refsect3">
2408
2412
<a name="GApplication-startup"></a><h3>The <code class="literal">“startup”</code> signal</h3>
2409
2413
<pre class="programlisting"><span class="returnvalue">void</span>
2410
2414
user_function (<a class="link" href="GApplication.html" title="GApplication"><span class="type">GApplication</span></a> *application,
2411
 
               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
 
2415
               <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)</pre>
2412
2416
<p>The ::startup signal is emitted on the primary instance immediately
2413
2417
after registration. See <a class="link" href="GApplication.html#g-application-register" title="g_application_register ()"><code class="function">g_application_register()</code></a>.</p>
2414
2418
<div class="refsect3">