2002-08-08 Mike Kestner <mkestner@speakeasy.net>

* 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

svn path=/trunk/gtk-sharp/; revision=6556
This commit is contained in:
Mike Kestner 2002-08-09 03:56:27 +00:00
parent 71266c0337
commit 903349cd37
19 changed files with 1057 additions and 26 deletions

View file

@ -1,3 +1,13 @@
2002-08-08 Mike Kestner <mkestner@speakeasy.net>
* 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 <mkestner@speakeasy.net>
* gdk/Event.cs : derived from Boxed, not Object.

View file

@ -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)
{

File diff suppressed because it is too large Load diff

View file

@ -95,6 +95,20 @@ namespace GLib {
}
}
/// <summary>
/// GType Property
/// </summary>
///
/// <remarks>
/// The type associated with this object class.
/// </remarks>
public static int GType {
get {
return 0;
}
}
/// <summary>
/// Handle Property
/// </summary>

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -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)
{
}

View file

@ -1535,6 +1535,15 @@
</attribute>
</data>
</rule>
<rule>
<class name="GtkTreeIter"/>
<data>
<attribute target="class">
<name>opaque</name>
<value>1</value>
</attribute>
</data>
</rule>
<rule>
<class name="GtkTreeModel">
<method>IterNChildren</method>

View file

@ -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) {

View file

@ -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);

View file

@ -1535,6 +1535,15 @@
</attribute>
</data>
</rule>
<rule>
<class name="GtkTreeIter"/>
<data>
<attribute target="class">
<name>opaque</name>
<value>1</value>
</attribute>
</data>
</rule>
<rule>
<class name="GtkTreeModel">
<method>IterNChildren</method>