]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0: Improve GApplication binding
authorJürg Billeter <j@bitron.ch>
Sat, 19 Jun 2010 19:34:15 +0000 (21:34 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 20 Jun 2010 00:03:11 +0000 (02:03 +0200)
vapi/gio-2.0.vapi
vapi/packages/gio-2.0/gio-2.0-custom.vala
vapi/packages/gio-2.0/gio-2.0.metadata

index 4a124067cbec781a8a7f369f322738db59f680dc..ee91f38567ec69f57fe04992e5954765ca7abb16 100644 (file)
@@ -13,7 +13,7 @@ namespace GLib {
        [CCode (cheader_filename = "gio/gio.h")]
        public class Application : GLib.Object, GLib.Initable {
                [CCode (has_construct_function = false)]
-               public Application (string appid, int argc, out unowned string argv);
+               public Application (string appid, [CCode (array_length_pos = 1.9)] ref unowned string[]? argv = null);
                public void add_action (string name, string description);
                public unowned string get_action_description (string name);
                public bool get_action_enabled (string name);
@@ -21,6 +21,9 @@ namespace GLib {
                public static unowned GLib.Application get_instance ();
                public void invoke_action (string name, GLib.Variant platform_data);
                public unowned string list_actions ();
+               [CCode (cname = "g_application_quit_with_data")]
+               public bool quit (GLib.Variant? platform_data = null);
+               public bool register ();
                public void remove_action (string name);
                public virtual void run ();
                public void set_action_enabled (string name, bool enabled);
@@ -36,8 +39,6 @@ namespace GLib {
                public bool is_remote { get; }
                [NoAccessorMethod]
                public GLib.Variant platform_data { owned get; construct; }
-               [NoAccessorMethod]
-               public bool register { get; construct; }
                public virtual signal void action_with_data (string action_name, GLib.Variant platform_data);
                public virtual signal void prepare_activation (GLib.Variant arguments, GLib.Variant platform_data);
                [HasEmitter]
index ae52b16afec8e85abc6af1add111a843da5cc714..f3e6b0e80d1da293a5f235e230cc5c19d8c6c6b0 100644 (file)
@@ -45,5 +45,11 @@ namespace GLib {
        public static GLib.HashFunc file_hash;
        [CCode (cname = "g_file_equal", cheader_filename = "gio/gio.h")]
        public static GLib.EqualFunc file_equal;
+
+       [CCode (cname = "GApplication")]
+       public class Application {
+               [CCode (cname = "g_application_quit_with_data")]
+               public bool quit (GLib.Variant? platform_data = null);
+       }
 }
 
index 3e711df7ce20ae4acd5aa142e2e2c69f2b80cb16..bb8c91015bc309bdefecf7115e868deaea8c6550 100644 (file)
@@ -139,9 +139,11 @@ g_io_scheduler_*.notify nullable="1"
 g_memory_input_stream_*.destroy nullable="1"
 g_memory_output_stream_*.destroy_function nullable="1"
 
+g_application_new.argc hidden="1"
+g_application_new.argv is_array="1" is_ref="1" array_length_pos="1.9" nullable="1" default_value="null"
 g_application_is_remote hidden="1"
 GApplication::quit_with_data has_emitter="1"
-g_application_register hidden="1"
+GApplication:register hidden="1"
 
 GDBusAuthObserver::authorize_authenticated_peer has_emitter="1"
 GDBusConnection:closed hidden="1"