// 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 Printer : GLib.Object {

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_printer_new(IntPtr name, IntPtr backend, bool virtual_);
		static d_gtk_printer_new gtk_printer_new = FuncLoader.LoadFunction<d_gtk_printer_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_printer_new"));

		public Printer (string name, Gtk.PrintBackend backend, bool virtual_) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Printer)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("name");
				vals.Add (new GLib.Value (name));
				if (backend != null) {
					names.Add ("backend");
					vals.Add (new GLib.Value (backend));
				}
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			Raw = gtk_printer_new(native_name, backend == null ? IntPtr.Zero : backend.Handle, virtual_);
			GLib.Marshaller.Free (native_name);
		}

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

		[GLib.Property ("name")]
		public string Name {
			get  {
				IntPtr raw_ret = gtk_printer_get_name(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		[GLib.Property ("backend")]
		public Gtk.PrintBackend Backend {
			get  {
				IntPtr raw_ret = gtk_printer_get_backend(Handle);
				Gtk.PrintBackend ret = raw_ret == IntPtr.Zero ? null : (Gtk.PrintBackend) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.PrintBackend), false);
				return ret;
			}
		}

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

		[GLib.Property ("is-virtual")]
		public bool IsVirtual {
			get  {
				bool raw_ret = gtk_printer_is_virtual(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		[GLib.Property ("accepts-pdf")]
		public bool AcceptsPdf {
			get  {
				bool raw_ret = gtk_printer_accepts_pdf(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		[GLib.Property ("accepts-ps")]
		public bool AcceptsPs {
			get  {
				bool raw_ret = gtk_printer_accepts_ps(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		[GLib.Property ("state-message")]
		public string StateMessage {
			get  {
				IntPtr raw_ret = gtk_printer_get_state_message(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		[GLib.Property ("location")]
		public string Location {
			get  {
				IntPtr raw_ret = gtk_printer_get_location(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		[GLib.Property ("icon-name")]
		public string IconName {
			get  {
				IntPtr raw_ret = gtk_printer_get_icon_name(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		[GLib.Property ("job-count")]
		public int JobCount {
			get  {
				int raw_ret = gtk_printer_get_job_count(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[GLib.Property ("paused")]
		public bool Paused {
			get {
				GLib.Value val = GetProperty ("paused");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
		}

		[GLib.Property ("accepting-jobs")]
		public bool AcceptingJobs {
			get {
				GLib.Value val = GetProperty ("accepting-jobs");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
		}

		[GLib.Signal("details-acquired")]
		public event Gtk.DetailsAcquiredHandler DetailsAcquired {
			add {
				this.AddSignalHandler ("details-acquired", value, typeof (Gtk.DetailsAcquiredArgs));
			}
			remove {
				this.RemoveSignalHandler ("details-acquired", value);
			}
		}

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

		public int Compare(Gtk.Printer b) {
			int raw_ret = gtk_printer_compare(Handle, b == null ? IntPtr.Zero : b.Handle);
			int ret = raw_ret;
			return ret;
		}

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

		public Gtk.PrintCapabilities Capabilities { 
			get {
				int raw_ret = gtk_printer_get_capabilities(Handle);
				Gtk.PrintCapabilities ret = (Gtk.PrintCapabilities) raw_ret;
				return ret;
			}
		}

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

		public Gtk.PageSetup DefaultPageSize { 
			get {
				IntPtr raw_ret = gtk_printer_get_default_page_size(Handle);
				Gtk.PageSetup ret = GLib.Object.GetObject(raw_ret) as Gtk.PageSetup;
				return ret;
			}
		}

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

		public string Description { 
			get {
				IntPtr raw_ret = gtk_printer_get_description(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_printer_get_hard_margins(IntPtr raw, out double top, out double bottom, out double left, out double right);
		static d_gtk_printer_get_hard_margins gtk_printer_get_hard_margins = FuncLoader.LoadFunction<d_gtk_printer_get_hard_margins>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_printer_get_hard_margins"));

		public bool GetHardMargins(out double top, out double bottom, out double left, out double right) {
			bool raw_ret = gtk_printer_get_hard_margins(Handle, out top, out bottom, out left, out right);
			bool ret = raw_ret;
			return ret;
		}

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

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

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

		public bool HasDetails { 
			get {
				bool raw_ret = gtk_printer_has_details(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public bool IsAcceptingJobs { 
			get {
				bool raw_ret = gtk_printer_is_accepting_jobs(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public bool IsActive { 
			get {
				bool raw_ret = gtk_printer_is_active(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public bool IsDefault { 
			get {
				bool raw_ret = gtk_printer_is_default(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public bool IsPaused { 
			get {
				bool raw_ret = gtk_printer_is_paused(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public Gtk.PageSetup[] ListPapers() {
			IntPtr raw_ret = gtk_printer_list_papers(Handle);
			Gtk.PageSetup[] ret = GLib.Marshaller.ListPtrToArray<Gtk.PageSetup, Gtk.PageSetup> (raw_ret, true, true);
			return ret;
		}

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

		public void RequestDetails() {
			gtk_printer_request_details(Handle);
		}

#endregion
	}
}
