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

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_action_new(IntPtr name, IntPtr label, IntPtr tooltip, IntPtr stock_id);
		static d_gtk_action_new gtk_action_new = FuncLoader.LoadFunction<d_gtk_action_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_action_new"));

		[Obsolete]
		public Action (string name, string label, string tooltip, string stock_id) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Action)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("name");
				vals.Add (new GLib.Value (name));
				names.Add ("label");
				vals.Add (new GLib.Value (label));
				names.Add ("tooltip");
				vals.Add (new GLib.Value (tooltip));
				names.Add ("stock_id");
				vals.Add (new GLib.Value (stock_id));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr native_label = GLib.Marshaller.StringToPtrGStrdup (label);
			IntPtr native_tooltip = GLib.Marshaller.StringToPtrGStrdup (tooltip);
			IntPtr native_stock_id = GLib.Marshaller.StringToPtrGStrdup (stock_id);
			Raw = gtk_action_new(native_name, native_label, native_tooltip, native_stock_id);
			GLib.Marshaller.Free (native_name);
			GLib.Marshaller.Free (native_label);
			GLib.Marshaller.Free (native_tooltip);
			GLib.Marshaller.Free (native_stock_id);
		}

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

		[Obsolete]
		[GLib.Property ("name")]
		public string Name {
			get  {
				IntPtr raw_ret = gtk_action_get_name(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("label")]
		public string Label {
			get  {
				IntPtr raw_ret = gtk_action_get_label(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_action_set_label(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("short-label")]
		public string ShortLabel {
			get  {
				IntPtr raw_ret = gtk_action_get_short_label(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_action_set_short_label(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("tooltip")]
		public string Tooltip {
			get  {
				IntPtr raw_ret = gtk_action_get_tooltip(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_action_set_tooltip(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("stock-id")]
		public string StockId {
			get  {
				IntPtr raw_ret = gtk_action_get_stock_id(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_action_set_stock_id(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("gicon")]
		public GLib.IIcon Gicon {
			get  {
				IntPtr raw_ret = gtk_action_get_gicon(Handle);
				GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
				return ret;
			}
			set  {
				gtk_action_set_gicon(Handle, value == null ? IntPtr.Zero : ((value is GLib.Object) ? (value as GLib.Object).Handle : (value as GLib.IconAdapter).Handle));
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("icon-name")]
		public string IconName {
			get  {
				IntPtr raw_ret = gtk_action_get_icon_name(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_action_set_icon_name(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("visible-horizontal")]
		public bool VisibleHorizontal {
			get  {
				bool raw_ret = gtk_action_get_visible_horizontal(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_action_set_visible_horizontal(Handle, value);
			}
		}

		[GLib.Property ("visible-overflown")]
		public bool VisibleOverflown {
			get {
				GLib.Value val = GetProperty ("visible-overflown");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("visible-overflown", val);
				val.Dispose ();
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("visible-vertical")]
		public bool VisibleVertical {
			get  {
				bool raw_ret = gtk_action_get_visible_vertical(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_action_set_visible_vertical(Handle, value);
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("is-important")]
		public bool IsImportant {
			get  {
				bool raw_ret = gtk_action_get_is_important(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_action_set_is_important(Handle, value);
			}
		}

		[GLib.Property ("hide-if-empty")]
		public bool HideIfEmpty {
			get {
				GLib.Value val = GetProperty ("hide-if-empty");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("hide-if-empty", val);
				val.Dispose ();
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("sensitive")]
		public bool Sensitive {
			get  {
				bool raw_ret = gtk_action_get_sensitive(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_action_set_sensitive(Handle, value);
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("visible")]
		public bool Visible {
			get  {
				bool raw_ret = gtk_action_get_visible(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_action_set_visible(Handle, value);
			}
		}

		[GLib.Property ("action-group")]
		public Gtk.ActionGroup ActionGroup {
			get {
				GLib.Value val = GetProperty ("action-group");
				Gtk.ActionGroup ret = (Gtk.ActionGroup) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("action-group", val);
				val.Dispose ();
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("always-show-image")]
		public bool AlwaysShowImage {
			get  {
				bool raw_ret = gtk_action_get_always_show_image(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_action_set_always_show_image(Handle, value);
			}
		}

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

		static ActivatedNativeDelegate Activated_cb_delegate;
		static ActivatedNativeDelegate ActivatedVMCallback {
			get {
				if (Activated_cb_delegate == null)
					Activated_cb_delegate = new ActivatedNativeDelegate (Activated_cb);
				return Activated_cb_delegate;
			}
		}

		static void OverrideActivated (GLib.GType gtype)
		{
			OverrideActivated (gtype, ActivatedVMCallback);
		}

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

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Action), ConnectionMethod="OverrideActivated")]
		protected virtual void OnActivated ()
		{
			InternalActivated ();
		}

		private void InternalActivated ()
		{
			ActivatedNativeDelegate unmanaged = class_abi.BaseOverride<ActivatedNativeDelegate>(this.LookupGType(), "activate");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static CreateMenuItemNativeDelegate CreateMenuItem_cb_delegate;
		static CreateMenuItemNativeDelegate CreateMenuItemVMCallback {
			get {
				if (CreateMenuItem_cb_delegate == null)
					CreateMenuItem_cb_delegate = new CreateMenuItemNativeDelegate (CreateMenuItem_cb);
				return CreateMenuItem_cb_delegate;
			}
		}

		static void OverrideCreateMenuItem (GLib.GType gtype)
		{
			OverrideCreateMenuItem (gtype, CreateMenuItemVMCallback);
		}

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

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

		static IntPtr CreateMenuItem_cb (IntPtr inst)
		{
			try {
				Action __obj = GLib.Object.GetObject (inst, false) as Action;
				Gtk.Widget __result;
				__result = __obj.OnCreateMenuItem ();
				return __result == null ? IntPtr.Zero : __result.Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Action), ConnectionMethod="OverrideCreateMenuItem")]
		protected virtual Gtk.Widget OnCreateMenuItem ()
		{
			return InternalCreateMenuItem ();
		}

		private Gtk.Widget InternalCreateMenuItem ()
		{
			CreateMenuItemNativeDelegate unmanaged = class_abi.BaseOverride<CreateMenuItemNativeDelegate>(this.LookupGType(), "create_menu_item");
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle);
			return GLib.Object.GetObject(__result) as Gtk.Widget;
		}

		static CreateToolItemNativeDelegate CreateToolItem_cb_delegate;
		static CreateToolItemNativeDelegate CreateToolItemVMCallback {
			get {
				if (CreateToolItem_cb_delegate == null)
					CreateToolItem_cb_delegate = new CreateToolItemNativeDelegate (CreateToolItem_cb);
				return CreateToolItem_cb_delegate;
			}
		}

		static void OverrideCreateToolItem (GLib.GType gtype)
		{
			OverrideCreateToolItem (gtype, CreateToolItemVMCallback);
		}

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

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

		static IntPtr CreateToolItem_cb (IntPtr inst)
		{
			try {
				Action __obj = GLib.Object.GetObject (inst, false) as Action;
				Gtk.Widget __result;
				__result = __obj.OnCreateToolItem ();
				return __result == null ? IntPtr.Zero : __result.Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Action), ConnectionMethod="OverrideCreateToolItem")]
		protected virtual Gtk.Widget OnCreateToolItem ()
		{
			return InternalCreateToolItem ();
		}

		private Gtk.Widget InternalCreateToolItem ()
		{
			CreateToolItemNativeDelegate unmanaged = class_abi.BaseOverride<CreateToolItemNativeDelegate>(this.LookupGType(), "create_tool_item");
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle);
			return GLib.Object.GetObject(__result) as Gtk.Widget;
		}

		static ConnectProxyNativeDelegate ConnectProxy_cb_delegate;
		static ConnectProxyNativeDelegate ConnectProxyVMCallback {
			get {
				if (ConnectProxy_cb_delegate == null)
					ConnectProxy_cb_delegate = new ConnectProxyNativeDelegate (ConnectProxy_cb);
				return ConnectProxy_cb_delegate;
			}
		}

		static void OverrideConnectProxy (GLib.GType gtype)
		{
			OverrideConnectProxy (gtype, ConnectProxyVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ConnectProxyNativeDelegate (IntPtr inst, IntPtr proxy);

		static void ConnectProxy_cb (IntPtr inst, IntPtr proxy)
		{
			try {
				Action __obj = GLib.Object.GetObject (inst, false) as Action;
				__obj.OnConnectProxy (GLib.Object.GetObject(proxy) as Gtk.Widget);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Action), ConnectionMethod="OverrideConnectProxy")]
		protected virtual void OnConnectProxy (Gtk.Widget proxy)
		{
			InternalConnectProxy (proxy);
		}

		private void InternalConnectProxy (Gtk.Widget proxy)
		{
			ConnectProxyNativeDelegate unmanaged = class_abi.BaseOverride<ConnectProxyNativeDelegate>(this.LookupGType(), "connect_proxy");
			if (unmanaged == null) return;

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

		static DisconnectProxyNativeDelegate DisconnectProxy_cb_delegate;
		static DisconnectProxyNativeDelegate DisconnectProxyVMCallback {
			get {
				if (DisconnectProxy_cb_delegate == null)
					DisconnectProxy_cb_delegate = new DisconnectProxyNativeDelegate (DisconnectProxy_cb);
				return DisconnectProxy_cb_delegate;
			}
		}

		static void OverrideDisconnectProxy (GLib.GType gtype)
		{
			OverrideDisconnectProxy (gtype, DisconnectProxyVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void DisconnectProxyNativeDelegate (IntPtr inst, IntPtr proxy);

		static void DisconnectProxy_cb (IntPtr inst, IntPtr proxy)
		{
			try {
				Action __obj = GLib.Object.GetObject (inst, false) as Action;
				__obj.OnDisconnectProxy (GLib.Object.GetObject(proxy) as Gtk.Widget);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Action), ConnectionMethod="OverrideDisconnectProxy")]
		protected virtual void OnDisconnectProxy (Gtk.Widget proxy)
		{
			InternalDisconnectProxy (proxy);
		}

		private void InternalDisconnectProxy (Gtk.Widget proxy)
		{
			DisconnectProxyNativeDelegate unmanaged = class_abi.BaseOverride<DisconnectProxyNativeDelegate>(this.LookupGType(), "disconnect_proxy");
			if (unmanaged == null) return;

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

		static CreateMenuNativeDelegate CreateMenu_cb_delegate;
		static CreateMenuNativeDelegate CreateMenuVMCallback {
			get {
				if (CreateMenu_cb_delegate == null)
					CreateMenu_cb_delegate = new CreateMenuNativeDelegate (CreateMenu_cb);
				return CreateMenu_cb_delegate;
			}
		}

		static void OverrideCreateMenu (GLib.GType gtype)
		{
			OverrideCreateMenu (gtype, CreateMenuVMCallback);
		}

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

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

		static IntPtr CreateMenu_cb (IntPtr inst)
		{
			try {
				Action __obj = GLib.Object.GetObject (inst, false) as Action;
				Gtk.Widget __result;
				__result = __obj.OnCreateMenu ();
				return __result == null ? IntPtr.Zero : __result.Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Action), ConnectionMethod="OverrideCreateMenu")]
		protected virtual Gtk.Widget OnCreateMenu ()
		{
			return InternalCreateMenu ();
		}

		private Gtk.Widget InternalCreateMenu ()
		{
			CreateMenuNativeDelegate unmanaged = class_abi.BaseOverride<CreateMenuNativeDelegate>(this.LookupGType(), "create_menu");
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle);
			return GLib.Object.GetObject(__result) as Gtk.Widget;
		}


		// 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("activate"
							, GLib.Object.class_abi.Fields
							, (uint) sizeof( IntPtr ) // activate
							, null
							, "menu_item_type"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("menu_item_type"
							, -1
							, (uint) Marshal.SizeOf<GLib.GType>() // menu_item_type
							, "activate"
							, "toolbar_item_type"
							, (long) Marshal.OffsetOf<GtkAction_menu_item_typeAlign>("menu_item_type")
							, 0
							),
						new GLib.AbiField("toolbar_item_type"
							, -1
							, (uint) Marshal.SizeOf<GLib.GType>() // toolbar_item_type
							, "menu_item_type"
							, "create_menu_item"
							, (long) Marshal.OffsetOf<GtkAction_toolbar_item_typeAlign>("toolbar_item_type")
							, 0
							),
						new GLib.AbiField("create_menu_item"
							, -1
							, (uint) sizeof( IntPtr ) // create_menu_item
							, "toolbar_item_type"
							, "create_tool_item"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("create_tool_item"
							, -1
							, (uint) sizeof( IntPtr ) // create_tool_item
							, "create_menu_item"
							, "connect_proxy"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("connect_proxy"
							, -1
							, (uint) sizeof( IntPtr ) // connect_proxy
							, "create_tool_item"
							, "disconnect_proxy"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("disconnect_proxy"
							, -1
							, (uint) sizeof( IntPtr ) // disconnect_proxy
							, "connect_proxy"
							, "create_menu"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("create_menu"
							, -1
							, (uint) sizeof( IntPtr ) // create_menu
							, "disconnect_proxy"
							, "_gtk_reserved1"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved1"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved1
							, "create_menu"
							, "_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;
			}
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GtkAction_menu_item_typeAlign
		{
			sbyte f1;
			private GLib.GType menu_item_type;
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GtkAction_toolbar_item_typeAlign
		{
			sbyte f1;
			private GLib.GType toolbar_item_type;
		}


		// End of the ABI representation.

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

		[Obsolete]
		public void Activate() {
			gtk_action_activate(Handle);
		}

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

		[Obsolete]
		public void BlockActivate() {
			gtk_action_block_activate(Handle);
		}

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

		[Obsolete]
		public void ConnectAccelerator() {
			gtk_action_connect_accelerator(Handle);
		}

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

		[Obsolete]
		public Gtk.Widget CreateIcon(Gtk.IconSize icon_size) {
			IntPtr raw_ret = gtk_action_create_icon(Handle, (int) icon_size);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			return ret;
		}

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

		[Obsolete]
		public Gtk.Widget CreateMenu() {
			IntPtr raw_ret = gtk_action_create_menu(Handle);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			return ret;
		}

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

		[Obsolete]
		public Gtk.Widget CreateMenuItem() {
			IntPtr raw_ret = gtk_action_create_menu_item(Handle);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			return ret;
		}

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

		[Obsolete]
		public Gtk.Widget CreateToolItem() {
			IntPtr raw_ret = gtk_action_create_tool_item(Handle);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			return ret;
		}

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

		[Obsolete]
		public void DisconnectAccelerator() {
			gtk_action_disconnect_accelerator(Handle);
		}

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

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

		[Obsolete]
		public string AccelPath { 
			get {
				IntPtr raw_ret = gtk_action_get_accel_path(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_action_set_accel_path(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

		[Obsolete]
		public static new GLib.GType GType { 
			get {
				IntPtr raw_ret = gtk_action_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

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

		[Obsolete]
		public bool IsSensitive { 
			get {
				bool raw_ret = gtk_action_is_sensitive(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		[Obsolete]
		public bool IsVisible { 
			get {
				bool raw_ret = gtk_action_is_visible(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		[Obsolete]
		public Gtk.AccelGroup AccelGroup { 
			set {
				gtk_action_set_accel_group(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

		[Obsolete]
		public void UnblockActivate() {
			gtk_action_unblock_activate(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("private_data"
							, GLib.Object.abi_info.Fields
							, (uint) sizeof( IntPtr ) // private_data
							, null
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
