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

namespace Poppler {

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

#region Autogenerated code
	[StructLayout(LayoutKind.Sequential)]
	public struct PageTransition {

		public Poppler.PageTransitionType Type;
		public Poppler.PageTransitionAlignment Alignment;
		public Poppler.PageTransitionDirection Direction;
		public int Duration;
		public int Angle;
		public double Scale;
		public bool Rectangular;

		public static Poppler.PageTransition Zero = new Poppler.PageTransition ();

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

		[DllImport("poppler-glib")]
		static extern IntPtr poppler_page_transition_new();

		public static PageTransition New()
		{
			PageTransition result = PageTransition.New (poppler_page_transition_new());
			return result;
		}

		[DllImport("poppler-glib")]
		static extern IntPtr poppler_page_transition_copy(IntPtr raw);

		public Poppler.PageTransition Copy() {
			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 raw_ret = poppler_page_transition_copy(this_as_native);
			Poppler.PageTransition ret = Poppler.PageTransition.New (raw_ret);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

		[DllImport("poppler-glib")]
		static extern void poppler_page_transition_free(IntPtr raw);

		public void Free() {
			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);
			poppler_page_transition_free(this_as_native);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

		[DllImport("poppler-glib")]
		static extern IntPtr poppler_page_transition_get_type();

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

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

#endregion
	}
}
