// 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 IconSource : GLib.Opaque {

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

		[Obsolete]
		public Gtk.IconSource Copy() {
			IntPtr raw_ret = gtk_icon_source_copy(Handle);
			Gtk.IconSource ret = raw_ret == IntPtr.Zero ? null : (Gtk.IconSource) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.IconSource), true);
			return ret;
		}

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

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

		[Obsolete]
		public Gtk.TextDirection Direction { 
			get {
				int raw_ret = gtk_icon_source_get_direction(Handle);
				Gtk.TextDirection ret = (Gtk.TextDirection) raw_ret;
				return ret;
			}
			set {
				gtk_icon_source_set_direction(Handle, (int) value);
			}
		}

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

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

		[Obsolete]
		public bool DirectionWildcarded { 
			get {
				bool raw_ret = gtk_icon_source_get_direction_wildcarded(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_icon_source_set_direction_wildcarded(Handle, value);
			}
		}

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

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

		[Obsolete]
		public string Filename { 
			get {
				IntPtr raw_ret = gtk_icon_source_get_filename(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_icon_source_set_filename(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

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

		[Obsolete]
		public string IconName { 
			get {
				IntPtr raw_ret = gtk_icon_source_get_icon_name(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_icon_source_set_icon_name(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

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

		[Obsolete]
		public Gdk.Pixbuf Pixbuf { 
			get {
				IntPtr raw_ret = gtk_icon_source_get_pixbuf(Handle);
				Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf;
				return ret;
			}
			set {
				gtk_icon_source_set_pixbuf(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

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

		[Obsolete]
		public Gtk.IconSize Size { 
			get {
				int raw_ret = gtk_icon_source_get_size(Handle);
				Gtk.IconSize ret = (Gtk.IconSize) raw_ret;
				return ret;
			}
			set {
				gtk_icon_source_set_size(Handle, (int) value);
			}
		}

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

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

		[Obsolete]
		public bool SizeWildcarded { 
			get {
				bool raw_ret = gtk_icon_source_get_size_wildcarded(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_icon_source_set_size_wildcarded(Handle, value);
			}
		}

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

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

		[Obsolete]
		public Gtk.StateType State { 
			get {
				int raw_ret = gtk_icon_source_get_state(Handle);
				Gtk.StateType ret = (Gtk.StateType) raw_ret;
				return ret;
			}
			set {
				gtk_icon_source_set_state(Handle, (int) value);
			}
		}

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

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

		[Obsolete]
		public bool StateWildcarded { 
			get {
				bool raw_ret = gtk_icon_source_get_state_wildcarded(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_icon_source_set_state_wildcarded(Handle, value);
			}
		}

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

		[Obsolete]
		public static GLib.GType GType { 
			get {
				IntPtr raw_ret = gtk_icon_source_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

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

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

		[Obsolete]
		public IconSource () 
		{
			Raw = gtk_icon_source_new();
		}

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

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

		[Obsolete("Gtk.IconSource is now freed automatically")]
		public void Free () {}

		class FinalizerInfo {
			IntPtr handle;
			public uint timeoutHandlerId;

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

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

		~IconSource ()
		{
			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
	}
}
