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

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

		protected Clipboard() : base(IntPtr.Zero)
		{
			CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
		}

		[GLib.Signal("owner-change")]
		public event Gtk.OwnerChangeHandler OwnerChange {
			add {
				this.AddSignalHandler ("owner-change", value, typeof (Gtk.OwnerChangeArgs));
			}
			remove {
				this.RemoveSignalHandler ("owner-change", value);
			}
		}

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

		public void Clear() {
			gtk_clipboard_clear(Handle);
		}

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

		public static Gtk.Clipboard Get(Gdk.Atom selection) {
			IntPtr raw_ret = gtk_clipboard_get(selection == null ? IntPtr.Zero : selection.Handle);
			Gtk.Clipboard ret = GLib.Object.GetObject(raw_ret) as Gtk.Clipboard;
			return ret;
		}

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

		public static Gtk.Clipboard GetDefault(Gdk.Display display) {
			IntPtr raw_ret = gtk_clipboard_get_default(display == null ? IntPtr.Zero : display.Handle);
			Gtk.Clipboard ret = GLib.Object.GetObject(raw_ret) as Gtk.Clipboard;
			return ret;
		}

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

		public Gdk.Display Display { 
			get {
				IntPtr raw_ret = gtk_clipboard_get_display(Handle);
				Gdk.Display ret = GLib.Object.GetObject(raw_ret) as Gdk.Display;
				return ret;
			}
		}

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

		public static Gtk.Clipboard GetForDisplay(Gdk.Display display, Gdk.Atom selection) {
			IntPtr raw_ret = gtk_clipboard_get_for_display(display == null ? IntPtr.Zero : display.Handle, selection == null ? IntPtr.Zero : selection.Handle);
			Gtk.Clipboard ret = GLib.Object.GetObject(raw_ret) as Gtk.Clipboard;
			return ret;
		}

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

		public GLib.Object Owner { 
			get {
				IntPtr raw_ret = gtk_clipboard_get_owner(Handle);
				GLib.Object ret = GLib.Object.GetObject (raw_ret);
				return ret;
			}
		}

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

		public Gdk.Atom Selection { 
			get {
				IntPtr raw_ret = gtk_clipboard_get_selection(Handle);
				Gdk.Atom ret = raw_ret == IntPtr.Zero ? null : (Gdk.Atom) GLib.Opaque.GetOpaque (raw_ret, typeof (Gdk.Atom), false);
				return ret;
			}
		}

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

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_clipboard_request_contents(IntPtr raw, IntPtr target, GtkSharp.ClipboardReceivedFuncNative cb, IntPtr user_data);
		static d_gtk_clipboard_request_contents gtk_clipboard_request_contents = FuncLoader.LoadFunction<d_gtk_clipboard_request_contents>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_request_contents"));

		public void RequestContents(Gdk.Atom target, Gtk.ClipboardReceivedFunc cb) {
			GtkSharp.ClipboardReceivedFuncWrapper cb_wrapper = new GtkSharp.ClipboardReceivedFuncWrapper (cb);
			cb_wrapper.PersistUntilCalled ();
			gtk_clipboard_request_contents(Handle, target == null ? IntPtr.Zero : target.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_clipboard_request_image(IntPtr raw, GtkSharp.ClipboardImageReceivedFuncNative cb, IntPtr user_data);
		static d_gtk_clipboard_request_image gtk_clipboard_request_image = FuncLoader.LoadFunction<d_gtk_clipboard_request_image>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_request_image"));

		public void RequestImage(Gtk.ClipboardImageReceivedFunc cb) {
			GtkSharp.ClipboardImageReceivedFuncWrapper cb_wrapper = new GtkSharp.ClipboardImageReceivedFuncWrapper (cb);
			cb_wrapper.PersistUntilCalled ();
			gtk_clipboard_request_image(Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_clipboard_request_targets(IntPtr raw, GtkSharp.ClipboardTargetsReceivedFuncNative cb, IntPtr user_data);
		static d_gtk_clipboard_request_targets gtk_clipboard_request_targets = FuncLoader.LoadFunction<d_gtk_clipboard_request_targets>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_request_targets"));

		public void RequestTargets(Gtk.ClipboardTargetsReceivedFunc cb) {
			GtkSharp.ClipboardTargetsReceivedFuncWrapper cb_wrapper = new GtkSharp.ClipboardTargetsReceivedFuncWrapper (cb);
			cb_wrapper.PersistUntilCalled ();
			gtk_clipboard_request_targets(Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_clipboard_request_text(IntPtr raw, GtkSharp.ClipboardTextReceivedFuncNative cb, IntPtr user_data);
		static d_gtk_clipboard_request_text gtk_clipboard_request_text = FuncLoader.LoadFunction<d_gtk_clipboard_request_text>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_request_text"));

		public void RequestText(Gtk.ClipboardTextReceivedFunc cb) {
			GtkSharp.ClipboardTextReceivedFuncWrapper cb_wrapper = new GtkSharp.ClipboardTextReceivedFuncWrapper (cb);
			cb_wrapper.PersistUntilCalled ();
			gtk_clipboard_request_text(Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_clipboard_request_uris(IntPtr raw, GtkSharp.ClipboardURIReceivedFuncNative cb, IntPtr user_data);
		static d_gtk_clipboard_request_uris gtk_clipboard_request_uris = FuncLoader.LoadFunction<d_gtk_clipboard_request_uris>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_request_uris"));

		public void RequestUris(Gtk.ClipboardURIReceivedFunc cb) {
			GtkSharp.ClipboardURIReceivedFuncWrapper cb_wrapper = new GtkSharp.ClipboardURIReceivedFuncWrapper (cb);
			cb_wrapper.PersistUntilCalled ();
			gtk_clipboard_request_uris(Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_clipboard_set_can_store(IntPtr raw, Gtk.TargetEntry[] targets, int n_targets);
		static d_gtk_clipboard_set_can_store gtk_clipboard_set_can_store = FuncLoader.LoadFunction<d_gtk_clipboard_set_can_store>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_set_can_store"));

		public Gtk.TargetEntry[] CanStore { 
			set {
				gtk_clipboard_set_can_store(Handle, value, (value == null ? 0 : value.Length));
			}
		}

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

		public Gdk.Pixbuf Image { 
			set {
				gtk_clipboard_set_image(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_clipboard_set_text(IntPtr raw, IntPtr text, int len);
		static d_gtk_clipboard_set_text gtk_clipboard_set_text = FuncLoader.LoadFunction<d_gtk_clipboard_set_text>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_set_text"));

		public string Text { 
			set {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_clipboard_set_text(Handle, native_value, System.Text.Encoding.UTF8.GetByteCount (value));
				GLib.Marshaller.Free (native_value);
			}
		}

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

		public void Store() {
			gtk_clipboard_store(Handle);
		}

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

		public Gtk.SelectionData WaitForContents(Gdk.Atom target) {
			IntPtr raw_ret = gtk_clipboard_wait_for_contents(Handle, target == null ? IntPtr.Zero : target.Handle);
			Gtk.SelectionData ret = raw_ret == IntPtr.Zero ? null : (Gtk.SelectionData) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.SelectionData), true);
			return ret;
		}

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

		public Gdk.Pixbuf WaitForImage() {
			IntPtr raw_ret = gtk_clipboard_wait_for_image(Handle);
			Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_clipboard_wait_for_targets(IntPtr raw, IntPtr targets, out int n_targets);
		static d_gtk_clipboard_wait_for_targets gtk_clipboard_wait_for_targets = FuncLoader.LoadFunction<d_gtk_clipboard_wait_for_targets>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_wait_for_targets"));

		public bool WaitForTargets(Gdk.Atom targets, out int n_targets) {
			bool raw_ret = gtk_clipboard_wait_for_targets(Handle, targets == null ? IntPtr.Zero : targets.Handle, out n_targets);
			bool ret = raw_ret;
			return ret;
		}

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

		public string WaitForText() {
			IntPtr raw_ret = gtk_clipboard_wait_for_text(Handle);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}

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

		public string WaitForUris() {
			IntPtr raw_ret = gtk_clipboard_wait_for_uris(Handle);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}

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

		public bool WaitIsImageAvailable() {
			bool raw_ret = gtk_clipboard_wait_is_image_available(Handle);
			bool ret = raw_ret;
			return ret;
		}

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

		public bool WaitIsRichTextAvailable(Gtk.TextBuffer buffer) {
			bool raw_ret = gtk_clipboard_wait_is_rich_text_available(Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
			bool ret = raw_ret;
			return ret;
		}

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

		public bool WaitIsTargetAvailable(Gdk.Atom target) {
			bool raw_ret = gtk_clipboard_wait_is_target_available(Handle, target == null ? IntPtr.Zero : target.Handle);
			bool ret = raw_ret;
			return ret;
		}

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

		public bool WaitIsTextAvailable() {
			bool raw_ret = gtk_clipboard_wait_is_text_available(Handle);
			bool ret = raw_ret;
			return ret;
		}

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

		public bool WaitIsUrisAvailable() {
			bool raw_ret = gtk_clipboard_wait_is_uris_available(Handle);
			bool ret = raw_ret;
			return ret;
		}

#endregion
	}
}
