From: Juerg Billeter Date: Sun, 13 Apr 2008 11:19:25 +0000 (+0000) Subject: support type_name metadata attribute for method parameters X-Git-Tag: VALA_0_3_1~105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b04b71296cbaa586dd44b6519aed29395f10d12c;p=platform%2Fupstream%2Fvala.git support type_name metadata attribute for method parameters 2008-04-13 Juerg Billeter * vapigen/valagidlparser.vala: support type_name metadata attribute for method parameters * vapi/packages/gtk+-2.0/: fix gtk_action_group_add_radio_actions binding, fixes bug 526871 * vapi/gtk+-2.0.vapi: regenerated svn path=/trunk/; revision=1197 --- diff --git a/ChangeLog b/ChangeLog index ad8dbbc..c5b53f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2008-04-13 Jürg Billeter + * vapigen/valagidlparser.vala: support type_name metadata attribute + for method parameters + + * vapi/packages/gtk+-2.0/: fix gtk_action_group_add_radio_actions + binding, fixes bug 526871 + + * vapi/gtk+-2.0.vapi: regenerated + +2008-04-13 Jürg Billeter + * vala/valaparser.vala: allow object creation expressions in expression statements diff --git a/vapi/gtk+-2.0.vapi b/vapi/gtk+-2.0.vapi index 623143c..6e91031 100644 --- a/vapi/gtk+-2.0.vapi +++ b/vapi/gtk+-2.0.vapi @@ -1822,8 +1822,8 @@ namespace Gtk { public void add_action_with_accel (Gtk.Action action, string accelerator); public void add_actions (Gtk.ActionEntry[] entries, pointer user_data); public void add_actions_full (Gtk.ActionEntry[] entries, pointer user_data, GLib.DestroyNotify destroy); - public void add_radio_actions (Gtk.RadioActionEntry[] entries, int value, GLib.Callback on_change, pointer user_data); - public void add_radio_actions_full (Gtk.RadioActionEntry[] entries, int value, GLib.Callback on_change, pointer user_data, GLib.DestroyNotify destroy); + public void add_radio_actions (Gtk.RadioActionEntry[] entries, int value, Gtk.RadioActionCallback on_change); + public void add_radio_actions_full (Gtk.RadioActionEntry[] entries, int value, Gtk.RadioActionCallback on_change, GLib.DestroyNotify destroy); public void add_toggle_actions (Gtk.ToggleActionEntry[] entries, pointer user_data); public void add_toggle_actions_full (Gtk.ToggleActionEntry[] entries, pointer user_data, GLib.DestroyNotify destroy); public weak string get_name (); @@ -6273,6 +6273,8 @@ namespace Gtk { [CCode (cheader_filename = "gtk/gtk.h")] public delegate void ActionCallback (Gtk.Action action); [CCode (cheader_filename = "gtk/gtk.h")] + public delegate void RadioActionCallback (Gtk.Action action, Gtk.Action current); + [CCode (cheader_filename = "gtk/gtk.h")] public delegate void AboutDialogActivateLinkFunc (Gtk.AboutDialog about, string link_); [CCode (cheader_filename = "gtk/gtk.h")] public static delegate bool AccelGroupActivate (Gtk.AccelGroup accel_group, GLib.Object acceleratable, uint keyval, Gdk.ModifierType modifier); diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0-custom.vala b/vapi/packages/gtk+-2.0/gtk+-2.0-custom.vala index a74de75..2fa7f99 100644 --- a/vapi/packages/gtk+-2.0/gtk+-2.0-custom.vala +++ b/vapi/packages/gtk+-2.0/gtk+-2.0-custom.vala @@ -51,4 +51,6 @@ namespace Gtk { public static delegate void CallbackMarshal (Object object, pointer data, Arg[] args); public delegate void ActionCallback (Action action); + + public delegate void RadioActionCallback (Action action, Action current); } diff --git a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata index 0381d48..7331b73 100644 --- a/vapi/packages/gtk+-2.0/gtk+-2.0.metadata +++ b/vapi/packages/gtk+-2.0/gtk+-2.0.metadata @@ -18,8 +18,8 @@ gtk_action_group_add_actions.user_data hidden="0" gtk_action_group_add_actions_full.user_data hidden="0" gtk_action_group_add_toggle_actions.user_data hidden="0" gtk_action_group_add_toggle_actions_full.user_data hidden="0" -gtk_action_group_add_radio_actions.user_data hidden="0" -gtk_action_group_add_radio_actions_full.user_data hidden="0" +gtk_action_group_add_radio_actions.on_change type_name="RadioActionCallback" +gtk_action_group_add_radio_actions_full.on_change type_name="RadioActionCallback" GtkAdjustment::changed has_emitter="1" GtkAdjustment::value_changed has_emitter="1" GtkAllocation is_value_type="1" diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index d0c9a43..51c81de 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -1344,6 +1344,8 @@ public class Vala.GIdlParser : CodeVisitor { } else if (nv[0] == "array_length_pos") { set_array_length_pos = true; array_length_pos = eval (nv[1]).to_double (); + } else if (nv[0] == "type_name") { + param_type.unresolved_symbol = new UnresolvedSymbol (null, eval (nv[1])); } } }