// 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 Requisition : IEquatable<Requisition> {

		public int Width;
		public int Height;

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

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

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

		public static Requisition New()
		{
			Requisition result = Requisition.New (gtk_requisition_new());
			return result;
		}

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

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

		public bool Equals (Requisition other)
		{
			return true && Width.Equals (other.Width) && Height.Equals (other.Height);
		}

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

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

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

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

		[Obsolete("This is a no-op")]
		public Gtk.Requisition Copy() {
			return this;
		}
#endregion
	}
}
