// 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;
	using static GLib.AbiStructExtension;

#region Autogenerated code
	public partial class Button : Gtk.Bin, Gtk.IActionable, Gtk.IActivatable {

		public Button (IntPtr raw) : base(raw) {}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_button_new();
		static d_gtk_button_new gtk_button_new = FuncLoader.LoadFunction<d_gtk_button_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_new"));

		public Button () : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Button)) {
				CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
				return;
			}
			Raw = gtk_button_new();
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_button_new_from_icon_name(IntPtr icon_name, int size);
		static d_gtk_button_new_from_icon_name gtk_button_new_from_icon_name = FuncLoader.LoadFunction<d_gtk_button_new_from_icon_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_new_from_icon_name"));

		public Button (string icon_name, Gtk.IconSize size) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Button)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			IntPtr native_icon_name = GLib.Marshaller.StringToPtrGStrdup (icon_name);
			Raw = gtk_button_new_from_icon_name(native_icon_name, (int) size);
			GLib.Marshaller.Free (native_icon_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_button_new_with_label(IntPtr label);
		static d_gtk_button_new_with_label gtk_button_new_with_label = FuncLoader.LoadFunction<d_gtk_button_new_with_label>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_new_with_label"));

		public static Button NewWithLabel(string label)
		{
			IntPtr native_label = GLib.Marshaller.StringToPtrGStrdup (label);
			Button result = new Button (gtk_button_new_with_label(native_label));
			GLib.Marshaller.Free (native_label);
			return result;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_button_new_with_mnemonic(IntPtr label);
		static d_gtk_button_new_with_mnemonic gtk_button_new_with_mnemonic = FuncLoader.LoadFunction<d_gtk_button_new_with_mnemonic>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_new_with_mnemonic"));

		public static Button NewWithMnemonic(string label)
		{
			IntPtr native_label = GLib.Marshaller.StringToPtrGStrdup (label);
			Button result = new Button (gtk_button_new_with_mnemonic(native_label));
			GLib.Marshaller.Free (native_label);
			return result;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_button_get_label(IntPtr raw);
		static d_gtk_button_get_label gtk_button_get_label = FuncLoader.LoadFunction<d_gtk_button_get_label>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_label"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_set_label(IntPtr raw, IntPtr label);
		static d_gtk_button_set_label gtk_button_set_label = FuncLoader.LoadFunction<d_gtk_button_set_label>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_set_label"));

		[GLib.Property ("label")]
		public string Label {
			get  {
				IntPtr raw_ret = gtk_button_get_label(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_button_set_label(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_button_get_use_underline(IntPtr raw);
		static d_gtk_button_get_use_underline gtk_button_get_use_underline = FuncLoader.LoadFunction<d_gtk_button_get_use_underline>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_use_underline"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_set_use_underline(IntPtr raw, bool use_underline);
		static d_gtk_button_set_use_underline gtk_button_set_use_underline = FuncLoader.LoadFunction<d_gtk_button_set_use_underline>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_set_use_underline"));

		[GLib.Property ("use-underline")]
		public bool UseUnderline {
			get  {
				bool raw_ret = gtk_button_get_use_underline(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_button_set_use_underline(Handle, value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_button_get_use_stock(IntPtr raw);
		static d_gtk_button_get_use_stock gtk_button_get_use_stock = FuncLoader.LoadFunction<d_gtk_button_get_use_stock>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_use_stock"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_set_use_stock(IntPtr raw, bool use_stock);
		static d_gtk_button_set_use_stock gtk_button_set_use_stock = FuncLoader.LoadFunction<d_gtk_button_set_use_stock>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_set_use_stock"));

		[Obsolete]
		[GLib.Property ("use-stock")]
		public bool UseStock {
			get  {
				bool raw_ret = gtk_button_get_use_stock(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_button_set_use_stock(Handle, value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int d_gtk_button_get_relief(IntPtr raw);
		static d_gtk_button_get_relief gtk_button_get_relief = FuncLoader.LoadFunction<d_gtk_button_get_relief>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_relief"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_set_relief(IntPtr raw, int relief);
		static d_gtk_button_set_relief gtk_button_set_relief = FuncLoader.LoadFunction<d_gtk_button_set_relief>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_set_relief"));

		[GLib.Property ("relief")]
		public Gtk.ReliefStyle Relief {
			get  {
				int raw_ret = gtk_button_get_relief(Handle);
				Gtk.ReliefStyle ret = (Gtk.ReliefStyle) raw_ret;
				return ret;
			}
			set  {
				gtk_button_set_relief(Handle, (int) value);
			}
		}

		[GLib.Property ("xalign")]
		public float Xalign {
			get {
				GLib.Value val = GetProperty ("xalign");
				float ret = (float) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("xalign", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("yalign")]
		public float Yalign {
			get {
				GLib.Value val = GetProperty ("yalign");
				float ret = (float) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("yalign", val);
				val.Dispose ();
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_button_get_image(IntPtr raw);
		static d_gtk_button_get_image gtk_button_get_image = FuncLoader.LoadFunction<d_gtk_button_get_image>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_image"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_set_image(IntPtr raw, IntPtr image);
		static d_gtk_button_set_image gtk_button_set_image = FuncLoader.LoadFunction<d_gtk_button_set_image>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_set_image"));

		[GLib.Property ("image")]
		public Gtk.Widget Image {
			get  {
				IntPtr raw_ret = gtk_button_get_image(Handle);
				Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
				return ret;
			}
			set  {
				gtk_button_set_image(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int d_gtk_button_get_image_position(IntPtr raw);
		static d_gtk_button_get_image_position gtk_button_get_image_position = FuncLoader.LoadFunction<d_gtk_button_get_image_position>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_image_position"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_set_image_position(IntPtr raw, int position);
		static d_gtk_button_set_image_position gtk_button_set_image_position = FuncLoader.LoadFunction<d_gtk_button_set_image_position>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_set_image_position"));

		[GLib.Property ("image-position")]
		public Gtk.PositionType ImagePosition {
			get  {
				int raw_ret = gtk_button_get_image_position(Handle);
				Gtk.PositionType ret = (Gtk.PositionType) raw_ret;
				return ret;
			}
			set  {
				gtk_button_set_image_position(Handle, (int) value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_button_get_always_show_image(IntPtr raw);
		static d_gtk_button_get_always_show_image gtk_button_get_always_show_image = FuncLoader.LoadFunction<d_gtk_button_get_always_show_image>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_always_show_image"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_set_always_show_image(IntPtr raw, bool always_show);
		static d_gtk_button_set_always_show_image gtk_button_set_always_show_image = FuncLoader.LoadFunction<d_gtk_button_set_always_show_image>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_set_always_show_image"));

		[GLib.Property ("always-show-image")]
		public bool AlwaysShowImage {
			get  {
				bool raw_ret = gtk_button_get_always_show_image(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_button_set_always_show_image(Handle, value);
			}
		}

		[Obsolete]
		public Gtk.Border? DefaultBorder {
			get {
				var val = (Gtk.Border?)StyleGetProperty("default-border");
				return val;
			}
		}

		[Obsolete]
		public Gtk.Border? DefaultOutsideBorder {
			get {
				var val = (Gtk.Border?)StyleGetProperty("default-outside-border");
				return val;
			}
		}

		[Obsolete]
		public int ChildDisplacementX {
			get {
				var val = (int)StyleGetProperty("child-displacement-x");
				return val;
			}
		}

		[Obsolete]
		public int ChildDisplacementY {
			get {
				var val = (int)StyleGetProperty("child-displacement-y");
				return val;
			}
		}

		[Obsolete]
		public bool DisplaceFocus {
			get {
				var val = (bool)StyleGetProperty("displace-focus");
				return val;
			}
		}

		[Obsolete]
		public Gtk.Border? InnerBorder {
			get {
				var val = (Gtk.Border?)StyleGetProperty("inner-border");
				return val;
			}
		}

		public int ImageSpacing {
			get {
				var val = (int)StyleGetProperty("image-spacing");
				return val;
			}
		}

		[GLib.Signal("clicked")]
		public event System.EventHandler Clicked {
			add {
				this.AddSignalHandler ("clicked", value);
			}
			remove {
				this.RemoveSignalHandler ("clicked", value);
			}
		}

		[GLib.Signal("pressed")]
		public event System.EventHandler Pressed {
			add {
				this.AddSignalHandler ("pressed", value);
			}
			remove {
				this.RemoveSignalHandler ("pressed", value);
			}
		}

		[GLib.Signal("activate")]
		public event System.EventHandler Activated {
			add {
				this.AddSignalHandler ("activate", value);
			}
			remove {
				this.RemoveSignalHandler ("activate", value);
			}
		}

		[GLib.Signal("released")]
		public event System.EventHandler Released {
			add {
				this.AddSignalHandler ("released", value);
			}
			remove {
				this.RemoveSignalHandler ("released", value);
			}
		}

		[GLib.Signal("enter")]
		public event System.EventHandler Entered {
			add {
				this.AddSignalHandler ("enter", value);
			}
			remove {
				this.RemoveSignalHandler ("enter", value);
			}
		}

		[GLib.Signal("leave")]
		public event System.EventHandler Left {
			add {
				this.AddSignalHandler ("leave", value);
			}
			remove {
				this.RemoveSignalHandler ("leave", value);
			}
		}

		static PressedNativeDelegate Pressed_cb_delegate;
		static PressedNativeDelegate PressedVMCallback {
			get {
				if (Pressed_cb_delegate == null)
					Pressed_cb_delegate = new PressedNativeDelegate (Pressed_cb);
				return Pressed_cb_delegate;
			}
		}

		static void OverridePressed (GLib.GType gtype)
		{
			OverridePressed (gtype, PressedVMCallback);
		}

		static void OverridePressed (GLib.GType gtype, PressedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pressed"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void PressedNativeDelegate (IntPtr inst);

		static void Pressed_cb (IntPtr inst)
		{
			try {
				Button __obj = GLib.Object.GetObject (inst, false) as Button;
				__obj.OnPressed ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Button), ConnectionMethod="OverridePressed")]
		protected virtual void OnPressed ()
		{
			InternalPressed ();
		}

		private void InternalPressed ()
		{
			PressedNativeDelegate unmanaged = class_abi.BaseOverride<PressedNativeDelegate>(this.LookupGType(), "pressed");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static ReleasedNativeDelegate Released_cb_delegate;
		static ReleasedNativeDelegate ReleasedVMCallback {
			get {
				if (Released_cb_delegate == null)
					Released_cb_delegate = new ReleasedNativeDelegate (Released_cb);
				return Released_cb_delegate;
			}
		}

		static void OverrideReleased (GLib.GType gtype)
		{
			OverrideReleased (gtype, ReleasedVMCallback);
		}

		static void OverrideReleased (GLib.GType gtype, ReleasedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("released"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ReleasedNativeDelegate (IntPtr inst);

		static void Released_cb (IntPtr inst)
		{
			try {
				Button __obj = GLib.Object.GetObject (inst, false) as Button;
				__obj.OnReleased ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Button), ConnectionMethod="OverrideReleased")]
		protected virtual void OnReleased ()
		{
			InternalReleased ();
		}

		private void InternalReleased ()
		{
			ReleasedNativeDelegate unmanaged = class_abi.BaseOverride<ReleasedNativeDelegate>(this.LookupGType(), "released");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static ClickedNativeDelegate Clicked_cb_delegate;
		static ClickedNativeDelegate ClickedVMCallback {
			get {
				if (Clicked_cb_delegate == null)
					Clicked_cb_delegate = new ClickedNativeDelegate (Clicked_cb);
				return Clicked_cb_delegate;
			}
		}

		static void OverrideClicked (GLib.GType gtype)
		{
			OverrideClicked (gtype, ClickedVMCallback);
		}

		static void OverrideClicked (GLib.GType gtype, ClickedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("clicked"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ClickedNativeDelegate (IntPtr inst);

		static void Clicked_cb (IntPtr inst)
		{
			try {
				Button __obj = GLib.Object.GetObject (inst, false) as Button;
				__obj.OnClicked ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Button), ConnectionMethod="OverrideClicked")]
		protected virtual void OnClicked ()
		{
			InternalClicked ();
		}

		private void InternalClicked ()
		{
			ClickedNativeDelegate unmanaged = class_abi.BaseOverride<ClickedNativeDelegate>(this.LookupGType(), "clicked");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static EnteredNativeDelegate Entered_cb_delegate;
		static EnteredNativeDelegate EnteredVMCallback {
			get {
				if (Entered_cb_delegate == null)
					Entered_cb_delegate = new EnteredNativeDelegate (Entered_cb);
				return Entered_cb_delegate;
			}
		}

		static void OverrideEntered (GLib.GType gtype)
		{
			OverrideEntered (gtype, EnteredVMCallback);
		}

		static void OverrideEntered (GLib.GType gtype, EnteredNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("enter"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void EnteredNativeDelegate (IntPtr inst);

		static void Entered_cb (IntPtr inst)
		{
			try {
				Button __obj = GLib.Object.GetObject (inst, false) as Button;
				__obj.OnEntered ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Button), ConnectionMethod="OverrideEntered")]
		protected virtual void OnEntered ()
		{
			InternalEntered ();
		}

		private void InternalEntered ()
		{
			EnteredNativeDelegate unmanaged = class_abi.BaseOverride<EnteredNativeDelegate>(this.LookupGType(), "enter");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static LeftNativeDelegate Left_cb_delegate;
		static LeftNativeDelegate LeftVMCallback {
			get {
				if (Left_cb_delegate == null)
					Left_cb_delegate = new LeftNativeDelegate (Left_cb);
				return Left_cb_delegate;
			}
		}

		static void OverrideLeft (GLib.GType gtype)
		{
			OverrideLeft (gtype, LeftVMCallback);
		}

		static void OverrideLeft (GLib.GType gtype, LeftNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("leave"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void LeftNativeDelegate (IntPtr inst);

		static void Left_cb (IntPtr inst)
		{
			try {
				Button __obj = GLib.Object.GetObject (inst, false) as Button;
				__obj.OnLeft ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Button), ConnectionMethod="OverrideLeft")]
		protected virtual void OnLeft ()
		{
			InternalLeft ();
		}

		private void InternalLeft ()
		{
			LeftNativeDelegate unmanaged = class_abi.BaseOverride<LeftNativeDelegate>(this.LookupGType(), "leave");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		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)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("activate"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ActivatedNativeDelegate (IntPtr inst);

		static void Activated_cb (IntPtr inst)
		{
			try {
				Button __obj = GLib.Object.GetObject (inst, false) as Button;
				__obj.OnActivated ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Button), ConnectionMethod="OverrideActivated")]
		protected virtual void OnActivated ()
		{
			InternalActivated ();
		}

		private void InternalActivated ()
		{
			ActivatedNativeDelegate unmanaged = class_abi.BaseOverride<ActivatedNativeDelegate>(this.LookupGType(), "activate");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _class_abi = null;
		static public unsafe new GLib.AbiStruct class_abi {
			get {
				if (_class_abi == null)
					_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("pressed"
							, Gtk.Bin.class_abi.Fields
							, (uint) sizeof( IntPtr ) // pressed
							, null
							, "released"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("released"
							, -1
							, (uint) sizeof( IntPtr ) // released
							, "pressed"
							, "clicked"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("clicked"
							, -1
							, (uint) sizeof( IntPtr ) // clicked
							, "released"
							, "enter"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("enter"
							, -1
							, (uint) sizeof( IntPtr ) // enter
							, "clicked"
							, "leave"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("leave"
							, -1
							, (uint) sizeof( IntPtr ) // leave
							, "enter"
							, "activate"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("activate"
							, -1
							, (uint) sizeof( IntPtr ) // activate
							, "leave"
							, "_gtk_reserved1"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved1"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved1
							, "activate"
							, "_gtk_reserved2"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved2"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved2
							, "_gtk_reserved1"
							, "_gtk_reserved3"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved3"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved3
							, "_gtk_reserved2"
							, "_gtk_reserved4"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved4"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved4
							, "_gtk_reserved3"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_clicked(IntPtr raw);
		static d_gtk_button_clicked gtk_button_clicked = FuncLoader.LoadFunction<d_gtk_button_clicked>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_clicked"));

		public void Click() {
			gtk_button_clicked(Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_enter(IntPtr raw);
		static d_gtk_button_enter gtk_button_enter = FuncLoader.LoadFunction<d_gtk_button_enter>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_enter"));

		[Obsolete]
		public void Enter() {
			gtk_button_enter(Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_get_alignment(IntPtr raw, out float xalign, out float yalign);
		static d_gtk_button_get_alignment gtk_button_get_alignment = FuncLoader.LoadFunction<d_gtk_button_get_alignment>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_alignment"));

		[Obsolete]
		public void GetAlignment(out float xalign, out float yalign) {
			gtk_button_get_alignment(Handle, out xalign, out yalign);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_button_get_event_window(IntPtr raw);
		static d_gtk_button_get_event_window gtk_button_get_event_window = FuncLoader.LoadFunction<d_gtk_button_get_event_window>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_event_window"));

		public Gdk.Window EventWindow { 
			get {
				IntPtr raw_ret = gtk_button_get_event_window(Handle);
				Gdk.Window ret = GLib.Object.GetObject(raw_ret) as Gdk.Window;
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_button_get_type();
		static d_gtk_button_get_type gtk_button_get_type = FuncLoader.LoadFunction<d_gtk_button_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_get_type"));

		public static new GLib.GType GType { 
			get {
				IntPtr raw_ret = gtk_button_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_leave(IntPtr raw);
		static d_gtk_button_leave gtk_button_leave = FuncLoader.LoadFunction<d_gtk_button_leave>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_leave"));

		[Obsolete]
		public void Leave() {
			gtk_button_leave(Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_pressed(IntPtr raw);
		static d_gtk_button_pressed gtk_button_pressed = FuncLoader.LoadFunction<d_gtk_button_pressed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_pressed"));

		[Obsolete]
		public void Press() {
			gtk_button_pressed(Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_released(IntPtr raw);
		static d_gtk_button_released gtk_button_released = FuncLoader.LoadFunction<d_gtk_button_released>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_released"));

		[Obsolete]
		public void Release() {
			gtk_button_released(Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_button_set_alignment(IntPtr raw, float xalign, float yalign);
		static d_gtk_button_set_alignment gtk_button_set_alignment = FuncLoader.LoadFunction<d_gtk_button_set_alignment>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_set_alignment"));

		[Obsolete]
		public void SetAlignment(float xalign, float yalign) {
			gtk_button_set_alignment(Handle, xalign, yalign);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_actionable_get_action_name(IntPtr raw);
		static d_gtk_actionable_get_action_name gtk_actionable_get_action_name = FuncLoader.LoadFunction<d_gtk_actionable_get_action_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_actionable_get_action_name"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_actionable_set_action_name(IntPtr raw, IntPtr action_name);
		static d_gtk_actionable_set_action_name gtk_actionable_set_action_name = FuncLoader.LoadFunction<d_gtk_actionable_set_action_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_actionable_set_action_name"));

		public string ActionName { 
			get {
				IntPtr raw_ret = gtk_actionable_get_action_name(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_actionable_set_action_name(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_actionable_get_action_target_value(IntPtr raw);
		static d_gtk_actionable_get_action_target_value gtk_actionable_get_action_target_value = FuncLoader.LoadFunction<d_gtk_actionable_get_action_target_value>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_actionable_get_action_target_value"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_actionable_set_action_target_value(IntPtr raw, IntPtr target_value);
		static d_gtk_actionable_set_action_target_value gtk_actionable_set_action_target_value = FuncLoader.LoadFunction<d_gtk_actionable_set_action_target_value>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_actionable_set_action_target_value"));

		public GLib.Variant ActionTargetValue { 
			get {
				IntPtr raw_ret = gtk_actionable_get_action_target_value(Handle);
				GLib.Variant ret = new GLib.Variant(raw_ret);
				return ret;
			}
			set {
				gtk_actionable_set_action_target_value(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_actionable_set_detailed_action_name(IntPtr raw, IntPtr detailed_action_name);
		static d_gtk_actionable_set_detailed_action_name gtk_actionable_set_detailed_action_name = FuncLoader.LoadFunction<d_gtk_actionable_set_detailed_action_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_actionable_set_detailed_action_name"));

		public string DetailedActionName { 
			set {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_actionable_set_detailed_action_name(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_activatable_do_set_related_action(IntPtr raw, IntPtr action);
		static d_gtk_activatable_do_set_related_action gtk_activatable_do_set_related_action = FuncLoader.LoadFunction<d_gtk_activatable_do_set_related_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_activatable_do_set_related_action"));

		[Obsolete]
		public void DoSetRelatedAction(Gtk.Action action) {
			gtk_activatable_do_set_related_action(Handle, action == null ? IntPtr.Zero : action.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_activatable_sync_action_properties(IntPtr raw, IntPtr action);
		static d_gtk_activatable_sync_action_properties gtk_activatable_sync_action_properties = FuncLoader.LoadFunction<d_gtk_activatable_sync_action_properties>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_activatable_sync_action_properties"));

		[Obsolete]
		public void SyncActionProperties(Gtk.Action action) {
			gtk_activatable_sync_action_properties(Handle, action == null ? IntPtr.Zero : action.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_activatable_get_related_action(IntPtr raw);
		static d_gtk_activatable_get_related_action gtk_activatable_get_related_action = FuncLoader.LoadFunction<d_gtk_activatable_get_related_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_activatable_get_related_action"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_activatable_set_related_action(IntPtr raw, IntPtr action);
		static d_gtk_activatable_set_related_action gtk_activatable_set_related_action = FuncLoader.LoadFunction<d_gtk_activatable_set_related_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_activatable_set_related_action"));

		[Obsolete]
		[GLib.Property ("related-action")]
		public Gtk.Action RelatedAction {
			get  {
				IntPtr raw_ret = gtk_activatable_get_related_action(Handle);
				Gtk.Action ret = GLib.Object.GetObject(raw_ret) as Gtk.Action;
				return ret;
			}
			set  {
				gtk_activatable_set_related_action(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_activatable_get_use_action_appearance(IntPtr raw);
		static d_gtk_activatable_get_use_action_appearance gtk_activatable_get_use_action_appearance = FuncLoader.LoadFunction<d_gtk_activatable_get_use_action_appearance>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_activatable_get_use_action_appearance"));

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_activatable_set_use_action_appearance(IntPtr raw, bool use_appearance);
		static d_gtk_activatable_set_use_action_appearance gtk_activatable_set_use_action_appearance = FuncLoader.LoadFunction<d_gtk_activatable_set_use_action_appearance>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_activatable_set_use_action_appearance"));

		[Obsolete]
		[GLib.Property ("use-action-appearance")]
		public bool UseActionAppearance {
			get  {
				bool raw_ret = gtk_activatable_get_use_action_appearance(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_activatable_set_use_action_appearance(Handle, value);
			}
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public unsafe new GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("priv"
							, Gtk.Bin.abi_info.Fields
							, (uint) sizeof( IntPtr ) // priv
							, null
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
