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

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

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

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

		[Obsolete]
		public override string ToString() {
			IntPtr raw_ret = gtk_symbolic_color_to_string(Handle);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_symbolic_color_new_alpha(IntPtr color, double factor);
		static d_gtk_symbolic_color_new_alpha gtk_symbolic_color_new_alpha = FuncLoader.LoadFunction<d_gtk_symbolic_color_new_alpha>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_symbolic_color_new_alpha"));

		[Obsolete]
		public SymbolicColor (Gtk.SymbolicColor color, double factor) 
		{
			Raw = gtk_symbolic_color_new_alpha(color == null ? IntPtr.Zero : color.Handle, factor);
		}

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

		[Obsolete]
		public SymbolicColor (Gdk.RGBA color) 
		{
			IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color);
			Raw = gtk_symbolic_color_new_literal(native_color);
			Marshal.FreeHGlobal (native_color);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_symbolic_color_new_mix(IntPtr color1, IntPtr color2, double factor);
		static d_gtk_symbolic_color_new_mix gtk_symbolic_color_new_mix = FuncLoader.LoadFunction<d_gtk_symbolic_color_new_mix>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_symbolic_color_new_mix"));

		[Obsolete]
		public SymbolicColor (Gtk.SymbolicColor color1, Gtk.SymbolicColor color2, double factor) 
		{
			Raw = gtk_symbolic_color_new_mix(color1 == null ? IntPtr.Zero : color1.Handle, color2 == null ? IntPtr.Zero : color2.Handle, factor);
		}

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

		[Obsolete]
		public SymbolicColor (string name) 
		{
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			Raw = gtk_symbolic_color_new_name(native_name);
			GLib.Marshaller.Free (native_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_symbolic_color_new_shade(IntPtr color, double factor);
		static d_gtk_symbolic_color_new_shade gtk_symbolic_color_new_shade = FuncLoader.LoadFunction<d_gtk_symbolic_color_new_shade>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_symbolic_color_new_shade"));

		public static SymbolicColor NewShade(Gtk.SymbolicColor color, double factor)
		{
			SymbolicColor result = new SymbolicColor (gtk_symbolic_color_new_shade(color == null ? IntPtr.Zero : color.Handle, factor));
			return result;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_symbolic_color_new_win32(IntPtr theme_class, int id);
		static d_gtk_symbolic_color_new_win32 gtk_symbolic_color_new_win32 = FuncLoader.LoadFunction<d_gtk_symbolic_color_new_win32>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_symbolic_color_new_win32"));

		[Obsolete]
		public SymbolicColor (string theme_class, int id) 
		{
			IntPtr native_theme_class = GLib.Marshaller.StringToPtrGStrdup (theme_class);
			Raw = gtk_symbolic_color_new_win32(native_theme_class, id);
			GLib.Marshaller.Free (native_theme_class);
		}

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

		protected override void Ref (IntPtr raw)
		{
			if (!Owned) {
				gtk_symbolic_color_ref (raw);
				Owned = true;
			}
		}

		[Obsolete("Gtk.SymbolicColor is now refcounted automatically")]
		public SymbolicColor Ref () { return this; }

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

		protected override void Unref (IntPtr raw)
		{
			if (Owned) {
				gtk_symbolic_color_unref (raw);
				Owned = false;
			}
		}

		[Obsolete("Gtk.SymbolicColor is now refcounted automatically")]
		public void Unref () {}

		class FinalizerInfo {
			IntPtr handle;
			public uint timeoutHandlerId;

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

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

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