context: // This file was generated by the Gtk# code generator.
  // Any changes made will be lost if regenerated.
  
  namespace Gtk {
  
  	using System;
  	using System.Collections;
  	using System.Collections.Generic;
  	using System.Runtime.InteropServices;
  
  #region Autogenerated code
  	public partial class HandleBox : Gtk.Bin {
  
  		public HandleBox (IntPtr raw) : base(raw) {}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gtk_handle_box_new();
  
  		public HandleBox () : base (IntPtr.Zero)
  		{
  			if (GetType () != typeof (HandleBox)) {
  				CreateNativeObject (new string [0], new GLib.Value[0]);
  				return;
  			}
  			Raw = gtk_handle_box_new();
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern int gtk_handle_box_get_handle_position(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_handle_box_set_handle_position(IntPtr raw, int position);
  
  		[GLib.Property ("handle-position")]
  		public Gtk.PositionType HandlePosition {
  			get  {
  				int raw_ret = gtk_handle_box_get_handle_position(Handle);
  				Gtk.PositionType ret = (Gtk.PositionType) raw_ret;
  				return ret;
  			}
  			set  {
  				gtk_handle_box_set_handle_position(Handle, (int) value);
  			}
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern int gtk_handle_box_get_snap_edge(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_handle_box_set_snap_edge(IntPtr raw, int edge);
  
  		[GLib.Property ("snap-edge")]
  		public Gtk.PositionType SnapEdge {
  			get  {
  				int raw_ret = gtk_handle_box_get_snap_edge(Handle);
  				Gtk.PositionType ret = (Gtk.PositionType) raw_ret;
  				return ret;
  			}
  			set  {
  				gtk_handle_box_set_snap_edge(Handle, (int) value);
  			}
  		}
  
  		[GLib.Property ("snap-edge-set")]
  		public bool SnapEdgeSet {
  			get {
  				GLib.Value val = GetProperty ("snap-edge-set");
  				bool ret = (bool) val;
  				val.Dispose ();
  				return ret;
  			}
  			set {
  				GLib.Value val = new GLib.Value(value);
  				SetProperty("snap-edge-set", val);
  				val.Dispose ();
  			}
  		}
  
  		[GLib.Signal("child-detached")]
  		public event Gtk.ChildDetachedHandler ChildDetached {
  			add {
  				this.AddSignalHandler ("child-detached", value, typeof (Gtk.ChildDetachedArgs));
  			}
  			remove {
  				this.RemoveSignalHandler ("child-detached", value);
  			}
  		}
  
  		[GLib.Signal("child-attached")]
  		public event Gtk.ChildAttachedHandler ChildAttached {
  			add {
  				this.AddSignalHandler ("child-attached", value, typeof (Gtk.ChildAttachedArgs));
  			}
  			remove {
  				this.RemoveSignalHandler ("child-attached", value);
  			}
  		}
  
  		static ChildAttachedNativeDelegate ChildAttached_cb_delegate;
  		static ChildAttachedNativeDelegate ChildAttachedVMCallback {
  			get {
  				if (ChildAttached_cb_delegate == null)
  					ChildAttached_cb_delegate = new ChildAttachedNativeDelegate (ChildAttached_cb);
  				return ChildAttached_cb_delegate;
  			}
  		}
  
  		static void OverrideChildAttached (GLib.GType gtype)
  		{
  			OverrideChildAttached (gtype, ChildAttachedVMCallback);
  		}
  
  		static void OverrideChildAttached (GLib.GType gtype, ChildAttachedNativeDelegate callback)
  		{
  			GtkHandleBoxClass class_iface = GetClassStruct (gtype, false);
  			class_iface.ChildAttached = callback;
  			OverrideClassStruct (gtype, class_iface);
  		}
  
  		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
  		delegate void ChildAttachedNativeDelegate (IntPtr inst, IntPtr child);
  
  		static void ChildAttached_cb (IntPtr inst, IntPtr child)
  		{
  			try {
  				HandleBox __obj = GLib.Object.GetObject (inst, false) as HandleBox;
  				__obj.OnChildAttached (GLib.Object.GetObject(child) as Gtk.Widget);
  			} catch (Exception e) {
  				GLib.ExceptionManager.RaiseUnhandledException (e, false);
  			}
  		}
  
  		[GLib.DefaultSignalHandler(Type=typeof(Gtk.HandleBox), ConnectionMethod="OverrideChildAttached")]
  		protected virtual void OnChildAttached (Gtk.Widget child)
  		{
  			InternalChildAttached (child);
  		}
  
  		private void InternalChildAttached (Gtk.Widget child)
  		{
  			ChildAttachedNativeDelegate unmanaged = GetClassStruct (this.LookupGType ().GetThresholdType (), true).ChildAttached;
  			if (unmanaged == null) return;
  
  			unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle);
  		}
  
  		static ChildDetachedNativeDelegate ChildDetached_cb_delegate;
  		static ChildDetachedNativeDelegate ChildDetachedVMCallback {
  			get {
  				if (ChildDetached_cb_delegate == null)
  					ChildDetached_cb_delegate = new ChildDetachedNativeDelegate (ChildDetached_cb);
  				return ChildDetached_cb_delegate;
  			}
  		}
  
  		static void OverrideChildDetached (GLib.GType gtype)
  		{
  			OverrideChildDetached (gtype, ChildDetachedVMCallback);
  		}
  
  		static void OverrideChildDetached (GLib.GType gtype, ChildDetachedNativeDelegate callback)
  		{
  			GtkHandleBoxClass class_iface = GetClassStruct (gtype, false);
  			class_iface.ChildDetached = callback;
  			OverrideClassStruct (gtype, class_iface);
  		}
  
  		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
  		delegate void ChildDetachedNativeDelegate (IntPtr inst, IntPtr child);
  
  		static void ChildDetached_cb (IntPtr inst, IntPtr child)
  		{
  			try {
  				HandleBox __obj = GLib.Object.GetObject (inst, false) as HandleBox;
  				__obj.OnChildDetached (GLib.Object.GetObject(child) as Gtk.Widget);
  			} catch (Exception e) {
  				GLib.ExceptionManager.RaiseUnhandledException (e, false);
  			}
  		}
  
  		[GLib.DefaultSignalHandler(Type=typeof(Gtk.HandleBox), ConnectionMethod="OverrideChildDetached")]
  		protected virtual void OnChildDetached (Gtk.Widget child)
  		{
  			InternalChildDetached (child);
  		}
  
  		private void InternalChildDetached (Gtk.Widget child)
  		{
  			ChildDetachedNativeDelegate unmanaged = GetClassStruct (this.LookupGType ().GetThresholdType (), true).ChildDetached;
  			if (unmanaged == null) return;
  
  			unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle);
  		}
  
  		[StructLayout (LayoutKind.Sequential)]
  		struct GtkHandleBoxClass {
  			public ChildAttachedNativeDelegate ChildAttached;
  			public ChildDetachedNativeDelegate ChildDetached;
  			IntPtr GtkReserved1;
  			IntPtr GtkReserved2;
  			IntPtr GtkReserved3;
  			IntPtr GtkReserved4;
  		}
  
  		static uint class_offset = ((GLib.GType) typeof (Gtk.Bin)).GetClassSize ();
  		static Dictionary<GLib.GType, GtkHandleBoxClass> class_structs;
  
  		static GtkHandleBoxClass GetClassStruct (GLib.GType gtype, bool use_cache)
  		{
  			if (class_structs == null)
  				class_structs = new Dictionary<GLib.GType, GtkHandleBoxClass> ();
  
  			if (use_cache && class_structs.ContainsKey (gtype))
  				return class_structs [gtype];
  			else {
  				IntPtr class_ptr = new IntPtr (gtype.GetClassPtr ().ToInt64 () + class_offset);
  				GtkHandleBoxClass class_struct = (GtkHandleBoxClass) Marshal.PtrToStructure (class_ptr, typeof (GtkHandleBoxClass));
  				if (use_cache)
  					class_structs.Add (gtype, class_struct);
  				return class_struct;
  			}
  		}
  
  		static void OverrideClassStruct (GLib.GType gtype, GtkHandleBoxClass class_struct)
  		{
  			IntPtr class_ptr = new IntPtr (gtype.GetClassPtr ().ToInt64 () + class_offset);
  			Marshal.StructureToPtr (class_struct, class_ptr, false);
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern bool gtk_handle_box_get_child_detached(IntPtr raw);
  
  		public bool IsChildDetached { 
  			get {
  				bool raw_ret = gtk_handle_box_get_child_detached(Handle);
  				bool ret = raw_ret;
  				return ret;
  			}
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern int gtk_handle_box_get_shadow_type(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_handle_box_set_shadow_type(IntPtr raw, int type);
  
  		public Gtk.ShadowType ShadowType { 
  			get {
  
gt: 				int raw_ret = gtk_handle_box_get_shadow_type(Handle);