// 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 ActionMuxer : GLib.Object, GLib.IActionGroup, Gtk.IActionObservable {

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

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

		public ActionMuxer () : base (IntPtr.Zero)
		{
			if (GetType () != typeof (ActionMuxer)) {
				CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
				return;
			}
			Raw = gtk_action_muxer_new();
		}

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

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

		[GLib.Property ("parent")]
		public Gtk.ActionMuxer Parent {
			get  {
				IntPtr raw_ret = gtk_action_muxer_get_parent(Handle);
				Gtk.ActionMuxer ret = GLib.Object.GetObject(raw_ret) as Gtk.ActionMuxer;
				return ret;
			}
			set  {
				gtk_action_muxer_set_parent(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[GLib.Signal("primary-accel-changed")]
		public event Gtk.PrimaryAccelChangedHandler PrimaryAccelChanged {
			add {
				this.AddSignalHandler ("primary-accel-changed", value, typeof (Gtk.PrimaryAccelChangedArgs));
			}
			remove {
				this.RemoveSignalHandler ("primary-accel-changed", value);
			}
		}

		static PrimaryAccelChangedNativeDelegate PrimaryAccelChanged_cb_delegate;
		static PrimaryAccelChangedNativeDelegate PrimaryAccelChangedVMCallback {
			get {
				if (PrimaryAccelChanged_cb_delegate == null)
					PrimaryAccelChanged_cb_delegate = new PrimaryAccelChangedNativeDelegate (PrimaryAccelChanged_cb);
				return PrimaryAccelChanged_cb_delegate;
			}
		}

		static void OverridePrimaryAccelChanged (GLib.GType gtype)
		{
			OverridePrimaryAccelChanged (gtype, PrimaryAccelChangedVMCallback);
		}

		static void OverridePrimaryAccelChanged (GLib.GType gtype, PrimaryAccelChangedNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "primary-accel-changed", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void PrimaryAccelChangedNativeDelegate (IntPtr inst, IntPtr p0, IntPtr p1);

		static void PrimaryAccelChanged_cb (IntPtr inst, IntPtr p0, IntPtr p1)
		{
			try {
				ActionMuxer __obj = GLib.Object.GetObject (inst, false) as ActionMuxer;
				__obj.OnPrimaryAccelChanged (GLib.Marshaller.PtrToStringGFree(p0), GLib.Marshaller.PtrToStringGFree(p1));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ActionMuxer), ConnectionMethod="OverridePrimaryAccelChanged")]
		protected virtual void OnPrimaryAccelChanged (string p0, string p1)
		{
			InternalPrimaryAccelChanged (p0, p1);
		}

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

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

		public string GetPrimaryAccel(string action_and_target) {
			IntPtr native_action_and_target = GLib.Marshaller.StringToPtrGStrdup (action_and_target);
			IntPtr raw_ret = gtk_action_muxer_get_primary_accel(Handle, native_action_and_target);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			GLib.Marshaller.Free (native_action_and_target);
			return ret;
		}

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

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

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

		public void Insert(string prefix, GLib.IActionGroup action_group) {
			IntPtr native_prefix = GLib.Marshaller.StringToPtrGStrdup (prefix);
			gtk_action_muxer_insert(Handle, native_prefix, action_group == null ? IntPtr.Zero : ((action_group is GLib.Object) ? (action_group as GLib.Object).Handle : (action_group as GLib.ActionGroupAdapter).Handle));
			GLib.Marshaller.Free (native_prefix);
		}

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

		public string ListPrefixes() {
			IntPtr raw_ret = gtk_action_muxer_list_prefixes(Handle);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			return ret;
		}

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

		public GLib.IActionGroup Lookup(string prefix) {
			IntPtr native_prefix = GLib.Marshaller.StringToPtrGStrdup (prefix);
			IntPtr raw_ret = gtk_action_muxer_lookup(Handle, native_prefix);
			GLib.IActionGroup ret = GLib.ActionGroupAdapter.GetObject (raw_ret, false);
			GLib.Marshaller.Free (native_prefix);
			return ret;
		}

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

		public void Remove(string prefix) {
			IntPtr native_prefix = GLib.Marshaller.StringToPtrGStrdup (prefix);
			gtk_action_muxer_remove(Handle, native_prefix);
			GLib.Marshaller.Free (native_prefix);
		}

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

		public void SetPrimaryAccel(string action_and_target, string primary_accel) {
			IntPtr native_action_and_target = GLib.Marshaller.StringToPtrGStrdup (action_and_target);
			IntPtr native_primary_accel = GLib.Marshaller.StringToPtrGStrdup (primary_accel);
			gtk_action_muxer_set_primary_accel(Handle, native_action_and_target, native_primary_accel);
			GLib.Marshaller.Free (native_action_and_target);
			GLib.Marshaller.Free (native_primary_accel);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_g_action_group_action_added(IntPtr raw, IntPtr action_name);
		static d_g_action_group_action_added g_action_group_action_added = FuncLoader.LoadFunction<d_g_action_group_action_added>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_action_added"));

		public void EmitActionAdded(string action_name) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			g_action_group_action_added(Handle, native_action_name);
			GLib.Marshaller.Free (native_action_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_g_action_group_action_enabled_changed(IntPtr raw, IntPtr action_name, bool enabled);
		static d_g_action_group_action_enabled_changed g_action_group_action_enabled_changed = FuncLoader.LoadFunction<d_g_action_group_action_enabled_changed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_action_enabled_changed"));

		public void EmitActionEnabledChanged(string action_name, bool enabled) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			g_action_group_action_enabled_changed(Handle, native_action_name, enabled);
			GLib.Marshaller.Free (native_action_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_g_action_group_action_removed(IntPtr raw, IntPtr action_name);
		static d_g_action_group_action_removed g_action_group_action_removed = FuncLoader.LoadFunction<d_g_action_group_action_removed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_action_removed"));

		public void EmitActionRemoved(string action_name) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			g_action_group_action_removed(Handle, native_action_name);
			GLib.Marshaller.Free (native_action_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_g_action_group_action_state_changed(IntPtr raw, IntPtr action_name, IntPtr state);
		static d_g_action_group_action_state_changed g_action_group_action_state_changed = FuncLoader.LoadFunction<d_g_action_group_action_state_changed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_action_state_changed"));

		public void EmitActionStateChanged(string action_name, GLib.Variant state) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			g_action_group_action_state_changed(Handle, native_action_name, state == null ? IntPtr.Zero : state.Handle);
			GLib.Marshaller.Free (native_action_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_g_action_group_activate_action(IntPtr raw, IntPtr action_name, IntPtr parameter);
		static d_g_action_group_activate_action g_action_group_activate_action = FuncLoader.LoadFunction<d_g_action_group_activate_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_activate_action"));

		public void ActivateAction(string action_name, GLib.Variant parameter) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			g_action_group_activate_action(Handle, native_action_name, parameter == null ? IntPtr.Zero : parameter.Handle);
			GLib.Marshaller.Free (native_action_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_g_action_group_change_action_state(IntPtr raw, IntPtr action_name, IntPtr value);
		static d_g_action_group_change_action_state g_action_group_change_action_state = FuncLoader.LoadFunction<d_g_action_group_change_action_state>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_change_action_state"));

		public void ChangeActionState(string action_name, GLib.Variant value) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			g_action_group_change_action_state(Handle, native_action_name, value == null ? IntPtr.Zero : value.Handle);
			GLib.Marshaller.Free (native_action_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_g_action_group_get_action_enabled(IntPtr raw, IntPtr action_name);
		static d_g_action_group_get_action_enabled g_action_group_get_action_enabled = FuncLoader.LoadFunction<d_g_action_group_get_action_enabled>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_enabled"));

		public bool GetActionEnabled(string action_name) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			bool raw_ret = g_action_group_get_action_enabled(Handle, native_action_name);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_action_name);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_g_action_group_get_action_parameter_type(IntPtr raw, IntPtr action_name);
		static d_g_action_group_get_action_parameter_type g_action_group_get_action_parameter_type = FuncLoader.LoadFunction<d_g_action_group_get_action_parameter_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_parameter_type"));

		public GLib.VariantType GetActionParameterType(string action_name) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			IntPtr raw_ret = g_action_group_get_action_parameter_type(Handle, native_action_name);
			GLib.VariantType ret = new GLib.VariantType(raw_ret);
			GLib.Marshaller.Free (native_action_name);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_g_action_group_get_action_state(IntPtr raw, IntPtr action_name);
		static d_g_action_group_get_action_state g_action_group_get_action_state = FuncLoader.LoadFunction<d_g_action_group_get_action_state>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_state"));

		public GLib.Variant GetActionState(string action_name) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			IntPtr raw_ret = g_action_group_get_action_state(Handle, native_action_name);
			GLib.Variant ret = new GLib.Variant(raw_ret);
			GLib.Marshaller.Free (native_action_name);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_g_action_group_get_action_state_hint(IntPtr raw, IntPtr action_name);
		static d_g_action_group_get_action_state_hint g_action_group_get_action_state_hint = FuncLoader.LoadFunction<d_g_action_group_get_action_state_hint>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_state_hint"));

		public GLib.Variant GetActionStateHint(string action_name) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			IntPtr raw_ret = g_action_group_get_action_state_hint(Handle, native_action_name);
			GLib.Variant ret = new GLib.Variant(raw_ret);
			GLib.Marshaller.Free (native_action_name);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_g_action_group_get_action_state_type(IntPtr raw, IntPtr action_name);
		static d_g_action_group_get_action_state_type g_action_group_get_action_state_type = FuncLoader.LoadFunction<d_g_action_group_get_action_state_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_state_type"));

		public GLib.VariantType GetActionStateType(string action_name) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			IntPtr raw_ret = g_action_group_get_action_state_type(Handle, native_action_name);
			GLib.VariantType ret = new GLib.VariantType(raw_ret);
			GLib.Marshaller.Free (native_action_name);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_g_action_group_has_action(IntPtr raw, IntPtr action_name);
		static d_g_action_group_has_action g_action_group_has_action = FuncLoader.LoadFunction<d_g_action_group_has_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_has_action"));

		public bool HasAction(string action_name) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			bool raw_ret = g_action_group_has_action(Handle, native_action_name);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_action_name);
			return ret;
		}

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

		public string[] ListActions() {
			IntPtr raw_ret = g_action_group_list_actions(Handle);
			string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_g_action_group_query_action(IntPtr raw, IntPtr action_name, out bool enabled, IntPtr parameter_type, IntPtr state_type, IntPtr state_hint, IntPtr state);
		static d_g_action_group_query_action g_action_group_query_action = FuncLoader.LoadFunction<d_g_action_group_query_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_query_action"));

		public bool QueryAction(string action_name, out bool enabled, GLib.VariantType parameter_type, GLib.VariantType state_type, GLib.Variant state_hint, GLib.Variant state) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			bool raw_ret = g_action_group_query_action(Handle, native_action_name, out enabled, parameter_type == null ? IntPtr.Zero : parameter_type.Handle, state_type == null ? IntPtr.Zero : state_type.Handle, state_hint == null ? IntPtr.Zero : state_hint.Handle, state == null ? IntPtr.Zero : state.Handle);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_action_name);
			return ret;
		}

		[GLib.Signal("action-enabled-changed")]
		public event GLib.ActionEnabledChangedHandler ActionEnabledChanged {
			add {
				this.AddSignalHandler ("action-enabled-changed", value, typeof (GLib.ActionEnabledChangedArgs));
			}
			remove {
				this.RemoveSignalHandler ("action-enabled-changed", value);
			}
		}

		[GLib.Signal("action-state-changed")]
		public event GLib.ActionStateChangedHandler ActionStateChanged {
			add {
				this.AddSignalHandler ("action-state-changed", value, typeof (GLib.ActionStateChangedArgs));
			}
			remove {
				this.RemoveSignalHandler ("action-state-changed", value);
			}
		}

		[GLib.Signal("action-added")]
		public event GLib.ActionAddedHandler ActionAdded {
			add {
				this.AddSignalHandler ("action-added", value, typeof (GLib.ActionAddedArgs));
			}
			remove {
				this.RemoveSignalHandler ("action-added", value);
			}
		}

		[GLib.Signal("action-removed")]
		public event GLib.ActionRemovedHandler ActionRemoved {
			add {
				this.AddSignalHandler ("action-removed", value, typeof (GLib.ActionRemovedArgs));
			}
			remove {
				this.RemoveSignalHandler ("action-removed", value);
			}
		}

		static ActionAddedNativeDelegate ActionAdded_cb_delegate;
		static ActionAddedNativeDelegate ActionAddedVMCallback {
			get {
				if (ActionAdded_cb_delegate == null)
					ActionAdded_cb_delegate = new ActionAddedNativeDelegate (ActionAdded_cb);
				return ActionAdded_cb_delegate;
			}
		}

		static void OverrideActionAdded (GLib.GType gtype)
		{
			OverrideActionAdded (gtype, ActionAddedVMCallback);
		}

		static void OverrideActionAdded (GLib.GType gtype, ActionAddedNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "action-added", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ActionAddedNativeDelegate (IntPtr inst, IntPtr action_name);

		static void ActionAdded_cb (IntPtr inst, IntPtr action_name)
		{
			try {
				Gtk.ActionMuxer __obj = GLib.Object.GetObject (inst, false) as Gtk.ActionMuxer;
				__obj.OnActionAdded (GLib.Marshaller.Utf8PtrToString (action_name));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ActionMuxer), ConnectionMethod="OverrideActionAdded")]
		protected virtual void OnActionAdded (string action_name)
		{
			InternalActionAdded (action_name);
		}

		private void InternalActionAdded (string action_name)
		{
			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 (action_name);
			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 ActionRemovedNativeDelegate ActionRemoved_cb_delegate;
		static ActionRemovedNativeDelegate ActionRemovedVMCallback {
			get {
				if (ActionRemoved_cb_delegate == null)
					ActionRemoved_cb_delegate = new ActionRemovedNativeDelegate (ActionRemoved_cb);
				return ActionRemoved_cb_delegate;
			}
		}

		static void OverrideActionRemoved (GLib.GType gtype)
		{
			OverrideActionRemoved (gtype, ActionRemovedVMCallback);
		}

		static void OverrideActionRemoved (GLib.GType gtype, ActionRemovedNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "action-removed", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ActionRemovedNativeDelegate (IntPtr inst, IntPtr action_name);

		static void ActionRemoved_cb (IntPtr inst, IntPtr action_name)
		{
			try {
				Gtk.ActionMuxer __obj = GLib.Object.GetObject (inst, false) as Gtk.ActionMuxer;
				__obj.OnActionRemoved (GLib.Marshaller.Utf8PtrToString (action_name));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ActionMuxer), ConnectionMethod="OverrideActionRemoved")]
		protected virtual void OnActionRemoved (string action_name)
		{
			InternalActionRemoved (action_name);
		}

		private void InternalActionRemoved (string action_name)
		{
			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 (action_name);
			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 ActionEnabledChangedNativeDelegate ActionEnabledChanged_cb_delegate;
		static ActionEnabledChangedNativeDelegate ActionEnabledChangedVMCallback {
			get {
				if (ActionEnabledChanged_cb_delegate == null)
					ActionEnabledChanged_cb_delegate = new ActionEnabledChangedNativeDelegate (ActionEnabledChanged_cb);
				return ActionEnabledChanged_cb_delegate;
			}
		}

		static void OverrideActionEnabledChanged (GLib.GType gtype)
		{
			OverrideActionEnabledChanged (gtype, ActionEnabledChangedVMCallback);
		}

		static void OverrideActionEnabledChanged (GLib.GType gtype, ActionEnabledChangedNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "action-enabled-changed", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ActionEnabledChangedNativeDelegate (IntPtr inst, IntPtr action_name, bool enabled);

		static void ActionEnabledChanged_cb (IntPtr inst, IntPtr action_name, bool enabled)
		{
			try {
				Gtk.ActionMuxer __obj = GLib.Object.GetObject (inst, false) as Gtk.ActionMuxer;
				__obj.OnActionEnabledChanged (GLib.Marshaller.Utf8PtrToString (action_name), enabled);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ActionMuxer), ConnectionMethod="OverrideActionEnabledChanged")]
		protected virtual void OnActionEnabledChanged (string action_name, bool enabled)
		{
			InternalActionEnabledChanged (action_name, enabled);
		}

		private void InternalActionEnabledChanged (string action_name, bool enabled)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (3);
			GLib.Value[] vals = new GLib.Value [3];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (action_name);
			inst_and_params.Append (vals [1]);
			vals [2] = new GLib.Value (enabled);
			inst_and_params.Append (vals [2]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static ActionStateChangedNativeDelegate ActionStateChanged_cb_delegate;
		static ActionStateChangedNativeDelegate ActionStateChangedVMCallback {
			get {
				if (ActionStateChanged_cb_delegate == null)
					ActionStateChanged_cb_delegate = new ActionStateChangedNativeDelegate (ActionStateChanged_cb);
				return ActionStateChanged_cb_delegate;
			}
		}

		static void OverrideActionStateChanged (GLib.GType gtype)
		{
			OverrideActionStateChanged (gtype, ActionStateChangedVMCallback);
		}

		static void OverrideActionStateChanged (GLib.GType gtype, ActionStateChangedNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "action-state-changed", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ActionStateChangedNativeDelegate (IntPtr inst, IntPtr action_name, IntPtr state);

		static void ActionStateChanged_cb (IntPtr inst, IntPtr action_name, IntPtr state)
		{
			try {
				Gtk.ActionMuxer __obj = GLib.Object.GetObject (inst, false) as Gtk.ActionMuxer;
				__obj.OnActionStateChanged (GLib.Marshaller.Utf8PtrToString (action_name), new GLib.Variant(state));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ActionMuxer), ConnectionMethod="OverrideActionStateChanged")]
		protected virtual void OnActionStateChanged (string action_name, GLib.Variant state)
		{
			InternalActionStateChanged (action_name, state);
		}

		private void InternalActionStateChanged (string action_name, GLib.Variant state)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (3);
			GLib.Value[] vals = new GLib.Value [3];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (action_name);
			inst_and_params.Append (vals [1]);
			vals [2] = new GLib.Value (state);
			inst_and_params.Append (vals [2]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

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

		public void RegisterObserver(string action_name, Gtk.IActionObserver observer) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			gtk_action_observable_register_observer(Handle, native_action_name, observer == null ? IntPtr.Zero : ((observer is GLib.Object) ? (observer as GLib.Object).Handle : (observer as Gtk.ActionObserverAdapter).Handle));
			GLib.Marshaller.Free (native_action_name);
		}

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

		public void UnregisterObserver(string action_name, Gtk.IActionObserver observer) {
			IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
			gtk_action_observable_unregister_observer(Handle, native_action_name, observer == null ? IntPtr.Zero : ((observer is GLib.Object) ? (observer as GLib.Object).Handle : (observer as Gtk.ActionObserverAdapter).Handle));
			GLib.Marshaller.Free (native_action_name);
		}

#endregion
	}
}
