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

namespace Gtk {

	using System;
	using System.Runtime.InteropServices;

#region Autogenerated code
	public partial class RecentChooserAdapter : GLib.GInterfaceAdapter, Gtk.IRecentChooser {

		[StructLayout (LayoutKind.Sequential)]
		struct GtkRecentChooserIface {
			public SetCurrentUriNativeDelegate SetCurrentUri;
			public GetCurrentUriNativeDelegate GetCurrentUri;
			public SelectUriNativeDelegate SelectUri;
			public UnselectUriNativeDelegate UnselectUri;
			public SelectAllNativeDelegate SelectAll;
			public UnselectAllNativeDelegate UnselectAll;
			public GetItemsNativeDelegate GetItems;
			IntPtr GetRecentManager;
			public AddFilterNativeDelegate AddFilter;
			public RemoveFilterNativeDelegate RemoveFilter;
			public GetFiltersNativeDelegate GetFilters;
			public SetSortFuncNativeDelegate SetSortFunc;
			IntPtr ItemActivated;
			IntPtr SelectionChanged;
		}

		static GtkRecentChooserIface iface;

		static RecentChooserAdapter ()
		{
			GLib.GType.Register (_gtype, typeof (RecentChooserAdapter));
			iface.SetCurrentUri = new SetCurrentUriNativeDelegate (SetCurrentUri_cb);
			iface.GetCurrentUri = new GetCurrentUriNativeDelegate (GetCurrentUri_cb);
			iface.SelectUri = new SelectUriNativeDelegate (SelectUri_cb);
			iface.UnselectUri = new UnselectUriNativeDelegate (UnselectUri_cb);
			iface.SelectAll = new SelectAllNativeDelegate (SelectAll_cb);
			iface.UnselectAll = new UnselectAllNativeDelegate (UnselectAll_cb);
			iface.GetItems = new GetItemsNativeDelegate (GetItems_cb);
			iface.AddFilter = new AddFilterNativeDelegate (AddFilter_cb);
			iface.RemoveFilter = new RemoveFilterNativeDelegate (RemoveFilter_cb);
			iface.GetFilters = new GetFiltersNativeDelegate (GetFilters_cb);
			iface.SetSortFunc = new SetSortFuncNativeDelegate (SetSortFunc_cb);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool SetCurrentUriNativeDelegate (IntPtr inst, IntPtr uri, out IntPtr error);

		static bool SetCurrentUri_cb (IntPtr inst, IntPtr uri, out IntPtr error)
		{
			error = IntPtr.Zero;

			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				bool __result;
				__result = __obj.SetCurrentUri (GLib.Marshaller.Utf8PtrToString (uri));
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

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

		static IntPtr GetCurrentUri_cb (IntPtr inst)
		{
			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				string __result;
				__result = __obj.CurrentUri;
				return GLib.Marshaller.StringToPtrGStrdup(__result);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool SelectUriNativeDelegate (IntPtr inst, IntPtr uri, out IntPtr error);

		static bool SelectUri_cb (IntPtr inst, IntPtr uri, out IntPtr error)
		{
			error = IntPtr.Zero;

			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				bool __result;
				__result = __obj.SelectUri (GLib.Marshaller.Utf8PtrToString (uri));
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void UnselectUriNativeDelegate (IntPtr inst, IntPtr uri);

		static void UnselectUri_cb (IntPtr inst, IntPtr uri)
		{
			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				__obj.UnselectUri (GLib.Marshaller.Utf8PtrToString (uri));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

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

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

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

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

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

		static IntPtr GetItems_cb (IntPtr inst)
		{
			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				Gtk.RecentInfo[] __result;
				__result = __obj.Items;
				return new GLib.List(__result, typeof (Gtk.RecentInfo), true, true) == null ? IntPtr.Zero : new GLib.List(__result, typeof (Gtk.RecentInfo), true, true).Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void AddFilterNativeDelegate (IntPtr inst, IntPtr filter);

		static void AddFilter_cb (IntPtr inst, IntPtr filter)
		{
			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				__obj.AddFilter (GLib.Object.GetObject(filter) as Gtk.RecentFilter);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RemoveFilterNativeDelegate (IntPtr inst, IntPtr filter);

		static void RemoveFilter_cb (IntPtr inst, IntPtr filter)
		{
			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				__obj.RemoveFilter (GLib.Object.GetObject(filter) as Gtk.RecentFilter);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

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

		static IntPtr GetFilters_cb (IntPtr inst)
		{
			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				Gtk.RecentFilter[] __result;
				__result = __obj.Filters;
				return new GLib.SList(__result, typeof (Gtk.RecentFilter), true, false) == null ? IntPtr.Zero : new GLib.SList(__result, typeof (Gtk.RecentFilter), true, false).Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void SetSortFuncNativeDelegate (IntPtr inst, GtkSharp.RecentSortFuncNative sort_func, IntPtr sort_data, GLib.DestroyNotify data_destroy);

		static void SetSortFunc_cb (IntPtr inst, GtkSharp.RecentSortFuncNative sort_func, IntPtr sort_data, GLib.DestroyNotify data_destroy)
		{
			try {
				IRecentChooserImplementor __obj = GLib.Object.GetObject (inst, false) as IRecentChooserImplementor;
				GtkSharp.RecentSortFuncInvoker sort_func_invoker = new GtkSharp.RecentSortFuncInvoker (sort_func, sort_data, data_destroy);
				__obj.SortFunc = sort_func_invoker.Handler;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		static int class_offset = 2 * IntPtr.Size;

		static void Initialize (IntPtr ptr, IntPtr data)
		{
			IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset);
			GtkRecentChooserIface native_iface = (GtkRecentChooserIface) Marshal.PtrToStructure (ifaceptr, typeof (GtkRecentChooserIface));
			native_iface.SetCurrentUri = iface.SetCurrentUri;
			native_iface.GetCurrentUri = iface.GetCurrentUri;
			native_iface.SelectUri = iface.SelectUri;
			native_iface.UnselectUri = iface.UnselectUri;
			native_iface.SelectAll = iface.SelectAll;
			native_iface.UnselectAll = iface.UnselectAll;
			native_iface.GetItems = iface.GetItems;
			native_iface.AddFilter = iface.AddFilter;
			native_iface.RemoveFilter = iface.RemoveFilter;
			native_iface.GetFilters = iface.GetFilters;
			native_iface.SetSortFunc = iface.SetSortFunc;
			Marshal.StructureToPtr (native_iface, ifaceptr, false);
		}

		GLib.Object implementor;

		public RecentChooserAdapter ()
		{
			InitHandler = new GLib.GInterfaceInitHandler (Initialize);
		}

		public RecentChooserAdapter (IRecentChooserImplementor implementor)
		{
			if (implementor == null)
				throw new ArgumentNullException ("implementor");
			else if (!(implementor is GLib.Object))
				throw new ArgumentException ("implementor must be a subclass of GLib.Object");
			this.implementor = implementor as GLib.Object;
		}

		public RecentChooserAdapter (IntPtr handle)
		{
			if (!_gtype.IsInstance (handle))
				throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
			implementor = GLib.Object.GetObject (handle);
		}

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

		private static GLib.GType _gtype = new GLib.GType (gtk_recent_chooser_get_type ());

		public static GLib.GType GType {
			get {
				return _gtype;
			}
		}

		public override GLib.GType GInterfaceGType {
			get {
				return _gtype;
			}
		}

		public override IntPtr Handle {
			get {
				return implementor.Handle;
			}
		}

		public IntPtr OwnedHandle {
			get {
				return implementor.OwnedHandle;
			}
		}

		public static IRecentChooser GetObject (IntPtr handle, bool owned)
		{
			GLib.Object obj = GLib.Object.GetObject (handle, owned);
			return GetObject (obj);
		}

		public static IRecentChooser GetObject (GLib.Object obj)
		{
			if (obj == null)
				return null;
			else if (obj is IRecentChooserImplementor)
				return new RecentChooserAdapter (obj as IRecentChooserImplementor);
			else if (obj as IRecentChooser == null)
				return new RecentChooserAdapter (obj.Handle);
			else
				return obj as IRecentChooser;
		}

		public IRecentChooserImplementor Implementor {
			get {
				return implementor as IRecentChooserImplementor;
			}
		}

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

		public void AddFilter(Gtk.RecentFilter filter) {
			gtk_recent_chooser_add_filter(Handle, filter == null ? IntPtr.Zero : filter.Handle);
		}

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

		public static int ErrorQuark() {
			int raw_ret = gtk_recent_chooser_error_quark();
			int ret = raw_ret;
			return ret;
		}

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

		public Gtk.RecentInfo CurrentItem { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_get_current_item(Handle);
				Gtk.RecentInfo ret = raw_ret == IntPtr.Zero ? null : (Gtk.RecentInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.RecentInfo), false);
				return ret;
			}
		}

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

		public string CurrentUri { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_get_current_uri(Handle);
				string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
				return ret;
			}
		}

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

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

		public Gtk.RecentFilter Filter { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_get_filter(Handle);
				Gtk.RecentFilter ret = GLib.Object.GetObject(raw_ret) as Gtk.RecentFilter;
				return ret;
			}
			set {
				gtk_recent_chooser_set_filter(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

		public Gtk.RecentInfo[] Items { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_get_items(Handle);
				Gtk.RecentInfo[] ret = GLib.Marshaller.ListPtrToArray<Gtk.RecentInfo, Gtk.RecentInfo> (raw_ret, true, true);
				return ret;
			}
		}

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

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

		public int Limit { 
			get {
				int raw_ret = gtk_recent_chooser_get_limit(Handle);
				int ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_limit(Handle, value);
			}
		}

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

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

		public bool LocalOnly { 
			get {
				bool raw_ret = gtk_recent_chooser_get_local_only(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_local_only(Handle, value);
			}
		}

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

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

		public bool SelectMultiple { 
			get {
				bool raw_ret = gtk_recent_chooser_get_select_multiple(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_select_multiple(Handle, value);
			}
		}

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

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

		public bool ShowIcons { 
			get {
				bool raw_ret = gtk_recent_chooser_get_show_icons(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_show_icons(Handle, value);
			}
		}

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

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

		public bool ShowNotFound { 
			get {
				bool raw_ret = gtk_recent_chooser_get_show_not_found(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_show_not_found(Handle, value);
			}
		}

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

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

		public bool ShowPrivate { 
			get {
				bool raw_ret = gtk_recent_chooser_get_show_private(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_show_private(Handle, value);
			}
		}

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

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

		public bool ShowTips { 
			get {
				bool raw_ret = gtk_recent_chooser_get_show_tips(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_show_tips(Handle, value);
			}
		}

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

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

		public Gtk.RecentSortType SortType { 
			get {
				int raw_ret = gtk_recent_chooser_get_sort_type(Handle);
				Gtk.RecentSortType ret = (Gtk.RecentSortType) raw_ret;
				return ret;
			}
			set {
				gtk_recent_chooser_set_sort_type(Handle, (int) value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_recent_chooser_get_uris(IntPtr raw, out UIntPtr length);
		static d_gtk_recent_chooser_get_uris gtk_recent_chooser_get_uris = FuncLoader.LoadFunction<d_gtk_recent_chooser_get_uris>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_recent_chooser_get_uris"));

		public string[] GetUris(out ulong length) {
			UIntPtr native_length;
			IntPtr raw_ret = gtk_recent_chooser_get_uris(Handle, out native_length);
			string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, false);
			length = (ulong) native_length;
			return ret;
		}

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

		public Gtk.RecentFilter[] Filters { 
			get {
				IntPtr raw_ret = gtk_recent_chooser_list_filters(Handle);
				Gtk.RecentFilter[] ret = GLib.Marshaller.SListPtrToArray<Gtk.RecentFilter, Gtk.RecentFilter> (raw_ret, true, false);
				return ret;
			}
		}

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

		public void RemoveFilter(Gtk.RecentFilter filter) {
			gtk_recent_chooser_remove_filter(Handle, filter == null ? IntPtr.Zero : filter.Handle);
		}

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

		public void SelectAll() {
			gtk_recent_chooser_select_all(Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_recent_chooser_select_uri(IntPtr raw, IntPtr uri, out IntPtr error);
		static d_gtk_recent_chooser_select_uri gtk_recent_chooser_select_uri = FuncLoader.LoadFunction<d_gtk_recent_chooser_select_uri>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_recent_chooser_select_uri"));

		public bool SelectUri(string uri) {
			IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
			IntPtr error = IntPtr.Zero;
			bool raw_ret = gtk_recent_chooser_select_uri(Handle, native_uri, out error);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_uri);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_recent_chooser_set_current_uri(IntPtr raw, IntPtr uri, out IntPtr error);
		static d_gtk_recent_chooser_set_current_uri gtk_recent_chooser_set_current_uri = FuncLoader.LoadFunction<d_gtk_recent_chooser_set_current_uri>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_recent_chooser_set_current_uri"));

		public bool SetCurrentUri(string uri) {
			IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
			IntPtr error = IntPtr.Zero;
			bool raw_ret = gtk_recent_chooser_set_current_uri(Handle, native_uri, out error);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_uri);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_recent_chooser_set_sort_func(IntPtr raw, GtkSharp.RecentSortFuncNative sort_func, IntPtr sort_data, GLib.DestroyNotify data_destroy);
		static d_gtk_recent_chooser_set_sort_func gtk_recent_chooser_set_sort_func = FuncLoader.LoadFunction<d_gtk_recent_chooser_set_sort_func>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_recent_chooser_set_sort_func"));

		public Gtk.RecentSortFunc SortFunc { 
			set {
				GtkSharp.RecentSortFuncWrapper value_wrapper = new GtkSharp.RecentSortFuncWrapper (value);
				IntPtr sort_data;
				GLib.DestroyNotify data_destroy;
				if (value == null) {
					sort_data = IntPtr.Zero;
					data_destroy = null;
				} else {
					sort_data = (IntPtr) GCHandle.Alloc (value_wrapper);
					data_destroy = GLib.DestroyHelper.NotifyHandler;
				}
				gtk_recent_chooser_set_sort_func(Handle, value_wrapper.NativeDelegate, sort_data, data_destroy);
			}
		}

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

		public void UnselectAll() {
			gtk_recent_chooser_unselect_all(Handle);
		}

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

		public void UnselectUri(string uri) {
			IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
			gtk_recent_chooser_unselect_uri(Handle, native_uri);
			GLib.Marshaller.Free (native_uri);
		}

#endregion
	}
}
