* updater/updater.cs (Compare): handle BaseType changes

(Generate, AddTypeSignature): fix spelling of "delegate"
 
        * en/*: regenerate to update BaseType nodes

svn path=/trunk/gtk-sharp/; revision=40721
This commit is contained in:
Dan Winship 2005-02-15 21:53:03 +00:00
parent 14ae0b1953
commit fec5eff891
44 changed files with 120 additions and 86 deletions

View file

@ -1,3 +1,10 @@
2005-02-15 Dan Winship <danw@novell.com>
* updater/updater.cs (Compare): handle BaseType changes
(Generate, AddTypeSignature): fix spelling of "delegate"
* en/*: regenerate to update BaseType nodes
2005-02-11 Dan Winship <danw@novell.com>
* en/Gtk/Widget.xml (StyleGetValist, StyleGetProperty): update

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -22,7 +22,7 @@ One interesting thing about Gda.Command's is that they can be reused over and ov
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks>To be added</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -18,7 +18,7 @@ Management of parameters. Parameters are the way clients have to send an unlimi
<remarks>To be added</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks>The <see cref="T:Gdk.Cursor" /> represents cursors.</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks>This class is equivalent to the GdkEventAny structure in the C API.</remarks>
</Docs>
<Base>
<BaseTypeName>GLib.Boxed</BaseTypeName>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -107,7 +107,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -24,7 +24,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks>To be added</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks>None.</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -19,7 +19,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>Gdk.Event</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks>To be added</remarks>
</Docs>
<Base>
<BaseTypeName>GLib.Opaque</BaseTypeName>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces>
<Interface>

View file

@ -14,7 +14,7 @@
<remarks>Mostly for internal use.</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks />
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks>To be added</remarks>
</Docs>
<Base>
<BaseTypeName>GLib.Opaque</BaseTypeName>
<BaseTypeName>GLib.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>

View file

@ -14,7 +14,7 @@
<remarks />
</Docs>
<Base>
<BaseTypeName>System.Exception</BaseTypeName>
<BaseTypeName>System.SystemException</BaseTypeName>
</Base>
<Interfaces>
<Interface>
@ -32,7 +32,8 @@
<Docs>
<summary>The type of delegate that was supposed to be connected to the signal.</summary>
<returns>a <see cref="T:System.Type" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="SignalName">
@ -44,7 +45,8 @@
<Docs>
<summary>The name of the signal that was supposed to be connected.</summary>
<returns>a <see cref="T:System.String" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="HandlerName">
@ -56,7 +58,8 @@
<Docs>
<summary>The name of the handler that was supposed to be connected.</summary>
<returns>a <see cref="T:System.String" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="Event">
@ -68,7 +71,8 @@
<Docs>
<summary>Information about the event.</summary>
<returns>a <see cref="T:System.Reflection.EventInfo" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
@ -88,7 +92,8 @@
<param name="evnt">a <see cref="T:System.Reflection.EventInfo" /></param>
<param name="delegate_type">a <see cref="T:System.Type" /></param>
<returns>a <see cref="T:Glade.HandlerNotFoundException" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
@ -104,7 +109,8 @@
<param name="info">a <see cref="T:System.Runtime.Serialization.SerializationInfo" /></param>
<param name="context">a <see cref="T:System.Runtime.Serialization.StreamingContext" /></param>
<returns>a <see cref="T:Glade.HandlerNotFoundException" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
@ -126,7 +132,8 @@
<param name="delegate_type">a <see cref="T:System.Type" /></param>
<param name="inner">a <see cref="T:System.Exception" /></param>
<returns>a <see cref="T:Glade.HandlerNotFoundException" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="GetObjectData">
@ -143,7 +150,8 @@
<summary>Returns details about the object the handler was connected to.</summary>
<param name="info">a <see cref="T:System.Runtime.Serialization.SerializationInfo" /></param>
<param name="context">a <see cref="T:System.Runtime.Serialization.StreamingContext" /></param>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
</Members>

View file

@ -14,7 +14,7 @@
<remarks>To be added</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks>To be added</remarks>
</Docs>
<Base>
<BaseTypeName>GLib.Object</BaseTypeName>
<BaseTypeName>Gtk.IconTheme</BaseTypeName>
</Base>
<Interfaces>
<Interface>

View file

@ -14,7 +14,7 @@
<remarks>This class's C version is only used internally by gtkobject.c.</remarks>
</Docs>
<Base>
<BaseTypeName>GLib.Opaque</BaseTypeName>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces>
<Interface>
@ -33,7 +33,8 @@
</Parameters>
<Docs>
<summary>Do not use.</summary>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="Type">
@ -46,7 +47,8 @@
</Parameters>
<Docs>
<summary>Do not use.</summary>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="Name">
@ -59,7 +61,8 @@
</Parameters>
<Docs>
<summary>Do not use.</summary>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="CharData">
@ -72,7 +75,8 @@
</Parameters>
<Docs>
<summary>Do not use.</summary>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName="New">
@ -88,7 +92,8 @@
<summary>Do not use.</summary>
<param name="raw">a <see cref="T:System.IntPtr" /></param>
<returns>a <see cref="T:Gtk.Arg" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
</Members>

View file

@ -10,10 +10,11 @@
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Docs>
<summary>A child of a <see cref="T:Gtk.ButtonBox" />, used to interact with its container child properties.</summary>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
<Base>
<BaseTypeName>Gtk.Container+ContainerChild</BaseTypeName>
<BaseTypeName>Gtk.Box+BoxChild</BaseTypeName>
</Base>
<Interfaces />
<Attributes />
@ -28,11 +29,10 @@
<Docs>
<summary>Whether or not the child should appear in a secondary group of children</summary>
<returns>
<see langword="true" /> or <see langword="false" />
</returns>
<see langword="true" /> or <see langword="false" /></returns>
<remarks>
<para>A secondary group appears after the other children if the style is <see cref="P:Gtk.ButtonBoxStyle.Start" />, <see cref="P:Gtk.ButtonBoxStyle.Spread" /> or <see cref="P:Gtk.ButtonBoxStyle.Edge" />, and before the the other children if the style is <see cref="P:Gtk.ButtonBoxStyle.End" />. For horizontal button boxes, the definition of before/after depends on direction of the widget (see <see cref="P:Gtk.Widget.Direction" />). If the style is <see cref="P:Gtk.ButtonBoxStyle.Start" /> or <see cref="P:Gtk.ButtonBoxStyle.End" />, then the secondary children are aligned at the other end of the button box from the main children. For the other styles, they appear immediately next to the main children.</para>
</remarks>
</remarks>
</Docs>
</Member>
</Members>

View file

@ -21,7 +21,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>GLib.Opaque</BaseTypeName>
<BaseTypeName>GLib.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>

View file

@ -14,7 +14,7 @@
<remarks />
</Docs>
<Base>
<BaseTypeName>GLib.Opaque</BaseTypeName>
<BaseTypeName>Gtk.Bin</BaseTypeName>
</Base>
<Interfaces>
<Interface>

View file

@ -14,7 +14,7 @@
<remarks>TODO: needs examples.</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -25,7 +25,7 @@
</remarks>
</Docs>
<Base>
<BaseTypeName>Gtk.Progress</BaseTypeName>
<BaseTypeName>Gtk.Widget</BaseTypeName>
</Base>
<Interfaces>
<Interface>
@ -275,7 +275,8 @@
<Docs>
<summary>Update the progress bar with a new percentage-done.</summary>
<param name="percentage">a <see cref="T:System.Double" />, the percentage completed this bar should display.</param>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
@ -289,7 +290,8 @@
<summary>Public constructor.</summary>
<param name="adjustment">a <see cref="T:Gtk.Adjustment" /></param>
<returns>a <see cref="T:Gtk.ProgressBar" /></returns>
<remarks></remarks>
<remarks>
</remarks>
</Docs>
</Member>
</Members>

View file

@ -14,7 +14,7 @@
<remarks />
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks />
</Docs>
<Base>
<BaseTypeName>Glib.Opaque</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks />
</Docs>
<Base>
<BaseTypeName>GLib.Object</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces>
<Interface>

View file

@ -14,7 +14,7 @@
<remarks>The <see cref="T:Pango.EngineLang" /> is implemented by engines that customize the rendering-system independent part of the Pango pipeline for a particular script or language. For instance, a custom <see cref="T:Pango.EngineLang" /> could be provided for Thai to implement the dictionary-based word boundary lookups needed for that language.</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks>The <see cref="T:Pango.EngineShape" /> class is implemented by engines that customize the rendering-system dependent part of the Pango pipeline for a particular script or language. A <see cref="T:Pango.EngineShape" /> implementation is then specific to both a particular rendering system or group of rendering systems and to a particular script. For instance, there is one <see cref="T:Pango.EngineShape" /> implementation to handling shaping Arabic for Fontconfig-based backends.</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -14,7 +14,7 @@
<remarks />
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -15,7 +15,7 @@
<see cref="T:Pango.LayoutLine" />s are obtained by calling <see cref="M:Pango.Layout.GetLine(System.Int32)" /> and are only valid until the text, attributes, or settings of the parent <see cref="T:Pango.Layout" /> are modified.</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
<BaseTypeName>GLib.Opaque</BaseTypeName>
</Base>
<Interfaces />
<Attributes />

View file

@ -153,6 +153,12 @@ class Updater {
if (!t.IsAbstract && typeof (System.Delegate).IsAssignableFrom (t))
return CompareDelegate (t, doc);
XmlNode base_type = doc.SelectSingleNode ("/Type/Base/BaseTypeName");
if (base_type != null && base_type.InnerText != GetBaseType (t)) {
base_type.InnerText = GetBaseType (t);
changed = true;
}
TypeReflector reflector = new TypeReflector (t);
changed |= Compare (doc, MemberType.Field, reflector.Fields, GetNodesOfType (doc, "Field"));
changed |= Compare (doc, MemberType.Property, reflector.Properties, GetNodesOfType (doc, "Property"));
@ -519,8 +525,8 @@ class Updater {
XmlDocument Generate (Type type)
{
bool isDelagate;
string signature = AddTypeSignature (type, out isDelagate);
bool isDelegate;
string signature = AddTypeSignature (type, out isDelegate);
if (signature == null)
return null;
@ -607,17 +613,9 @@ class Updater {
XmlElement base_node = document.CreateElement ("Base");
type_node.AppendChild (base_node);
if (type.IsEnum)
base_node.AppendChild (AddElement (document, "BaseTypeName", "System.Enum"));
else if (type.IsValueType)
base_node.AppendChild (AddElement (document, "BaseTypeName", "System.ValueType"));
else if (isDelagate)
base_node.AppendChild (AddElement (document, "BaseTypeName", "System.Delegate"));
else if (type.IsClass && type != typeof (object))
base_node.AppendChild (AddElement (document, "BaseTypeName", type.BaseType.FullName));
string base_type = GetBaseType (type);
if (base_type != null)
base_node.AppendChild (AddElement (document, "BaseTypeName", base_type));
//
// <Interfaces>
@ -653,7 +651,7 @@ class Updater {
//
// delegates have an empty <Members> element.
//
if (isDelagate)
if (isDelegate)
members = document.CreateElement ("Members");
else
members = AddMembersNode (document, type);
@ -663,7 +661,7 @@ class Updater {
//
// delegates have a top-level parameters and return value section
//
if (isDelagate) {
if (isDelegate) {
System.Reflection.MethodInfo method = type.GetMethod ("Invoke");
Type return_type = method.ReturnType;
ParameterInfo [] parameters = method.GetParameters ();
@ -1009,6 +1007,20 @@ class Updater {
throw new ArgumentException ();
}
string GetBaseType (Type t)
{
if (t.IsEnum)
return "System.Enum";
else if (t.IsValueType)
return "System.ValueType";
else if (!t.IsAbstract && typeof (System.Delegate).IsAssignableFrom (t))
return "System.Delegate";
else if (t.IsClass && t != typeof (object))
return t.BaseType.FullName;
else
return null;
}
string GetTypeVisibility (TypeAttributes ta)
{
switch (ta & TypeAttributes.VisibilityMask){
@ -1026,10 +1038,10 @@ class Updater {
}
}
string AddTypeSignature (Type type, out bool isDelagate)
string AddTypeSignature (Type type, out bool isDelegate)
{
// Assume it is not a delegate
isDelagate = false;
isDelegate = false;
if (type == null)
return null;
@ -1061,7 +1073,7 @@ class Updater {
//
if (kind == "class" && !type.IsAbstract &&
typeof (System.Delegate).IsAssignableFrom (type)) {
isDelagate = true;
isDelegate = true;
return AddDelegateSignature (visibility, modifiers, name, type);
}