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

namespace WebKit {

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

#region Autogenerated code
	[StructLayout(LayoutKind.Sequential)]
	public partial struct ITPThirdParty : IEquatable<ITPThirdParty> {


		public static WebKit.ITPThirdParty Zero = new WebKit.ITPThirdParty ();

		public static WebKit.ITPThirdParty New(IntPtr raw) {
			if (raw == IntPtr.Zero)
				return WebKit.ITPThirdParty.Zero;
			return (WebKit.ITPThirdParty) Marshal.PtrToStructure (raw, typeof (WebKit.ITPThirdParty));
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_webkit_itp_third_party_get_type();
		static d_webkit_itp_third_party_get_type webkit_itp_third_party_get_type = FuncLoader.LoadFunction<d_webkit_itp_third_party_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Webkit), "webkit_itp_third_party_get_type"));

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

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

		public string Domain { 
			get {
				IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf<WebKit.ITPThirdParty>());
				System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
				IntPtr raw_ret = webkit_itp_third_party_get_domain(this_as_native);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

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

		public GLib.List[] FirstParties { 
			get {
				IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf<WebKit.ITPThirdParty>());
				System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
				IntPtr raw_ret = webkit_itp_third_party_get_first_parties(this_as_native);
				GLib.List[] ret = GLib.Marshaller.ListPtrToArray<GLib.List, GLib.List> (raw_ret, false, false);
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

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

		public WebKit.ITPThirdParty Ref() {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf<WebKit.ITPThirdParty>());
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			IntPtr raw_ret = webkit_itp_third_party_ref(this_as_native);
			WebKit.ITPThirdParty ret = WebKit.ITPThirdParty.New (raw_ret);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

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

		public void Unref() {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf<WebKit.ITPThirdParty>());
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			webkit_itp_third_party_unref(this_as_native);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

		static void ReadNative (IntPtr native, ref WebKit.ITPThirdParty target)
		{
			target = New (native);
		}

		public bool Equals (ITPThirdParty other)
		{
			return true;
		}

		public override bool Equals (object other)
		{
			return other is ITPThirdParty && Equals ((ITPThirdParty) other);
		}

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode ();
		}

		public static explicit operator GLib.Value (WebKit.ITPThirdParty boxed)
		{
			GLib.Value val = GLib.Value.Empty;
			val.Init (WebKit.ITPThirdParty.GType);
			val.Val = boxed;
			return val;
		}

		public static explicit operator WebKit.ITPThirdParty (GLib.Value val)
		{
			return (WebKit.ITPThirdParty) val.Val;
		}
#endregion
	}
}
