]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libnotify: Switch to GIR
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 28 Nov 2013 08:28:19 +0000 (09:28 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 28 Nov 2013 08:30:16 +0000 (09:30 +0100)
vapi/Makefile.am
vapi/libnotify.deps
vapi/libnotify.vapi
vapi/metadata/Notify-0.7.metadata [new file with mode: 0644]
vapi/packages/libnotify/libnotify.deps [deleted file]
vapi/packages/libnotify/libnotify.files [deleted file]
vapi/packages/libnotify/libnotify.gi [deleted file]
vapi/packages/libnotify/libnotify.metadata [deleted file]
vapi/packages/libnotify/libnotify.namespace [deleted file]

index 00318391870f4169143543996613152fe72d213f..0ceece799c743c4bb31b47e837cef37ae8f1015f 100644 (file)
@@ -343,7 +343,6 @@ GIDL_BINDINGS = \
        libgnome-menu \
        libgnomeui-2.0 \
        libgsf-1 \
-       libnotify \
        liboobs-1 \
        librsvg-2.0 \
        libsexy \
@@ -398,6 +397,7 @@ GIR_BINDINGS = \
        json-glib-1.0 \
        libgdata \
        libgnome-menu-3.0 \
+       libnotify \
        libpeas-1.0 \
        libpeas-gtk-1.0 \
        libsoup-2.4 \
@@ -677,7 +677,7 @@ libgsf-1:
        $(GENVAPI) --library $(srcdir)/libgsf-1 $(PACKAGESDIR)/libgsf-1/libgsf-1-custom.vala $(PACKAGESDIR)/libgsf-1/libgsf-1.gi
 
 libnotify:
-       $(GENVAPI) --library $(srcdir)/libnotify $(PACKAGESDIR)/libnotify/libnotify.gi
+       $(GENVAPI) --library $(srcdir)/libnotify --pkg gdk-pixbuf-2.0 --pkg gio-2.0 --metadatadir $(METADATADIR) $(GIRDIR)/Notify-0.7.gir
 
 liboobs-1:
        $(GENVAPI) --library $(srcdir)/liboobs-1 $(PACKAGESDIR)/liboobs-1/liboobs-1.gi
index f3d91f785147e85db18a5fe8c0199b960a1a7a07..f162e5b30db64aa2c639e314c416b0839b6c9488 100644 (file)
@@ -1,4 +1,2 @@
-atk
-cairo
 gio-2.0
 gdk-pixbuf-2.0
index c5a67511cf2e1a1ce7d3762038ea7727f0c0b866..9c44b6bdfe45579786010ec7d4d64a8e51156e05 100644 (file)
@@ -1,7 +1,8 @@
 /* libnotify.vapi generated by vapigen, do not modify. */
 
+[CCode (cprefix = "Notify", gir_namespace = "Notify", gir_version = "0.7", lower_case_cprefix = "notify_")]
 namespace Notify {
-       [CCode (cheader_filename = "libnotify/notify.h")]
+       [CCode (cheader_filename = "libnotify/notify.h", type_id = "notify_notification_get_type ()")]
        public class Notification : GLib.Object {
                [CCode (has_construct_function = false)]
                public Notification (string summary, string? body, string? icon);
@@ -12,19 +13,26 @@ namespace Notify {
                public int get_closed_reason ();
                public void set_app_name (string app_name);
                public void set_category (string category);
-               public void set_hint (string key, GLib.Variant value);
-               public void set_hint_byte (string key, uchar value);
-               public void set_hint_byte_array (string key, uchar[] value, size_t len);
+               public void set_hint (string key, GLib.Variant? value);
+               [Deprecated (since = "0.6.")]
+               public void set_hint_byte (string key, [CCode (type = "guchar")] uchar value);
+               [Deprecated (since = "0.6.")]
+               public void set_hint_byte_array (string key, [CCode (array_length = false, type = "const guchar*")] uchar[] value, size_t len);
+               [Deprecated (since = "0.6.")]
                public void set_hint_double (string key, double value);
+               [Deprecated (since = "0.6.")]
                public void set_hint_int32 (string key, int value);
+               [Deprecated (since = "0.6.")]
                public void set_hint_string (string key, string value);
+               [Deprecated (since = "0.6.")]
                public void set_hint_uint32 (string key, uint value);
+               [Deprecated]
                public void set_icon_from_pixbuf (Gdk.Pixbuf icon);
                public void set_image_from_pixbuf (Gdk.Pixbuf pixbuf);
                public void set_timeout (int timeout);
                public void set_urgency (Notify.Urgency urgency);
                public bool show () throws GLib.Error;
-               public bool update (string summary, string body, string icon);
+               public bool update (string summary, string? body, string? icon);
                [NoAccessorMethod]
                public string app_name { owned get; set; }
                [NoAccessorMethod]
@@ -38,30 +46,30 @@ namespace Notify {
                public string summary { owned get; set construct; }
                public virtual signal void closed ();
        }
-       [CCode (cheader_filename = "libnotify/notify.h", cprefix = "NOTIFY_URGENCY_")]
+       [CCode (cheader_filename = "libnotify/notify.h", cprefix = "NOTIFY_URGENCY_", has_type_id = false)]
        public enum Urgency {
                LOW,
                NORMAL,
                CRITICAL
        }
-       [CCode (cheader_filename = "libnotify/notify.h")]
+       [CCode (cheader_filename = "libnotify/notify.h", instance_pos = 2.9)]
        public delegate void ActionCallback (Notify.Notification notification, string action);
-       [CCode (cheader_filename = "libnotify/notify.h")]
+       [CCode (cheader_filename = "libnotify/notify.h", cname = "NOTIFY_EXPIRES_DEFAULT")]
        public const int EXPIRES_DEFAULT;
-       [CCode (cheader_filename = "libnotify/notify.h")]
+       [CCode (cheader_filename = "libnotify/notify.h", cname = "NOTIFY_EXPIRES_NEVER")]
        public const int EXPIRES_NEVER;
-       [CCode (cheader_filename = "libnotify/notify.h")]
+       [CCode (cheader_filename = "libnotify/notify.h", cname = "NOTIFY_VERSION_MAJOR")]
        public const int VERSION_MAJOR;
-       [CCode (cheader_filename = "libnotify/notify.h")]
+       [CCode (cheader_filename = "libnotify/notify.h", cname = "NOTIFY_VERSION_MICRO")]
        public const int VERSION_MICRO;
-       [CCode (cheader_filename = "libnotify/notify.h")]
+       [CCode (cheader_filename = "libnotify/notify.h", cname = "NOTIFY_VERSION_MINOR")]
        public const int VERSION_MINOR;
        [CCode (cheader_filename = "libnotify/notify.h")]
        public static unowned string get_app_name ();
        [CCode (cheader_filename = "libnotify/notify.h")]
        public static GLib.List<string> get_server_caps ();
        [CCode (cheader_filename = "libnotify/notify.h")]
-       public static bool get_server_info (out unowned string ret_name, out unowned string ret_vendor, out unowned string ret_version, out unowned string ret_spec_version);
+       public static bool get_server_info (out string ret_name, out string ret_vendor, out string ret_version, out string ret_spec_version);
        [CCode (cheader_filename = "libnotify/notify.h")]
        public static bool init (string app_name);
        [CCode (cheader_filename = "libnotify/notify.h")]
diff --git a/vapi/metadata/Notify-0.7.metadata b/vapi/metadata/Notify-0.7.metadata
new file mode 100644 (file)
index 0000000..edfa4e5
--- /dev/null
@@ -0,0 +1,5 @@
+* cheader_filename="libnotify/notify.h"
+
+Notification
+       .set_hint_byte.value type="uchar"
+       .set_hint_byte_array.value type="uchar[]"
diff --git a/vapi/packages/libnotify/libnotify.deps b/vapi/packages/libnotify/libnotify.deps
deleted file mode 100644 (file)
index f3d91f7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-atk
-cairo
-gio-2.0
-gdk-pixbuf-2.0
diff --git a/vapi/packages/libnotify/libnotify.files b/vapi/packages/libnotify/libnotify.files
deleted file mode 100644 (file)
index 50d30a3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-include/libnotify
-lib/libnotify.so
diff --git a/vapi/packages/libnotify/libnotify.gi b/vapi/packages/libnotify/libnotify.gi
deleted file mode 100644 (file)
index 383f76d..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0"?>
-<api version="1.0">
-       <namespace name="Notify">
-               <function name="get_app_name" symbol="notify_get_app_name">
-                       <return-type type="char*"/>
-               </function>
-               <function name="get_server_caps" symbol="notify_get_server_caps">
-                       <return-type type="GList*"/>
-               </function>
-               <function name="get_server_info" symbol="notify_get_server_info">
-                       <return-type type="gboolean"/>
-                       <parameters>
-                               <parameter name="ret_name" type="char**"/>
-                               <parameter name="ret_vendor" type="char**"/>
-                               <parameter name="ret_version" type="char**"/>
-                               <parameter name="ret_spec_version" type="char**"/>
-                       </parameters>
-               </function>
-               <function name="init" symbol="notify_init">
-                       <return-type type="gboolean"/>
-                       <parameters>
-                               <parameter name="app_name" type="char*"/>
-                       </parameters>
-               </function>
-               <function name="is_initted" symbol="notify_is_initted">
-                       <return-type type="gboolean"/>
-               </function>
-               <function name="set_app_name" symbol="notify_set_app_name">
-                       <return-type type="void"/>
-                       <parameters>
-                               <parameter name="app_name" type="char*"/>
-                       </parameters>
-               </function>
-               <function name="uninit" symbol="notify_uninit">
-                       <return-type type="void"/>
-               </function>
-               <callback name="NotifyActionCallback">
-                       <return-type type="void"/>
-                       <parameters>
-                               <parameter name="notification" type="NotifyNotification*"/>
-                               <parameter name="action" type="char*"/>
-                               <parameter name="user_data" type="gpointer"/>
-                       </parameters>
-               </callback>
-               <enum name="NotifyUrgency" type-name="NotifyUrgency" get-type="notify_urgency_get_type">
-                       <member name="NOTIFY_URGENCY_LOW" value="0"/>
-                       <member name="NOTIFY_URGENCY_NORMAL" value="1"/>
-                       <member name="NOTIFY_URGENCY_CRITICAL" value="2"/>
-               </enum>
-               <object name="NotifyNotification" parent="GObject" type-name="NotifyNotification" get-type="notify_notification_get_type">
-                       <method name="add_action" symbol="notify_notification_add_action">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="action" type="char*"/>
-                                       <parameter name="label" type="char*"/>
-                                       <parameter name="callback" type="NotifyActionCallback"/>
-                                       <parameter name="user_data" type="gpointer"/>
-                                       <parameter name="free_func" type="GFreeFunc"/>
-                               </parameters>
-                       </method>
-                       <method name="clear_actions" symbol="notify_notification_clear_actions">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                               </parameters>
-                       </method>
-                       <method name="clear_hints" symbol="notify_notification_clear_hints">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                               </parameters>
-                       </method>
-                       <method name="close" symbol="notify_notification_close">
-                               <return-type type="gboolean"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="error" type="GError**"/>
-                               </parameters>
-                       </method>
-                       <method name="get_closed_reason" symbol="notify_notification_get_closed_reason">
-                               <return-type type="gint"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                               </parameters>
-                       </method>
-                       <constructor name="new" symbol="notify_notification_new">
-                               <return-type type="NotifyNotification*"/>
-                               <parameters>
-                                       <parameter name="summary" type="char*"/>
-                                       <parameter name="body" type="char*"/>
-                                       <parameter name="icon" type="char*"/>
-                               </parameters>
-                       </constructor>
-                       <method name="set_app_name" symbol="notify_notification_set_app_name">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="app_name" type="char*"/>
-                               </parameters>
-                       </method>
-                       <method name="set_category" symbol="notify_notification_set_category">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="category" type="char*"/>
-                               </parameters>
-                       </method>
-                       <method name="set_hint" symbol="notify_notification_set_hint">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="key" type="char*"/>
-                                       <parameter name="value" type="GVariant*"/>
-                               </parameters>
-                       </method>
-                       <method name="set_hint_byte" symbol="notify_notification_set_hint_byte">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="key" type="char*"/>
-                                       <parameter name="value" type="guchar"/>
-                               </parameters>
-                       </method>
-                       <method name="set_hint_byte_array" symbol="notify_notification_set_hint_byte_array">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="key" type="char*"/>
-                                       <parameter name="value" type="guchar*"/>
-                                       <parameter name="len" type="gsize"/>
-                               </parameters>
-                       </method>
-                       <method name="set_hint_double" symbol="notify_notification_set_hint_double">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="key" type="char*"/>
-                                       <parameter name="value" type="gdouble"/>
-                               </parameters>
-                       </method>
-                       <method name="set_hint_int32" symbol="notify_notification_set_hint_int32">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="key" type="char*"/>
-                                       <parameter name="value" type="gint"/>
-                               </parameters>
-                       </method>
-                       <method name="set_hint_string" symbol="notify_notification_set_hint_string">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="key" type="char*"/>
-                                       <parameter name="value" type="char*"/>
-                               </parameters>
-                       </method>
-                       <method name="set_hint_uint32" symbol="notify_notification_set_hint_uint32">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="key" type="char*"/>
-                                       <parameter name="value" type="guint"/>
-                               </parameters>
-                       </method>
-                       <method name="set_icon_from_pixbuf" symbol="notify_notification_set_icon_from_pixbuf">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="icon" type="GdkPixbuf*"/>
-                               </parameters>
-                       </method>
-                       <method name="set_image_from_pixbuf" symbol="notify_notification_set_image_from_pixbuf">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="pixbuf" type="GdkPixbuf*"/>
-                               </parameters>
-                       </method>
-                       <method name="set_timeout" symbol="notify_notification_set_timeout">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="timeout" type="gint"/>
-                               </parameters>
-                       </method>
-                       <method name="set_urgency" symbol="notify_notification_set_urgency">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="urgency" type="NotifyUrgency"/>
-                               </parameters>
-                       </method>
-                       <method name="show" symbol="notify_notification_show">
-                               <return-type type="gboolean"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="error" type="GError**"/>
-                               </parameters>
-                       </method>
-                       <method name="update" symbol="notify_notification_update">
-                               <return-type type="gboolean"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                                       <parameter name="summary" type="char*"/>
-                                       <parameter name="body" type="char*"/>
-                                       <parameter name="icon" type="char*"/>
-                               </parameters>
-                       </method>
-                       <property name="app-name" type="char*" readable="1" writable="1" construct="0" construct-only="0"/>
-                       <property name="body" type="char*" readable="1" writable="1" construct="1" construct-only="0"/>
-                       <property name="closed-reason" type="gint" readable="1" writable="0" construct="0" construct-only="0"/>
-                       <property name="icon-name" type="char*" readable="1" writable="1" construct="1" construct-only="0"/>
-                       <property name="id" type="gint" readable="1" writable="1" construct="1" construct-only="0"/>
-                       <property name="summary" type="char*" readable="1" writable="1" construct="1" construct-only="0"/>
-                       <signal name="closed" when="FIRST">
-                               <return-type type="void"/>
-                               <parameters>
-                                       <parameter name="notification" type="NotifyNotification*"/>
-                               </parameters>
-                       </signal>
-               </object>
-               <constant name="NOTIFY_EXPIRES_DEFAULT" type="int" value="-1"/>
-               <constant name="NOTIFY_EXPIRES_NEVER" type="int" value="0"/>
-               <constant name="NOTIFY_VERSION_MAJOR" type="int" value="0"/>
-               <constant name="NOTIFY_VERSION_MICRO" type="int" value="6"/>
-               <constant name="NOTIFY_VERSION_MINOR" type="int" value="7"/>
-       </namespace>
-</api>
diff --git a/vapi/packages/libnotify/libnotify.metadata b/vapi/packages/libnotify/libnotify.metadata
deleted file mode 100644 (file)
index f742e6e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Notify cheader_filename="libnotify/notify.h"
-
-NotifyActionCallback has_target="1"
-NotifyActionCallback.p3 hidden="1"
-notify_get_server_caps transfer_ownership="1" type_arguments="string"
-notify_notification_add_action.callback transfer_ownership="1"
-notify_notification_add_action.free_func hidden="1"
-notify_notification_new.body nullable="1"
-notify_notification_new.icon nullable="1"
-notify_notification_new.attach nullable="1"
-
diff --git a/vapi/packages/libnotify/libnotify.namespace b/vapi/packages/libnotify/libnotify.namespace
deleted file mode 100644 (file)
index 838d60e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Notify