// 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
	[StructLayout(LayoutKind.Sequential)]
	public partial struct TargetEntry : IEquatable<TargetEntry> {

		public string Target;
		public Gtk.TargetFlags Flags;
		public uint Info;

		public static Gtk.TargetEntry Zero = new Gtk.TargetEntry ();

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_target_entry_new(IntPtr target, uint flags, uint info);
		static d_gtk_target_entry_new gtk_target_entry_new = FuncLoader.LoadFunction<d_gtk_target_entry_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_target_entry_new"));

		public static TargetEntry New(string target, uint flags, uint info)
		{
			IntPtr native_target = GLib.Marshaller.StringToPtrGStrdup (target);
			TargetEntry result = TargetEntry.New (gtk_target_entry_new(native_target, flags, info));
			GLib.Marshaller.Free (native_target);
			return result;
		}

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

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

		public bool Equals (TargetEntry other)
		{
			return true && Target.Equals (other.Target) && Flags.Equals (other.Flags) && Info.Equals (other.Info);
		}

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

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ Target.GetHashCode () ^ Flags.GetHashCode () ^ Info.GetHashCode ();
		}

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

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