// 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
	public class AnnotMapping : GLib.Opaque {

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

		public Poppler.AnnotMapping Copy() {
			IntPtr raw_ret = poppler_annot_mapping_copy(Handle);
			Poppler.AnnotMapping ret = raw_ret == IntPtr.Zero ? null : (Poppler.AnnotMapping) GLib.Opaque.GetOpaque (raw_ret, typeof (Poppler.AnnotMapping), true);
			return ret;
		}

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

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

		public AnnotMapping(IntPtr raw) : base(raw) {}

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

		public AnnotMapping () 
		{
			Raw = poppler_annot_mapping_new();
		}

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

		protected override void Free (IntPtr raw)
		{
			poppler_annot_mapping_free (raw);
		}

		class FinalizerInfo {
			IntPtr handle;

			public FinalizerInfo (IntPtr handle)
			{
				this.handle = handle;
			}

			public bool Handler ()
			{
				poppler_annot_mapping_free (handle);
				return false;
			}
		}

		~AnnotMapping ()
		{
			if (!Owned)
				return;
			FinalizerInfo info = new FinalizerInfo (Handle);
			GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler));
		}

#endregion
	}
}
