update to use vala-gen-introspect
authorJuerg Billeter <j@bitron.ch>
Thu, 22 Nov 2007 20:37:43 +0000 (20:37 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Thu, 22 Nov 2007 20:37:43 +0000 (20:37 +0000)
2007-11-22  Juerg Billeter  <j@bitron.ch>

* vapi/packages/libnotify/: update to use vala-gen-introspect

* vapi/libnotify.vapi: regenerated

svn path=/trunk/; revision=709

ChangeLog
vapi/libnotify.vapi
vapi/packages/libnotify/libnotify-custom.vala [deleted file]
vapi/packages/libnotify/libnotify.files
vapi/packages/libnotify/libnotify.gi [new file with mode: 0644]
vapi/packages/libnotify/libnotify.gidl [deleted file]

index 2c0e017..47cf1ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-11-22  Jürg Billeter  <j@bitron.ch>
 
+       * vapi/packages/libnotify/: update to use vala-gen-introspect
+
+       * vapi/libnotify.vapi: regenerated
+
+2007-11-22  Jürg Billeter  <j@bitron.ch>
+
        * vapi/packages/libgnome-2.0/, vapi/packages/libgnomeui-2.0/: update to
          use vala-gen-introspect
 
index 3cc4985..94455f0 100644 (file)
@@ -11,12 +11,13 @@ namespace Notify {
        [CCode (cheader_filename = "libnotify/notify.h")]
        public class Notification : GLib.Object {
                public void add_action (string action, string label, Notify.ActionCallback callback, pointer user_data, GLib.FreeFunc free_func);
+               public void attach_to_status_icon (Gtk.StatusIcon status_icon);
                public void attach_to_widget (Gtk.Widget attach);
                public void clear_actions ();
                public void clear_hints ();
                public bool close () throws GLib.Error;
-               public static GLib.Type get_type ();
                public Notification (string summary, string body, string icon, Gtk.Widget attach);
+               public Notification.with_status_icon (string summary, string body, string icon, Gtk.StatusIcon status_icon);
                public void set_category (string category);
                public void set_geometry_hints (Gdk.Screen screen, int x, int y);
                public void set_hint_byte (string key, uchar value);
@@ -31,21 +32,24 @@ namespace Notify {
                public bool show () throws GLib.Error;
                public bool update (string summary, string body, string icon);
                [NoAccessorMethod]
-               public weak string summary { get; set construct; }
+               public weak Gtk.Widget attach_widget { get; set construct; }
                [NoAccessorMethod]
                public weak string body { get; set construct; }
                [NoAccessorMethod]
                public weak string icon_name { get; set construct; }
                [NoAccessorMethod]
-               public weak Gtk.Widget attach_widget { get; set construct; }
-               [NoAccessorMethod]
                public weak Gtk.StatusIcon status_icon { get; set construct; }
+               [NoAccessorMethod]
+               public weak string summary { get; set construct; }
                public signal void closed ();
        }
-       public static delegate void ActionCallback (Notify.Notification arg1, string arg2, pointer arg3);
-       public static bool init (string! app_name);
+       public static delegate void ActionCallback (Notify.Notification p1, string p2, pointer p3);
+       public const int EXPIRES_DEFAULT;
+       public const int EXPIRES_NEVER;
        public static weak string get_app_name ();
        public static weak GLib.List get_server_caps ();
        public static bool get_server_info (out string ret_name, out string ret_vendor, out string ret_version, out string ret_spec_version);
+       public static bool init (string app_name);
        public static bool is_initted ();
+       public static void uninit ();
 }
diff --git a/vapi/packages/libnotify/libnotify-custom.vala b/vapi/packages/libnotify/libnotify-custom.vala
deleted file mode 100644 (file)
index 3e0a8c9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* libnotify-custom.vala
- *
- * Copyright (C) 2007  Nicolas Christener, Roland Hostettler
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
-
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- *
- * Author:
- *     Nicolas Christener <nicu@0x17.ch>
- *     Roland Hostettler <r.hostettler@gmx.ch>
- */
-
-[CCode (cheader_filename = "libnotify/notify.h")]
-namespace Notify {
-       [Import]
-       public bool init (string! app_name);
-}
diff --git a/vapi/packages/libnotify/libnotify.gi b/vapi/packages/libnotify/libnotify.gi
new file mode 100644 (file)
index 0000000..d514412
--- /dev/null
@@ -0,0 +1,216 @@
+<?xml version="1.0"?>
+<api version="1.0">
+       <namespace name="Notify">
+               <function name="get_app_name" symbol="notify_get_app_name">
+                       <return-type type="gchar*"/>
+               </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="uninit" symbol="notify_uninit">
+                       <return-type type="void"/>
+               </function>
+               <callback name="NotifyActionCallback">
+                       <return-type type="void"/>
+                       <parameters>
+                               <parameter name="p1" type="NotifyNotification*"/>
+                               <parameter name="p2" type="gchar*"/>
+                               <parameter name="p3" type="gpointer"/>
+                       </parameters>
+               </callback>
+               <enum name="NotifyUrgency">
+                       <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="attach_to_status_icon" symbol="notify_notification_attach_to_status_icon">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="notification" type="NotifyNotification*"/>
+                                       <parameter name="status_icon" type="GtkStatusIcon*"/>
+                               </parameters>
+                       </method>
+                       <method name="attach_to_widget" symbol="notify_notification_attach_to_widget">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="notification" type="NotifyNotification*"/>
+                                       <parameter name="attach" type="GtkWidget*"/>
+                               </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>
+                       <constructor name="new" symbol="notify_notification_new">
+                               <return-type type="NotifyNotification*"/>
+                               <parameters>
+                                       <parameter name="summary" type="gchar*"/>
+                                       <parameter name="body" type="gchar*"/>
+                                       <parameter name="icon" type="gchar*"/>
+                                       <parameter name="attach" type="GtkWidget*"/>
+                               </parameters>
+                       </constructor>
+                       <constructor name="new_with_status_icon" symbol="notify_notification_new_with_status_icon">
+                               <return-type type="NotifyNotification*"/>
+                               <parameters>
+                                       <parameter name="summary" type="gchar*"/>
+                                       <parameter name="body" type="gchar*"/>
+                                       <parameter name="icon" type="gchar*"/>
+                                       <parameter name="status_icon" type="GtkStatusIcon*"/>
+                               </parameters>
+                       </constructor>
+                       <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_geometry_hints" symbol="notify_notification_set_geometry_hints">
+                               <return-type type="void"/>
+                               <parameters>
+                                       <parameter name="notification" type="NotifyNotification*"/>
+                                       <parameter name="screen" type="GdkScreen*"/>
+                                       <parameter name="x" type="gint"/>
+                                       <parameter name="y" type="gint"/>
+                               </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="gchar*"/>
+                                       <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="gchar*"/>
+                                       <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="gchar*"/>
+                                       <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="gchar*"/>
+                                       <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="gchar*"/>
+                                       <parameter name="value" type="gchar*"/>
+                               </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_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="gchar*"/>
+                                       <parameter name="body" type="gchar*"/>
+                                       <parameter name="icon" type="gchar*"/>
+                               </parameters>
+                       </method>
+                       <property name="attach-widget" type="GtkWidget*" readable="1" writable="1" construct="1" construct-only="0"/>
+                       <property name="body" type="char*" readable="1" writable="1" construct="1" construct-only="0"/>
+                       <property name="icon-name" type="char*" readable="1" writable="1" construct="1" construct-only="0"/>
+                       <property name="status-icon" type="GtkStatusIcon*" 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"/>
+       </namespace>
+</api>
diff --git a/vapi/packages/libnotify/libnotify.gidl b/vapi/packages/libnotify/libnotify.gidl
deleted file mode 100644 (file)
index 82f6f5d..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0"?>
-<api version="1.0">
-  <!--
-
-        This file was automatically generated.
-        Please DO NOT MODIFY THIS FILE, modify .metadata files instead.
-
--->
-  <namespace name="Notify">
-    <enum get-type="notify_urgency_get_type" name="NotifyUrgency" type="enum" type-name="NotifyUrgency">
-      <member name="NOTIFY_URGENCY_LOW" value=""/>
-      <member name="NOTIFY_URGENCY_NORMAL" value=""/>
-      <member name="NOTIFY_URGENCY_CRITICAL" value=""/>
-    </enum>
-    <callback name="NotifyActionCallback" type-name="NotifyActionCallback">
-      <return-type type="void"/>
-      <parameters>
-        <parameter name="arg1" type="NotifyNotification*"/>
-        <parameter name="arg2" type="gchar*"/>
-        <parameter name="arg3" type="gpointer"/>
-      </parameters>
-    </callback>
-    <object get-type="" name="NotifyNotification" parent="GObject" type-name="NotifyNotification">
-      <field name="priv" type="NotifyNotificationPrivate*"/>
-      <signal name="closed" when="FIRST">
-        <return-type type="void"/>
-        <parameters>
-          <parameter name="notification" type="NotifyNotification*"/>
-        </parameters>
-      </signal>
-      <property construct="1" name="summary" readable="1" type="gchar*" writable="1"/>
-      <property construct="1" name="body" readable="1" type="gchar*" writable="1"/>
-      <property construct="1" name="icon-name" readable="1" type="gchar*" writable="1"/>
-      <property construct="1" name="attach-widget" readable="1" type="GtkWidget" writable="1"/>
-      <property construct="1" name="status-icon" readable="1" type="GtkStatusIcon" writable="1"/>
-      <method name="add_action" symbol="notify_notification_add_action">
-        <return-type type="void"/>
-        <parameters>
-          <parameter name="notification" type="NotifyNotification*"/>
-          <parameter name="action" type="const-char*"/>
-          <parameter name="label" type="const-char*"/>
-          <parameter name="callback" type="NotifyActionCallback"/>
-          <parameter name="user_data" type="gpointer"/>
-          <parameter name="free_func" type="GFreeFunc"/>
-        </parameters>
-      </method>
-      <method name="attach_to_widget" symbol="notify_notification_attach_to_widget">
-        <return-type type="void"/>
-        <parameters>
-          <parameter name="notification" type="NotifyNotification*"/>
-          <parameter name="attach" type="GtkWidget*"/>
-        </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_type" symbol="notify_notification_get_type">
-        <return-type type="GType"/>
-      </method>
-      <constructor name="new" symbol="notify_notification_new">
-        <parameters>
-          <parameter name="summary" type="const-gchar*"/>
-          <parameter name="body" type="const-gchar*"/>
-          <parameter name="icon" type="const-gchar*"/>
-          <parameter name="attach" type="GtkWidget*"/>
-        </parameters>
-      </constructor>
-      <method name="set_category" symbol="notify_notification_set_category">
-        <return-type type="void"/>
-        <parameters>
-          <parameter name="notification" type="NotifyNotification*"/>
-          <parameter name="category" type="const-char*"/>
-        </parameters>
-      </method>
-      <method name="set_geometry_hints" symbol="notify_notification_set_geometry_hints">
-        <return-type type="void"/>
-        <parameters>
-          <parameter name="notification" type="NotifyNotification*"/>
-          <parameter name="screen" type="GdkScreen*"/>
-          <parameter name="x" type="gint"/>
-          <parameter name="y" type="gint"/>
-        </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="const-gchar*"/>
-          <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="const-gchar*"/>
-          <parameter name="value" type="const-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="const-gchar*"/>
-          <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="const-gchar*"/>
-          <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="const-gchar*"/>
-          <parameter name="value" type="const-gchar*"/>
-        </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_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="const-gchar*"/>
-          <parameter name="body" type="const-gchar*"/>
-          <parameter name="icon" type="const-gchar*"/>
-        </parameters>
-      </method>
-    </object>
-    <function name="get_app_name" symbol="notify_get_app_name">
-      <return-type type="const-gchar*"/>
-    </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="is_initted" symbol="notify_is_initted">
-      <return-type type="gboolean"/>
-    </function>
-  </namespace>
-</api>