2002-02-03 03:44:10 +00:00
|
|
|
// SList.cs - GSList class wrapper implementation
|
|
|
|
//
|
|
|
|
// Authors: Mike Kestner <mkestner@speakeasy.net>
|
|
|
|
//
|
|
|
|
// (c) 2002 Mike Kestner
|
|
|
|
|
|
|
|
namespace GLib {
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// SList Class
|
|
|
|
/// </summary>
|
|
|
|
///
|
|
|
|
/// <remarks>
|
|
|
|
/// Wrapper class for GSList.
|
|
|
|
/// </remarks>
|
|
|
|
|
2002-09-01 04:46:38 +00:00
|
|
|
public class SList : ListBase {
|
2002-02-03 03:44:10 +00:00
|
|
|
|
2003-02-22 04:34:56 +00:00
|
|
|
[DllImport("libglib-2.0-0.dll")]
|
2002-09-01 04:46:38 +00:00
|
|
|
static extern IntPtr g_slist_copy (IntPtr l);
|
|
|
|
|
|
|
|
public override object Clone ()
|
2002-04-25 09:17:54 +00:00
|
|
|
{
|
2002-09-01 04:46:38 +00:00
|
|
|
return new SList (g_slist_copy (Handle));
|
2002-02-03 03:44:10 +00:00
|
|
|
}
|
2002-06-26 Rachel Hestilow <hestilow@ximian.com>
* configure.in, makefile, makefile.win32: add gnome.
* doc/index.html, netdoc.xsl: Add gnome.
* gdk/Event.cs: New manual wrap for GdkEvent.
* generator/ClassBase.cs: Add methods GetProperty,
GetPropertyRecursively, GetMethodRecursively.
Move Parent property here from ObjectGen.cs. Pass this pointer
into Property.
* generator/Ctor.cs: Generate docs.
* generator/Method.cs, Property.cs: Tag method as "new" if a
Method/Property with the same name is found in the class hierarchy.
* generator/SignalHandler.cs: Correctly wrap complex signal argument
types. Add gnome directory.
* generator/SymbolTable.cs: Add manually wrapped types hash
(contains GLib.GSList and Gdk.Event). Add method IsManuallyWrapped.
* glib/SList.cs: Add constructor from IntPtr.
* glue/slist.c, glue/event.c: Added (field accessor glue).
* glue/Makefile.am: Update.
* parser/Gtk.metadata: Add new signal renames for new signals
exposed by GdkEvent changes.
* parser/README, parser/build.pl: Add libgnome, libgnomecanvas,
libgnomeui.
* parser/gapi2xml.pl: Handle literal-length array parameters,
and NULL property doc strings.
* sample/: Add new test GnomeHelloWorld.cs.
* gnome/: Added.
* parser/Gnome.metadata: Added.
svn path=/trunk/gtk-sharp/; revision=5461
2002-06-26 08:36:05 +00:00
|
|
|
|
2002-07-11 17:58:49 +00:00
|
|
|
[DllImport("gtksharpglue")]
|
2002-06-26 Rachel Hestilow <hestilow@ximian.com>
* configure.in, makefile, makefile.win32: add gnome.
* doc/index.html, netdoc.xsl: Add gnome.
* gdk/Event.cs: New manual wrap for GdkEvent.
* generator/ClassBase.cs: Add methods GetProperty,
GetPropertyRecursively, GetMethodRecursively.
Move Parent property here from ObjectGen.cs. Pass this pointer
into Property.
* generator/Ctor.cs: Generate docs.
* generator/Method.cs, Property.cs: Tag method as "new" if a
Method/Property with the same name is found in the class hierarchy.
* generator/SignalHandler.cs: Correctly wrap complex signal argument
types. Add gnome directory.
* generator/SymbolTable.cs: Add manually wrapped types hash
(contains GLib.GSList and Gdk.Event). Add method IsManuallyWrapped.
* glib/SList.cs: Add constructor from IntPtr.
* glue/slist.c, glue/event.c: Added (field accessor glue).
* glue/Makefile.am: Update.
* parser/Gtk.metadata: Add new signal renames for new signals
exposed by GdkEvent changes.
* parser/README, parser/build.pl: Add libgnome, libgnomecanvas,
libgnomeui.
* parser/gapi2xml.pl: Handle literal-length array parameters,
and NULL property doc strings.
* sample/: Add new test GnomeHelloWorld.cs.
* gnome/: Added.
* parser/Gnome.metadata: Added.
svn path=/trunk/gtk-sharp/; revision=5461
2002-06-26 08:36:05 +00:00
|
|
|
static extern IntPtr gtksharp_slist_get_data (IntPtr l);
|
2002-09-01 04:46:38 +00:00
|
|
|
|
|
|
|
internal override IntPtr GetData (IntPtr current)
|
|
|
|
{
|
|
|
|
return gtksharp_slist_get_data (current);
|
|
|
|
}
|
|
|
|
|
2002-07-11 17:58:49 +00:00
|
|
|
[DllImport("gtksharpglue")]
|
2002-06-26 Rachel Hestilow <hestilow@ximian.com>
* configure.in, makefile, makefile.win32: add gnome.
* doc/index.html, netdoc.xsl: Add gnome.
* gdk/Event.cs: New manual wrap for GdkEvent.
* generator/ClassBase.cs: Add methods GetProperty,
GetPropertyRecursively, GetMethodRecursively.
Move Parent property here from ObjectGen.cs. Pass this pointer
into Property.
* generator/Ctor.cs: Generate docs.
* generator/Method.cs, Property.cs: Tag method as "new" if a
Method/Property with the same name is found in the class hierarchy.
* generator/SignalHandler.cs: Correctly wrap complex signal argument
types. Add gnome directory.
* generator/SymbolTable.cs: Add manually wrapped types hash
(contains GLib.GSList and Gdk.Event). Add method IsManuallyWrapped.
* glib/SList.cs: Add constructor from IntPtr.
* glue/slist.c, glue/event.c: Added (field accessor glue).
* glue/Makefile.am: Update.
* parser/Gtk.metadata: Add new signal renames for new signals
exposed by GdkEvent changes.
* parser/README, parser/build.pl: Add libgnome, libgnomecanvas,
libgnomeui.
* parser/gapi2xml.pl: Handle literal-length array parameters,
and NULL property doc strings.
* sample/: Add new test GnomeHelloWorld.cs.
* gnome/: Added.
* parser/Gnome.metadata: Added.
svn path=/trunk/gtk-sharp/; revision=5461
2002-06-26 08:36:05 +00:00
|
|
|
static extern IntPtr gtksharp_slist_get_next (IntPtr l);
|
|
|
|
|
2002-09-01 04:46:38 +00:00
|
|
|
internal override IntPtr Next (IntPtr current)
|
2002-06-26 Rachel Hestilow <hestilow@ximian.com>
* configure.in, makefile, makefile.win32: add gnome.
* doc/index.html, netdoc.xsl: Add gnome.
* gdk/Event.cs: New manual wrap for GdkEvent.
* generator/ClassBase.cs: Add methods GetProperty,
GetPropertyRecursively, GetMethodRecursively.
Move Parent property here from ObjectGen.cs. Pass this pointer
into Property.
* generator/Ctor.cs: Generate docs.
* generator/Method.cs, Property.cs: Tag method as "new" if a
Method/Property with the same name is found in the class hierarchy.
* generator/SignalHandler.cs: Correctly wrap complex signal argument
types. Add gnome directory.
* generator/SymbolTable.cs: Add manually wrapped types hash
(contains GLib.GSList and Gdk.Event). Add method IsManuallyWrapped.
* glib/SList.cs: Add constructor from IntPtr.
* glue/slist.c, glue/event.c: Added (field accessor glue).
* glue/Makefile.am: Update.
* parser/Gtk.metadata: Add new signal renames for new signals
exposed by GdkEvent changes.
* parser/README, parser/build.pl: Add libgnome, libgnomecanvas,
libgnomeui.
* parser/gapi2xml.pl: Handle literal-length array parameters,
and NULL property doc strings.
* sample/: Add new test GnomeHelloWorld.cs.
* gnome/: Added.
* parser/Gnome.metadata: Added.
svn path=/trunk/gtk-sharp/; revision=5461
2002-06-26 08:36:05 +00:00
|
|
|
{
|
2002-09-01 04:46:38 +00:00
|
|
|
return gtksharp_slist_get_next (current);
|
2002-06-26 Rachel Hestilow <hestilow@ximian.com>
* configure.in, makefile, makefile.win32: add gnome.
* doc/index.html, netdoc.xsl: Add gnome.
* gdk/Event.cs: New manual wrap for GdkEvent.
* generator/ClassBase.cs: Add methods GetProperty,
GetPropertyRecursively, GetMethodRecursively.
Move Parent property here from ObjectGen.cs. Pass this pointer
into Property.
* generator/Ctor.cs: Generate docs.
* generator/Method.cs, Property.cs: Tag method as "new" if a
Method/Property with the same name is found in the class hierarchy.
* generator/SignalHandler.cs: Correctly wrap complex signal argument
types. Add gnome directory.
* generator/SymbolTable.cs: Add manually wrapped types hash
(contains GLib.GSList and Gdk.Event). Add method IsManuallyWrapped.
* glib/SList.cs: Add constructor from IntPtr.
* glue/slist.c, glue/event.c: Added (field accessor glue).
* glue/Makefile.am: Update.
* parser/Gtk.metadata: Add new signal renames for new signals
exposed by GdkEvent changes.
* parser/README, parser/build.pl: Add libgnome, libgnomecanvas,
libgnomeui.
* parser/gapi2xml.pl: Handle literal-length array parameters,
and NULL property doc strings.
* sample/: Add new test GnomeHelloWorld.cs.
* gnome/: Added.
* parser/Gnome.metadata: Added.
svn path=/trunk/gtk-sharp/; revision=5461
2002-06-26 08:36:05 +00:00
|
|
|
}
|
|
|
|
|
2003-02-22 04:34:56 +00:00
|
|
|
[DllImport("libglib-2.0-0.dll")]
|
2002-09-01 04:46:38 +00:00
|
|
|
static extern int g_slist_length (IntPtr l);
|
|
|
|
|
|
|
|
internal override int Length (IntPtr list)
|
|
|
|
{
|
|
|
|
return g_slist_length (list);
|
|
|
|
}
|
|
|
|
|
2003-02-22 04:34:56 +00:00
|
|
|
[DllImport("libglib-2.0-0.dll")]
|
2002-09-01 04:46:38 +00:00
|
|
|
static extern void g_slist_free(IntPtr l);
|
|
|
|
|
|
|
|
internal override void Free (IntPtr list)
|
|
|
|
{
|
|
|
|
if (list != IntPtr.Zero)
|
|
|
|
g_slist_free (list);
|
|
|
|
}
|
|
|
|
|
2003-02-22 04:34:56 +00:00
|
|
|
[DllImport("libglib-2.0-0.dll")]
|
2002-10-11 15:43:52 +00:00
|
|
|
static extern IntPtr g_slist_append (IntPtr l, IntPtr raw);
|
|
|
|
|
|
|
|
internal override IntPtr Append (IntPtr list, IntPtr raw)
|
|
|
|
{
|
|
|
|
return g_slist_append (list, raw);
|
|
|
|
}
|
|
|
|
|
2003-02-22 04:34:56 +00:00
|
|
|
[DllImport("libglib-2.0-0.dll")]
|
2002-10-11 15:43:52 +00:00
|
|
|
static extern IntPtr g_slist_prepend (IntPtr l, IntPtr raw);
|
|
|
|
|
|
|
|
internal override IntPtr Prepend (IntPtr list, IntPtr raw)
|
|
|
|
{
|
|
|
|
return g_slist_prepend (list, raw);
|
|
|
|
}
|
|
|
|
|
2003-10-27 04:58:42 +00:00
|
|
|
|
|
|
|
[DllImport("libglib-2.0-0.dll")]
|
|
|
|
static extern IntPtr g_slist_nth_data (IntPtr l, uint n);
|
|
|
|
|
|
|
|
internal override IntPtr NthData (uint n)
|
|
|
|
{
|
|
|
|
return g_slist_nth_data (Handle, n);
|
|
|
|
}
|
|
|
|
|
2002-09-01 04:46:38 +00:00
|
|
|
public SList (IntPtr raw) : base (raw)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2003-02-24 06:39:30 +00:00
|
|
|
public SList (IntPtr raw, System.Type element_type) : base (raw, element_type)
|
2002-09-01 04:46:38 +00:00
|
|
|
{
|
|
|
|
}
|
2002-02-03 03:44:10 +00:00
|
|
|
}
|
|
|
|
}
|