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

namespace Gst.Video {

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

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

		private IntPtr _in_info;
		public Gst.Video.VideoInfo InInfo {
			get {
				return _in_info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (_in_info, typeof (Gst.Video.VideoInfo), false);
			}
			set {
				_in_info = value == null ? IntPtr.Zero : value.Handle;
			}
		}
		public Gst.Video.VideoRectangle InRectangle;
		private IntPtr _out_info;
		public Gst.Video.VideoInfo OutInfo {
			get {
				return _out_info == IntPtr.Zero ? null : (Gst.Video.VideoInfo) GLib.Opaque.GetOpaque (_out_info, typeof (Gst.Video.VideoInfo), false);
			}
			set {
				_out_info = value == null ? IntPtr.Zero : value.Handle;
			}
		}
		public Gst.Video.VideoRectangle OutRectangle;
		[MarshalAs (UnmanagedType.ByValArray, SizeConst=9)]
		public float[] Matrix;

		public static Gst.Video.VideoMetaTransformMatrix Zero = new Gst.Video.VideoMetaTransformMatrix ();

		public static Gst.Video.VideoMetaTransformMatrix New(IntPtr raw) {
			if (raw == IntPtr.Zero)
				return Gst.Video.VideoMetaTransformMatrix.Zero;
			return (Gst.Video.VideoMetaTransformMatrix) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoMetaTransformMatrix));
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_video_meta_transform_matrix_init(IntPtr raw, IntPtr in_info, IntPtr in_rectangle, IntPtr out_info, IntPtr out_rectangle);

		public void Init(Gst.Video.VideoInfo in_info, Gst.Video.VideoRectangle in_rectangle, Gst.Video.VideoInfo out_info, Gst.Video.VideoRectangle out_rectangle) {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			IntPtr native_in_rectangle = GLib.Marshaller.StructureToPtrAlloc (in_rectangle);
			IntPtr native_out_rectangle = GLib.Marshaller.StructureToPtrAlloc (out_rectangle);
			gst_video_meta_transform_matrix_init(this_as_native, in_info == null ? IntPtr.Zero : in_info.Handle, native_in_rectangle, out_info == null ? IntPtr.Zero : out_info.Handle, native_out_rectangle);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			Marshal.FreeHGlobal (native_in_rectangle);
			Marshal.FreeHGlobal (native_out_rectangle);
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_video_meta_transform_matrix_point(IntPtr raw, ref int x, ref int y);

		public bool Point(ref int x, ref int y) {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			bool raw_ret = gst_video_meta_transform_matrix_point(this_as_native, ref x, ref y);
			bool ret = raw_ret;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_video_meta_transform_matrix_point_clipped(IntPtr raw, ref int x, ref int y);

		public bool PointClipped(ref int x, ref int y) {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			bool raw_ret = gst_video_meta_transform_matrix_point_clipped(this_as_native, ref x, ref y);
			bool ret = raw_ret;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_video_meta_transform_matrix_rectangle(IntPtr raw, IntPtr rect);

		public bool Rectangle(ref Gst.Video.VideoRectangle rect) {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect);
			bool raw_ret = gst_video_meta_transform_matrix_rectangle(this_as_native, native_rect);
			bool ret = raw_ret;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			rect = Gst.Video.VideoRectangle.New (native_rect);
			Marshal.FreeHGlobal (native_rect);
			return ret;
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_video_meta_transform_matrix_rectangle_clipped(IntPtr raw, IntPtr rect);

		public bool RectangleClipped(ref Gst.Video.VideoRectangle rect) {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect);
			bool raw_ret = gst_video_meta_transform_matrix_rectangle_clipped(this_as_native, native_rect);
			bool ret = raw_ret;
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			rect = Gst.Video.VideoRectangle.New (native_rect);
			Marshal.FreeHGlobal (native_rect);
			return ret;
		}

		[DllImport("gstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern uint gst_video_meta_transform_matrix_get_quark();

		public static uint Quark { 
			get {
				uint raw_ret = gst_video_meta_transform_matrix_get_quark();
				uint ret = raw_ret;
				return ret;
			}
		}

		static void ReadNative (IntPtr native, ref Gst.Video.VideoMetaTransformMatrix target)
		{
			target = New (native);
		}

		public bool Equals (VideoMetaTransformMatrix other)
		{
			return true && InInfo.Equals (other.InInfo) && InRectangle.Equals (other.InRectangle) && OutInfo.Equals (other.OutInfo) && OutRectangle.Equals (other.OutRectangle) && Matrix.Equals (other.Matrix);
		}

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

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode () ^ InInfo.GetHashCode () ^ InRectangle.GetHashCode () ^ OutInfo.GetHashCode () ^ OutRectangle.GetHashCode () ^ Matrix.GetHashCode ();
		}

		private static GLib.GType GType {
			get { return GLib.GType.Pointer; }
		}
#endregion
	}
}
