// 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 SpinButton : Gtk.Entry, Gtk.IOrientable {

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_spin_button_new(IntPtr adjustment, double climb_rate, uint digits);
		static d_gtk_spin_button_new gtk_spin_button_new = FuncLoader.LoadFunction<d_gtk_spin_button_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_new"));

		public SpinButton (Gtk.Adjustment adjustment, double climb_rate, uint digits) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (SpinButton)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				if (adjustment != null) {
					names.Add ("adjustment");
					vals.Add (new GLib.Value (adjustment));
				}
				names.Add ("climb_rate");
				vals.Add (new GLib.Value (climb_rate));
				names.Add ("digits");
				vals.Add (new GLib.Value (digits));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = gtk_spin_button_new(adjustment == null ? IntPtr.Zero : adjustment.Handle, climb_rate, digits);
		}

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

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

		[GLib.Property ("adjustment")]
		public Gtk.Adjustment Adjustment {
			get  {
				IntPtr raw_ret = gtk_spin_button_get_adjustment(Handle);
				Gtk.Adjustment ret = GLib.Object.GetObject(raw_ret) as Gtk.Adjustment;
				return ret;
			}
			set  {
				gtk_spin_button_set_adjustment(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[GLib.Property ("climb-rate")]
		public double ClimbRate {
			get {
				GLib.Value val = GetProperty ("climb-rate");
				double ret = (double) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("climb-rate", val);
				val.Dispose ();
			}
		}

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

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

		[GLib.Property ("digits")]
		public uint Digits {
			get  {
				uint raw_ret = gtk_spin_button_get_digits(Handle);
				uint ret = raw_ret;
				return ret;
			}
			set  {
				gtk_spin_button_set_digits(Handle, value);
			}
		}

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

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

		[GLib.Property ("snap-to-ticks")]
		public bool SnapToTicks {
			get  {
				bool raw_ret = gtk_spin_button_get_snap_to_ticks(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_spin_button_set_snap_to_ticks(Handle, value);
			}
		}

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

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

		[GLib.Property ("numeric")]
		public bool Numeric {
			get  {
				bool raw_ret = gtk_spin_button_get_numeric(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_spin_button_set_numeric(Handle, value);
			}
		}

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

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

		[GLib.Property ("wrap")]
		public bool Wrap {
			get  {
				bool raw_ret = gtk_spin_button_get_wrap(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_spin_button_set_wrap(Handle, value);
			}
		}

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

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

		[GLib.Property ("update-policy")]
		public Gtk.SpinButtonUpdatePolicy UpdatePolicy {
			get  {
				int raw_ret = gtk_spin_button_get_update_policy(Handle);
				Gtk.SpinButtonUpdatePolicy ret = (Gtk.SpinButtonUpdatePolicy) raw_ret;
				return ret;
			}
			set  {
				gtk_spin_button_set_update_policy(Handle, (int) value);
			}
		}

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

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

		[GLib.Property ("value")]
		public double Value {
			get  {
				double raw_ret = gtk_spin_button_get_value(Handle);
				double ret = raw_ret;
				return ret;
			}
			set  {
				gtk_spin_button_set_value(Handle, value);
			}
		}

		[Obsolete]
		public new Gtk.ShadowType ShadowType {
			get {
				var val = (Gtk.ShadowType)StyleGetProperty("shadow-type");
				return val;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int OutputSignalDelegate (IntPtr inst, IntPtr gch);

		static int OutputSignalCallback (IntPtr inst, IntPtr gch)
		{
			Gtk.OutputArgs args = new Gtk.OutputArgs ();
			try {
				GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal;
				if (sig == null)
					throw new Exception("Unknown signal GC handle received " + gch);

				Gtk.OutputHandler handler = (Gtk.OutputHandler) sig.Handler;
				handler (GLib.Object.GetObject (inst), args);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}

			try {
				return ((int) args.RetVal);
			} catch (Exception) {
				Exception ex = new Exception ("args.RetVal or 'out' property unset or set to incorrect type in Gtk.OutputHandler callback");
				GLib.ExceptionManager.RaiseUnhandledException (ex, true);
				// NOTREACHED: above call doesn't return.
				throw ex;
			}
		}

		[GLib.Signal("output")]
		public event Gtk.OutputHandler Output {
			add {
				this.AddSignalHandler ("output", value, new OutputSignalDelegate(OutputSignalCallback));
			}
			remove {
				this.RemoveSignalHandler ("output", value);
			}
		}

		[GLib.Signal("change-value")]
		public event Gtk.ChangeValueHandler ChangeValue {
			add {
				this.AddSignalHandler ("change-value", value, typeof (Gtk.ChangeValueArgs));
			}
			remove {
				this.RemoveSignalHandler ("change-value", value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int InputSignalDelegate (IntPtr inst, out double arg0, IntPtr gch);

		static int InputSignalCallback (IntPtr inst, out double arg0, IntPtr gch)
		{
			Gtk.InputArgs args = new Gtk.InputArgs ();
			try {
				GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal;
				if (sig == null)
					throw new Exception("Unknown signal GC handle received " + gch);

				args.Args = new object[1];
				Gtk.InputHandler handler = (Gtk.InputHandler) sig.Handler;
				handler (GLib.Object.GetObject (inst), args);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}

			try {
				arg0 = ((double)args.Args[0]);
				return ((int) args.RetVal);
			} catch (Exception) {
				Exception ex = new Exception ("args.RetVal or 'out' property unset or set to incorrect type in Gtk.InputHandler callback");
				GLib.ExceptionManager.RaiseUnhandledException (ex, true);
				// NOTREACHED: above call doesn't return.
				throw ex;
			}
		}

		[GLib.Signal("input")]
		public event Gtk.InputHandler Input {
			add {
				this.AddSignalHandler ("input", value, new InputSignalDelegate(InputSignalCallback));
			}
			remove {
				this.RemoveSignalHandler ("input", value);
			}
		}

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

		static InputNativeDelegate Input_cb_delegate;
		static InputNativeDelegate InputVMCallback {
			get {
				if (Input_cb_delegate == null)
					Input_cb_delegate = new InputNativeDelegate (Input_cb);
				return Input_cb_delegate;
			}
		}

		static void OverrideInput (GLib.GType gtype)
		{
			OverrideInput (gtype, InputVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int InputNativeDelegate (IntPtr inst, out double new_value);

		static int Input_cb (IntPtr inst, out double new_value)
		{
			try {
				SpinButton __obj = GLib.Object.GetObject (inst, false) as SpinButton;
				int __result;
				__result = __obj.OnInput (out new_value);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.SpinButton), ConnectionMethod="OverrideInput")]
		protected virtual int OnInput (out double new_value)
		{
			return InternalInput (out new_value);
		}

		private int InternalInput (out double new_value)
		{
			InputNativeDelegate unmanaged = class_abi.BaseOverride<InputNativeDelegate>(this.LookupGType(), "input");
			if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");

			int __result = unmanaged (this.Handle, out new_value);
			return __result;
		}

		static OutputNativeDelegate Output_cb_delegate;
		static OutputNativeDelegate OutputVMCallback {
			get {
				if (Output_cb_delegate == null)
					Output_cb_delegate = new OutputNativeDelegate (Output_cb);
				return Output_cb_delegate;
			}
		}

		static void OverrideOutput (GLib.GType gtype)
		{
			OverrideOutput (gtype, OutputVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int OutputNativeDelegate (IntPtr inst);

		static int Output_cb (IntPtr inst)
		{
			try {
				SpinButton __obj = GLib.Object.GetObject (inst, false) as SpinButton;
				int __result;
				__result = __obj.OnOutput ();
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.SpinButton), ConnectionMethod="OverrideOutput")]
		protected virtual int OnOutput ()
		{
			return InternalOutput ();
		}

		private int InternalOutput ()
		{
			OutputNativeDelegate unmanaged = class_abi.BaseOverride<OutputNativeDelegate>(this.LookupGType(), "output");
			if (unmanaged == null) return 0;

			int __result = unmanaged (this.Handle);
			return __result;
		}

		static ValueChangedNativeDelegate ValueChanged_cb_delegate;
		static ValueChangedNativeDelegate ValueChangedVMCallback {
			get {
				if (ValueChanged_cb_delegate == null)
					ValueChanged_cb_delegate = new ValueChangedNativeDelegate (ValueChanged_cb);
				return ValueChanged_cb_delegate;
			}
		}

		static void OverrideValueChanged (GLib.GType gtype)
		{
			OverrideValueChanged (gtype, ValueChangedVMCallback);
		}

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

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.SpinButton), ConnectionMethod="OverrideValueChanged")]
		protected virtual void OnValueChanged ()
		{
			InternalValueChanged ();
		}

		private void InternalValueChanged ()
		{
			ValueChangedNativeDelegate unmanaged = class_abi.BaseOverride<ValueChangedNativeDelegate>(this.LookupGType(), "value_changed");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static ChangeValueNativeDelegate ChangeValue_cb_delegate;
		static ChangeValueNativeDelegate ChangeValueVMCallback {
			get {
				if (ChangeValue_cb_delegate == null)
					ChangeValue_cb_delegate = new ChangeValueNativeDelegate (ChangeValue_cb);
				return ChangeValue_cb_delegate;
			}
		}

		static void OverrideChangeValue (GLib.GType gtype)
		{
			OverrideChangeValue (gtype, ChangeValueVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ChangeValueNativeDelegate (IntPtr inst, int scroll);

		static void ChangeValue_cb (IntPtr inst, int scroll)
		{
			try {
				SpinButton __obj = GLib.Object.GetObject (inst, false) as SpinButton;
				__obj.OnChangeValue ((Gtk.ScrollType) scroll);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.SpinButton), ConnectionMethod="OverrideChangeValue")]
		protected virtual void OnChangeValue (Gtk.ScrollType scroll)
		{
			InternalChangeValue (scroll);
		}

		private void InternalChangeValue (Gtk.ScrollType scroll)
		{
			ChangeValueNativeDelegate unmanaged = class_abi.BaseOverride<ChangeValueNativeDelegate>(this.LookupGType(), "change_value");
			if (unmanaged == null) return;

			unmanaged (this.Handle, (int) scroll);
		}

		static WrappedNativeDelegate Wrapped_cb_delegate;
		static WrappedNativeDelegate WrappedVMCallback {
			get {
				if (Wrapped_cb_delegate == null)
					Wrapped_cb_delegate = new WrappedNativeDelegate (Wrapped_cb);
				return Wrapped_cb_delegate;
			}
		}

		static void OverrideWrapped (GLib.GType gtype)
		{
			OverrideWrapped (gtype, WrappedVMCallback);
		}

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

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.SpinButton), ConnectionMethod="OverrideWrapped")]
		protected virtual void OnWrapped ()
		{
			InternalWrapped ();
		}

		private void InternalWrapped ()
		{
			WrappedNativeDelegate unmanaged = class_abi.BaseOverride<WrappedNativeDelegate>(this.LookupGType(), "wrapped");
			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("input"
							, Gtk.Entry.class_abi.Fields
							, (uint) sizeof( IntPtr ) // input
							, null
							, "output"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("output"
							, -1
							, (uint) sizeof( IntPtr ) // output
							, "input"
							, "value_changed"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("value_changed"
							, -1
							, (uint) sizeof( IntPtr ) // value_changed
							, "output"
							, "change_value"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("change_value"
							, -1
							, (uint) sizeof( IntPtr ) // change_value
							, "value_changed"
							, "wrapped"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("wrapped"
							, -1
							, (uint) sizeof( IntPtr ) // wrapped
							, "change_value"
							, "_gtk_reserved1"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved1"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved1
							, "wrapped"
							, "_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_spin_button_configure(IntPtr raw, IntPtr adjustment, double climb_rate, uint digits);
		static d_gtk_spin_button_configure gtk_spin_button_configure = FuncLoader.LoadFunction<d_gtk_spin_button_configure>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_configure"));

		public void Configure(Gtk.Adjustment adjustment, double climb_rate, uint digits) {
			gtk_spin_button_configure(Handle, adjustment == null ? IntPtr.Zero : adjustment.Handle, climb_rate, digits);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_spin_button_get_increments(IntPtr raw, out double step, out double page);
		static d_gtk_spin_button_get_increments gtk_spin_button_get_increments = FuncLoader.LoadFunction<d_gtk_spin_button_get_increments>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_get_increments"));

		public void GetIncrements(out double step, out double page) {
			gtk_spin_button_get_increments(Handle, out step, out page);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_spin_button_get_range(IntPtr raw, out double min, out double max);
		static d_gtk_spin_button_get_range gtk_spin_button_get_range = FuncLoader.LoadFunction<d_gtk_spin_button_get_range>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_get_range"));

		public void GetRange(out double min, out double max) {
			gtk_spin_button_get_range(Handle, out min, out max);
		}

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

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

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

		public int ValueAsInt { 
			get {
				int raw_ret = gtk_spin_button_get_value_as_int(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_spin_button_set_increments(IntPtr raw, double step, double page);
		static d_gtk_spin_button_set_increments gtk_spin_button_set_increments = FuncLoader.LoadFunction<d_gtk_spin_button_set_increments>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_set_increments"));

		public void SetIncrements(double step, double page) {
			gtk_spin_button_set_increments(Handle, step, page);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_spin_button_set_range(IntPtr raw, double min, double max);
		static d_gtk_spin_button_set_range gtk_spin_button_set_range = FuncLoader.LoadFunction<d_gtk_spin_button_set_range>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_set_range"));

		public void SetRange(double min, double max) {
			gtk_spin_button_set_range(Handle, min, max);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_spin_button_spin(IntPtr raw, int direction, double increment);
		static d_gtk_spin_button_spin gtk_spin_button_spin = FuncLoader.LoadFunction<d_gtk_spin_button_spin>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_spin"));

		public void Spin(Gtk.SpinType direction, double increment) {
			gtk_spin_button_spin(Handle, (int) direction, increment);
		}

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

		public void Update() {
			gtk_spin_button_update(Handle);
		}

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

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

		[GLib.Property ("orientation")]
		public Gtk.Orientation Orientation {
			get  {
				int raw_ret = gtk_orientable_get_orientation(Handle);
				Gtk.Orientation ret = (Gtk.Orientation) raw_ret;
				return ret;
			}
			set  {
				gtk_orientable_set_orientation(Handle, (int) 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.Entry.abi_info.Fields
							, (uint) sizeof( IntPtr ) // priv
							, null
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
