// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Atk {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	public partial class Range : GLib.Opaque {

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

		public Atk.Range Copy() {
			IntPtr raw_ret = atk_range_copy(Handle);
			Atk.Range ret = raw_ret == IntPtr.Zero ? null : (Atk.Range) GLib.Opaque.GetOpaque (raw_ret, typeof (Atk.Range), true);
			return ret;
		}

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

		public string Description { 
			get {
				IntPtr raw_ret = atk_range_get_description(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		public double LowerLimit { 
			get {
				double raw_ret = atk_range_get_lower_limit(Handle);
				double ret = raw_ret;
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_atk_range_get_type();
		static d_atk_range_get_type atk_range_get_type = FuncLoader.LoadFunction<d_atk_range_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Atk), "atk_range_get_type"));

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

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

		public double UpperLimit { 
			get {
				double raw_ret = atk_range_get_upper_limit(Handle);
				double ret = raw_ret;
				return ret;
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_atk_range_new(double lower_limit, double upper_limit, IntPtr description);
		static d_atk_range_new atk_range_new = FuncLoader.LoadFunction<d_atk_range_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Atk), "atk_range_new"));

		public Range (double lower_limit, double upper_limit, string description) 
		{
			IntPtr native_description = GLib.Marshaller.StringToPtrGStrdup (description);
			Raw = atk_range_new(lower_limit, upper_limit, native_description);
			GLib.Marshaller.Free (native_description);
		}

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

		protected override void Free (IntPtr raw)
		{
			atk_range_free (raw);
		}

		class FinalizerInfo {
			IntPtr handle;
			public uint timeoutHandlerId;

			public FinalizerInfo (IntPtr handle)
			{
				this.handle = handle;
			}

			public bool Handler ()
			{
				atk_range_free (handle);
				GLib.Timeout.Remove(timeoutHandlerId);
				return false;
			}
		}

		~Range ()
		{
			if (!Owned)
				return;
			FinalizerInfo info = new FinalizerInfo (Handle);
			info.timeoutHandlerId = GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler));
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public unsafe GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
