Add unique-1.0 bindings, patch by Phil Housley, fixes bug 540821
authorJürg Billeter <j@bitron.ch>
Sat, 5 Jul 2008 12:33:58 +0000 (12:33 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sat, 5 Jul 2008 12:33:58 +0000 (12:33 +0000)
2008-07-05  Jürg Billeter  <j@bitron.ch>

* vapi/Makefile.am:
* vapi/unique-1.0.deps:
* vapi/unique-1.0.vapi:
* vapi/packages/unique-1.0/:

Add unique-1.0 bindings, patch by Phil Housley, fixes bug 540821

svn path=/trunk/; revision=1674

ChangeLog
vapi/Makefile.am
vapi/packages/unique-1.0/unique-1.0.deps [new file with mode: 0644]
vapi/packages/unique-1.0/unique-1.0.files [new file with mode: 0644]
vapi/packages/unique-1.0/unique-1.0.gi [new file with mode: 0644]
vapi/packages/unique-1.0/unique-1.0.metadata [new file with mode: 0644]
vapi/packages/unique-1.0/unique-1.0.namespace [new file with mode: 0644]
vapi/unique-1.0.deps [new file with mode: 0644]
vapi/unique-1.0.vapi [new file with mode: 0644]

index 8261a6c..0b6ef89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-07-05  Jürg Billeter  <j@bitron.ch>
+
+       * vapi/Makefile.am:
+       * vapi/unique-1.0.deps:
+       * vapi/unique-1.0.vapi:
+       * vapi/packages/unique-1.0/:
+
+       Add unique-1.0 bindings, patch by Phil Housley, fixes bug 540821
+
 2008-07-03  Jürg Billeter  <j@bitron.ch>
 
        * gobject-introspection/scanner.c: (g_igenerator_add_symbol):
index 0c67957..d75cb46 100644 (file)
@@ -122,6 +122,8 @@ dist_vapi_DATA = \
        sqlite3.vapi \
        taglib_c.vapi \
        tiff.vapi \
+       unique-1.0.deps \
+       unique-1.0.vapi \
        vala-1.0.vapi \
        vte.deps \
        vte.vapi \
diff --git a/vapi/packages/unique-1.0/unique-1.0.deps b/vapi/packages/unique-1.0/unique-1.0.deps
new file mode 100644 (file)
index 0000000..ed3fb6d
--- /dev/null
@@ -0,0 +1,3 @@
+gdk-2.0
+gtk+-2.0
+
diff --git a/vapi/packages/unique-1.0/unique-1.0.files b/vapi/packages/unique-1.0/unique-1.0.files
new file mode 100644 (file)
index 0000000..4ac61ad
--- /dev/null
@@ -0,0 +1,2 @@
+include/unique-1.0
+lib/libunique-1.0.so
diff --git a/vapi/packages/unique-1.0/unique-1.0.gi b/vapi/packages/unique-1.0/unique-1.0.gi
new file mode 100644 (file)
index 0000000..0d75eb8
--- /dev/null
@@ -0,0 +1,240 @@
+<?xml version="1.0"?>
+<api version="1.0">
+       <namespace name="Unique">
+               <boxed name="UniqueMessageData" type-name="UniqueMessageData" get-type="unique_message_data_get_type">
+                       <method name="copy" symbol="unique_message_data_copy">
+                               <return-type type="UniqueMessageData*"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                               </parameters>
+                       </method>
+                       <method name="free" symbol="unique_message_data_free">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                               </parameters>
+                       </method>
+                       <method name="get_screen" symbol="unique_message_data_get_screen">
+                               <return-type type="GdkScreen*"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                               </parameters>
+                       </method>
+                       <method name="get_startup_id" symbol="unique_message_data_get_startup_id">
+                               <return-type type="gchar*"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                               </parameters>
+                       </method>
+                       <method name="get_text" symbol="unique_message_data_get_text">
+                               <return-type type="gchar*"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                               </parameters>
+                       </method>
+                       <method name="get_uris" symbol="unique_message_data_get_uris">
+                               <return-type type="gchar**"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                               </parameters>
+                       </method>
+                       <method name="get_workspace" symbol="unique_message_data_get_workspace">
+                               <return-type type="guint"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                               </parameters>
+                       </method>
+                       <constructor name="new" symbol="unique_message_data_new">
+                               <return-type type="UniqueMessageData*"/>
+                       </constructor>
+                       <method name="set" symbol="unique_message_data_set">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                                       <parameter name="data" type="guchar*"/>
+                                       <parameter name="length" type="gsize"/>
+                               </parameters>
+                       </method>
+                       <method name="set_text" symbol="unique_message_data_set_text">
+                               <return-type type="gboolean"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                                       <parameter name="str" type="gchar*"/>
+                                       <parameter name="length" type="gssize"/>
+                               </parameters>
+                       </method>
+                       <method name="set_uris" symbol="unique_message_data_set_uris">
+                               <return-type type="gboolean"/>
+                               <parameters>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                                       <parameter name="uris" type="gchar**"/>
+                               </parameters>
+                       </method>
+               </boxed>
+               <enum name="UniqueCommand">
+                       <member name="UNIQUE_INVALID" value="0"/>
+                       <member name="UNIQUE_ACTIVATE" value="-1"/>
+                       <member name="UNIQUE_NEW" value="-2"/>
+                       <member name="UNIQUE_OPEN" value="-3"/>
+                       <member name="UNIQUE_CLOSE" value="-4"/>
+               </enum>
+               <enum name="UniqueResponse">
+                       <member name="UNIQUE_RESPONSE_INVALID" value="0"/>
+                       <member name="UNIQUE_RESPONSE_OK" value="1"/>
+                       <member name="UNIQUE_RESPONSE_CANCEL" value="2"/>
+                       <member name="UNIQUE_RESPONSE_FAIL" value="3"/>
+               </enum>
+               <object name="UniqueApp" parent="GObject" type-name="UniqueApp" get-type="unique_app_get_type">
+                       <method name="add_command" symbol="unique_app_add_command">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="app" type="UniqueApp*"/>
+                                       <parameter name="command_name" type="gchar*"/>
+                                       <parameter name="command_id" type="gint"/>
+                               </parameters>
+                       </method>
+                       <method name="is_running" symbol="unique_app_is_running">
+                               <return-type type="gboolean"/>
+                               <parameters>
+                                       <parameter name="app" type="UniqueApp*"/>
+                               </parameters>
+                       </method>
+                       <constructor name="new" symbol="unique_app_new">
+                               <return-type type="UniqueApp*"/>
+                               <parameters>
+                                       <parameter name="name" type="gchar*"/>
+                                       <parameter name="startup_id" type="gchar*"/>
+                               </parameters>
+                       </constructor>
+                       <constructor name="new_with_commands" symbol="unique_app_new_with_commands">
+                               <return-type type="UniqueApp*"/>
+                               <parameters>
+                                       <parameter name="name" type="gchar*"/>
+                                       <parameter name="startup_id" type="gchar*"/>
+                                       <parameter name="first_command_name" type="gchar*"/>
+                               </parameters>
+                       </constructor>
+                       <method name="send_message" symbol="unique_app_send_message">
+                               <return-type type="UniqueResponse"/>
+                               <parameters>
+                                       <parameter name="app" type="UniqueApp*"/>
+                                       <parameter name="command_id" type="gint"/>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                               </parameters>
+                       </method>
+                       <method name="watch_window" symbol="unique_app_watch_window">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="app" type="UniqueApp*"/>
+                                       <parameter name="window" type="GtkWindow*"/>
+                               </parameters>
+                       </method>
+                       <property name="is-running" type="gboolean" readable="1" writable="0" construct="0" construct-only="0"/>
+                       <property name="name" type="char*" readable="1" writable="1" construct="0" construct-only="1"/>
+                       <property name="screen" type="GdkScreen*" readable="1" writable="1" construct="1" construct-only="0"/>
+                       <property name="startup-id" type="char*" readable="1" writable="1" construct="0" construct-only="1"/>
+                       <signal name="message-received" when="LAST">
+                               <return-type type="UniqueResponse"/>
+                               <parameters>
+                                       <parameter name="app" type="UniqueApp*"/>
+                                       <parameter name="command" type="gint"/>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                                       <parameter name="time_" type="guint"/>
+                               </parameters>
+                       </signal>
+               </object>
+               <object name="UniqueBackend" parent="GObject" type-name="UniqueBackend" get-type="unique_backend_get_type">
+                       <method name="create" symbol="unique_backend_create">
+                               <return-type type="UniqueBackend*"/>
+                       </method>
+                       <method name="get_name" symbol="unique_backend_get_name">
+                               <return-type type="gchar*"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                               </parameters>
+                       </method>
+                       <method name="get_screen" symbol="unique_backend_get_screen">
+                               <return-type type="GdkScreen*"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                               </parameters>
+                       </method>
+                       <method name="get_startup_id" symbol="unique_backend_get_startup_id">
+                               <return-type type="gchar*"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                               </parameters>
+                       </method>
+                       <method name="get_workspace" symbol="unique_backend_get_workspace">
+                               <return-type type="guint"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                               </parameters>
+                       </method>
+                       <method name="request_name" symbol="unique_backend_request_name">
+                               <return-type type="gboolean"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                               </parameters>
+                       </method>
+                       <method name="send_message" symbol="unique_backend_send_message">
+                               <return-type type="UniqueResponse"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                                       <parameter name="command_id" type="gint"/>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                                       <parameter name="time_" type="guint"/>
+                               </parameters>
+                       </method>
+                       <method name="set_name" symbol="unique_backend_set_name">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                                       <parameter name="name" type="gchar*"/>
+                               </parameters>
+                       </method>
+                       <method name="set_screen" symbol="unique_backend_set_screen">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                                       <parameter name="screen" type="GdkScreen*"/>
+                               </parameters>
+                       </method>
+                       <method name="set_startup_id" symbol="unique_backend_set_startup_id">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                                       <parameter name="startup_id" type="gchar*"/>
+                               </parameters>
+                       </method>
+                       <vfunc name="request_name">
+                               <return-type type="gboolean"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                               </parameters>
+                       </vfunc>
+                       <vfunc name="send_message">
+                               <return-type type="UniqueResponse"/>
+                               <parameters>
+                                       <parameter name="backend" type="UniqueBackend*"/>
+                                       <parameter name="command_id" type="gint"/>
+                                       <parameter name="message_data" type="UniqueMessageData*"/>
+                                       <parameter name="time_" type="guint"/>
+                               </parameters>
+                       </vfunc>
+                       <field name="parent" type="UniqueApp*"/>
+                       <field name="name" type="gchar*"/>
+                       <field name="startup_id" type="gchar*"/>
+                       <field name="screen" type="GdkScreen*"/>
+                       <field name="workspace" type="guint"/>
+               </object>
+               <constant name="UNIQUE_API_VERSION_S" type="char*" value="1.0"/>
+               <constant name="UNIQUE_DEFAULT_BACKEND_S" type="char*" value="dbus"/>
+               <constant name="UNIQUE_MAJOR_VERSION" type="int" value="0"/>
+               <constant name="UNIQUE_MICRO_VERSION" type="int" value="5"/>
+               <constant name="UNIQUE_MINOR_VERSION" type="int" value="9"/>
+               <constant name="UNIQUE_PROTOCOL_VERSION_S" type="char*" value="1.0"/>
+               <constant name="UNIQUE_VERSION_HEX" type="int" value="0"/>
+               <constant name="UNIQUE_VERSION_S" type="char*" value="0.9.5"/>
+       </namespace>
+</api>
diff --git a/vapi/packages/unique-1.0/unique-1.0.metadata b/vapi/packages/unique-1.0/unique-1.0.metadata
new file mode 100644 (file)
index 0000000..9087fa1
--- /dev/null
@@ -0,0 +1,9 @@
+Unique cheader_filename="unique/unique.h"
+unique_app_is_running hidden="1"
+unique_app_send_message.message_data nullable="1"
+unique_message_data_copy transfer_ownership="1"
+unique_message_data_set.data nullable="1"
+unique_message_data_get_text transfer_ownership="1"
+unique_message_data_get_uris is_array="1" no_array_length="1" transfer_ownership="1"
+unique_message_data_set_uris no_array_length="1"
+unique_message_data_set_uris.uris is_array="1"
diff --git a/vapi/packages/unique-1.0/unique-1.0.namespace b/vapi/packages/unique-1.0/unique-1.0.namespace
new file mode 100644 (file)
index 0000000..4708f7e
--- /dev/null
@@ -0,0 +1 @@
+Unique
diff --git a/vapi/unique-1.0.deps b/vapi/unique-1.0.deps
new file mode 100644 (file)
index 0000000..ed3fb6d
--- /dev/null
@@ -0,0 +1,3 @@
+gdk-2.0
+gtk+-2.0
+
diff --git a/vapi/unique-1.0.vapi b/vapi/unique-1.0.vapi
new file mode 100644 (file)
index 0000000..ed02dff
--- /dev/null
@@ -0,0 +1,87 @@
+/* unique-1.0.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "Unique", lower_case_cprefix = "unique_")]
+namespace Unique {
+       [CCode (cprefix = "UNIQUE_", has_type_id = "0", cheader_filename = "unique/unique.h")]
+       public enum Command {
+               INVALID,
+               ACTIVATE,
+               NEW,
+               OPEN,
+               CLOSE
+       }
+       [CCode (cprefix = "UNIQUE_RESPONSE_", has_type_id = "0", cheader_filename = "unique/unique.h")]
+       public enum Response {
+               INVALID,
+               OK,
+               CANCEL,
+               FAIL
+       }
+       [Compact]
+       [CCode (copy_function = "unique_message_data_copy", cheader_filename = "unique/unique.h")]
+       public class MessageData {
+               public Unique.MessageData copy ();
+               public weak Gdk.Screen get_screen ();
+               public weak string get_startup_id ();
+               public string get_text ();
+               [NoArrayLength]
+               public string[] get_uris ();
+               public uint get_workspace ();
+               public MessageData ();
+               public void set (uchar[] data, ulong length);
+               public bool set_text (string str, long length);
+               [NoArrayLength]
+               public bool set_uris (string[] uris);
+       }
+       [CCode (cheader_filename = "unique/unique.h")]
+       public class App : GLib.Object {
+               public void add_command (string command_name, int command_id);
+               public App (string name, string startup_id);
+               public App.with_commands (string name, string startup_id, ...);
+               public Unique.Response send_message (int command_id, Unique.MessageData? message_data);
+               public void watch_window (Gtk.Window window);
+               [NoAccessorMethod]
+               public bool is_running { get; }
+               [NoAccessorMethod]
+               public string name { get; construct; }
+               [NoAccessorMethod]
+               public Gdk.Screen screen { get; set construct; }
+               [NoAccessorMethod]
+               public string startup_id { get; construct; }
+               public virtual signal Unique.Response message_received (int command, Unique.MessageData message_data, uint time_);
+       }
+       [CCode (cheader_filename = "unique/unique.h")]
+       public class Backend : GLib.Object {
+               public weak Unique.App parent;
+               public weak string name;
+               public weak string startup_id;
+               public weak Gdk.Screen screen;
+               public uint workspace;
+               public static weak Unique.Backend create ();
+               public weak string get_name ();
+               public weak Gdk.Screen get_screen ();
+               public weak string get_startup_id ();
+               public uint get_workspace ();
+               public void set_name (string name);
+               public void set_screen (Gdk.Screen screen);
+               public void set_startup_id (string startup_id);
+               public virtual bool request_name ();
+               public virtual Unique.Response send_message (int command_id, Unique.MessageData message_data, uint time_);
+       }
+       [CCode (cheader_filename = "unique/unique.h")]
+       public const string API_VERSION_S;
+       [CCode (cheader_filename = "unique/unique.h")]
+       public const string DEFAULT_BACKEND_S;
+       [CCode (cheader_filename = "unique/unique.h")]
+       public const int MAJOR_VERSION;
+       [CCode (cheader_filename = "unique/unique.h")]
+       public const int MICRO_VERSION;
+       [CCode (cheader_filename = "unique/unique.h")]
+       public const int MINOR_VERSION;
+       [CCode (cheader_filename = "unique/unique.h")]
+       public const string PROTOCOL_VERSION_S;
+       [CCode (cheader_filename = "unique/unique.h")]
+       public const int VERSION_HEX;
+       [CCode (cheader_filename = "unique/unique.h")]
+       public const string VERSION_S;
+}