// GtkSharp.Boxed.cs - Base class for deriving marshallable structures. // // Author: Mike Kestner // // (c) 2001-2002 Mike Kestner namespace GLib { using System; /// /// Boxed Class /// /// /// /// An abstract base class to derive structures and marshal them. /// public abstract class Boxed { private IntPtr raw; public Boxed () : this (IntPtr.Zero) {} /// /// Boxed Constructor /// /// /// /// Constructs a Boxed type from a raw ref. /// public Boxed (IntPtr raw) { this.raw = raw; } /// /// Handle Property /// /// /// /// Gets a marshallable IntPtr. /// public virtual IntPtr Handle { get { return raw; } set { raw = value; } } /// /// Raw Property /// /// /// /// Gets or sets a marshallable IntPtr. /// protected IntPtr Raw { get { return raw; } set { raw = value; } } /// /// FromNative Method /// /// /// /// Gets a Boxed type from a raw IntPtr. /// public static GLib.Boxed FromNative (IntPtr raw) { // FIXME: return null; } } }