From: Jürg Billeter Date: Fri, 16 Dec 2011 08:47:28 +0000 (+0100) Subject: gtk+-3.0: Improve Dialog.get_content_area binding X-Git-Tag: 0.14.2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=370eea140e2e364acf52caddffd34b3b5b120569;p=thirdparty%2Fvala.git gtk+-3.0: Improve Dialog.get_content_area binding gtk_dialog_get_content_area always returns a pointer to GtkBox. --- diff --git a/vapi/gtk+-3.0.vapi b/vapi/gtk+-3.0.vapi index 5406c9fa4..b6bd093f3 100644 --- a/vapi/gtk+-3.0.vapi +++ b/vapi/gtk+-3.0.vapi @@ -1542,7 +1542,8 @@ namespace Gtk { public unowned Gtk.Widget add_button (string button_text, int response_id); public void add_buttons (...); public unowned Gtk.Widget get_action_area (); - public unowned Gtk.Widget get_content_area (); + [CCode (type = "GtkWidget*")] + public unowned Gtk.Box get_content_area (); public int get_response_for_widget (Gtk.Widget widget); public unowned Gtk.Widget get_widget_for_response (int response_id); public int run (); diff --git a/vapi/packages/gtk+-3.0/gtk+-3.0.metadata b/vapi/packages/gtk+-3.0/gtk+-3.0.metadata index db32c6fca..0149cde04 100644 --- a/vapi/packages/gtk+-3.0/gtk+-3.0.metadata +++ b/vapi/packages/gtk+-3.0/gtk+-3.0.metadata @@ -203,6 +203,7 @@ gtk_container_get_focus_chain.focusable_widgets is_out="1" takes_ownership="1" t gtk_container_set_focus_chain.focusable_widgets type_arguments="Widget" GtkContainerClass name="pointer" GtkDestroyNotify has_target="0" +gtk_dialog_get_content_area type_name="Box" ctype="GtkWidget*" gtk_dialog_new_with_buttons.title nullable="1" gtk_dialog_new_with_buttons.parent nullable="1" gtk_dialog_set_alternative_button_order sentinel="-1" diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 1fbfc48b1..66141dd68 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -2258,6 +2258,8 @@ public class Vala.GIdlParser : CodeVisitor { m.set_attribute_string ("CCode", "array_length_type", eval (nv[1])); } else if (nv[0] == "type_name") { m.return_type = return_type = parse_type_from_string (eval (nv[1]), return_type.value_owned); + } else if (nv[0] == "ctype") { + m.set_attribute_string ("CCode", "type", eval (nv[1])); } else if (nv[0] == "type_arguments") { parse_type_arguments_from_string (return_type, eval (nv[1])); } else if (nv[0] == "deprecated") {