2002-07-20 Mike Kestner <mkestner@speakeasy.net>

* generator/Method.cs : beef up !Validate warnings
	* generator/ObjectGen.cs : beef up !Validate warnings
	* generator/Parameters.cs (Validate): fail on ellipsis parm
	* parser/gapi2xml.pl : Handle more opaque types properly

svn path=/trunk/gtk-sharp/; revision=5965
This commit is contained in:
Mike Kestner 2002-07-20 14:43:48 +00:00
parent 2ac0a2cc89
commit d837953e6c
6 changed files with 54 additions and 10 deletions

View file

@ -1,3 +1,10 @@
2002-07-20 Mike Kestner <mkestner@speakeasy.net>
* generator/Method.cs : beef up !Validate warnings
* generator/ObjectGen.cs : beef up !Validate warnings
* generator/Parameters.cs (Validate): fail on ellipsis parm
* parser/gapi2xml.pl : Handle more opaque types properly
2002-07-19 Duncan Mak <duncan@ximian.com>
* gtk/Paned.custom:

View file

@ -106,8 +106,10 @@ namespace GtkSharp.Generation {
if (initialized)
return true;
if (parms != null && !parms.Validate ())
return false;
if (parms != null && !parms.Validate ()) {
Console.Write ("in method " + Name + " ");
return false;
}
XmlElement ret_elem = elem["return-type"];
if (ret_elem == null) {
@ -182,7 +184,6 @@ namespace GtkSharp.Generation {
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 ");
}

View file

@ -140,29 +140,37 @@ namespace GtkSharp.Generation {
string parent = Elem.GetAttribute("parent");
string cs_parent = SymbolTable.GetCSType(parent);
if (cs_parent == "") {
Console.WriteLine ("Object " + Name + " Unknown parent " + parent);
Console.WriteLine ("Object " + QualifiedName + " Unknown parent " + parent);
return false;
}
if (ctors != null)
foreach (Ctor ctor in ctors)
if (!ctor.Validate())
if (!ctor.Validate()) {
Console.WriteLine ("in Object " + QualifiedName);
return false;
}
if (props != null)
foreach (Property prop in props.Values)
if (!prop.Validate())
if (!prop.Validate()) {
Console.WriteLine ("in Object " + QualifiedName);
return false;
}
if (sigs != null)
foreach (Signal sig in sigs.Values)
if (!sig.Validate())
if (!sig.Validate()) {
Console.WriteLine ("in Object " + QualifiedName);
return false;
}
if (methods != null)
foreach (Method method in methods.Values)
if (!method.Validate())
if (!method.Validate()) {
Console.WriteLine ("in Object " + QualifiedName);
return false;
}
if (SymbolTable.GetCSType(parent) == null)
return false;

View file

@ -114,6 +114,12 @@ namespace GtkSharp.Generation {
}
XmlElement p_elem = (XmlElement) parm;
if (p_elem.HasAttribute("ellipsis")) {
Console.Write("Ellipsis parameter ");
return false;
}
string type = p_elem.GetAttribute("type");
string cs_type = SymbolTable.GetCSType(type);
string m_type = SymbolTable.GetMarshalType(type);

View file

@ -673,6 +673,7 @@
<property name="Anchor" cname="anchor" type="GtkAnchorType" doc-string=" NULL" readable="true" writeable="true"/>
<property name="SizePixels" cname="size_pixels" type="gboolean" doc-string=" NULL" readable="true" writeable="true"/>
</object>
<struct name="CanvasBpathPriv" cname="GnomeCanvasBpathPriv" opaque="true"/>
<struct name="CanvasPathDef" cname="GnomeCanvasPathDef" opaque="true">
<method name="Unref" cname="gnome_canvas_path_def_unref">
<return-type type="void"/>
@ -3028,6 +3029,7 @@
<field cname="changed_mask" type="GdkWindowState"/>
<field cname="new_window_state" type="GdkWindowState"/>
</struct>
<boxed name="Font" cname="GdkFont" opaque="true"/>
<struct name="GCValues" cname="GdkGCValues">
<field cname="foreground" type="GdkColor"/>
<field cname="background" type="GdkColor"/>
@ -3245,6 +3247,7 @@
<return-type type="void"/>
</method>
</struct>
<struct name="Screen" cname="GdkScreen" opaque="true"/>
<struct name="Segment" cname="GdkSegment">
<field cname="x1" type="gint"/>
<field cname="y1" type="gint"/>
@ -12934,6 +12937,7 @@
<field cname="accel_flags" bits="16" type="guint"/>
</struct>
<alias name="Allocation" cname="GtkAllocation" type="GdkRectangle "/>
<struct name="Arg" cname="GtkArg" opaque="true"/>
<struct name="BindingArg" cname="GtkBindingArg">
<field cname="arg_type" type="GtkType"/>
<field cname="{glong long_data" type="union"/>
@ -13255,6 +13259,7 @@
<field cname="parent_tree" type="GtkRBTree*"/>
<field cname="parent_node" type="GtkRBNode*"/>
</struct>
<struct name="RBTreeView" cname="GtkRBTreeView" opaque="true"/>
<struct name="RangeLayout" cname="GtkRangeLayout" opaque="true"/>
<struct name="RangeStepTimer" cname="GtkRangeStepTimer" opaque="true"/>
<struct name="RcContext" cname="GtkRcContext" opaque="true"/>
@ -13480,6 +13485,7 @@
</method>
</boxed>
<struct name="TextBTree" cname="GtkTextBTree" opaque="true"/>
<struct name="TextCounter" cname="GtkTextCounter" opaque="true"/>
<boxed name="TextIter" cname="GtkTextIter">
<field cname="dummy1" type="gpointer"/>
<field cname="dummy2" type="gpointer"/>
@ -16157,6 +16163,7 @@
</parameters>
</method>
</object>
<struct name="AppBarMsg" cname="GnomeAppBarMsg" opaque="true"/>
<struct name="GdkPixbufAsyncHandle" cname="GnomeGdkPixbufAsyncHandle" opaque="true"/>
<struct name="UIBuilderData" cname="GnomeUIBuilderData">
<field cname="connect_func" type="GnomeUISignalConnectFunc"/>
@ -16983,6 +16990,7 @@
</parameters>
</method>
</object>
<struct name="HTMLClassProperties" cname="GtkHTMLClassProperties" opaque="true"/>
<struct name="HTMLEditorAPI" cname="GtkHTMLEditorAPI">
<callback cname="check_word">
<return-type type="gboolean"/>
@ -17033,6 +17041,8 @@
</parameters>
</callback>
</struct>
<struct name="HTMLEmbedded" cname="GtkHTMLEmbedded" opaque="true"/>
<struct name="HTMLEmbeddedClass" cname="GtkHTMLEmbeddedClass" opaque="true"/>
<struct name="HTMLStream" cname="GtkHTMLStream">
<field cname="write_func" type="GtkHTMLStreamWriteFunc"/>
<field cname="close_func" type="GtkHTMLStreamCloseFunc"/>
@ -19364,6 +19374,17 @@
</parameters>
</method>
</struct>
<boxed name="Language" cname="PangoLanguage" opaque="true">
<method name="GetSampleString" cname="pango_language_get_sample_string">
<return-type type="const-char*"/>
</method>
<method name="Matches" cname="pango_language_matches">
<return-type type="gboolean"/>
<parameters>
<parameter type="const-char*" name="range_list"/>
</parameters>
</method>
</boxed>
<struct name="LayoutIter" cname="PangoLayoutIter" opaque="true">
<method name="GetRunExtents" cname="pango_layout_iter_get_run_extents">
<return-type type="void"/>
@ -19522,6 +19543,8 @@
<field cname="info" type="PangoEngineInfo*"/>
<field cname="is_exact" type="gboolean"/>
</struct>
<struct name="OTInfo" cname="PangoOTInfo" opaque="true"/>
<struct name="OTRuleset" cname="PangoOTRuleset" opaque="true"/>
<alias name="OTTag" cname="PangoOTTag" type="guint32 "/>
<struct name="Rectangle" cname="PangoRectangle">
<field cname="x" type="int"/>

View file

@ -320,8 +320,7 @@ foreach $key (sort (keys (%types))) {
if (exists($sdefs{$type})) {
$def = $sdefs{$type};
} else {
warn "Couldn't find $type\n" if $debug;
next;
$def = "privatestruct";
}
if (exists($boxdefs{$key})) {