// 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;

#region Autogenerated code
	public partial class RecentInfo : GLib.Opaque {

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

		public unsafe GLib.IAppInfo CreateAppInfo(string app_name) {
			IntPtr native_app_name = GLib.Marshaller.StringToPtrGStrdup (app_name);
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = gtk_recent_info_create_app_info(Handle, native_app_name, out error);
			GLib.IAppInfo ret = GLib.AppInfoAdapter.GetObject (raw_ret, false);
			GLib.Marshaller.Free (native_app_name);
			if (error != IntPtr.Zero) throw new GLib.GException (error);
			return ret;
		}

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

		public bool Exists() {
			bool raw_ret = gtk_recent_info_exists(Handle);
			bool ret = raw_ret;
			return ret;
		}

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

		public System.DateTime Added { 
			get {
				IntPtr raw_ret = gtk_recent_info_get_added(Handle);
				System.DateTime ret = GLib.Marshaller.time_tToDateTime (raw_ret);
				return ret;
			}
		}

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

		public int Age { 
			get {
				int raw_ret = gtk_recent_info_get_age(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_recent_info_get_application_info(IntPtr raw, IntPtr app_name, out IntPtr app_exec, out uint count, out IntPtr time_);
		static d_gtk_recent_info_get_application_info gtk_recent_info_get_application_info = FuncLoader.LoadFunction<d_gtk_recent_info_get_application_info>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_recent_info_get_application_info"));

		public bool GetApplicationInfo(string app_name, out string app_exec, out uint count, out System.DateTime time_) {
			IntPtr native_app_name = GLib.Marshaller.StringToPtrGStrdup (app_name);
			IntPtr native_app_exec;
			IntPtr native_time_;
			bool raw_ret = gtk_recent_info_get_application_info(Handle, native_app_name, out native_app_exec, out count, out native_time_);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_app_name);
			app_exec = GLib.Marshaller.Utf8PtrToString (native_app_exec);
			time_ = GLib.Marshaller.time_tToDateTime (native_time_);
			return ret;
		}

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

		public string GetApplications(out ulong length) {
			UIntPtr native_length;
			IntPtr raw_ret = gtk_recent_info_get_applications(Handle, out native_length);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			length = (ulong) native_length;
			return ret;
		}

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

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

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

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

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

		public GLib.IIcon Gicon { 
			get {
				IntPtr raw_ret = gtk_recent_info_get_gicon(Handle);
				GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
				return ret;
			}
		}

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

		public string GetGroups(out ulong length) {
			UIntPtr native_length;
			IntPtr raw_ret = gtk_recent_info_get_groups(Handle, out native_length);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			length = (ulong) native_length;
			return ret;
		}

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

		public Gdk.Pixbuf GetIcon(int size) {
			IntPtr raw_ret = gtk_recent_info_get_icon(Handle, size);
			Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf;
			return ret;
		}

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

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

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

		public System.DateTime Modified { 
			get {
				IntPtr raw_ret = gtk_recent_info_get_modified(Handle);
				System.DateTime ret = GLib.Marshaller.time_tToDateTime (raw_ret);
				return ret;
			}
		}

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

		public bool PrivateHint { 
			get {
				bool raw_ret = gtk_recent_info_get_private_hint(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

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

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

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

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

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

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

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

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

		public System.DateTime Visited { 
			get {
				IntPtr raw_ret = gtk_recent_info_get_visited(Handle);
				System.DateTime ret = GLib.Marshaller.time_tToDateTime (raw_ret);
				return ret;
			}
		}

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

		public bool HasApplication(string app_name) {
			IntPtr native_app_name = GLib.Marshaller.StringToPtrGStrdup (app_name);
			bool raw_ret = gtk_recent_info_has_application(Handle, native_app_name);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_app_name);
			return ret;
		}

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

		public bool HasGroup(string group_name) {
			IntPtr native_group_name = GLib.Marshaller.StringToPtrGStrdup (group_name);
			bool raw_ret = gtk_recent_info_has_group(Handle, native_group_name);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_group_name);
			return ret;
		}

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

		public bool IsLocal { 
			get {
				bool raw_ret = gtk_recent_info_is_local(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

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

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

		public bool Match(Gtk.RecentInfo info_b) {
			bool raw_ret = gtk_recent_info_match(Handle, info_b == null ? IntPtr.Zero : info_b.Handle);
			bool ret = raw_ret;
			return ret;
		}

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

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

		protected override void Ref (IntPtr raw)
		{
			if (!Owned) {
				gtk_recent_info_ref (raw);
				Owned = true;
			}
		}

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

		protected override void Unref (IntPtr raw)
		{
			if (Owned) {
				gtk_recent_info_unref (raw);
				Owned = false;
			}
		}

		class FinalizerInfo {
			IntPtr handle;
			public uint timeoutHandlerId;

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

			public bool Handler ()
			{
				gtk_recent_info_unref (handle);
				GLib.Timeout.Remove(timeoutHandlerId);
				return false;
			}
		}

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


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public unsafe GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
