// 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;
	using static GLib.AbiStructExtension;

#region Autogenerated code
	public partial class PrintOperation : GLib.Object, Gtk.IPrintOperationPreview {

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

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

		public PrintOperation () : base (IntPtr.Zero)
		{
			if (GetType () != typeof (PrintOperation)) {
				CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
				return;
			}
			Raw = gtk_print_operation_new();
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_default_page_setup(IntPtr raw, IntPtr default_page_setup);
		static d_gtk_print_operation_set_default_page_setup gtk_print_operation_set_default_page_setup = FuncLoader.LoadFunction<d_gtk_print_operation_set_default_page_setup>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_default_page_setup"));

		[GLib.Property ("default-page-setup")]
		public Gtk.PageSetup DefaultPageSetup {
			get  {
				IntPtr raw_ret = gtk_print_operation_get_default_page_setup(Handle);
				Gtk.PageSetup ret = GLib.Object.GetObject(raw_ret) as Gtk.PageSetup;
				return ret;
			}
			set  {
				gtk_print_operation_set_default_page_setup(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_print_settings(IntPtr raw, IntPtr print_settings);
		static d_gtk_print_operation_set_print_settings gtk_print_operation_set_print_settings = FuncLoader.LoadFunction<d_gtk_print_operation_set_print_settings>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_print_settings"));

		[GLib.Property ("print-settings")]
		public Gtk.PrintSettings PrintSettings {
			get  {
				IntPtr raw_ret = gtk_print_operation_get_print_settings(Handle);
				Gtk.PrintSettings ret = GLib.Object.GetObject(raw_ret) as Gtk.PrintSettings;
				return ret;
			}
			set  {
				gtk_print_operation_set_print_settings(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_job_name(IntPtr raw, IntPtr job_name);
		static d_gtk_print_operation_set_job_name gtk_print_operation_set_job_name = FuncLoader.LoadFunction<d_gtk_print_operation_set_job_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_job_name"));

		[GLib.Property ("job-name")]
		public string JobName {
			get {
				GLib.Value val = GetProperty ("job-name");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_print_operation_set_job_name(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_n_pages(IntPtr raw, int n_pages);
		static d_gtk_print_operation_set_n_pages gtk_print_operation_set_n_pages = FuncLoader.LoadFunction<d_gtk_print_operation_set_n_pages>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_n_pages"));

		[GLib.Property ("n-pages")]
		public int NPages {
			get {
				GLib.Value val = GetProperty ("n-pages");
				int ret = (int) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_n_pages(Handle, value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_current_page(IntPtr raw, int current_page);
		static d_gtk_print_operation_set_current_page gtk_print_operation_set_current_page = FuncLoader.LoadFunction<d_gtk_print_operation_set_current_page>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_current_page"));

		[GLib.Property ("current-page")]
		public int CurrentPage {
			get {
				GLib.Value val = GetProperty ("current-page");
				int ret = (int) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_current_page(Handle, value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_use_full_page(IntPtr raw, bool full_page);
		static d_gtk_print_operation_set_use_full_page gtk_print_operation_set_use_full_page = FuncLoader.LoadFunction<d_gtk_print_operation_set_use_full_page>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_use_full_page"));

		[GLib.Property ("use-full-page")]
		public bool UseFullPage {
			get {
				GLib.Value val = GetProperty ("use-full-page");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_use_full_page(Handle, value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_track_print_status(IntPtr raw, bool track_status);
		static d_gtk_print_operation_set_track_print_status gtk_print_operation_set_track_print_status = FuncLoader.LoadFunction<d_gtk_print_operation_set_track_print_status>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_track_print_status"));

		[GLib.Property ("track-print-status")]
		public bool TrackPrintStatus {
			get {
				GLib.Value val = GetProperty ("track-print-status");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_track_print_status(Handle, value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_unit(IntPtr raw, int unit);
		static d_gtk_print_operation_set_unit gtk_print_operation_set_unit = FuncLoader.LoadFunction<d_gtk_print_operation_set_unit>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_unit"));

		[GLib.Property ("unit")]
		public Gtk.Unit Unit {
			get {
				GLib.Value val = GetProperty ("unit");
				Gtk.Unit ret = (Gtk.Unit) (Enum) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_unit(Handle, (int) value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_show_progress(IntPtr raw, bool show_progress);
		static d_gtk_print_operation_set_show_progress gtk_print_operation_set_show_progress = FuncLoader.LoadFunction<d_gtk_print_operation_set_show_progress>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_show_progress"));

		[GLib.Property ("show-progress")]
		public bool ShowProgress {
			get {
				GLib.Value val = GetProperty ("show-progress");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_show_progress(Handle, value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_allow_async(IntPtr raw, bool allow_async);
		static d_gtk_print_operation_set_allow_async gtk_print_operation_set_allow_async = FuncLoader.LoadFunction<d_gtk_print_operation_set_allow_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_allow_async"));

		[GLib.Property ("allow-async")]
		public bool AllowAsync {
			get {
				GLib.Value val = GetProperty ("allow-async");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set  {
				gtk_print_operation_set_allow_async(Handle, value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_export_filename(IntPtr raw, IntPtr filename);
		static d_gtk_print_operation_set_export_filename gtk_print_operation_set_export_filename = FuncLoader.LoadFunction<d_gtk_print_operation_set_export_filename>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_export_filename"));

		[GLib.Property ("export-filename")]
		public string ExportFilename {
			get {
				GLib.Value val = GetProperty ("export-filename");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_print_operation_set_export_filename(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

		[GLib.Property ("status")]
		public Gtk.PrintStatus Status {
			get  {
				int raw_ret = gtk_print_operation_get_status(Handle);
				Gtk.PrintStatus ret = (Gtk.PrintStatus) raw_ret;
				return ret;
			}
		}

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

		[GLib.Property ("status-string")]
		public string StatusString {
			get  {
				IntPtr raw_ret = gtk_print_operation_get_status_string(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_custom_tab_label(IntPtr raw, IntPtr label);
		static d_gtk_print_operation_set_custom_tab_label gtk_print_operation_set_custom_tab_label = FuncLoader.LoadFunction<d_gtk_print_operation_set_custom_tab_label>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_custom_tab_label"));

		[GLib.Property ("custom-tab-label")]
		public string CustomTabLabel {
			get {
				GLib.Value val = GetProperty ("custom-tab-label");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_print_operation_set_custom_tab_label(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_support_selection(IntPtr raw, bool support_selection);
		static d_gtk_print_operation_set_support_selection gtk_print_operation_set_support_selection = FuncLoader.LoadFunction<d_gtk_print_operation_set_support_selection>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_support_selection"));

		[GLib.Property ("support-selection")]
		public bool SupportSelection {
			get  {
				bool raw_ret = gtk_print_operation_get_support_selection(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_print_operation_set_support_selection(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_has_selection(IntPtr raw, bool has_selection);
		static d_gtk_print_operation_set_has_selection gtk_print_operation_set_has_selection = FuncLoader.LoadFunction<d_gtk_print_operation_set_has_selection>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_has_selection"));

		[GLib.Property ("has-selection")]
		public bool HasSelection {
			get  {
				bool raw_ret = gtk_print_operation_get_has_selection(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_print_operation_set_has_selection(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_set_embed_page_setup(IntPtr raw, bool embed);
		static d_gtk_print_operation_set_embed_page_setup gtk_print_operation_set_embed_page_setup = FuncLoader.LoadFunction<d_gtk_print_operation_set_embed_page_setup>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_set_embed_page_setup"));

		[GLib.Property ("embed-page-setup")]
		public bool EmbedPageSetup {
			get  {
				bool raw_ret = gtk_print_operation_get_embed_page_setup(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_print_operation_set_embed_page_setup(Handle, value);
			}
		}

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

		[GLib.Property ("n-pages-to-print")]
		public int NPagesToPrint {
			get  {
				int raw_ret = gtk_print_operation_get_n_pages_to_print(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[GLib.Signal("paginate")]
		public event Gtk.PaginateHandler Paginate {
			add {
				this.AddSignalHandler ("paginate", value, typeof (Gtk.PaginateArgs));
			}
			remove {
				this.RemoveSignalHandler ("paginate", value);
			}
		}

		[GLib.Signal("request-page-setup")]
		public event Gtk.RequestPageSetupHandler RequestPageSetup {
			add {
				this.AddSignalHandler ("request-page-setup", value, typeof (Gtk.RequestPageSetupArgs));
			}
			remove {
				this.RemoveSignalHandler ("request-page-setup", value);
			}
		}

		[GLib.Signal("status-changed")]
		public event System.EventHandler StatusChanged {
			add {
				this.AddSignalHandler ("status-changed", value);
			}
			remove {
				this.RemoveSignalHandler ("status-changed", value);
			}
		}

		[GLib.Signal("preview")]
		public event Gtk.PreviewHandler Preview {
			add {
				this.AddSignalHandler ("preview", value, typeof (Gtk.PreviewArgs));
			}
			remove {
				this.RemoveSignalHandler ("preview", value);
			}
		}

		[GLib.Signal("end-print")]
		public event Gtk.EndPrintHandler EndPrint {
			add {
				this.AddSignalHandler ("end-print", value, typeof (Gtk.EndPrintArgs));
			}
			remove {
				this.RemoveSignalHandler ("end-print", value);
			}
		}

		[GLib.Signal("begin-print")]
		public event Gtk.BeginPrintHandler BeginPrint {
			add {
				this.AddSignalHandler ("begin-print", value, typeof (Gtk.BeginPrintArgs));
			}
			remove {
				this.RemoveSignalHandler ("begin-print", value);
			}
		}

		[GLib.Signal("custom-widget-apply")]
		public event Gtk.CustomWidgetApplyHandler CustomWidgetApply {
			add {
				this.AddSignalHandler ("custom-widget-apply", value, typeof (Gtk.CustomWidgetApplyArgs));
			}
			remove {
				this.RemoveSignalHandler ("custom-widget-apply", value);
			}
		}

		[GLib.Signal("update-custom-widget")]
		public event Gtk.UpdateCustomWidgetHandler UpdateCustomWidget {
			add {
				this.AddSignalHandler ("update-custom-widget", value, typeof (Gtk.UpdateCustomWidgetArgs));
			}
			remove {
				this.RemoveSignalHandler ("update-custom-widget", value);
			}
		}

		[GLib.Signal("create-custom-widget")]
		public event Gtk.CreateCustomWidgetHandler CreateCustomWidget {
			add {
				this.AddSignalHandler ("create-custom-widget", value, typeof (Gtk.CreateCustomWidgetArgs));
			}
			remove {
				this.RemoveSignalHandler ("create-custom-widget", value);
			}
		}

		[GLib.Signal("draw-page")]
		public event Gtk.DrawPageHandler DrawPage {
			add {
				this.AddSignalHandler ("draw-page", value, typeof (Gtk.DrawPageArgs));
			}
			remove {
				this.RemoveSignalHandler ("draw-page", value);
			}
		}

		[GLib.Signal("done")]
		public event Gtk.DoneHandler Done {
			add {
				this.AddSignalHandler ("done", value, typeof (Gtk.DoneArgs));
			}
			remove {
				this.RemoveSignalHandler ("done", value);
			}
		}

		static DoneNativeDelegate Done_cb_delegate;
		static DoneNativeDelegate DoneVMCallback {
			get {
				if (Done_cb_delegate == null)
					Done_cb_delegate = new DoneNativeDelegate (Done_cb);
				return Done_cb_delegate;
			}
		}

		static void OverrideDone (GLib.GType gtype)
		{
			OverrideDone (gtype, DoneVMCallback);
		}

		static void OverrideDone (GLib.GType gtype, DoneNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("done"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DoneNativeDelegate (IntPtr inst, int result);

		static void Done_cb (IntPtr inst, int result)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnDone ((Gtk.PrintOperationResult) result);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideDone")]
		protected virtual void OnDone (Gtk.PrintOperationResult result)
		{
			InternalDone (result);
		}

		private void InternalDone (Gtk.PrintOperationResult result)
		{
			DoneNativeDelegate unmanaged = class_abi.BaseOverride<DoneNativeDelegate>(this.LookupGType(), "done");
			if (unmanaged == null) return;

			unmanaged (this.Handle, (int) result);
		}

		static BeginPrintNativeDelegate BeginPrint_cb_delegate;
		static BeginPrintNativeDelegate BeginPrintVMCallback {
			get {
				if (BeginPrint_cb_delegate == null)
					BeginPrint_cb_delegate = new BeginPrintNativeDelegate (BeginPrint_cb);
				return BeginPrint_cb_delegate;
			}
		}

		static void OverrideBeginPrint (GLib.GType gtype)
		{
			OverrideBeginPrint (gtype, BeginPrintVMCallback);
		}

		static void OverrideBeginPrint (GLib.GType gtype, BeginPrintNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("begin_print"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void BeginPrintNativeDelegate (IntPtr inst, IntPtr context);

		static void BeginPrint_cb (IntPtr inst, IntPtr context)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnBeginPrint (GLib.Object.GetObject(context) as Gtk.PrintContext);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideBeginPrint")]
		protected virtual void OnBeginPrint (Gtk.PrintContext context)
		{
			InternalBeginPrint (context);
		}

		private void InternalBeginPrint (Gtk.PrintContext context)
		{
			BeginPrintNativeDelegate unmanaged = class_abi.BaseOverride<BeginPrintNativeDelegate>(this.LookupGType(), "begin_print");
			if (unmanaged == null) return;

			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle);
		}

		static PaginateNativeDelegate Paginate_cb_delegate;
		static PaginateNativeDelegate PaginateVMCallback {
			get {
				if (Paginate_cb_delegate == null)
					Paginate_cb_delegate = new PaginateNativeDelegate (Paginate_cb);
				return Paginate_cb_delegate;
			}
		}

		static void OverridePaginate (GLib.GType gtype)
		{
			OverridePaginate (gtype, PaginateVMCallback);
		}

		static void OverridePaginate (GLib.GType gtype, PaginateNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("paginate"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool PaginateNativeDelegate (IntPtr inst, IntPtr context);

		static bool Paginate_cb (IntPtr inst, IntPtr context)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				bool __result;
				__result = __obj.OnPaginate (GLib.Object.GetObject(context) as Gtk.PrintContext);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverridePaginate")]
		protected virtual bool OnPaginate (Gtk.PrintContext context)
		{
			return InternalPaginate (context);
		}

		private bool InternalPaginate (Gtk.PrintContext context)
		{
			PaginateNativeDelegate unmanaged = class_abi.BaseOverride<PaginateNativeDelegate>(this.LookupGType(), "paginate");
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle);
			return __result;
		}

		static RequestPageSetupNativeDelegate RequestPageSetup_cb_delegate;
		static RequestPageSetupNativeDelegate RequestPageSetupVMCallback {
			get {
				if (RequestPageSetup_cb_delegate == null)
					RequestPageSetup_cb_delegate = new RequestPageSetupNativeDelegate (RequestPageSetup_cb);
				return RequestPageSetup_cb_delegate;
			}
		}

		static void OverrideRequestPageSetup (GLib.GType gtype)
		{
			OverrideRequestPageSetup (gtype, RequestPageSetupVMCallback);
		}

		static void OverrideRequestPageSetup (GLib.GType gtype, RequestPageSetupNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("request_page_setup"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RequestPageSetupNativeDelegate (IntPtr inst, IntPtr context, int page_nr, IntPtr setup);

		static void RequestPageSetup_cb (IntPtr inst, IntPtr context, int page_nr, IntPtr setup)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnRequestPageSetup (GLib.Object.GetObject(context) as Gtk.PrintContext, page_nr, GLib.Object.GetObject(setup) as Gtk.PageSetup);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideRequestPageSetup")]
		protected virtual void OnRequestPageSetup (Gtk.PrintContext context, int page_nr, Gtk.PageSetup setup)
		{
			InternalRequestPageSetup (context, page_nr, setup);
		}

		private void InternalRequestPageSetup (Gtk.PrintContext context, int page_nr, Gtk.PageSetup setup)
		{
			RequestPageSetupNativeDelegate unmanaged = class_abi.BaseOverride<RequestPageSetupNativeDelegate>(this.LookupGType(), "request_page_setup");
			if (unmanaged == null) return;

			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, page_nr, setup == null ? IntPtr.Zero : setup.Handle);
		}

		static DrawPageNativeDelegate DrawPage_cb_delegate;
		static DrawPageNativeDelegate DrawPageVMCallback {
			get {
				if (DrawPage_cb_delegate == null)
					DrawPage_cb_delegate = new DrawPageNativeDelegate (DrawPage_cb);
				return DrawPage_cb_delegate;
			}
		}

		static void OverrideDrawPage (GLib.GType gtype)
		{
			OverrideDrawPage (gtype, DrawPageVMCallback);
		}

		static void OverrideDrawPage (GLib.GType gtype, DrawPageNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("draw_page"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DrawPageNativeDelegate (IntPtr inst, IntPtr context, int page_nr);

		static void DrawPage_cb (IntPtr inst, IntPtr context, int page_nr)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnDrawPage (GLib.Object.GetObject(context) as Gtk.PrintContext, page_nr);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideDrawPage")]
		protected virtual void OnDrawPage (Gtk.PrintContext context, int page_nr)
		{
			InternalDrawPage (context, page_nr);
		}

		private void InternalDrawPage (Gtk.PrintContext context, int page_nr)
		{
			DrawPageNativeDelegate unmanaged = class_abi.BaseOverride<DrawPageNativeDelegate>(this.LookupGType(), "draw_page");
			if (unmanaged == null) return;

			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, page_nr);
		}

		static EndPrintNativeDelegate EndPrint_cb_delegate;
		static EndPrintNativeDelegate EndPrintVMCallback {
			get {
				if (EndPrint_cb_delegate == null)
					EndPrint_cb_delegate = new EndPrintNativeDelegate (EndPrint_cb);
				return EndPrint_cb_delegate;
			}
		}

		static void OverrideEndPrint (GLib.GType gtype)
		{
			OverrideEndPrint (gtype, EndPrintVMCallback);
		}

		static void OverrideEndPrint (GLib.GType gtype, EndPrintNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("end_print"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void EndPrintNativeDelegate (IntPtr inst, IntPtr context);

		static void EndPrint_cb (IntPtr inst, IntPtr context)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnEndPrint (GLib.Object.GetObject(context) as Gtk.PrintContext);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideEndPrint")]
		protected virtual void OnEndPrint (Gtk.PrintContext context)
		{
			InternalEndPrint (context);
		}

		private void InternalEndPrint (Gtk.PrintContext context)
		{
			EndPrintNativeDelegate unmanaged = class_abi.BaseOverride<EndPrintNativeDelegate>(this.LookupGType(), "end_print");
			if (unmanaged == null) return;

			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle);
		}

		static StatusChangedNativeDelegate StatusChanged_cb_delegate;
		static StatusChangedNativeDelegate StatusChangedVMCallback {
			get {
				if (StatusChanged_cb_delegate == null)
					StatusChanged_cb_delegate = new StatusChangedNativeDelegate (StatusChanged_cb);
				return StatusChanged_cb_delegate;
			}
		}

		static void OverrideStatusChanged (GLib.GType gtype)
		{
			OverrideStatusChanged (gtype, StatusChangedVMCallback);
		}

		static void OverrideStatusChanged (GLib.GType gtype, StatusChangedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("status_changed"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void StatusChangedNativeDelegate (IntPtr inst);

		static void StatusChanged_cb (IntPtr inst)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnStatusChanged ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideStatusChanged")]
		protected virtual void OnStatusChanged ()
		{
			InternalStatusChanged ();
		}

		private void InternalStatusChanged ()
		{
			StatusChangedNativeDelegate unmanaged = class_abi.BaseOverride<StatusChangedNativeDelegate>(this.LookupGType(), "status_changed");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static CreateCustomWidgetNativeDelegate CreateCustomWidget_cb_delegate;
		static CreateCustomWidgetNativeDelegate CreateCustomWidgetVMCallback {
			get {
				if (CreateCustomWidget_cb_delegate == null)
					CreateCustomWidget_cb_delegate = new CreateCustomWidgetNativeDelegate (CreateCustomWidget_cb);
				return CreateCustomWidget_cb_delegate;
			}
		}

		static void OverrideCreateCustomWidget (GLib.GType gtype)
		{
			OverrideCreateCustomWidget (gtype, CreateCustomWidgetVMCallback);
		}

		static void OverrideCreateCustomWidget (GLib.GType gtype, CreateCustomWidgetNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_custom_widget"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr CreateCustomWidgetNativeDelegate (IntPtr inst);

		static IntPtr CreateCustomWidget_cb (IntPtr inst)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				Gtk.Widget __result;
				__result = __obj.OnCreateCustomWidget ();
				return __result == null ? IntPtr.Zero : __result.Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideCreateCustomWidget")]
		protected virtual Gtk.Widget OnCreateCustomWidget ()
		{
			return InternalCreateCustomWidget ();
		}

		private Gtk.Widget InternalCreateCustomWidget ()
		{
			CreateCustomWidgetNativeDelegate unmanaged = class_abi.BaseOverride<CreateCustomWidgetNativeDelegate>(this.LookupGType(), "create_custom_widget");
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle);
			return GLib.Object.GetObject(__result) as Gtk.Widget;
		}

		static CustomWidgetApplyNativeDelegate CustomWidgetApply_cb_delegate;
		static CustomWidgetApplyNativeDelegate CustomWidgetApplyVMCallback {
			get {
				if (CustomWidgetApply_cb_delegate == null)
					CustomWidgetApply_cb_delegate = new CustomWidgetApplyNativeDelegate (CustomWidgetApply_cb);
				return CustomWidgetApply_cb_delegate;
			}
		}

		static void OverrideCustomWidgetApply (GLib.GType gtype)
		{
			OverrideCustomWidgetApply (gtype, CustomWidgetApplyVMCallback);
		}

		static void OverrideCustomWidgetApply (GLib.GType gtype, CustomWidgetApplyNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("custom_widget_apply"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void CustomWidgetApplyNativeDelegate (IntPtr inst, IntPtr widget);

		static void CustomWidgetApply_cb (IntPtr inst, IntPtr widget)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnCustomWidgetApply (GLib.Object.GetObject(widget) as Gtk.Widget);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideCustomWidgetApply")]
		protected virtual void OnCustomWidgetApply (Gtk.Widget widget)
		{
			InternalCustomWidgetApply (widget);
		}

		private void InternalCustomWidgetApply (Gtk.Widget widget)
		{
			CustomWidgetApplyNativeDelegate unmanaged = class_abi.BaseOverride<CustomWidgetApplyNativeDelegate>(this.LookupGType(), "custom_widget_apply");
			if (unmanaged == null) return;

			unmanaged (this.Handle, widget == null ? IntPtr.Zero : widget.Handle);
		}

		static PreviewNativeDelegate Preview_cb_delegate;
		static PreviewNativeDelegate PreviewVMCallback {
			get {
				if (Preview_cb_delegate == null)
					Preview_cb_delegate = new PreviewNativeDelegate (Preview_cb);
				return Preview_cb_delegate;
			}
		}

		static void OverridePreview (GLib.GType gtype)
		{
			OverridePreview (gtype, PreviewVMCallback);
		}

		static void OverridePreview (GLib.GType gtype, PreviewNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("preview"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool PreviewNativeDelegate (IntPtr inst, IntPtr preview, IntPtr context, IntPtr parent);

		static bool Preview_cb (IntPtr inst, IntPtr preview, IntPtr context, IntPtr parent)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				bool __result;
				__result = __obj.OnPreview (Gtk.PrintOperationPreviewAdapter.GetObject (preview, false), GLib.Object.GetObject(context) as Gtk.PrintContext, GLib.Object.GetObject(parent) as Gtk.Window);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverridePreview")]
		protected virtual bool OnPreview (Gtk.IPrintOperationPreview preview, Gtk.PrintContext context, Gtk.Window parent)
		{
			return InternalPreview (preview, context, parent);
		}

		private bool InternalPreview (Gtk.IPrintOperationPreview preview, Gtk.PrintContext context, Gtk.Window parent)
		{
			PreviewNativeDelegate unmanaged = class_abi.BaseOverride<PreviewNativeDelegate>(this.LookupGType(), "preview");
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle, preview == null ? IntPtr.Zero : ((preview is GLib.Object) ? (preview as GLib.Object).Handle : (preview as Gtk.PrintOperationPreviewAdapter).Handle), context == null ? IntPtr.Zero : context.Handle, parent == null ? IntPtr.Zero : parent.Handle);
			return __result;
		}

		static UpdateCustomWidgetNativeDelegate UpdateCustomWidget_cb_delegate;
		static UpdateCustomWidgetNativeDelegate UpdateCustomWidgetVMCallback {
			get {
				if (UpdateCustomWidget_cb_delegate == null)
					UpdateCustomWidget_cb_delegate = new UpdateCustomWidgetNativeDelegate (UpdateCustomWidget_cb);
				return UpdateCustomWidget_cb_delegate;
			}
		}

		static void OverrideUpdateCustomWidget (GLib.GType gtype)
		{
			OverrideUpdateCustomWidget (gtype, UpdateCustomWidgetVMCallback);
		}

		static void OverrideUpdateCustomWidget (GLib.GType gtype, UpdateCustomWidgetNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("update_custom_widget"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void UpdateCustomWidgetNativeDelegate (IntPtr inst, IntPtr widget, IntPtr setup, IntPtr settings);

		static void UpdateCustomWidget_cb (IntPtr inst, IntPtr widget, IntPtr setup, IntPtr settings)
		{
			try {
				PrintOperation __obj = GLib.Object.GetObject (inst, false) as PrintOperation;
				__obj.OnUpdateCustomWidget (GLib.Object.GetObject(widget) as Gtk.Widget, GLib.Object.GetObject(setup) as Gtk.PageSetup, GLib.Object.GetObject(settings) as Gtk.PrintSettings);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideUpdateCustomWidget")]
		protected virtual void OnUpdateCustomWidget (Gtk.Widget widget, Gtk.PageSetup setup, Gtk.PrintSettings settings)
		{
			InternalUpdateCustomWidget (widget, setup, settings);
		}

		private void InternalUpdateCustomWidget (Gtk.Widget widget, Gtk.PageSetup setup, Gtk.PrintSettings settings)
		{
			UpdateCustomWidgetNativeDelegate unmanaged = class_abi.BaseOverride<UpdateCustomWidgetNativeDelegate>(this.LookupGType(), "update_custom_widget");
			if (unmanaged == null) return;

			unmanaged (this.Handle, widget == null ? IntPtr.Zero : widget.Handle, setup == null ? IntPtr.Zero : setup.Handle, settings == null ? IntPtr.Zero : settings.Handle);
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _class_abi = null;
		static public unsafe new GLib.AbiStruct class_abi {
			get {
				if (_class_abi == null)
					_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("done"
							, GLib.Object.class_abi.Fields
							, (uint) sizeof( IntPtr ) // done
							, null
							, "begin_print"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("begin_print"
							, -1
							, (uint) sizeof( IntPtr ) // begin_print
							, "done"
							, "paginate"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("paginate"
							, -1
							, (uint) sizeof( IntPtr ) // paginate
							, "begin_print"
							, "request_page_setup"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("request_page_setup"
							, -1
							, (uint) sizeof( IntPtr ) // request_page_setup
							, "paginate"
							, "draw_page"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("draw_page"
							, -1
							, (uint) sizeof( IntPtr ) // draw_page
							, "request_page_setup"
							, "end_print"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("end_print"
							, -1
							, (uint) sizeof( IntPtr ) // end_print
							, "draw_page"
							, "status_changed"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("status_changed"
							, -1
							, (uint) sizeof( IntPtr ) // status_changed
							, "end_print"
							, "create_custom_widget"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("create_custom_widget"
							, -1
							, (uint) sizeof( IntPtr ) // create_custom_widget
							, "status_changed"
							, "custom_widget_apply"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("custom_widget_apply"
							, -1
							, (uint) sizeof( IntPtr ) // custom_widget_apply
							, "create_custom_widget"
							, "preview"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("preview"
							, -1
							, (uint) sizeof( IntPtr ) // preview
							, "custom_widget_apply"
							, "update_custom_widget"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("update_custom_widget"
							, -1
							, (uint) sizeof( IntPtr ) // update_custom_widget
							, "preview"
							, "_gtk_reserved1"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved1"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved1
							, "update_custom_widget"
							, "_gtk_reserved2"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved2"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved2
							, "_gtk_reserved1"
							, "_gtk_reserved3"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved3"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved3
							, "_gtk_reserved2"
							, "_gtk_reserved4"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved4"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved4
							, "_gtk_reserved3"
							, "_gtk_reserved5"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved5"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved5
							, "_gtk_reserved4"
							, "_gtk_reserved6"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved6"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved6
							, "_gtk_reserved5"
							, "_gtk_reserved7"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved7"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved7
							, "_gtk_reserved6"
							, "_gtk_reserved8"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved8"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved8
							, "_gtk_reserved7"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

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

		public void Cancel() {
			gtk_print_operation_cancel(Handle);
		}

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

		public void DrawPageFinish() {
			gtk_print_operation_draw_page_finish(Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_get_error(IntPtr raw, out IntPtr error);
		static d_gtk_print_operation_get_error gtk_print_operation_get_error = FuncLoader.LoadFunction<d_gtk_print_operation_get_error>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_get_error"));

		public unsafe void GetError() {
			IntPtr error = IntPtr.Zero;
			gtk_print_operation_get_error(Handle, out error);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
		}

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

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

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

		public bool IsFinished { 
			get {
				bool raw_ret = gtk_print_operation_is_finished(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_portal_launch_preview(IntPtr raw, IntPtr surface, IntPtr parent, IntPtr filename);
		static d_gtk_print_operation_portal_launch_preview gtk_print_operation_portal_launch_preview = FuncLoader.LoadFunction<d_gtk_print_operation_portal_launch_preview>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_portal_launch_preview"));

		public void PortalLaunchPreview(Cairo.Surface surface, Gtk.Window parent, string filename) {
			IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
			gtk_print_operation_portal_launch_preview(Handle, surface.Handle, parent == null ? IntPtr.Zero : parent.Handle, native_filename);
			GLib.Marshaller.Free (native_filename);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int d_gtk_print_operation_portal_run_dialog(IntPtr raw, bool show_dialog, IntPtr parent, out bool do_print);
		static d_gtk_print_operation_portal_run_dialog gtk_print_operation_portal_run_dialog = FuncLoader.LoadFunction<d_gtk_print_operation_portal_run_dialog>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_portal_run_dialog"));

		public Gtk.PrintOperationResult PortalRunDialog(bool show_dialog, Gtk.Window parent, out bool do_print) {
			int raw_ret = gtk_print_operation_portal_run_dialog(Handle, show_dialog, parent == null ? IntPtr.Zero : parent.Handle, out do_print);
			Gtk.PrintOperationResult ret = (Gtk.PrintOperationResult) raw_ret;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int d_gtk_print_operation_run(IntPtr raw, int action, IntPtr parent, out IntPtr error);
		static d_gtk_print_operation_run gtk_print_operation_run = FuncLoader.LoadFunction<d_gtk_print_operation_run>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_run"));

		public unsafe Gtk.PrintOperationResult Run(Gtk.PrintOperationAction action, Gtk.Window parent) {
			IntPtr error = IntPtr.Zero;
			int raw_ret = gtk_print_operation_run(Handle, (int) action, parent == null ? IntPtr.Zero : parent.Handle, out error);
			Gtk.PrintOperationResult ret = (Gtk.PrintOperationResult) raw_ret;
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

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

		public void SetDeferDrawing() {
			gtk_print_operation_set_defer_drawing(Handle);
		}

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

		public void EndPreview() {
			gtk_print_operation_preview_end_preview(Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_print_operation_preview_is_selected(IntPtr raw, int page_nr);
		static d_gtk_print_operation_preview_is_selected gtk_print_operation_preview_is_selected = FuncLoader.LoadFunction<d_gtk_print_operation_preview_is_selected>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_preview_is_selected"));

		public bool IsSelected(int page_nr) {
			bool raw_ret = gtk_print_operation_preview_is_selected(Handle, page_nr);
			bool ret = raw_ret;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_print_operation_preview_render_page(IntPtr raw, int page_nr);
		static d_gtk_print_operation_preview_render_page gtk_print_operation_preview_render_page = FuncLoader.LoadFunction<d_gtk_print_operation_preview_render_page>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_print_operation_preview_render_page"));

		public void RenderPage(int page_nr) {
			gtk_print_operation_preview_render_page(Handle, page_nr);
		}

		[GLib.Signal("got-page-size")]
		public event Gtk.GotPageSizeHandler GotPageSize {
			add {
				this.AddSignalHandler ("got-page-size", value, typeof (Gtk.GotPageSizeArgs));
			}
			remove {
				this.RemoveSignalHandler ("got-page-size", value);
			}
		}

		[GLib.Signal("ready")]
		public event Gtk.ReadyHandler Ready {
			add {
				this.AddSignalHandler ("ready", value, typeof (Gtk.ReadyArgs));
			}
			remove {
				this.RemoveSignalHandler ("ready", value);
			}
		}

		static ReadyNativeDelegate Ready_cb_delegate;
		static ReadyNativeDelegate ReadyVMCallback {
			get {
				if (Ready_cb_delegate == null)
					Ready_cb_delegate = new ReadyNativeDelegate (Ready_cb);
				return Ready_cb_delegate;
			}
		}

		static void OverrideReady (GLib.GType gtype)
		{
			OverrideReady (gtype, ReadyVMCallback);
		}

		static void OverrideReady (GLib.GType gtype, ReadyNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "ready", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ReadyNativeDelegate (IntPtr inst, IntPtr context);

		static void Ready_cb (IntPtr inst, IntPtr context)
		{
			try {
				Gtk.PrintOperation __obj = GLib.Object.GetObject (inst, false) as Gtk.PrintOperation;
				__obj.OnReady (GLib.Object.GetObject(context) as Gtk.PrintContext);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideReady")]
		protected virtual void OnReady (Gtk.PrintContext context)
		{
			InternalReady (context);
		}

		private void InternalReady (Gtk.PrintContext context)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (context);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static GotPageSizeNativeDelegate GotPageSize_cb_delegate;
		static GotPageSizeNativeDelegate GotPageSizeVMCallback {
			get {
				if (GotPageSize_cb_delegate == null)
					GotPageSize_cb_delegate = new GotPageSizeNativeDelegate (GotPageSize_cb);
				return GotPageSize_cb_delegate;
			}
		}

		static void OverrideGotPageSize (GLib.GType gtype)
		{
			OverrideGotPageSize (gtype, GotPageSizeVMCallback);
		}

		static void OverrideGotPageSize (GLib.GType gtype, GotPageSizeNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "got-page-size", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void GotPageSizeNativeDelegate (IntPtr inst, IntPtr context, IntPtr page_setup);

		static void GotPageSize_cb (IntPtr inst, IntPtr context, IntPtr page_setup)
		{
			try {
				Gtk.PrintOperation __obj = GLib.Object.GetObject (inst, false) as Gtk.PrintOperation;
				__obj.OnGotPageSize (GLib.Object.GetObject(context) as Gtk.PrintContext, GLib.Object.GetObject(page_setup) as Gtk.PageSetup);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.PrintOperation), ConnectionMethod="OverrideGotPageSize")]
		protected virtual void OnGotPageSize (Gtk.PrintContext context, Gtk.PageSetup page_setup)
		{
			InternalGotPageSize (context, page_setup);
		}

		private void InternalGotPageSize (Gtk.PrintContext context, Gtk.PageSetup page_setup)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (3);
			GLib.Value[] vals = new GLib.Value [3];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (context);
			inst_and_params.Append (vals [1]);
			vals [2] = new GLib.Value (page_setup);
			inst_and_params.Append (vals [2]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public unsafe new GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("priv"
							, GLib.Object.abi_info.Fields
							, (uint) sizeof( IntPtr ) // priv
							, null
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
