[Vala] Gtk.TreeSelection bindings
- From: Jim Nelson <jim yorba org>
- To: vala-list gnome org
- Subject: [Vala] Gtk.TreeSelection bindings
- Date: Thu, 16 Apr 2009 17:51:37 -0700
I'm having some problems with the set_select_function method and its delegate, Gtk.TreeSelectionFunc. A user data void * is available to pass a target pointer, but it's not being used. The target pointer is being inserted anyway by valac, causing compilation errors.
I hand-edited 0.6.1's gtk+-2.0.vapi to get something working. It looks like this is more in the ballpark:
4407c4407,4408
< public void set_select_function (Gtk.TreeSelectionFunc func, void* data, Gtk.DestroyNotify destroy);
---
> [CCode (delegate_target_pos=1.1)]
> public void set_select_function (Gtk.TreeSelectionFunc func, Gtk.DestroyNotify? destroy);
6725c6726
< [CCode (cheader_filename = "gtk/gtk.h")]
---
> [CCode (cheader_filename = "gtk/gtk.h", delegate_target_pos=3.1)]
This also handles passing null for the destroy function, which is valid, although with the data pointer being used for the target, I'm not sure its necessary.
-- Jim Nelson
Yorba
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]