[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[Vala] Vala and Gnome panel applets
- From: Andrea Del Signore <sejerpz tin it>
- To: Vala ML <vala-list gnome org>
- Subject: [Vala] Vala and Gnome panel applets
- Date: Sat, 01 Mar 2008 13:49:58 +0100
Hi all,
I think that vala its a great language especially to write little gnome
panel applets, but I had some problems with it.
1) Bindings to relevant libraries are incomplete since gnome-panel
depends on deprecated libraries such as libbonobui. The result is that
we can define a right click menu' for the applet.
2) panel applet main function is hidden under a C macro, so we have to
write it manually, translating directly from the C header.
I've some discussion with Juerg in IRC about 1, and he thinks that an
incomplete binding to libbonoboui just for the scope of writing applets
would be fine.
So here it is my attempt to solve 1, but I think that 2 can't be fixed
without some special support from the compiler.
Have a nice day,
Andrea
/*
+ WARNING: this vapi file is provided only to support devlopment of gnome-panel applets
* since libbonoboui is deprecated (http://library.gnome.org/devel/references.html.en_GB)
*/
[CCode (cheader_filename = "libbonoboui.h")]
namespace BonoboUI {
public struct Verb {
public string cname;
public VerbFn cb;
public pointer user_data;
public pointer dummy;
}
public class Component
{
}
public static delegate void VerbFn (Component component, pointer user_data, string cname);
}diff --git a/vapi/libpanelapplet-2.0.vapi b/vapi/libpanelapplet-2.0.vapi
index ddcaedc..0439b47 100644
--- a/vapi/libpanelapplet-2.0.vapi
+++ b/vapi/libpanelapplet-2.0.vapi
@@ -28,6 +28,8 @@ namespace Panel {
public void set_flags (AppletFlags flags);
public static int factory_main (string iid, GLib.Type applet_type, AppletFactoryCallback callback, pointer data);
public void set_background_widget (Gtk.Widget widget);
+ [NoArrayLength]
+ public void setup_menu (string xml, BonoboUI.Verb[] verb_list, pointer data);
public signal void change_background (AppletBackgroundType type, ref Gdk.Color color, Gdk.Pixmap pixmap);
}
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]