// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace _GnomeSharp {

	using System;

	#region Autogenerated code
	[GLib.CDeclCallback]
	internal delegate bool PanelAppletFactoryCallbackNative(IntPtr applet, IntPtr iid, IntPtr user_data);

	internal class PanelAppletFactoryCallbackWrapper {

		public bool NativeCallback (IntPtr applet, IntPtr iid, IntPtr user_data)
		{
			_Gnome.PanelApplet _arg0 = GLib.Object.GetObject(applet) as _Gnome.PanelApplet;
			string _arg1 = GLib.Marshaller.Utf8PtrToString (iid);
			return (bool) (managed ( _arg0,  _arg1));
		}

		internal PanelAppletFactoryCallbackNative NativeDelegate;
		_Gnome.PanelAppletFactoryCallback managed;

		public PanelAppletFactoryCallbackWrapper (_Gnome.PanelAppletFactoryCallback managed)
		{
			this.managed = managed;
			if (managed != null)
				NativeDelegate = new PanelAppletFactoryCallbackNative (NativeCallback);
		}

		public static _Gnome.PanelAppletFactoryCallback GetManagedDelegate (PanelAppletFactoryCallbackNative native)
		{
			if (native == null)
				return null;
			PanelAppletFactoryCallbackWrapper wrapper = (PanelAppletFactoryCallbackWrapper) native.Target;
			if (wrapper == null)
				return null;
			return wrapper.managed;
		}
	}
	#endregion
}
