From e6347ec16d3053640961ba300cc72e7eeb904380 Mon Sep 17 00:00:00 2001 From: Juerg Billeter Date: Wed, 29 Aug 2007 20:39:02 +0000 Subject: [PATCH] add libnotify bindings, patch by Nicolas Christener and Roland Hostettler 2007-08-29 Juerg Billeter * vapi/Makefile.am, vapi/libnotify.valam, vapi/packages/libnotify/: add libnotify bindings, patch by Nicolas Christener and Roland Hostettler svn path=/trunk/; revision=534 --- ChangeLog | 5 + vapi/Makefile.am | 2 + vapi/libnotify.vala | 51 +++++++ vapi/packages/libnotify/libnotify-custom.vala | 28 ++++ vapi/packages/libnotify/libnotify.deps | 5 + vapi/packages/libnotify/libnotify.files | 1 + vapi/packages/libnotify/libnotify.gidl | 198 ++++++++++++++++++++++++++ vapi/packages/libnotify/libnotify.metadata | 2 + vapi/packages/libnotify/libnotify.namespace | 1 + 9 files changed, 293 insertions(+) create mode 100644 vapi/libnotify.vala create mode 100644 vapi/packages/libnotify/libnotify-custom.vala create mode 100644 vapi/packages/libnotify/libnotify.deps create mode 100644 vapi/packages/libnotify/libnotify.files create mode 100644 vapi/packages/libnotify/libnotify.gidl create mode 100644 vapi/packages/libnotify/libnotify.metadata create mode 100644 vapi/packages/libnotify/libnotify.namespace diff --git a/ChangeLog b/ChangeLog index 740cb29..b13bb99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-08-29 Jürg Billeter + * vapi/Makefile.am, vapi/libnotify.valam, vapi/packages/libnotify/: add + libnotify bindings, patch by Nicolas Christener and Roland Hostettler + +2007-08-29 Jürg Billeter + * vapi/glib-2.0.vala: add missing type_id information 2007-08-29 Jürg Billeter diff --git a/vapi/Makefile.am b/vapi/Makefile.am index afb61d5..fa7a404 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -39,6 +39,8 @@ dist_vapi_DATA = \ libgnome-2.0.vala \ libgnomeui-2.0.deps \ libgnomeui-2.0.vala \ + libnotify.deps \ + libnotify.vala \ libpanelapplet-2.0.deps \ libpanelapplet-2.0.vala \ libwnck-1.0.vala \ diff --git a/vapi/libnotify.vala b/vapi/libnotify.vala new file mode 100644 index 0000000..3cb10a2 --- /dev/null +++ b/vapi/libnotify.vala @@ -0,0 +1,51 @@ +/* libnotify.vala generated by lt-vapigen, do not modify. */ + +[CCode (cprefix = "Notify", lower_case_cprefix = "notify_")] +namespace Notify { + [CCode (cprefix = "NOTIFY_URGENCY_", cheader_filename = "libnotify/notify.h")] + public enum Urgency { + LOW, + NORMAL, + CRITICAL, + } + [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_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 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); + [NoArrayLength] + public void set_hint_byte_array (string key, uchar[] value, ulong len); + public void set_hint_double (string key, double value); + public void set_hint_int32 (string key, int value); + public void set_hint_string (string key, string value); + public void set_icon_from_pixbuf (Gdk.Pixbuf icon); + 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); + [NoAccessorMethod] + public weak string summary { 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; } + 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 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 is_initted (); +} diff --git a/vapi/packages/libnotify/libnotify-custom.vala b/vapi/packages/libnotify/libnotify-custom.vala new file mode 100644 index 0000000..18a0d0b --- /dev/null +++ b/vapi/packages/libnotify/libnotify-custom.vala @@ -0,0 +1,28 @@ +/* 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 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 + * Roland Hostettler + */ + +[CCode (cheader_filename = "libnotify/notify.h")] +namespace Notify { + [Import] + public bool init (string! app_name); +} diff --git a/vapi/packages/libnotify/libnotify.deps b/vapi/packages/libnotify/libnotify.deps new file mode 100644 index 0000000..41a2aa1 --- /dev/null +++ b/vapi/packages/libnotify/libnotify.deps @@ -0,0 +1,5 @@ +atk +cairo +gdk-2.0 +pango +gtk+-2.0 diff --git a/vapi/packages/libnotify/libnotify.files b/vapi/packages/libnotify/libnotify.files new file mode 100644 index 0000000..a449208 --- /dev/null +++ b/vapi/packages/libnotify/libnotify.files @@ -0,0 +1 @@ +libnotify diff --git a/vapi/packages/libnotify/libnotify.gidl b/vapi/packages/libnotify/libnotify.gidl new file mode 100644 index 0000000..82f6f5d --- /dev/null +++ b/vapi/packages/libnotify/libnotify.gidl @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vapi/packages/libnotify/libnotify.metadata b/vapi/packages/libnotify/libnotify.metadata new file mode 100644 index 0000000..4408d78 --- /dev/null +++ b/vapi/packages/libnotify/libnotify.metadata @@ -0,0 +1,2 @@ +Notify cheader_filename="libnotify/notify.h" + diff --git a/vapi/packages/libnotify/libnotify.namespace b/vapi/packages/libnotify/libnotify.namespace new file mode 100644 index 0000000..838d60e --- /dev/null +++ b/vapi/packages/libnotify/libnotify.namespace @@ -0,0 +1 @@ +Notify -- 2.7.4