From fb1256d2f34b86eca8633f0c9568e9c1b05986ed Mon Sep 17 00:00:00 2001 From: Rachel Hestilow Date: Sat, 13 Jul 2002 20:31:23 +0000 Subject: [PATCH] 2002-07-13 Rachel Hestilow * parser/Gnome.metadata, Gtk.metadata: More conflict fixes. * parser/build.pl: Fully qualify all lib names. (Gtk+ packages are now LFS-compliant in Debian...) * parser/gapi2xml.pl: Fix for whitespace in fields, defines, and docs. * generator/BoxedGen.cs: Remove extraneous CallByName definition, add "override" keyword to FromNative. (Generate): Generate methods after fields. * generator/ClassBase.cs: Change CallByName, FromNative to virtual. (.ctor): Ignore "hidden" nodes. Set container on signal. (GenSignals, GenMethods): Add "implementor" argument for interface use. (Get(Method|Signal|Property)Recursively): Rework to correctly recurse interfaces. (Implements): Added. * generator/Ctor.cs (Initialize): Move clash initialization completely out of Generate, so we can check for collisions. * generator/Method.cs (GenerateDeclCommon): Check for duplicates, for "new" keyword. (Generate): Add "implementor" argument. * generator/ObjectGen.cs (Generate): Initialize ctor clashes on this and all parents, before generating. (Ctors, InitializeCtors): Added. * generator/Signal.cs: Store the container_type, check for collisions. * generator/StructGen.cs: Add "override" keyword to overriden methods. * gtk/FileSelection.custom (ActionArea): Add "new" keyword. svn path=/trunk/gtk-sharp/; revision=5782 --- ChangeLog | 33 +++++++ generator/BoxedGen.cs | 14 +-- generator/ClassBase.cs | 80 ++++++++++++--- generator/Ctor.cs | 52 +++++++--- generator/Method.cs | 33 ++++--- generator/ObjectGen.cs | 57 ++++++++--- generator/Signal.cs | 11 ++- generator/StructGen.cs | 4 +- generator/gtkapi.xml | 206 +++++++++++++++++++-------------------- gtk/FileSelection.custom | 2 +- parser/Gnome.metadata | 28 ++++++ parser/Gtk.metadata | 61 ++++++++++++ parser/build.pl | 8 +- parser/gapi2xml.pl | 7 +- sources/Gnome.metadata | 28 ++++++ sources/Gtk.metadata | 61 ++++++++++++ 16 files changed, 505 insertions(+), 180 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5302b855f..781dc18a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +2002-07-13 Rachel Hestilow + + * parser/Gnome.metadata, Gtk.metadata: More conflict + fixes. + * parser/build.pl: Fully qualify all lib names. (Gtk+ packages + are now LFS-compliant in Debian...) + * parser/gapi2xml.pl: Fix for whitespace in fields, defines, + and docs. + + * generator/BoxedGen.cs: Remove extraneous CallByName definition, + add "override" keyword to FromNative. + (Generate): Generate methods after fields. + * generator/ClassBase.cs: Change CallByName, FromNative to virtual. + (.ctor): Ignore "hidden" nodes. Set container on signal. + (GenSignals, GenMethods): Add "implementor" argument for interface + use. + (Get(Method|Signal|Property)Recursively): Rework to correctly + recurse interfaces. + (Implements): Added. + * generator/Ctor.cs (Initialize): Move clash initialization completely + out of Generate, so we can check for collisions. + * generator/Method.cs (GenerateDeclCommon): Check for duplicates, + for "new" keyword. + (Generate): Add "implementor" argument. + * generator/ObjectGen.cs (Generate): Initialize ctor clashes on + this and all parents, before generating. + (Ctors, InitializeCtors): Added. + * generator/Signal.cs: Store the container_type, check for + collisions. + * generator/StructGen.cs: Add "override" keyword to overriden methods. + + * gtk/FileSelection.custom (ActionArea): Add "new" keyword. + 2002-07-11 Mike Kestner * glib/SList.cs : fix a couple DllImports diff --git a/generator/BoxedGen.cs b/generator/BoxedGen.cs index bb667dfd5..d7bc4435d 100644 --- a/generator/BoxedGen.cs +++ b/generator/BoxedGen.cs @@ -15,12 +15,7 @@ namespace GtkSharp.Generation { public BoxedGen (XmlElement ns, XmlElement elem) : base (ns, elem) {} - public String CallByName (String var_name) - { - return var_name + ".Handle"; - } - - public String FromNative(String var) + public override String FromNative(String var) { return "(" + QualifiedName + ") GLib.Boxed.FromNative(" + var + ")"; } @@ -68,9 +63,7 @@ namespace GtkSharp.Generation { break; case "method": - if (!GenMethod(member, sw)) { - Console.WriteLine(" in boxed " + CName); - } + //Console.WriteLine ("HIYA {0}", ((Method) member).Name); break; default: @@ -78,7 +71,8 @@ namespace GtkSharp.Generation { break; } } - + + GenMethods (sw, null, null, false); AppendCustom(sw); sw.WriteLine ("\t}"); CloseWriter (sw); diff --git a/generator/ClassBase.cs b/generator/ClassBase.cs index 147d6708e..753e93041 100644 --- a/generator/ClassBase.cs +++ b/generator/ClassBase.cs @@ -41,6 +41,8 @@ namespace GtkSharp.Generation { foreach (XmlNode node in elem.ChildNodes) { if (!(node is XmlElement)) continue; XmlElement member = (XmlElement) node; + if (member.HasAttribute ("hidden")) + continue; switch (node.Name) { case "method": @@ -55,7 +57,7 @@ namespace GtkSharp.Generation { break; case "signal": - sigs.Add (member.GetAttribute ("name"), new Signal (member)); + sigs.Add (member.GetAttribute ("name"), new Signal (member, this)); break; case "implements": @@ -89,12 +91,12 @@ namespace GtkSharp.Generation { } } - public String CallByName (String var_name) + public virtual String CallByName (String var_name) { return var_name + ".Handle"; } - public String FromNative(String var) + public virtual String FromNative(String var) { return "(" + QualifiedName + ") GLib.Object.GetObject(" + var + ")"; } @@ -112,14 +114,14 @@ namespace GtkSharp.Generation { } } - public void GenSignals (StreamWriter sw, bool gen_docs) + public void GenSignals (StreamWriter sw, ClassBase implementor, bool gen_docs) { if (sigs == null) return; foreach (Signal sig in sigs.Values) { if (sig.Validate ()) - sig.Generate (sw, gen_docs); + sig.Generate (sw, implementor, gen_docs); else Console.WriteLine(" in Object " + Name); } @@ -146,7 +148,7 @@ namespace GtkSharp.Generation { (props != null) && props.ContainsKey(mname.Substring(3))); } - public void GenMethods (StreamWriter sw, Hashtable collisions, bool gen_docs) + public void GenMethods (StreamWriter sw, Hashtable collisions, ClassBase implementor, bool gen_docs) { if (methods == null) return; @@ -165,7 +167,7 @@ namespace GtkSharp.Generation { method.Name = Name + "." + method.Name; method.Protection = ""; } - method.Generate (sw, gen_docs); + method.Generate (sw, implementor, gen_docs); if (oname != null) { method.Name = oname; @@ -187,16 +189,34 @@ namespace GtkSharp.Generation { return (Property) props[name]; } - public virtual Method GetMethodRecursively (string name) + public Signal GetSignal (string name) { - ClassBase klass = this; - Method m = null; - while (klass != null && m == null) { - m = (Method) klass.GetMethod (name); - klass = klass.Parent; + return (Signal) sigs[name]; + } + + public Method GetMethodRecursively (string name) + { + return GetMethodRecursively (name, false); + } + + public virtual Method GetMethodRecursively (string name, bool check_self) + { + Method p = null; + if (check_self) + p = GetMethod (name); + if (p == null && Parent != null) + p = Parent.GetMethodRecursively (name, true); + + if (check_self && p == null && interfaces != null) { + foreach (string iface in interfaces) { + ClassBase igen = SymbolTable.GetClassGen (iface); + p = igen.GetMethodRecursively (name, true); + if (p != null) + break; + } } - return m; + return p; } public virtual Property GetPropertyRecursively (string name) @@ -211,5 +231,37 @@ namespace GtkSharp.Generation { return p; } + public Signal GetSignalRecursively (string name) + { + return GetSignalRecursively (name, false); + } + + public virtual Signal GetSignalRecursively (string name, bool check_self) + { + Signal p = null; + if (check_self) + p = GetSignal (name); + if (p == null && Parent != null) + p = Parent.GetSignalRecursively (name, true); + + if (check_self && p == null && interfaces != null) { + foreach (string iface in interfaces) { + ClassBase igen = SymbolTable.GetClassGen (iface); + p = igen.GetSignalRecursively (name, true); + if (p != null) + break; + } + } + + return p; + } + + public bool Implements (string iface) + { + if (interfaces != null) + return interfaces.Contains (iface); + else + return false; + } } } diff --git a/generator/Ctor.cs b/generator/Ctor.cs index a5cb71603..3414d1dd6 100644 --- a/generator/Ctor.cs +++ b/generator/Ctor.cs @@ -17,15 +17,18 @@ namespace GtkSharp.Generation { private XmlElement elem; private Parameters parms; private bool preferred; + private String clashName = null; + private ClassBase container_type; public bool Preferred { get { return preferred; } set { preferred = value; } } - public Ctor (string libname, XmlElement elem) { + public Ctor (string libname, XmlElement elem, ClassBase container_type) { this.libname = libname; this.elem = elem; + this.container_type = container_type; XmlElement parms_elem = elem ["parameters"]; if (parms_elem != null) parms = new Parameters (parms_elem); @@ -53,13 +56,33 @@ namespace GtkSharp.Generation { if (clash_map.ContainsKey (sigtypes)) { int num = (int) clash_map[sigtypes]; clash_map[sigtypes] = ++num; - Console.WriteLine ("CLASH: {0} {1}", elem.GetAttribute ("cname"), num); } else clash_map[sigtypes] = 0; } + + public void Initialize (Hashtable clash_map) + { + string sig = "()"; + string sigtypes = ""; + if (parms != null) { + sig = "(" + parms.Signature + ")"; + sigtypes = parms.SignatureTypes; + } + int clashes = (int) clash_map[sigtypes]; + string cname = elem.GetAttribute("cname"); + if (clashes > 0 && !Preferred) { + String mname = cname.Substring(cname.IndexOf("new")); + mname = mname.Substring(0,1).ToUpper() + mname.Substring(1); + int idx; + while ((idx = mname.IndexOf("_")) > 0) { + mname = mname.Substring(0, idx) + mname.Substring(idx+1, 1).ToUpper() + mname.Substring(idx+2); + } + clashName = mname + sig; + } + } - public void Generate (StreamWriter sw, Hashtable clash_map) + public void Generate (StreamWriter sw) { string sigtypes = ""; string sig = "()"; @@ -72,8 +95,6 @@ namespace GtkSharp.Generation { sigtypes = parms.SignatureTypes; } - int clashes = (int) clash_map[sigtypes]; - string cname = elem.GetAttribute("cname"); string name = ((XmlElement)elem.ParentNode).GetAttribute("name"); string safety; @@ -88,15 +109,22 @@ namespace GtkSharp.Generation { sw.WriteLine("\t\t/// " + name + " Constructor "); sw.WriteLine("\t\t/// To be completed "); - if (clashes > 0 && !Preferred) { - String mname = cname.Substring(cname.IndexOf("new")); - mname = mname.Substring(0,1).ToUpper() + mname.Substring(1); - int idx; - while ((idx = mname.IndexOf("_")) > 0) { - mname = mname.Substring(0, idx) + mname.Substring(idx+1, 1).ToUpper() + mname.Substring(idx+2); + if (clashName != null) { + string modifiers = ""; + Ctor dup = null; + ObjectGen parent = (ObjectGen) container_type.Parent; + while (dup == null && parent != null) { + foreach (Ctor c in parent.Ctors) { + if (c.clashName == clashName) { + dup = c; + modifiers = "new "; + break; + } + } + parent = (ObjectGen) parent.Parent; } - sw.WriteLine("\t\tpublic static " + safety + name + " " + mname + sig); + sw.WriteLine("\t\tpublic static " + safety + modifiers + name + " " + clashName); sw.WriteLine("\t\t{"); if (parms != null) parms.Initialize(sw, false, ""); diff --git a/generator/Method.cs b/generator/Method.cs index c4d409876..ccedef50b 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -126,8 +126,8 @@ namespace GtkSharp.Generation { else safety = ""; - is_get = ((parms != null && (parms.IsAccessor || (parms.Count == 0 && s_ret != "void")) || (parms == null && s_ret != "void")) && Name.Substring(0, 3) == "Get"); - is_set = ((parms != null && (parms.IsAccessor || (parms.Count == 1 && s_ret == "void"))) && (Name.Substring(0, 3) == "Set")); + is_get = ((parms != null && (parms.IsAccessor || (parms.Count == 0 && s_ret != "void")) || (parms == null && s_ret != "void")) && Name.Length > 3 && Name.Substring(0, 3) == "Get"); + is_set = ((parms != null && (parms.IsAccessor || (parms.Count == 1 && s_ret == "void"))) && (Name.Length > 3 && Name.Substring(0, 3) == "Set")); if (parms != null) { parms.CreateSignature (is_set); @@ -168,9 +168,20 @@ namespace GtkSharp.Generation { return container_type.GetMethod (complement + elem.GetAttribute("name").Substring (1)); } - private void GenerateDeclCommon (StreamWriter sw) + private void GenerateDeclCommon (StreamWriter sw, ClassBase implementor) { sw.Write(safety); + Method dup = null; + if (Name == "ToString") + sw.Write("override "); + else if (elem.HasAttribute("new_flag") || (container_type != null && (dup = container_type.GetMethodRecursively (Name)) != null) || (implementor != null && (dup = implementor.GetMethodRecursively (Name)) != null)) { + if (dup != null && dup.parms != null) + dup.parms.CreateSignature (false); + if (Name == "Toggle") Console.WriteLine ("FOOK {0} {1}", (dup.parms != null) ? dup.parms.Signature : null, (parms != null) ? parms.Signature : null); + if (dup != null && ((dup.parms != null && dup.parms.Signature == parms.Signature) || (dup.parms == null && parms == null))) + sw.Write("new "); + } + if (is_get || is_set) { if (s_ret == "void") s_ret = parms.AccessorReturnType; @@ -179,8 +190,6 @@ namespace GtkSharp.Generation { sw.Write(Name.Substring (3)); sw.WriteLine(" { "); } else { - if (elem.HasAttribute("new_flag") || (container_type.Parent != null && container_type.Parent.GetMethodRecursively (Name) != null)) - sw.Write("new "); sw.Write(s_ret + " " + Name + sig); } } @@ -199,7 +208,7 @@ namespace GtkSharp.Generation { return; sw.Write("\t\t"); - GenerateDeclCommon (sw); + GenerateDeclCommon (sw, null); sw.Write("\t\t\t"); sw.Write ((is_get) ? "get;" : "set;"); @@ -214,7 +223,7 @@ namespace GtkSharp.Generation { else { sw.Write("\t\t"); - GenerateDeclCommon (sw); + GenerateDeclCommon (sw, null); sw.WriteLine (";"); } @@ -243,12 +252,12 @@ namespace GtkSharp.Generation { sw.WriteLine(); } - public void Generate (StreamWriter sw) + public void Generate (StreamWriter sw, ClassBase implementor) { - Generate (sw, true); + Generate (sw, implementor, true); } - public void Generate (StreamWriter sw, bool gen_docs) + public void Generate (StreamWriter sw, ClassBase implementor, bool gen_docs) { Method comp = null; @@ -258,7 +267,7 @@ namespace GtkSharp.Generation { /* we are generated by the get Method, if there is one */ if (is_set || is_get) { - if (container_type.GetProperty (Name.Substring (3)) != null) + if (container_type.GetPropertyRecursively (Name.Substring (3)) != null) return; comp = GetComplement (); if (comp != null && comp.Validate () && is_set && parms.AccessorReturnType == comp.s_ret) @@ -285,7 +294,7 @@ namespace GtkSharp.Generation { sw.Write("\t\t"); if (protection != "") sw.Write("{0} ", protection); - GenerateDeclCommon (sw); + GenerateDeclCommon (sw, implementor); if (is_get || is_set) { diff --git a/generator/ObjectGen.cs b/generator/ObjectGen.cs index e5117f1b5..7a22b7e3d 100644 --- a/generator/ObjectGen.cs +++ b/generator/ObjectGen.cs @@ -15,6 +15,8 @@ namespace GtkSharp.Generation { private ArrayList ctors = new ArrayList(); private ArrayList strings = new ArrayList(); + private bool ctors_initted = false; + private Hashtable clash_map; public ObjectGen (XmlElement ns, XmlElement elem) : base (ns, elem) { @@ -30,7 +32,7 @@ namespace GtkSharp.Generation { break; case "constructor": - ctors.Add (new Ctor (LibraryName, member)); + ctors.Add (new Ctor (LibraryName, member, this)); break; case "static-string": @@ -63,6 +65,8 @@ namespace GtkSharp.Generation { sw.Write (" : " + cs_parent); if (interfaces != null) { foreach (string iface in interfaces) { + if (Parent != null && Parent.Implements (iface)) + continue; sw.Write (", " + SymbolTable.GetCSType (iface)); } } @@ -86,10 +90,10 @@ namespace GtkSharp.Generation { if (has_sigs && Elem.HasAttribute("parent")) { sw.WriteLine("\t\tprivate Hashtable Signals = new Hashtable();"); - GenSignals (sw, true); + GenSignals (sw, null, true); } - GenMethods (sw, null, true); + GenMethods (sw, null, null, true); if (interfaces != null) { Hashtable all_methods = new Hashtable (); @@ -105,9 +109,11 @@ namespace GtkSharp.Generation { } foreach (string iface in interfaces) { + if (Parent != null && Parent.Implements (iface)) + continue; ClassBase igen = SymbolTable.GetClassGen (iface); - igen.GenMethods (sw, collisions, false); - igen.GenSignals (sw, false); + igen.GenMethods (sw, collisions, this, false); + igen.GenSignals (sw, this, false); } } @@ -159,14 +165,14 @@ namespace GtkSharp.Generation { return true; } - private void GenCtors (StreamWriter sw) - { - if (!Elem.HasAttribute("parent")) - return; - sw.WriteLine("\t\tpublic " + Name + "(IntPtr raw) : base(raw) {}"); - sw.WriteLine(); + public ArrayList Ctors { get { return ctors; } } - Hashtable clash_map = new Hashtable(); + private void InitializeCtors () + { + if (ctors_initted) + return; + + clash_map = new Hashtable(); if (ctors != null) { bool has_preferred = false; @@ -182,10 +188,33 @@ namespace GtkSharp.Generation { if (!has_preferred && ctors.Count > 0) ((Ctor) ctors[0]).Preferred = true; - + + foreach (Ctor ctor in ctors) + if (ctor.Validate ()) { + ctor.Initialize (clash_map); + } + } + + ctors_initted = true; + } + + private void GenCtors (StreamWriter sw) + { + if (!Elem.HasAttribute("parent")) + return; + ObjectGen klass = this; + while (klass != null) { + klass.InitializeCtors (); + klass = (ObjectGen) klass.Parent; + } + + sw.WriteLine("\t\tpublic " + Name + "(IntPtr raw) : base(raw) {}"); + sw.WriteLine(); + + if (ctors != null) { foreach (Ctor ctor in ctors) { if (ctor.Validate ()) - ctor.Generate (sw, clash_map); + ctor.Generate (sw); } } diff --git a/generator/Signal.cs b/generator/Signal.cs index 5476485a2..654f5c402 100644 --- a/generator/Signal.cs +++ b/generator/Signal.cs @@ -16,11 +16,13 @@ namespace GtkSharp.Generation { private string marsh; private string name; private XmlElement elem; + private ClassBase container_type; - public Signal (XmlElement elem) + public Signal (XmlElement elem, ClassBase container_type) { this.elem = elem; this.name = elem.GetAttribute ("name"); + this.container_type = container_type; } public string Name { @@ -47,8 +49,9 @@ namespace GtkSharp.Generation { public void GenerateDecl (StreamWriter sw) { GenComments (sw); - if (elem.HasAttribute("new_flag")) + if (elem.HasAttribute("new_flag") || (container_type != null && container_type.GetSignalRecursively (Name) != null)) sw.Write("new "); + sw.WriteLine ("\t\tevent EventHandler " + Name + ";"); } @@ -61,7 +64,7 @@ namespace GtkSharp.Generation { sw.WriteLine("\t\t/// "); } - public void Generate (StreamWriter sw, bool gen_docs) + public void Generate (StreamWriter sw, ClassBase implementor, bool gen_docs) { string cname = "\"" + elem.GetAttribute("cname") + "\""; marsh = "GtkSharp." + marsh; @@ -69,7 +72,7 @@ namespace GtkSharp.Generation { if (gen_docs) GenComments (sw); sw.Write("\t\tpublic "); - if (elem.HasAttribute("new_flag")) + if (elem.HasAttribute("new_flag") || (container_type != null && container_type.GetSignalRecursively (Name) != null) || (implementor != null && implementor.GetSignalRecursively (Name) != null)) sw.Write("new "); sw.WriteLine("event EventHandler " + Name + " {"); sw.WriteLine("\t\t\tadd {"); diff --git a/generator/StructGen.cs b/generator/StructGen.cs index 95e83fe1d..b778fa2c3 100644 --- a/generator/StructGen.cs +++ b/generator/StructGen.cs @@ -21,12 +21,12 @@ namespace GtkSharp.Generation { } } - public String CallByName (String var_name) + public override String CallByName (String var_name) { return var_name; } - public String FromNative(String var) + public override String FromNative(String var) { return var; } diff --git a/generator/gtkapi.xml b/generator/gtkapi.xml index b01e2fa0a..3b3a3f805 100644 --- a/generator/gtkapi.xml +++ b/generator/gtkapi.xml @@ -1,6 +1,6 @@ - + @@ -326,7 +326,7 @@ - + @@ -355,7 +355,7 @@ - + @@ -879,7 +879,7 @@ - + @@ -940,7 +940,7 @@ - + @@ -948,11 +948,11 @@ - + - - - + + + @@ -2148,7 +2148,7 @@ - + @@ -2158,7 +2158,7 @@ - + @@ -2356,7 +2356,7 @@ - + @@ -2423,7 +2423,7 @@ - + @@ -3051,7 +3051,7 @@ - + @@ -3109,13 +3109,13 @@ - - - - - - - + + + + + + + @@ -3201,10 +3201,10 @@ - - - - + + + + @@ -3668,24 +3668,24 @@ - + - - - - - - - - + + + + + + + + - + @@ -3721,7 +3721,7 @@ - + @@ -3874,11 +3874,11 @@ - - - - - + + + + + @@ -3900,7 +3900,7 @@ - + @@ -4354,7 +4354,7 @@ - + @@ -4687,7 +4687,6 @@ - @@ -4740,7 +4739,7 @@ - + @@ -5079,7 +5078,7 @@ - + @@ -7662,7 +7661,7 @@ - + @@ -8949,7 +8948,7 @@ - + @@ -9472,7 +9471,7 @@ - + @@ -10137,7 +10136,7 @@ - + @@ -10171,7 +10170,7 @@ - + @@ -10269,7 +10268,7 @@ - + @@ -10387,7 +10386,7 @@ - + @@ -10433,7 +10432,7 @@ - + @@ -10504,7 +10503,7 @@ - + @@ -11495,7 +11494,7 @@ - + @@ -11656,7 +11655,7 @@ - + @@ -11764,7 +11763,7 @@ - + @@ -11777,7 +11776,7 @@ - + @@ -12450,7 +12449,7 @@ - + @@ -12467,7 +12466,7 @@ - + @@ -13968,7 +13967,7 @@ - + @@ -14024,7 +14023,7 @@ - + @@ -14086,7 +14085,7 @@ - + @@ -14432,7 +14431,7 @@ - + @@ -15217,7 +15216,7 @@ - + @@ -15250,7 +15249,7 @@ - + @@ -15324,7 +15323,7 @@ - + @@ -15637,7 +15636,7 @@ - + @@ -16009,7 +16008,7 @@ - + @@ -16031,7 +16030,7 @@ - + @@ -16094,7 +16093,7 @@ - + @@ -16304,7 +16303,7 @@ - + @@ -16608,7 +16607,7 @@ - + @@ -16726,7 +16725,7 @@ - + @@ -16824,7 +16823,7 @@ - + - + - - - + @@ -17906,7 +17903,7 @@ - + @@ -18164,12 +18161,11 @@ - - - + + - + @@ -18832,18 +18828,18 @@ - + - + - + - + - - + + @@ -19865,19 +19861,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/gtk/FileSelection.custom b/gtk/FileSelection.custom index 2112378ce..6b5548ca5 100644 --- a/gtk/FileSelection.custom +++ b/gtk/FileSelection.custom @@ -108,7 +108,7 @@ public Gtk.HButtonBox ButtonArea { [DllImport("gtksharpglue")] static extern IntPtr gtksharp_file_selection_get_action_area (IntPtr i); -public Gtk.HButtonBox ActionArea { +public new Gtk.HButtonBox ActionArea { get { return new Gtk.HButtonBox (gtksharp_file_selection_get_action_area (this.Handle)); } } diff --git a/parser/Gnome.metadata b/parser/Gnome.metadata index 5f13a380e..1b2581313 100644 --- a/parser/Gnome.metadata +++ b/parser/Gnome.metadata @@ -134,6 +134,34 @@ + + + Activate + + + + name + Activated + + + + + + + + GnomeEntry + GtkEntry + + + PickDialog + + + + hidden + 1 + + + diff --git a/parser/Gtk.metadata b/parser/Gtk.metadata index 30a5d4ec9..801d79cf1 100644 --- a/parser/Gtk.metadata +++ b/parser/Gtk.metadata @@ -237,6 +237,17 @@ + + + Focus + + + + name + Focused + + + SizeAllocate @@ -598,6 +609,15 @@ Activate + + Activate + + + Activate + + + Activate + name @@ -1068,6 +1088,32 @@ + + + SetScrollAdjustments + + + SetScrollAdjustments + + + SetScrollAdjustments + + + SetScrollAdjustments + + + SetScrollAdjustments + + + SetScrollAdjustments + + + + name + ScrollAdjustmentsSet + + + Command @@ -1079,6 +1125,21 @@ + + + + + Destroyed + + + + hidden + 1 + + + + + PackStartDefaults diff --git a/parser/build.pl b/parser/build.pl index 7256e0c63..1d74ba179 100755 --- a/parser/build.pl +++ b/parser/build.pl @@ -9,10 +9,10 @@ unlink ($file); "gtk+-2.0.3/gdk" => "Gdk:gdk-x11-2.0", "gtk+-2.0.3/gdk-pixbuf" => "Gdk:gdk_pixbuf-2.0", "gtk+-2.0.3/gtk" => "Gtk:gtk-x11-2.0", - "libgnome-2.0.1/libgnome" => "Gnome:libgnome-2", - "libgnomecanvas-2.0.1/libgnomecanvas" => "Gnome:libgnomecanvas-2", - "libgnomeui-2.0.1/libgnomeui" => "Gnome:libgnomeui-2", - "gtkhtml/src" => "Gtk:libgtkhtml-3.0"); + "libgnome-2.0.1/libgnome" => "Gnome:gnome-2", + "libgnomecanvas-2.0.1/libgnomecanvas" => "Gnome:gnomecanvas-2", + "libgnomeui-2.0.1/libgnomeui" => "Gnome:gnomeui-2", + "gtkhtml/src" => "Gtk:gtkhtml-3.0"); foreach $dir (keys %srcs) { ($ns, $lib) = split (/:/, $srcs{$dir}); diff --git a/parser/gapi2xml.pl b/parser/gapi2xml.pl index 4b3608ca8..a0857ed9c 100755 --- a/parser/gapi2xml.pl +++ b/parser/gapi2xml.pl @@ -385,6 +385,9 @@ sub addFieldElems next if ($field !~ /\S/); $field =~ s/\s+(\*+)/\1 /g; $field =~ s/const /const\-/g; + $field =~ s/.*\*\///g; + next if ($field !~ /\S/); + if ($field =~ /(\S+\s+\*?)\(\*\s*(.+)\)\s*\((.*)\)/) { $elem = addNameElem($parent, 'callback', $2); addReturnElem($elem, $1); @@ -539,7 +542,7 @@ sub addPropElem if ($defines{$name}) { $name = $defines{$name}; } else { - $name =~ s/\"//g; + $name =~ s/\s*\"//g; } while ($params[2] !~ /(\"|NULL)\s*\)?$/) { @@ -548,7 +551,7 @@ sub addPropElem @params = (@params[0..2],@params[4..$#params]); } $docs = $params[2]; - $docs =~ s/\"//g; + $docs =~ s/\s*\"//g; $docs =~ s/\s+/ /g; $mode = $params[$#params]; diff --git a/sources/Gnome.metadata b/sources/Gnome.metadata index 5f13a380e..1b2581313 100644 --- a/sources/Gnome.metadata +++ b/sources/Gnome.metadata @@ -134,6 +134,34 @@ + + + Activate + + + + name + Activated + + + + + + + + GnomeEntry + GtkEntry + + + PickDialog + + + + hidden + 1 + + + diff --git a/sources/Gtk.metadata b/sources/Gtk.metadata index 30a5d4ec9..801d79cf1 100644 --- a/sources/Gtk.metadata +++ b/sources/Gtk.metadata @@ -237,6 +237,17 @@ + + + Focus + + + + name + Focused + + + SizeAllocate @@ -598,6 +609,15 @@ Activate + + Activate + + + Activate + + + Activate + name @@ -1068,6 +1088,32 @@ + + + SetScrollAdjustments + + + SetScrollAdjustments + + + SetScrollAdjustments + + + SetScrollAdjustments + + + SetScrollAdjustments + + + SetScrollAdjustments + + + + name + ScrollAdjustmentsSet + + + Command @@ -1079,6 +1125,21 @@ + + + + + Destroyed + + + + hidden + 1 + + + + + PackStartDefaults