// 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 MenuShell : Gtk.Container {

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

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

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

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

		[GLib.Property ("take-focus")]
		public bool TakeFocus {
			get  {
				bool raw_ret = gtk_menu_shell_get_take_focus(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_menu_shell_set_take_focus(Handle, value);
			}
		}

		[GLib.Signal("move-current")]
		public event Gtk.MoveCurrentHandler MoveCurrent {
			add {
				this.AddSignalHandler ("move-current", value, typeof (Gtk.MoveCurrentArgs));
			}
			remove {
				this.RemoveSignalHandler ("move-current", value);
			}
		}

		[GLib.Signal("activate-current")]
		public event Gtk.ActivateCurrentHandler ActivateCurrent {
			add {
				this.AddSignalHandler ("activate-current", value, typeof (Gtk.ActivateCurrentArgs));
			}
			remove {
				this.RemoveSignalHandler ("activate-current", value);
			}
		}

		[GLib.Signal("deactivate")]
		public event System.EventHandler Deactivated {
			add {
				this.AddSignalHandler ("deactivate", value);
			}
			remove {
				this.RemoveSignalHandler ("deactivate", value);
			}
		}

		[GLib.Signal("insert")]
		public event Gtk.InsertedHandler Inserted {
			add {
				this.AddSignalHandler ("insert", value, typeof (Gtk.InsertedArgs));
			}
			remove {
				this.RemoveSignalHandler ("insert", value);
			}
		}

		[GLib.Signal("cycle-focus")]
		public event Gtk.CycleFocusHandler CycleFocus {
			add {
				this.AddSignalHandler ("cycle-focus", value, typeof (Gtk.CycleFocusArgs));
			}
			remove {
				this.RemoveSignalHandler ("cycle-focus", value);
			}
		}

		[GLib.Signal("cancel")]
		public event System.EventHandler Canceled {
			add {
				this.AddSignalHandler ("cancel", value);
			}
			remove {
				this.RemoveSignalHandler ("cancel", value);
			}
		}

		[GLib.Signal("move-selected")]
		public event Gtk.MoveSelectedHandler MoveSelected {
			add {
				this.AddSignalHandler ("move-selected", value, typeof (Gtk.MoveSelectedArgs));
			}
			remove {
				this.RemoveSignalHandler ("move-selected", value);
			}
		}

		[GLib.Signal("selection-done")]
		public event System.EventHandler SelectionDone {
			add {
				this.AddSignalHandler ("selection-done", value);
			}
			remove {
				this.RemoveSignalHandler ("selection-done", value);
			}
		}

		static CycleFocusNativeDelegate CycleFocus_cb_delegate;
		static CycleFocusNativeDelegate CycleFocusVMCallback {
			get {
				if (CycleFocus_cb_delegate == null)
					CycleFocus_cb_delegate = new CycleFocusNativeDelegate (CycleFocus_cb);
				return CycleFocus_cb_delegate;
			}
		}

		static void OverrideCycleFocus (GLib.GType gtype)
		{
			OverrideCycleFocus (gtype, CycleFocusVMCallback);
		}

		static void OverrideCycleFocus (GLib.GType gtype, CycleFocusNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "cycle-focus", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void CycleFocusNativeDelegate (IntPtr inst, int p0);

		static void CycleFocus_cb (IntPtr inst, int p0)
		{
			try {
				MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
				__obj.OnCycleFocus ((Gtk.DirectionType) p0);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideCycleFocus")]
		protected virtual void OnCycleFocus (Gtk.DirectionType p0)
		{
			InternalCycleFocus (p0);
		}

		private void InternalCycleFocus (Gtk.DirectionType p0)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (p0);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static DeactivatedNativeDelegate Deactivated_cb_delegate;
		static DeactivatedNativeDelegate DeactivatedVMCallback {
			get {
				if (Deactivated_cb_delegate == null)
					Deactivated_cb_delegate = new DeactivatedNativeDelegate (Deactivated_cb);
				return Deactivated_cb_delegate;
			}
		}

		static void OverrideDeactivated (GLib.GType gtype)
		{
			OverrideDeactivated (gtype, DeactivatedVMCallback);
		}

		static void OverrideDeactivated (GLib.GType gtype, DeactivatedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deactivate"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideDeactivated")]
		protected virtual void OnDeactivated ()
		{
			InternalDeactivated ();
		}

		private void InternalDeactivated ()
		{
			DeactivatedNativeDelegate unmanaged = class_abi.BaseOverride<DeactivatedNativeDelegate>(this.LookupGType(), "deactivate");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static SelectionDoneNativeDelegate SelectionDone_cb_delegate;
		static SelectionDoneNativeDelegate SelectionDoneVMCallback {
			get {
				if (SelectionDone_cb_delegate == null)
					SelectionDone_cb_delegate = new SelectionDoneNativeDelegate (SelectionDone_cb);
				return SelectionDone_cb_delegate;
			}
		}

		static void OverrideSelectionDone (GLib.GType gtype)
		{
			OverrideSelectionDone (gtype, SelectionDoneVMCallback);
		}

		static void OverrideSelectionDone (GLib.GType gtype, SelectionDoneNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("selection_done"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideSelectionDone")]
		protected virtual void OnSelectionDone ()
		{
			InternalSelectionDone ();
		}

		private void InternalSelectionDone ()
		{
			SelectionDoneNativeDelegate unmanaged = class_abi.BaseOverride<SelectionDoneNativeDelegate>(this.LookupGType(), "selection_done");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static MoveCurrentNativeDelegate MoveCurrent_cb_delegate;
		static MoveCurrentNativeDelegate MoveCurrentVMCallback {
			get {
				if (MoveCurrent_cb_delegate == null)
					MoveCurrent_cb_delegate = new MoveCurrentNativeDelegate (MoveCurrent_cb);
				return MoveCurrent_cb_delegate;
			}
		}

		static void OverrideMoveCurrent (GLib.GType gtype)
		{
			OverrideMoveCurrent (gtype, MoveCurrentVMCallback);
		}

		static void OverrideMoveCurrent (GLib.GType gtype, MoveCurrentNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("move_current"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void MoveCurrentNativeDelegate (IntPtr inst, int direction);

		static void MoveCurrent_cb (IntPtr inst, int direction)
		{
			try {
				MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
				__obj.OnMoveCurrent ((Gtk.MenuDirectionType) direction);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideMoveCurrent")]
		protected virtual void OnMoveCurrent (Gtk.MenuDirectionType direction)
		{
			InternalMoveCurrent (direction);
		}

		private void InternalMoveCurrent (Gtk.MenuDirectionType direction)
		{
			MoveCurrentNativeDelegate unmanaged = class_abi.BaseOverride<MoveCurrentNativeDelegate>(this.LookupGType(), "move_current");
			if (unmanaged == null) return;

			unmanaged (this.Handle, (int) direction);
		}

		static ActivateCurrentNativeDelegate ActivateCurrent_cb_delegate;
		static ActivateCurrentNativeDelegate ActivateCurrentVMCallback {
			get {
				if (ActivateCurrent_cb_delegate == null)
					ActivateCurrent_cb_delegate = new ActivateCurrentNativeDelegate (ActivateCurrent_cb);
				return ActivateCurrent_cb_delegate;
			}
		}

		static void OverrideActivateCurrent (GLib.GType gtype)
		{
			OverrideActivateCurrent (gtype, ActivateCurrentVMCallback);
		}

		static void OverrideActivateCurrent (GLib.GType gtype, ActivateCurrentNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("activate_current"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ActivateCurrentNativeDelegate (IntPtr inst, bool force_hide);

		static void ActivateCurrent_cb (IntPtr inst, bool force_hide)
		{
			try {
				MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
				__obj.OnActivateCurrent (force_hide);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideActivateCurrent")]
		protected virtual void OnActivateCurrent (bool force_hide)
		{
			InternalActivateCurrent (force_hide);
		}

		private void InternalActivateCurrent (bool force_hide)
		{
			ActivateCurrentNativeDelegate unmanaged = class_abi.BaseOverride<ActivateCurrentNativeDelegate>(this.LookupGType(), "activate_current");
			if (unmanaged == null) return;

			unmanaged (this.Handle, force_hide);
		}

		static CanceledNativeDelegate Canceled_cb_delegate;
		static CanceledNativeDelegate CanceledVMCallback {
			get {
				if (Canceled_cb_delegate == null)
					Canceled_cb_delegate = new CanceledNativeDelegate (Canceled_cb);
				return Canceled_cb_delegate;
			}
		}

		static void OverrideCanceled (GLib.GType gtype)
		{
			OverrideCanceled (gtype, CanceledVMCallback);
		}

		static void OverrideCanceled (GLib.GType gtype, CanceledNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("cancel"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideCanceled")]
		protected virtual void OnCanceled ()
		{
			InternalCanceled ();
		}

		private void InternalCanceled ()
		{
			CanceledNativeDelegate unmanaged = class_abi.BaseOverride<CanceledNativeDelegate>(this.LookupGType(), "cancel");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static SelectItemNativeDelegate SelectItem_cb_delegate;
		static SelectItemNativeDelegate SelectItemVMCallback {
			get {
				if (SelectItem_cb_delegate == null)
					SelectItem_cb_delegate = new SelectItemNativeDelegate (SelectItem_cb);
				return SelectItem_cb_delegate;
			}
		}

		static void OverrideSelectItem (GLib.GType gtype)
		{
			OverrideSelectItem (gtype, SelectItemVMCallback);
		}

		static void OverrideSelectItem (GLib.GType gtype, SelectItemNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("select_item"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void SelectItemNativeDelegate (IntPtr inst, IntPtr menu_item);

		static void SelectItem_cb (IntPtr inst, IntPtr menu_item)
		{
			try {
				MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
				__obj.OnSelectItem (GLib.Object.GetObject(menu_item) as Gtk.Widget);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideSelectItem")]
		protected virtual void OnSelectItem (Gtk.Widget menu_item)
		{
			InternalSelectItem (menu_item);
		}

		private void InternalSelectItem (Gtk.Widget menu_item)
		{
			SelectItemNativeDelegate unmanaged = class_abi.BaseOverride<SelectItemNativeDelegate>(this.LookupGType(), "select_item");
			if (unmanaged == null) return;

			unmanaged (this.Handle, menu_item == null ? IntPtr.Zero : menu_item.Handle);
		}

		static InsertedNativeDelegate Inserted_cb_delegate;
		static InsertedNativeDelegate InsertedVMCallback {
			get {
				if (Inserted_cb_delegate == null)
					Inserted_cb_delegate = new InsertedNativeDelegate (Inserted_cb);
				return Inserted_cb_delegate;
			}
		}

		static void OverrideInserted (GLib.GType gtype)
		{
			OverrideInserted (gtype, InsertedVMCallback);
		}

		static void OverrideInserted (GLib.GType gtype, InsertedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("insert"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void InsertedNativeDelegate (IntPtr inst, IntPtr child, int position);

		static void Inserted_cb (IntPtr inst, IntPtr child, int position)
		{
			try {
				MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
				__obj.OnInserted (GLib.Object.GetObject(child) as Gtk.Widget, position);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideInserted")]
		protected virtual void OnInserted (Gtk.Widget child, int position)
		{
			InternalInserted (child, position);
		}

		private void InternalInserted (Gtk.Widget child, int position)
		{
			InsertedNativeDelegate unmanaged = class_abi.BaseOverride<InsertedNativeDelegate>(this.LookupGType(), "insert");
			if (unmanaged == null) return;

			unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle, position);
		}

		static GetPopupDelayNativeDelegate GetPopupDelay_cb_delegate;
		static GetPopupDelayNativeDelegate GetPopupDelayVMCallback {
			get {
				if (GetPopupDelay_cb_delegate == null)
					GetPopupDelay_cb_delegate = new GetPopupDelayNativeDelegate (GetPopupDelay_cb);
				return GetPopupDelay_cb_delegate;
			}
		}

		static void OverrideGetPopupDelay (GLib.GType gtype)
		{
			OverrideGetPopupDelay (gtype, GetPopupDelayVMCallback);
		}

		static void OverrideGetPopupDelay (GLib.GType gtype, GetPopupDelayNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_popup_delay"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

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

		static int GetPopupDelay_cb (IntPtr inst)
		{
			try {
				MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
				int __result;
				__result = __obj.OnGetPopupDelay ();
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideGetPopupDelay")]
		protected virtual int OnGetPopupDelay ()
		{
			return InternalGetPopupDelay ();
		}

		private int InternalGetPopupDelay ()
		{
			GetPopupDelayNativeDelegate unmanaged = class_abi.BaseOverride<GetPopupDelayNativeDelegate>(this.LookupGType(), "get_popup_delay");
			if (unmanaged == null) return 0;

			int __result = unmanaged (this.Handle);
			return __result;
		}

		static MoveSelectedNativeDelegate MoveSelected_cb_delegate;
		static MoveSelectedNativeDelegate MoveSelectedVMCallback {
			get {
				if (MoveSelected_cb_delegate == null)
					MoveSelected_cb_delegate = new MoveSelectedNativeDelegate (MoveSelected_cb);
				return MoveSelected_cb_delegate;
			}
		}

		static void OverrideMoveSelected (GLib.GType gtype)
		{
			OverrideMoveSelected (gtype, MoveSelectedVMCallback);
		}

		static void OverrideMoveSelected (GLib.GType gtype, MoveSelectedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("move_selected"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool MoveSelectedNativeDelegate (IntPtr inst, int distance);

		static bool MoveSelected_cb (IntPtr inst, int distance)
		{
			try {
				MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
				bool __result;
				__result = __obj.OnMoveSelected (distance);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideMoveSelected")]
		protected virtual bool OnMoveSelected (int distance)
		{
			return InternalMoveSelected (distance);
		}

		private bool InternalMoveSelected (int distance)
		{
			MoveSelectedNativeDelegate unmanaged = class_abi.BaseOverride<MoveSelectedNativeDelegate>(this.LookupGType(), "move_selected");
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle, distance);
			return __result;
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _class_abi = null;
		static public unsafe new GLib.AbiStruct class_abi {
			get {
				if (_class_abi == null)
					_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("submenu_placement"
							, Gtk.Container.class_abi.Fields
							, (uint) Marshal.SizeOf<bool>() // submenu_placement
							, null
							, "deactivate"
							, 1
							, 1
							),
						new GLib.AbiField("deactivate"
							, -1
							, (uint) sizeof( IntPtr ) // deactivate
							, "submenu_placement"
							, "selection_done"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("selection_done"
							, -1
							, (uint) sizeof( IntPtr ) // selection_done
							, "deactivate"
							, "move_current"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("move_current"
							, -1
							, (uint) sizeof( IntPtr ) // move_current
							, "selection_done"
							, "activate_current"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("activate_current"
							, -1
							, (uint) sizeof( IntPtr ) // activate_current
							, "move_current"
							, "cancel"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("cancel"
							, -1
							, (uint) sizeof( IntPtr ) // cancel
							, "activate_current"
							, "select_item"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("select_item"
							, -1
							, (uint) sizeof( IntPtr ) // select_item
							, "cancel"
							, "insert"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("insert"
							, -1
							, (uint) sizeof( IntPtr ) // insert
							, "select_item"
							, "get_popup_delay"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("get_popup_delay"
							, -1
							, (uint) sizeof( IntPtr ) // get_popup_delay
							, "insert"
							, "move_selected"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("move_selected"
							, -1
							, (uint) sizeof( IntPtr ) // move_selected
							, "get_popup_delay"
							, "_gtk_reserved1"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved1"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved1
							, "move_selected"
							, "_gtk_reserved2"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved2"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved2
							, "_gtk_reserved1"
							, "_gtk_reserved3"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved3"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved3
							, "_gtk_reserved2"
							, "_gtk_reserved4"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved4"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved4
							, "_gtk_reserved3"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_menu_shell_activate_item(IntPtr raw, IntPtr menu_item, bool force_deactivate);
		static d_gtk_menu_shell_activate_item gtk_menu_shell_activate_item = FuncLoader.LoadFunction<d_gtk_menu_shell_activate_item>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_shell_activate_item"));

		public void ActivateItem(Gtk.Widget menu_item, bool force_deactivate) {
			gtk_menu_shell_activate_item(Handle, menu_item == null ? IntPtr.Zero : menu_item.Handle, force_deactivate);
		}

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

		public void Append(Gtk.Widget child) {
			gtk_menu_shell_append(Handle, child == null ? IntPtr.Zero : child.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_menu_shell_bind_model(IntPtr raw, IntPtr model, IntPtr action_namespace, bool with_separators);
		static d_gtk_menu_shell_bind_model gtk_menu_shell_bind_model = FuncLoader.LoadFunction<d_gtk_menu_shell_bind_model>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_shell_bind_model"));

		public void BindModel(GLib.MenuModel model, string action_namespace, bool with_separators) {
			IntPtr native_action_namespace = GLib.Marshaller.StringToPtrGStrdup (action_namespace);
			gtk_menu_shell_bind_model(Handle, model == null ? IntPtr.Zero : model.Handle, native_action_namespace, with_separators);
			GLib.Marshaller.Free (native_action_namespace);
		}

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

		public void Cancel() {
			gtk_menu_shell_cancel(Handle);
		}

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

		public void Deactivate() {
			gtk_menu_shell_deactivate(Handle);
		}

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

		public void Deselect() {
			gtk_menu_shell_deselect(Handle);
		}

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

		public Gtk.Widget ParentShell { 
			get {
				IntPtr raw_ret = gtk_menu_shell_get_parent_shell(Handle);
				Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
				return ret;
			}
		}

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

		public Gtk.Widget SelectedItem { 
			get {
				IntPtr raw_ret = gtk_menu_shell_get_selected_item(Handle);
				Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
				return ret;
			}
		}

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

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_menu_shell_insert(IntPtr raw, IntPtr child, int position);
		static d_gtk_menu_shell_insert gtk_menu_shell_insert = FuncLoader.LoadFunction<d_gtk_menu_shell_insert>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_shell_insert"));

		public void Insert(Gtk.Widget child, int position) {
			gtk_menu_shell_insert(Handle, child == null ? IntPtr.Zero : child.Handle, position);
		}

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

		public void Prepend(Gtk.Widget child) {
			gtk_menu_shell_prepend(Handle, child == null ? IntPtr.Zero : child.Handle);
		}

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

		public void SelectFirst(bool search_sensitive) {
			gtk_menu_shell_select_first(Handle, search_sensitive);
		}

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

		public void SelectItem(Gtk.Widget menu_item) {
			gtk_menu_shell_select_item(Handle, menu_item == null ? IntPtr.Zero : menu_item.Handle);
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public unsafe new GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("priv"
							, Gtk.Container.abi_info.Fields
							, (uint) sizeof( IntPtr ) // priv
							, null
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
