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:
parent
2ac0a2cc89
commit
d837953e6c
6 changed files with 54 additions and 10 deletions
|
@ -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>
|
2002-07-19 Duncan Mak <duncan@ximian.com>
|
||||||
|
|
||||||
* gtk/Paned.custom:
|
* gtk/Paned.custom:
|
||||||
|
|
|
@ -106,8 +106,10 @@ namespace GtkSharp.Generation {
|
||||||
if (initialized)
|
if (initialized)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (parms != null && !parms.Validate ())
|
if (parms != null && !parms.Validate ()) {
|
||||||
return false;
|
Console.Write ("in method " + Name + " ");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
XmlElement ret_elem = elem["return-type"];
|
XmlElement ret_elem = elem["return-type"];
|
||||||
if (ret_elem == null) {
|
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)) {
|
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)
|
if (dup != null && dup.parms != null)
|
||||||
dup.parms.CreateSignature (false);
|
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)))
|
if (dup != null && ((dup.parms != null && dup.parms.Signature == parms.Signature) || (dup.parms == null && parms == null)))
|
||||||
sw.Write("new ");
|
sw.Write("new ");
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,29 +140,37 @@ namespace GtkSharp.Generation {
|
||||||
string parent = Elem.GetAttribute("parent");
|
string parent = Elem.GetAttribute("parent");
|
||||||
string cs_parent = SymbolTable.GetCSType(parent);
|
string cs_parent = SymbolTable.GetCSType(parent);
|
||||||
if (cs_parent == "") {
|
if (cs_parent == "") {
|
||||||
Console.WriteLine ("Object " + Name + " Unknown parent " + parent);
|
Console.WriteLine ("Object " + QualifiedName + " Unknown parent " + parent);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctors != null)
|
if (ctors != null)
|
||||||
foreach (Ctor ctor in ctors)
|
foreach (Ctor ctor in ctors)
|
||||||
if (!ctor.Validate())
|
if (!ctor.Validate()) {
|
||||||
|
Console.WriteLine ("in Object " + QualifiedName);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (props != null)
|
if (props != null)
|
||||||
foreach (Property prop in props.Values)
|
foreach (Property prop in props.Values)
|
||||||
if (!prop.Validate())
|
if (!prop.Validate()) {
|
||||||
|
Console.WriteLine ("in Object " + QualifiedName);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (sigs != null)
|
if (sigs != null)
|
||||||
foreach (Signal sig in sigs.Values)
|
foreach (Signal sig in sigs.Values)
|
||||||
if (!sig.Validate())
|
if (!sig.Validate()) {
|
||||||
|
Console.WriteLine ("in Object " + QualifiedName);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (methods != null)
|
if (methods != null)
|
||||||
foreach (Method method in methods.Values)
|
foreach (Method method in methods.Values)
|
||||||
if (!method.Validate())
|
if (!method.Validate()) {
|
||||||
|
Console.WriteLine ("in Object " + QualifiedName);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (SymbolTable.GetCSType(parent) == null)
|
if (SymbolTable.GetCSType(parent) == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -114,6 +114,12 @@ namespace GtkSharp.Generation {
|
||||||
}
|
}
|
||||||
|
|
||||||
XmlElement p_elem = (XmlElement) parm;
|
XmlElement p_elem = (XmlElement) parm;
|
||||||
|
|
||||||
|
if (p_elem.HasAttribute("ellipsis")) {
|
||||||
|
Console.Write("Ellipsis parameter ");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
string type = p_elem.GetAttribute("type");
|
string type = p_elem.GetAttribute("type");
|
||||||
string cs_type = SymbolTable.GetCSType(type);
|
string cs_type = SymbolTable.GetCSType(type);
|
||||||
string m_type = SymbolTable.GetMarshalType(type);
|
string m_type = SymbolTable.GetMarshalType(type);
|
||||||
|
|
|
@ -673,6 +673,7 @@
|
||||||
<property name="Anchor" cname="anchor" type="GtkAnchorType" doc-string=" NULL" readable="true" writeable="true"/>
|
<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"/>
|
<property name="SizePixels" cname="size_pixels" type="gboolean" doc-string=" NULL" readable="true" writeable="true"/>
|
||||||
</object>
|
</object>
|
||||||
|
<struct name="CanvasBpathPriv" cname="GnomeCanvasBpathPriv" opaque="true"/>
|
||||||
<struct name="CanvasPathDef" cname="GnomeCanvasPathDef" opaque="true">
|
<struct name="CanvasPathDef" cname="GnomeCanvasPathDef" opaque="true">
|
||||||
<method name="Unref" cname="gnome_canvas_path_def_unref">
|
<method name="Unref" cname="gnome_canvas_path_def_unref">
|
||||||
<return-type type="void"/>
|
<return-type type="void"/>
|
||||||
|
@ -3028,6 +3029,7 @@
|
||||||
<field cname="changed_mask" type="GdkWindowState"/>
|
<field cname="changed_mask" type="GdkWindowState"/>
|
||||||
<field cname="new_window_state" type="GdkWindowState"/>
|
<field cname="new_window_state" type="GdkWindowState"/>
|
||||||
</struct>
|
</struct>
|
||||||
|
<boxed name="Font" cname="GdkFont" opaque="true"/>
|
||||||
<struct name="GCValues" cname="GdkGCValues">
|
<struct name="GCValues" cname="GdkGCValues">
|
||||||
<field cname="foreground" type="GdkColor"/>
|
<field cname="foreground" type="GdkColor"/>
|
||||||
<field cname="background" type="GdkColor"/>
|
<field cname="background" type="GdkColor"/>
|
||||||
|
@ -3245,6 +3247,7 @@
|
||||||
<return-type type="void"/>
|
<return-type type="void"/>
|
||||||
</method>
|
</method>
|
||||||
</struct>
|
</struct>
|
||||||
|
<struct name="Screen" cname="GdkScreen" opaque="true"/>
|
||||||
<struct name="Segment" cname="GdkSegment">
|
<struct name="Segment" cname="GdkSegment">
|
||||||
<field cname="x1" type="gint"/>
|
<field cname="x1" type="gint"/>
|
||||||
<field cname="y1" type="gint"/>
|
<field cname="y1" type="gint"/>
|
||||||
|
@ -12934,6 +12937,7 @@
|
||||||
<field cname="accel_flags" bits="16" type="guint"/>
|
<field cname="accel_flags" bits="16" type="guint"/>
|
||||||
</struct>
|
</struct>
|
||||||
<alias name="Allocation" cname="GtkAllocation" type="GdkRectangle "/>
|
<alias name="Allocation" cname="GtkAllocation" type="GdkRectangle "/>
|
||||||
|
<struct name="Arg" cname="GtkArg" opaque="true"/>
|
||||||
<struct name="BindingArg" cname="GtkBindingArg">
|
<struct name="BindingArg" cname="GtkBindingArg">
|
||||||
<field cname="arg_type" type="GtkType"/>
|
<field cname="arg_type" type="GtkType"/>
|
||||||
<field cname="{glong long_data" type="union"/>
|
<field cname="{glong long_data" type="union"/>
|
||||||
|
@ -13255,6 +13259,7 @@
|
||||||
<field cname="parent_tree" type="GtkRBTree*"/>
|
<field cname="parent_tree" type="GtkRBTree*"/>
|
||||||
<field cname="parent_node" type="GtkRBNode*"/>
|
<field cname="parent_node" type="GtkRBNode*"/>
|
||||||
</struct>
|
</struct>
|
||||||
|
<struct name="RBTreeView" cname="GtkRBTreeView" opaque="true"/>
|
||||||
<struct name="RangeLayout" cname="GtkRangeLayout" opaque="true"/>
|
<struct name="RangeLayout" cname="GtkRangeLayout" opaque="true"/>
|
||||||
<struct name="RangeStepTimer" cname="GtkRangeStepTimer" opaque="true"/>
|
<struct name="RangeStepTimer" cname="GtkRangeStepTimer" opaque="true"/>
|
||||||
<struct name="RcContext" cname="GtkRcContext" opaque="true"/>
|
<struct name="RcContext" cname="GtkRcContext" opaque="true"/>
|
||||||
|
@ -13480,6 +13485,7 @@
|
||||||
</method>
|
</method>
|
||||||
</boxed>
|
</boxed>
|
||||||
<struct name="TextBTree" cname="GtkTextBTree" opaque="true"/>
|
<struct name="TextBTree" cname="GtkTextBTree" opaque="true"/>
|
||||||
|
<struct name="TextCounter" cname="GtkTextCounter" opaque="true"/>
|
||||||
<boxed name="TextIter" cname="GtkTextIter">
|
<boxed name="TextIter" cname="GtkTextIter">
|
||||||
<field cname="dummy1" type="gpointer"/>
|
<field cname="dummy1" type="gpointer"/>
|
||||||
<field cname="dummy2" type="gpointer"/>
|
<field cname="dummy2" type="gpointer"/>
|
||||||
|
@ -16157,6 +16163,7 @@
|
||||||
</parameters>
|
</parameters>
|
||||||
</method>
|
</method>
|
||||||
</object>
|
</object>
|
||||||
|
<struct name="AppBarMsg" cname="GnomeAppBarMsg" opaque="true"/>
|
||||||
<struct name="GdkPixbufAsyncHandle" cname="GnomeGdkPixbufAsyncHandle" opaque="true"/>
|
<struct name="GdkPixbufAsyncHandle" cname="GnomeGdkPixbufAsyncHandle" opaque="true"/>
|
||||||
<struct name="UIBuilderData" cname="GnomeUIBuilderData">
|
<struct name="UIBuilderData" cname="GnomeUIBuilderData">
|
||||||
<field cname="connect_func" type="GnomeUISignalConnectFunc"/>
|
<field cname="connect_func" type="GnomeUISignalConnectFunc"/>
|
||||||
|
@ -16983,6 +16990,7 @@
|
||||||
</parameters>
|
</parameters>
|
||||||
</method>
|
</method>
|
||||||
</object>
|
</object>
|
||||||
|
<struct name="HTMLClassProperties" cname="GtkHTMLClassProperties" opaque="true"/>
|
||||||
<struct name="HTMLEditorAPI" cname="GtkHTMLEditorAPI">
|
<struct name="HTMLEditorAPI" cname="GtkHTMLEditorAPI">
|
||||||
<callback cname="check_word">
|
<callback cname="check_word">
|
||||||
<return-type type="gboolean"/>
|
<return-type type="gboolean"/>
|
||||||
|
@ -17033,6 +17041,8 @@
|
||||||
</parameters>
|
</parameters>
|
||||||
</callback>
|
</callback>
|
||||||
</struct>
|
</struct>
|
||||||
|
<struct name="HTMLEmbedded" cname="GtkHTMLEmbedded" opaque="true"/>
|
||||||
|
<struct name="HTMLEmbeddedClass" cname="GtkHTMLEmbeddedClass" opaque="true"/>
|
||||||
<struct name="HTMLStream" cname="GtkHTMLStream">
|
<struct name="HTMLStream" cname="GtkHTMLStream">
|
||||||
<field cname="write_func" type="GtkHTMLStreamWriteFunc"/>
|
<field cname="write_func" type="GtkHTMLStreamWriteFunc"/>
|
||||||
<field cname="close_func" type="GtkHTMLStreamCloseFunc"/>
|
<field cname="close_func" type="GtkHTMLStreamCloseFunc"/>
|
||||||
|
@ -19364,6 +19374,17 @@
|
||||||
</parameters>
|
</parameters>
|
||||||
</method>
|
</method>
|
||||||
</struct>
|
</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">
|
<struct name="LayoutIter" cname="PangoLayoutIter" opaque="true">
|
||||||
<method name="GetRunExtents" cname="pango_layout_iter_get_run_extents">
|
<method name="GetRunExtents" cname="pango_layout_iter_get_run_extents">
|
||||||
<return-type type="void"/>
|
<return-type type="void"/>
|
||||||
|
@ -19522,6 +19543,8 @@
|
||||||
<field cname="info" type="PangoEngineInfo*"/>
|
<field cname="info" type="PangoEngineInfo*"/>
|
||||||
<field cname="is_exact" type="gboolean"/>
|
<field cname="is_exact" type="gboolean"/>
|
||||||
</struct>
|
</struct>
|
||||||
|
<struct name="OTInfo" cname="PangoOTInfo" opaque="true"/>
|
||||||
|
<struct name="OTRuleset" cname="PangoOTRuleset" opaque="true"/>
|
||||||
<alias name="OTTag" cname="PangoOTTag" type="guint32 "/>
|
<alias name="OTTag" cname="PangoOTTag" type="guint32 "/>
|
||||||
<struct name="Rectangle" cname="PangoRectangle">
|
<struct name="Rectangle" cname="PangoRectangle">
|
||||||
<field cname="x" type="int"/>
|
<field cname="x" type="int"/>
|
||||||
|
|
|
@ -320,8 +320,7 @@ foreach $key (sort (keys (%types))) {
|
||||||
if (exists($sdefs{$type})) {
|
if (exists($sdefs{$type})) {
|
||||||
$def = $sdefs{$type};
|
$def = $sdefs{$type};
|
||||||
} else {
|
} else {
|
||||||
warn "Couldn't find $type\n" if $debug;
|
$def = "privatestruct";
|
||||||
next;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exists($boxdefs{$key})) {
|
if (exists($boxdefs{$key})) {
|
||||||
|
|
Loading…
Reference in a new issue