// 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 Accelerator {

		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gtk_accelerator_get_default_mod_mask();

		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_accelerator_set_default_mod_mask(int default_mod_mask);

		public static Gdk.ModifierType DefaultModMask { 
			get {
				int raw_ret = gtk_accelerator_get_default_mod_mask();
				Gdk.ModifierType ret = (Gdk.ModifierType) raw_ret;
				return ret;
			}
			set {
				gtk_accelerator_set_default_mod_mask((int) value);
			}
		}

		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gtk_accelerator_get_label(uint accelerator_key, int accelerator_mods);

		public static string GetLabel(uint accelerator_key, Gdk.ModifierType accelerator_mods) {
			IntPtr raw_ret = gtk_accelerator_get_label(accelerator_key, (int) accelerator_mods);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}

		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gtk_accelerator_name(uint accelerator_key, int accelerator_mods);

		public static string Name(uint accelerator_key, Gdk.ModifierType accelerator_mods) {
			IntPtr raw_ret = gtk_accelerator_name(accelerator_key, (int) accelerator_mods);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}

		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gtk_accelerator_parse(IntPtr accelerator, out uint accelerator_key, out int accelerator_mods);

		public static void Parse(string accelerator, out uint accelerator_key, out Gdk.ModifierType accelerator_mods) {
			IntPtr native_accelerator = GLib.Marshaller.StringToPtrGStrdup (accelerator);
			int native_accelerator_mods;
			gtk_accelerator_parse(native_accelerator, out accelerator_key, out native_accelerator_mods);
			GLib.Marshaller.Free (native_accelerator);
			accelerator_mods = (Gdk.ModifierType) native_accelerator_mods;
		}

		[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gtk_accelerator_valid(uint keyval, int modifiers);

		public static bool Valid(uint keyval, Gdk.ModifierType modifiers) {
			bool raw_ret = gtk_accelerator_valid(keyval, (int) modifiers);
			bool ret = raw_ret;
			return ret;
		}

#endregion
	}
}
