diff --git a/ChangeLog b/ChangeLog index 3128ed0af..b742a3f76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-08-08 Mike Kestner + + * generator/Method.cs : s/GetType/GetGType. Don't generated static + methods for interfaces. + * glib/Object.cs : add GType prop + * gnome/*.custom : s/Type/GType + * parser/Gtk.metadata : rule to make TreeIter opaque + * parser/gapi2xml.pl : handle interface methods properly + * sample/Fifteen.cs : s/Type/GType + 2002-08-08 Mike Kestner * gdk/Event.cs : derived from Boxed, not Object. diff --git a/generator/Method.cs b/generator/Method.cs index 8788dc1ba..c501da54f 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -32,6 +32,8 @@ namespace GtkSharp.Generation { parms = new Parameters (elem["parameters"]); this.container_type = container_type; this.name = elem.GetAttribute("name"); + if (name == "GetType") + name = "GetGType"; // override library - used in pixbuf API fixage if (elem.HasAttribute ("library")) this.libname = elem.GetAttribute ("library"); @@ -206,6 +208,8 @@ namespace GtkSharp.Generation { Method dup = null; if (Name == "ToString") sw.Write("override "); + else if (Name == "GetGType" && container_type is ObjectGen) + sw.Write("new "); 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); @@ -230,6 +234,9 @@ namespace GtkSharp.Generation { if (!Initialize ()) return; + if (elem.HasAttribute("shared")) + return; + GenerateComments (sw); if (is_get || is_set) @@ -295,6 +302,9 @@ namespace GtkSharp.Generation { if (!Initialize ()) return; + if (implementor != null && elem.HasAttribute("shared")) + return; + /* we are generated by the get Method, if there is one */ if (is_set || is_get) { diff --git a/generator/gtkapi.xml b/generator/gtkapi.xml index 3c8feab62..180cd7ef6 100644 --- a/generator/gtkapi.xml +++ b/generator/gtkapi.xml @@ -1,4 +1,4 @@ - + @@ -4905,6 +4905,21 @@ + + + + + + + + + + + + + + + @@ -4930,9 +4945,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - @@ -4974,6 +5099,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4982,6 +5267,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15227,7 +15552,7 @@ - + @@ -17928,6 +18253,8 @@ + + @@ -18884,13 +19211,259 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18898,8 +19471,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - @@ -18951,6 +19579,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18974,8 +19776,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/glib/Object.cs b/glib/Object.cs index f434d601d..f5d276d52 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -95,6 +95,20 @@ namespace GLib { } } + /// + /// GType Property + /// + /// + /// + /// The type associated with this object class. + /// + + public static int GType { + get { + return 0; + } + } + /// /// Handle Property /// diff --git a/gnome/CanvasBpath.custom b/gnome/CanvasBpath.custom index d744b1a1c..b5002aa70 100644 --- a/gnome/CanvasBpath.custom +++ b/gnome/CanvasBpath.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasBpath (Gnome.CanvasGroup group) : base (group, Type) +public CanvasBpath (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/CanvasClipgroup.custom b/gnome/CanvasClipgroup.custom index d42b16375..115a324c1 100644 --- a/gnome/CanvasClipgroup.custom +++ b/gnome/CanvasClipgroup.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasClipgroup (Gnome.CanvasGroup group) : base (group, Type) +public CanvasClipgroup (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/CanvasEllipse.custom b/gnome/CanvasEllipse.custom index 9ecea43d7..3f727fc39 100644 --- a/gnome/CanvasEllipse.custom +++ b/gnome/CanvasEllipse.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasEllipse (Gnome.CanvasGroup group) : base (group, Type) +public CanvasEllipse (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/CanvasLine.custom b/gnome/CanvasLine.custom index 2daa25c8c..610c5e5a9 100644 --- a/gnome/CanvasLine.custom +++ b/gnome/CanvasLine.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasLine (Gnome.CanvasGroup group) : base (group, Type) +public CanvasLine (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/CanvasPixbuf.custom b/gnome/CanvasPixbuf.custom index d52651e09..caa4f8a3b 100644 --- a/gnome/CanvasPixbuf.custom +++ b/gnome/CanvasPixbuf.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasPixbuf (Gnome.CanvasGroup group) : base (group, Type) +public CanvasPixbuf (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/CanvasPolygon.custom b/gnome/CanvasPolygon.custom index 5c53013ae..b5963dadc 100644 --- a/gnome/CanvasPolygon.custom +++ b/gnome/CanvasPolygon.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasPolygon (Gnome.CanvasGroup group) : base (group, Type) +public CanvasPolygon (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/CanvasRect.custom b/gnome/CanvasRect.custom index ef3833fa1..5241f418e 100644 --- a/gnome/CanvasRect.custom +++ b/gnome/CanvasRect.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasRect (Gnome.CanvasGroup group) : base (group, Type) +public CanvasRect (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/CanvasRichText.custom b/gnome/CanvasRichText.custom index 1151121ee..42a475241 100644 --- a/gnome/CanvasRichText.custom +++ b/gnome/CanvasRichText.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasRichText (Gnome.CanvasGroup group) : base (group, Type) +public CanvasRichText (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/CanvasText.custom b/gnome/CanvasText.custom index 635dadeef..e7efc2711 100644 --- a/gnome/CanvasText.custom +++ b/gnome/CanvasText.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasText (Gnome.CanvasGroup group) : base (group, Type) +public CanvasText (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/CanvasWidget.custom b/gnome/CanvasWidget.custom index cfc611caa..68f94a0d2 100644 --- a/gnome/CanvasWidget.custom +++ b/gnome/CanvasWidget.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public CanvasWidget (Gnome.CanvasGroup group) : base (group, Type) +public CanvasWidget (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/gnome/IconTextItem.custom b/gnome/IconTextItem.custom index 1d76c6e38..81132bdc0 100644 --- a/gnome/IconTextItem.custom +++ b/gnome/IconTextItem.custom @@ -8,7 +8,7 @@ // This code is inserted after the automatically generated code. // -public IconTextItem (Gnome.CanvasGroup group) : base (group, Type) +public IconTextItem (Gnome.CanvasGroup group) : base (group, GType) { } diff --git a/parser/Gtk.metadata b/parser/Gtk.metadata index f23dcf303..7729e84e9 100644 --- a/parser/Gtk.metadata +++ b/parser/Gtk.metadata @@ -1535,6 +1535,15 @@ + + + + + opaque + 1 + + + IterNChildren diff --git a/parser/gapi2xml.pl b/parser/gapi2xml.pl index 31648f142..c3317e118 100755 --- a/parser/gapi2xml.pl +++ b/parser/gapi2xml.pl @@ -235,7 +235,8 @@ foreach $type (sort(keys(%ifaces))) { $ifacecnt++; $iface_el = addNameElem($ns_elem, 'interface', $inst, $ns); - addFuncElems($iface_el, $inst); + + $elem_table{lc($inst)} = $iface_el; $classdef = $sdefs{$1} if ($ifacetype =~ /struct\s+(\w+)/); if ($initfunc) { diff --git a/sample/Fifteen.cs b/sample/Fifteen.cs index 920f31b9b..b63a2688a 100644 --- a/sample/Fifteen.cs +++ b/sample/Fifteen.cs @@ -185,7 +185,7 @@ public class BoardPiece : Gnome.CanvasGroup public static bool Debug = false; public BoardPiece (CanvasGroup group, BoardPiece [] board, int x, int y, int i) - : base (group, CanvasGroup.Type) + : base (group, CanvasGroup.GType) { this.X = (x * PIECE_SIZE); this.Y = (y * PIECE_SIZE); diff --git a/sources/Gtk.metadata b/sources/Gtk.metadata index f23dcf303..7729e84e9 100644 --- a/sources/Gtk.metadata +++ b/sources/Gtk.metadata @@ -1535,6 +1535,15 @@ + + + + + opaque + 1 + + + IterNChildren