From: Jürg Billeter Date: Thu, 2 Nov 2006 16:23:29 +0000 (+0000) Subject: don't ignore Gtk.Allocation, set cname of methods add Gtk.Allocation X-Git-Tag: VALA_0_0_5~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b678817ccd2ad9059afe0cedea99cf318685ce7f;p=thirdparty%2Fvala.git don't ignore Gtk.Allocation, set cname of methods add Gtk.Allocation 2006-11-02 Jürg Billeter * vapigen/valagidlparser.vala: don't ignore Gtk.Allocation, set cname of methods * packages/gtk+-2.0/gtk+-2.0-custom.vala: add Gtk.Allocation struct svn path=/trunk/; revision=165 --- diff --git a/vapigen/ChangeLog b/vapigen/ChangeLog index 1ef7634da..c3bbe8bd2 100644 --- a/vapigen/ChangeLog +++ b/vapigen/ChangeLog @@ -1,3 +1,9 @@ +2006-11-02 Jürg Billeter + + * vapigen/valagidlparser.vala: don't ignore Gtk.Allocation, set cname + of methods + * packages/gtk+-2.0/gtk+-2.0-custom.vala: add Gtk.Allocation struct + 2006-10-27 Jürg Billeter * gidlgen/gapi2xml.pl: detect some array types in return types diff --git a/vapigen/packages/gtk+-2.0/gtk+-2.0-custom.vala b/vapigen/packages/gtk+-2.0/gtk+-2.0-custom.vala index c480ffb65..8f327324a 100644 --- a/vapigen/packages/gtk+-2.0/gtk+-2.0-custom.vala +++ b/vapigen/packages/gtk+-2.0/gtk+-2.0-custom.vala @@ -25,4 +25,11 @@ namespace Gtk { public void init (out string[] args); public void main (); public void main_quit (); + + public struct Allocation { + public int x; + public int y; + public int width; + public int height; + } } diff --git a/vapigen/vapigen/valagidlparser.vala b/vapigen/vapigen/valagidlparser.vala index b9455cf16..fc55e0cef 100644 --- a/vapigen/vapigen/valagidlparser.vala +++ b/vapigen/vapigen/valagidlparser.vala @@ -546,7 +546,7 @@ public class Vala.GIdlParser : CodeVisitor { } else if (n.has_prefix ("Gtk")) { type.namespace_name = "Gtk"; type.type_name = n.offset ("Gtk".len ()); - if (type.type_name == "Allocation" || type.type_name == "TextLayout") { + if (type.type_name == "TextLayout") { type.namespace_name = null; type.type_name = "pointer"; } @@ -658,6 +658,8 @@ public class Vala.GIdlParser : CodeVisitor { } } + m.set_cname (f.symbol); + bool first = true; foreach (IdlNodeParam param in f.parameters) { var param_node = (IdlNode) param;