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 Expander : Gtk.Bin {
  
  		public Expander (IntPtr raw) : base(raw) {}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gtk_expander_new(IntPtr label);
  
  		public static Expander New(string label)
  		{
  			IntPtr native_label = GLib.Marshaller.StringToPtrGStrdup (label);
  			Expander result = new Expander (gtk_expander_new(native_label));
  			GLib.Marshaller.Free (native_label);
  			return result;
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gtk_expander_new_with_mnemonic(IntPtr label);
  
  		public Expander (string label) : base (IntPtr.Zero)
  		{
  			if (GetType () != typeof (Expander)) {
  				var vals = new List<GLib.Value> ();
  				var names = new List<string> ();
  				names.Add ("label");
  				vals.Add (new GLib.Value (label));
  				CreateNativeObject (names.ToArray (), vals.ToArray ());
  				return;
  			}
  			IntPtr native_label = GLib.Marshaller.StringToPtrGStrdup (label);
  			Raw = gtk_expander_new_with_mnemonic(native_label);
  			GLib.Marshaller.Free (native_label);
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern bool gtk_expander_get_expanded(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_expander_set_expanded(IntPtr raw, bool expanded);
  
  		[GLib.Property ("expanded")]
  		public bool Expanded {
  			get  {
  				bool raw_ret = gtk_expander_get_expanded(Handle);
  				bool ret = raw_ret;
  				return ret;
  			}
  			set  {
  				gtk_expander_set_expanded(Handle, value);
  			}
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gtk_expander_get_label(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_expander_set_label(IntPtr raw, IntPtr label);
  
  		[GLib.Property ("label")]
  		public string Label {
  			get  {
  				IntPtr raw_ret = gtk_expander_get_label(Handle);
  				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
  				return ret;
  			}
  			set  {
  				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
  				gtk_expander_set_label(Handle, native_value);
  				GLib.Marshaller.Free (native_value);
  			}
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern bool gtk_expander_get_use_underline(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_expander_set_use_underline(IntPtr raw, bool use_underline);
  
  		[GLib.Property ("use-underline")]
  		public bool UseUnderline {
  			get  {
  				bool raw_ret = gtk_expander_get_use_underline(Handle);
  				bool ret = raw_ret;
  				return ret;
  			}
  			set  {
  				gtk_expander_set_use_underline(Handle, value);
  			}
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern bool gtk_expander_get_use_markup(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_expander_set_use_markup(IntPtr raw, bool use_markup);
  
  		[GLib.Property ("use-markup")]
  		public bool UseMarkup {
  			get  {
  				bool raw_ret = gtk_expander_get_use_markup(Handle);
  				bool ret = raw_ret;
  				return ret;
  			}
  			set  {
  				gtk_expander_set_use_markup(Handle, value);
  			}
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern int gtk_expander_get_spacing(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_expander_set_spacing(IntPtr raw, int spacing);
  
  		[GLib.Property ("spacing")]
  		public int Spacing {
  			get  {
  				int raw_ret = gtk_expander_get_spacing(Handle);
  				int ret = raw_ret;
  				return ret;
  			}
  			set  {
  				gtk_expander_set_spacing(Handle, value);
  			}
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gtk_expander_get_label_widget(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_expander_set_label_widget(IntPtr raw, IntPtr label_widget);
  
  		[GLib.Property ("label-widget")]
  		public Gtk.Widget LabelWidget {
  			get  {
  				IntPtr raw_ret = gtk_expander_get_label_widget(Handle);
  				Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
  				return ret;
  			}
  			set  {
  				gtk_expander_set_label_widget(Handle, value == null ? IntPtr.Zero : value.Handle);
  			}
  		}
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern bool gtk_expander_get_label_fill(IntPtr raw);
  
  		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gtk_expander_set_label_fill(IntPtr raw, bool label_fill);
  
  		[GLib.Property ("label-fill")]
  		public bool LabelFill {
  			get  {
  				bool raw_ret = gtk_expander_get_label_fill(Handle);
  				bool ret = raw_ret;
  				return ret;
  			}
  			set  {
  				gtk_expander_set_label_fill(Handle, value);
  			}
  		}
  
  		[GLib.Signal("activate")]
  		public event System.EventHandler Activated {
  			add {
  				this.AddSignalHandler ("activate", value);
  			}
  			remove {
  				this.RemoveSignalHandler ("activate", value);
  			}
  		}
  
  		static ActivatedNativeDelegate Activated_cb_delegate;
  		static ActivatedNativeDelegate ActivatedVMCallback {
  			get {
  				if (Activated_cb_delegate == null)
  					Activated_cb_delegate = new ActivatedNativeDelegate (Activated_cb);
  				return Activated_cb_delegate;
  			}
  		}
  
  		static void OverrideActivated (GLib.GType gtype)
  		{
  			OverrideActivated (gtype, ActivatedVMCallback);
  		}
  
  		static void OverrideActivated (GLib.GType gtype, ActivatedNativeDelegate callback)
  		{
  			GtkExpanderClass class_iface = GetClassStruct (gtype, false);
  			class_iface.Activated = callback;
  			OverrideClassStruct (gtype, class_iface);
  		}
  
  		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
  		delegate void ActivatedNativeDelegate (IntPtr inst);
  
  		static void Activated_cb (IntPtr inst)
  		{
  			try {
  				Expander __obj = GLib.Object.GetObject (inst, false) as Expander;
  				__obj.OnActivated ();
  			} catch (Exception e) {
  				GLib.ExceptionManager.RaiseUnhandledException (e, false);
  			}
  		}
  
  		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Expander), ConnectionMethod="OverrideActivated")]
  		protected virtual void OnActivated ()
  		{
  			InternalActivated ();
  		}
  
  		private void InternalActivated ()
  		{
  			ActivatedNativeDelegate unmanaged = GetClassStruct (this.LookupGType ().GetThresholdType (), true).Activated;
  			if (unmanaged == null) return;
  
  			unmanaged (this.Handle);
  		}
  
  		[StructLayout (LayoutKind.Sequential)]
  		struct GtkExpanderClass {
  			public ActivatedNativeDelegate Activated;
  			IntPtr GtkReserved1;
  			IntPtr GtkReserved2;
  			IntPtr GtkReserved3;
  			IntPtr GtkReserved4;
  		}
  
  		static uint class_offset = ((GLib.GType) typeof (Gtk.Bin)).GetClassSize ();
  		static Dictionary<GLib.GType, GtkExpanderClass> class_structs;
  
  		static GtkExpanderClass GetClassStruct (GLib.GType gtype, bool use_cache)
  		{
  			if (class_structs == null)
  				class_structs = new Dictionary<GLib.GType, GtkExpanderClass> ();
  
  
gt: 			if (use_cache && class_structs.ContainsKey (gtype))