// SList.cs - GSList class wrapper implementation // // Authors: Mike Kestner // // (c) 2002 Mike Kestner namespace GLib { using System; using System.Collections; using System.Runtime.InteropServices; /// /// SList Class /// /// /// /// Wrapper class for GSList. /// public class SList : ArrayList { /// /// Handle Property /// /// /// /// A raw GSList reference for marshaling situations. /// [DllImport("gobject-2.0")] static extern IntPtr g_slist_append(IntPtr l, IntPtr d); public IntPtr Handle { get { IntPtr l = IntPtr.Zero; foreach (object o in this) { IntPtr data = IntPtr.Zero; if (o is GLib.Object) l = g_slist_append (l, ((GLib.Object)o).Handle); else throw new Exception(); } return l; } } } }