2005-03-29 Mike Kestner <mkestner@novell.com>

* gtk/TreeStore.custom : fix a CLS incompliance in the Append
	Prepend, Insert, InsertBefore, and InsertAfter methods by obsoleting
	them and adding new *Node methods that are CLS compliant.
	[Fixes #73876]

svn path=/trunk/gtk-sharp/; revision=42355
This commit is contained in:
Mike Kestner 2005-03-29 21:12:32 +00:00
parent 639c24e0de
commit 1256fdb2c1
4 changed files with 322 additions and 23 deletions

View file

@ -1,3 +1,10 @@
2005-03-29 Mike Kestner <mkestner@novell.com>
* gtk/TreeStore.custom : fix a CLS incompliance in the Append
Prepend, Insert, InsertBefore, and InsertAfter methods by obsoleting
them and adding new *Node methods that are CLS compliant.
[Fixes #73876]
2005-03-29 Mike Kestner <mkestner@novell.com>
* generator/Parser.cs : add symbol type='marshal' support.

View file

@ -1584,5 +1584,165 @@ store = new TreeStore (typeof (int), typeof (string));
</remarks>
</Docs>
</Member>
<Member MemberName="AppendNode">
<MemberSignature Language="C#" Value="public Gtk.TreeIter AppendNode ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Appends a root node to the store.</summary>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="AppendNode">
<MemberSignature Language="C#" Value="public Gtk.TreeIter AppendNode (Gtk.TreeIter parent);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="parent" Type="Gtk.TreeIter" />
</Parameters>
<Docs>
<summary>Appends a child to an existing node.</summary>
<param name="parent">a <see cref="T:Gtk.TreeIter" /></param>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="InsertNode">
<MemberSignature Language="C#" Value="public Gtk.TreeIter InsertNode (Gtk.TreeIter parent, int position);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="parent" Type="Gtk.TreeIter" />
<Parameter Name="position" Type="System.Int32" />
</Parameters>
<Docs>
<summary>Inserts a child of an existing node.</summary>
<param name="parent">a <see cref="T:Gtk.TreeIter" /></param>
<param name="position">a <see cref="T:System.Int32" /></param>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="InsertNode">
<MemberSignature Language="C#" Value="public Gtk.TreeIter InsertNode (int position);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="position" Type="System.Int32" />
</Parameters>
<Docs>
<summary>Inserts a root node.</summary>
<param name="position">a <see cref="T:System.Int32" /></param>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="PrependNode">
<MemberSignature Language="C#" Value="public Gtk.TreeIter PrependNode (Gtk.TreeIter parent);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="parent" Type="Gtk.TreeIter" />
</Parameters>
<Docs>
<summary>Prepends a child of an existing node.</summary>
<param name="parent">a <see cref="T:Gtk.TreeIter" /></param>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="PrependNode">
<MemberSignature Language="C#" Value="public Gtk.TreeIter PrependNode ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Prepends a root node.</summary>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="InsertNodeBefore">
<MemberSignature Language="C#" Value="public Gtk.TreeIter InsertNodeBefore (Gtk.TreeIter sibling);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sibling" Type="Gtk.TreeIter" />
</Parameters>
<Docs>
<summary>Inserts a root node before a sibling.</summary>
<param name="sibling">a <see cref="T:Gtk.TreeIter" /></param>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="InsertNodeBefore">
<MemberSignature Language="C#" Value="public Gtk.TreeIter InsertNodeBefore (Gtk.TreeIter parent, Gtk.TreeIter sibling);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="parent" Type="Gtk.TreeIter" />
<Parameter Name="sibling" Type="Gtk.TreeIter" />
</Parameters>
<Docs>
<summary>Inserts a child of an existing node before a sibling.</summary>
<param name="parent">a <see cref="T:Gtk.TreeIter" /></param>
<param name="sibling">a <see cref="T:Gtk.TreeIter" /></param>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="InsertNodeAfter">
<MemberSignature Language="C#" Value="public Gtk.TreeIter InsertNodeAfter (Gtk.TreeIter sibling);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sibling" Type="Gtk.TreeIter" />
</Parameters>
<Docs>
<summary>Inserts a root node after a sibling.</summary>
<param name="sibling">a <see cref="T:Gtk.TreeIter" /></param>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
<Member MemberName="InsertNodeAfter">
<MemberSignature Language="C#" Value="public Gtk.TreeIter InsertNodeAfter (Gtk.TreeIter parent, Gtk.TreeIter sibling);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gtk.TreeIter</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="parent" Type="Gtk.TreeIter" />
<Parameter Name="sibling" Type="Gtk.TreeIter" />
</Parameters>
<Docs>
<summary>Inserts a child of an existing node after a sibling.</summary>
<param name="parent">a <see cref="T:Gtk.TreeIter" /></param>
<param name="sibling">a <see cref="T:Gtk.TreeIter" /></param>
<returns>a <see cref="T:Gtk.TreeIter" /></returns>
<remarks />
</Docs>
</Member>
</Members>
</Type>
</Type>

View file

@ -348,11 +348,11 @@
<attr path="/api/namespace/object[@cname='GtkTreeSelection']/method[@name='GetSelectedRows']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_new']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/constructor[@cname='gtk_tree_store_newv']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Append']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='InsertAfter']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='InsertBefore']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Insert']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Prepend']/*/*[@name='iter']" name="pass_as">out</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Append']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='InsertAfter']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='InsertBefore']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Insert']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Prepend']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='Remove']/*/*[@name='iter']" name="pass_as">ref</attr>
<attr path="/api/namespace/object[@cname='GtkTreeStore']/method[@name='SetColumnTypes']/*/*[@name='types']" name="array">1</attr>
<attr path="/api/namespace/object[@cname='GtkTreeViewColumn']/constructor[@cname='gtk_tree_view_column_new_with_attributes']" name="hidden">1</attr>

View file

@ -23,42 +23,175 @@
// Boston, MA 02111-1307, USA.
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, ref TreeIter parent);
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_append (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent);
static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, IntPtr parent);
public void Append (out Gtk.TreeIter iter) {
[Obsolete ("Replaced by AppendNode")]
public TreeIter Append (TreeIter parent)
{
TreeIter iter;
gtk_tree_store_append (Handle, out iter, ref parent);
return iter;
}
[Obsolete ("Replaced by AppendNode")]
public void Append (out TreeIter iter)
{
gtk_tree_store_append (Handle, out iter, IntPtr.Zero);
}
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_insert (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int position);
public TreeIter AppendNode ()
{
TreeIter iter;
gtk_tree_store_append (Handle, out iter, IntPtr.Zero);
return iter;
}
public void Insert (out Gtk.TreeIter iter, int position) {
public TreeIter AppendNode (TreeIter parent)
{
TreeIter iter;
gtk_tree_store_append (Handle, out iter, ref parent);
return iter;
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, ref TreeIter parent, int position);
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, IntPtr parent, int position);
[Obsolete ("Replaced by InsertNode")]
public TreeIter Insert (TreeIter parent, int position)
{
TreeIter iter;
gtk_tree_store_insert (Handle, out iter, ref parent, position);
return iter;
}
[Obsolete ("Replaced by InsertNode")]
public void Insert (out TreeIter iter, int position)
{
gtk_tree_store_insert (Handle, out iter, IntPtr.Zero, position);
}
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_prepend (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent);
public TreeIter InsertNode (TreeIter parent, int position)
{
TreeIter iter;
gtk_tree_store_insert (Handle, out iter, ref parent, position);
return iter;
}
public void Prepend (out Gtk.TreeIter iter) {
public TreeIter InsertNode (int position)
{
TreeIter iter;
gtk_tree_store_insert (Handle, out iter, IntPtr.Zero, position);
return iter;
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, ref TreeIter parent);
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, IntPtr parent);
[Obsolete ("Replaced by PrependNode")]
public TreeIter Prepend(TreeIter parent)
{
TreeIter iter;
gtk_tree_store_prepend (Handle, out iter, ref parent);
return iter;
}
[Obsolete ("Replaced by PrependNode")]
public void Prepend (out TreeIter iter)
{
gtk_tree_store_append (Handle, out iter, IntPtr.Zero);
}
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_insert_before (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, ref Gtk.TreeIter sibling);
public TreeIter PrependNode (TreeIter parent)
{
TreeIter iter;
gtk_tree_store_prepend (Handle, out iter, ref parent);
return iter;
}
public void InsertBefore (out Gtk.TreeIter iter, Gtk.TreeIter sibling) {
public TreeIter PrependNode ()
{
TreeIter iter;
gtk_tree_store_prepend (Handle, out iter, IntPtr.Zero);
return iter;
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_insert_before (IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling);
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_insert_before (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling);
[Obsolete ("Replaced by InsertNodeBefore")]
public TreeIter InsertBefore (TreeIter parent, TreeIter sibling)
{
TreeIter iter;
gtk_tree_store_insert_before (Handle, out iter, ref parent, ref sibling);
return iter;
}
[Obsolete ("Replaced by InsertNodeBefore")]
public void InsertBefore (out TreeIter iter, TreeIter sibling)
{
gtk_tree_store_insert_before (Handle, out iter, IntPtr.Zero, ref sibling);
}
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_insert_after (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, ref Gtk.TreeIter sibling);
public TreeIter InsertNodeBefore (TreeIter sibling)
{
TreeIter iter;
gtk_tree_store_insert_before (Handle, out iter, IntPtr.Zero, ref sibling);
return iter;
}
public void InsertAfter (out Gtk.TreeIter iter, Gtk.TreeIter sibling) {
public TreeIter InsertNodeBefore (TreeIter parent, TreeIter sibling)
{
TreeIter iter;
gtk_tree_store_insert_before (Handle, out iter, ref parent, ref sibling);
return iter;
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_insert_after (IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling);
[DllImport ("libgtk-win32-2.0-0.dll")]
static extern void gtk_tree_store_insert_after (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling);
[Obsolete ("Replaced by InsertNodeAfter")]
public TreeIter InsertAfter (TreeIter parent, TreeIter sibling)
{
TreeIter iter;
gtk_tree_store_insert_after (Handle, out iter, ref parent, ref sibling);
return iter;
}
[Obsolete ("Replaced by InsertNodeAfter")]
public void InsertAfter (out TreeIter iter, TreeIter sibling)
{
gtk_tree_store_insert_after (Handle, out iter, IntPtr.Zero, ref sibling);
}
public TreeIter InsertNodeAfter (TreeIter sibling)
{
TreeIter iter;
gtk_tree_store_insert_after (Handle, out iter, IntPtr.Zero, ref sibling);
return iter;
}
public TreeIter InsertNodeAfter (TreeIter parent, TreeIter sibling)
{
TreeIter iter;
gtk_tree_store_insert_after (Handle, out iter, ref parent, ref sibling);
return iter;
}
[DllImport("libgtk-win32-2.0-0.dll")]
static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent);
@ -143,7 +276,7 @@
}
public Gtk.TreeIter AppendValues (Gtk.TreeIter parent, Array values) {
Gtk.TreeIter iter = Append (parent);
Gtk.TreeIter iter = AppendNode (parent);
_AppendValues (iter, values);
return iter;
}
@ -153,8 +286,7 @@
}
public Gtk.TreeIter AppendValues (Array values) {
Gtk.TreeIter iter;
Append (out iter);
Gtk.TreeIter iter = AppendNode ();
_AppendValues (iter, values);
return iter;
}