// 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 CellArea : GLib.InitiallyUnowned {

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

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

		static AddNativeDelegate Add_cb_delegate;
		static AddNativeDelegate AddVMCallback {
			get {
				if (Add_cb_delegate == null)
					Add_cb_delegate = new AddNativeDelegate (Add_cb);
				return Add_cb_delegate;
			}
		}

		static void OverrideAdd (GLib.GType gtype)
		{
			OverrideAdd (gtype, AddVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void AddNativeDelegate (IntPtr inst, IntPtr renderer);

		static void Add_cb (IntPtr inst, IntPtr renderer)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				__obj.OnAdd (GLib.Object.GetObject(renderer) as Gtk.CellRenderer);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideAdd")]
		protected virtual void OnAdd (Gtk.CellRenderer renderer)
		{
			InternalAdd (renderer);
		}

		private void InternalAdd (Gtk.CellRenderer renderer)
		{
			AddNativeDelegate unmanaged = class_abi.BaseOverride<AddNativeDelegate>(this.LookupGType(), "add");
			if (unmanaged == null) return;

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

		static RemoveNativeDelegate Remove_cb_delegate;
		static RemoveNativeDelegate RemoveVMCallback {
			get {
				if (Remove_cb_delegate == null)
					Remove_cb_delegate = new RemoveNativeDelegate (Remove_cb);
				return Remove_cb_delegate;
			}
		}

		static void OverrideRemove (GLib.GType gtype)
		{
			OverrideRemove (gtype, RemoveVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RemoveNativeDelegate (IntPtr inst, IntPtr renderer);

		static void Remove_cb (IntPtr inst, IntPtr renderer)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				__obj.OnRemove (GLib.Object.GetObject(renderer) as Gtk.CellRenderer);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideRemove")]
		protected virtual void OnRemove (Gtk.CellRenderer renderer)
		{
			InternalRemove (renderer);
		}

		private void InternalRemove (Gtk.CellRenderer renderer)
		{
			RemoveNativeDelegate unmanaged = class_abi.BaseOverride<RemoveNativeDelegate>(this.LookupGType(), "_remove");
			if (unmanaged == null) return;

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

		static ForeachNativeDelegate Foreach_cb_delegate;
		static ForeachNativeDelegate ForeachVMCallback {
			get {
				if (Foreach_cb_delegate == null)
					Foreach_cb_delegate = new ForeachNativeDelegate (Foreach_cb);
				return Foreach_cb_delegate;
			}
		}

		static void OverrideForeach (GLib.GType gtype)
		{
			OverrideForeach (gtype, ForeachVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ForeachNativeDelegate (IntPtr inst, GtkSharp.CellCallbackNative cb, IntPtr callback_data);

		static void Foreach_cb (IntPtr inst, GtkSharp.CellCallbackNative cb, IntPtr callback_data)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				GtkSharp.CellCallbackInvoker cb_invoker = new GtkSharp.CellCallbackInvoker (cb, callback_data);
				__obj.OnForeach (cb_invoker.Handler);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideForeach")]
		protected virtual void OnForeach (Gtk.CellCallback cb)
		{
			InternalForeach (cb);
		}

		private void InternalForeach (Gtk.CellCallback cb)
		{
			ForeachNativeDelegate unmanaged = class_abi.BaseOverride<ForeachNativeDelegate>(this.LookupGType(), "for_each");
			if (unmanaged == null) return;

			GtkSharp.CellCallbackWrapper cb_wrapper = new GtkSharp.CellCallbackWrapper (cb);
			unmanaged (this.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
		}

		static ForeachAllocNativeDelegate ForeachAlloc_cb_delegate;
		static ForeachAllocNativeDelegate ForeachAllocVMCallback {
			get {
				if (ForeachAlloc_cb_delegate == null)
					ForeachAlloc_cb_delegate = new ForeachAllocNativeDelegate (ForeachAlloc_cb);
				return ForeachAlloc_cb_delegate;
			}
		}

		static void OverrideForeachAlloc (GLib.GType gtype)
		{
			OverrideForeachAlloc (gtype, ForeachAllocVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ForeachAllocNativeDelegate (IntPtr inst, IntPtr context, IntPtr widget, IntPtr cell_area, IntPtr background_area, GtkSharp.CellAllocCallbackNative cb, IntPtr callback_data);

		static void ForeachAlloc_cb (IntPtr inst, IntPtr context, IntPtr widget, IntPtr cell_area, IntPtr background_area, GtkSharp.CellAllocCallbackNative cb, IntPtr callback_data)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				GtkSharp.CellAllocCallbackInvoker cb_invoker = new GtkSharp.CellAllocCallbackInvoker (cb, callback_data);
				__obj.OnForeachAlloc (GLib.Object.GetObject(context) as Gtk.CellAreaContext, GLib.Object.GetObject(widget) as Gtk.Widget, (Gdk.Rectangle) Marshal.PtrToStructure (cell_area, typeof (Gdk.Rectangle)), (Gdk.Rectangle) Marshal.PtrToStructure (background_area, typeof (Gdk.Rectangle)), cb_invoker.Handler);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideForeachAlloc")]
		protected virtual void OnForeachAlloc (Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Rectangle cell_area, Gdk.Rectangle background_area, Gtk.CellAllocCallback cb)
		{
			InternalForeachAlloc (context, widget, cell_area, background_area, cb);
		}

		private void InternalForeachAlloc (Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Rectangle cell_area, Gdk.Rectangle background_area, Gtk.CellAllocCallback cb)
		{
			ForeachAllocNativeDelegate unmanaged = class_abi.BaseOverride<ForeachAllocNativeDelegate>(this.LookupGType(), "foreach_alloc");
			if (unmanaged == null) return;

			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			IntPtr native_background_area = GLib.Marshaller.StructureToPtrAlloc (background_area);
			GtkSharp.CellAllocCallbackWrapper cb_wrapper = new GtkSharp.CellAllocCallbackWrapper (cb);
			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, native_cell_area, native_background_area, cb_wrapper.NativeDelegate, IntPtr.Zero);
			Marshal.FreeHGlobal (native_cell_area);
			Marshal.FreeHGlobal (native_background_area);
		}

		static EventNativeDelegate Event_cb_delegate;
		static EventNativeDelegate EventVMCallback {
			get {
				if (Event_cb_delegate == null)
					Event_cb_delegate = new EventNativeDelegate (Event_cb);
				return Event_cb_delegate;
			}
		}

		static void OverrideEvent (GLib.GType gtype)
		{
			OverrideEvent (gtype, EventVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int EventNativeDelegate (IntPtr inst, IntPtr context, IntPtr widget, IntPtr evnt, IntPtr cell_area, int flags);

		static int Event_cb (IntPtr inst, IntPtr context, IntPtr widget, IntPtr evnt, IntPtr cell_area, int flags)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				int __result;
				__result = __obj.OnEvent (GLib.Object.GetObject(context) as Gtk.CellAreaContext, GLib.Object.GetObject(widget) as Gtk.Widget, Gdk.Event.GetEvent (evnt), (Gdk.Rectangle) Marshal.PtrToStructure (cell_area, typeof (Gdk.Rectangle)), (Gtk.CellRendererState) flags);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideEvent")]
		protected virtual int OnEvent (Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Event evnt, Gdk.Rectangle cell_area, Gtk.CellRendererState flags)
		{
			return InternalEvent (context, widget, evnt, cell_area, flags);
		}

		private int InternalEvent (Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Event evnt, Gdk.Rectangle cell_area, Gtk.CellRendererState flags)
		{
			EventNativeDelegate unmanaged = class_abi.BaseOverride<EventNativeDelegate>(this.LookupGType(), "evnt");
			if (unmanaged == null) return 0;

			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			int __result = unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, native_cell_area, (int) flags);
			Marshal.FreeHGlobal (native_cell_area);
			return __result;
		}

		static RenderNativeDelegate Render_cb_delegate;
		static RenderNativeDelegate RenderVMCallback {
			get {
				if (Render_cb_delegate == null)
					Render_cb_delegate = new RenderNativeDelegate (Render_cb);
				return Render_cb_delegate;
			}
		}

		static void OverrideRender (GLib.GType gtype)
		{
			OverrideRender (gtype, RenderVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderNativeDelegate (IntPtr inst, IntPtr context, IntPtr widget, IntPtr cr, IntPtr background_area, IntPtr cell_area, int flags, bool paint_focus);

		static void Render_cb (IntPtr inst, IntPtr context, IntPtr widget, IntPtr cr, IntPtr background_area, IntPtr cell_area, int flags, bool paint_focus)
		{
			Cairo.Context mycr = null;

			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRender (GLib.Object.GetObject(context) as Gtk.CellAreaContext, GLib.Object.GetObject(widget) as Gtk.Widget, mycr, (Gdk.Rectangle) Marshal.PtrToStructure (background_area, typeof (Gdk.Rectangle)), (Gdk.Rectangle) Marshal.PtrToStructure (cell_area, typeof (Gdk.Rectangle)), (Gtk.CellRendererState) flags, paint_focus);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			} finally {
				var disposable_cr = mycr as IDisposable;
				if (disposable_cr != null)
					disposable_cr.Dispose ();
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideRender")]
		protected virtual void OnRender (Gtk.CellAreaContext context, Gtk.Widget widget, Cairo.Context cr, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags, bool paint_focus)
		{
			InternalRender (context, widget, cr, background_area, cell_area, flags, paint_focus);
		}

		private void InternalRender (Gtk.CellAreaContext context, Gtk.Widget widget, Cairo.Context cr, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags, bool paint_focus)
		{
			RenderNativeDelegate unmanaged = class_abi.BaseOverride<RenderNativeDelegate>(this.LookupGType(), "render");
			if (unmanaged == null) return;

			IntPtr native_background_area = GLib.Marshaller.StructureToPtrAlloc (background_area);
			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, cr == null ? IntPtr.Zero : cr.Handle, native_background_area, native_cell_area, (int) flags, paint_focus);
			Marshal.FreeHGlobal (native_background_area);
			Marshal.FreeHGlobal (native_cell_area);
		}

		static ApplyAttributesNativeDelegate ApplyAttributes_cb_delegate;
		static ApplyAttributesNativeDelegate ApplyAttributesVMCallback {
			get {
				if (ApplyAttributes_cb_delegate == null)
					ApplyAttributes_cb_delegate = new ApplyAttributesNativeDelegate (ApplyAttributes_cb);
				return ApplyAttributes_cb_delegate;
			}
		}

		static void OverrideApplyAttributes (GLib.GType gtype)
		{
			OverrideApplyAttributes (gtype, ApplyAttributesVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ApplyAttributesNativeDelegate (IntPtr inst, IntPtr tree_model, IntPtr iter, bool is_expander, bool is_expanded);

		static void ApplyAttributes_cb (IntPtr inst, IntPtr tree_model, IntPtr iter, bool is_expander, bool is_expanded)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				__obj.OnApplyAttributes (Gtk.TreeModelAdapter.GetObject (tree_model, false), Gtk.TreeIter.New (iter), is_expander, is_expanded);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideApplyAttributes")]
		protected virtual void OnApplyAttributes (Gtk.ITreeModel tree_model, Gtk.TreeIter iter, bool is_expander, bool is_expanded)
		{
			InternalApplyAttributes (tree_model, iter, is_expander, is_expanded);
		}

		private void InternalApplyAttributes (Gtk.ITreeModel tree_model, Gtk.TreeIter iter, bool is_expander, bool is_expanded)
		{
			ApplyAttributesNativeDelegate unmanaged = class_abi.BaseOverride<ApplyAttributesNativeDelegate>(this.LookupGType(), "apply_attributes");
			if (unmanaged == null) return;

			IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter);
			unmanaged (this.Handle, tree_model == null ? IntPtr.Zero : ((tree_model is GLib.Object) ? (tree_model as GLib.Object).Handle : (tree_model as Gtk.TreeModelAdapter).Handle), native_iter, is_expander, is_expanded);
			Marshal.FreeHGlobal (native_iter);
		}

		static CreateContextNativeDelegate CreateContext_cb_delegate;
		static CreateContextNativeDelegate CreateContextVMCallback {
			get {
				if (CreateContext_cb_delegate == null)
					CreateContext_cb_delegate = new CreateContextNativeDelegate (CreateContext_cb);
				return CreateContext_cb_delegate;
			}
		}

		static void OverrideCreateContext (GLib.GType gtype)
		{
			OverrideCreateContext (gtype, CreateContextVMCallback);
		}

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

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

		static IntPtr CreateContext_cb (IntPtr inst)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				Gtk.CellAreaContext __result;
				__result = __obj.OnCreateContext ();
				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.CellArea), ConnectionMethod="OverrideCreateContext")]
		protected virtual Gtk.CellAreaContext OnCreateContext ()
		{
			return InternalCreateContext ();
		}

		private Gtk.CellAreaContext InternalCreateContext ()
		{
			CreateContextNativeDelegate unmanaged = class_abi.BaseOverride<CreateContextNativeDelegate>(this.LookupGType(), "create_context");
			if (unmanaged == null) return null;

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

		static CopyContextNativeDelegate CopyContext_cb_delegate;
		static CopyContextNativeDelegate CopyContextVMCallback {
			get {
				if (CopyContext_cb_delegate == null)
					CopyContext_cb_delegate = new CopyContextNativeDelegate (CopyContext_cb);
				return CopyContext_cb_delegate;
			}
		}

		static void OverrideCopyContext (GLib.GType gtype)
		{
			OverrideCopyContext (gtype, CopyContextVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr CopyContextNativeDelegate (IntPtr inst, IntPtr context);

		static IntPtr CopyContext_cb (IntPtr inst, IntPtr context)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				Gtk.CellAreaContext __result;
				__result = __obj.OnCopyContext (GLib.Object.GetObject(context) as Gtk.CellAreaContext);
				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.CellArea), ConnectionMethod="OverrideCopyContext")]
		protected virtual Gtk.CellAreaContext OnCopyContext (Gtk.CellAreaContext context)
		{
			return InternalCopyContext (context);
		}

		private Gtk.CellAreaContext InternalCopyContext (Gtk.CellAreaContext context)
		{
			CopyContextNativeDelegate unmanaged = class_abi.BaseOverride<CopyContextNativeDelegate>(this.LookupGType(), "copy_context");
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle);
			return GLib.Object.GetObject(__result) as Gtk.CellAreaContext;
		}

		static GetRequestModeNativeDelegate GetRequestMode_cb_delegate;
		static GetRequestModeNativeDelegate GetRequestModeVMCallback {
			get {
				if (GetRequestMode_cb_delegate == null)
					GetRequestMode_cb_delegate = new GetRequestModeNativeDelegate (GetRequestMode_cb);
				return GetRequestMode_cb_delegate;
			}
		}

		static void OverrideGetRequestMode (GLib.GType gtype)
		{
			OverrideGetRequestMode (gtype, GetRequestModeVMCallback);
		}

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

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideGetRequestMode")]
		protected virtual Gtk.SizeRequestMode OnGetRequestMode ()
		{
			return InternalGetRequestMode ();
		}

		private Gtk.SizeRequestMode InternalGetRequestMode ()
		{
			GetRequestModeNativeDelegate unmanaged = class_abi.BaseOverride<GetRequestModeNativeDelegate>(this.LookupGType(), "get_request_mode");
			if (unmanaged == null) return (Gtk.SizeRequestMode) 0;

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

		static GetPreferredWidthNativeDelegate GetPreferredWidth_cb_delegate;
		static GetPreferredWidthNativeDelegate GetPreferredWidthVMCallback {
			get {
				if (GetPreferredWidth_cb_delegate == null)
					GetPreferredWidth_cb_delegate = new GetPreferredWidthNativeDelegate (GetPreferredWidth_cb);
				return GetPreferredWidth_cb_delegate;
			}
		}

		static void OverrideGetPreferredWidth (GLib.GType gtype)
		{
			OverrideGetPreferredWidth (gtype, GetPreferredWidthVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void GetPreferredWidthNativeDelegate (IntPtr inst, IntPtr context, IntPtr widget, out int minimum_width, out int natural_width);

		static void GetPreferredWidth_cb (IntPtr inst, IntPtr context, IntPtr widget, out int minimum_width, out int natural_width)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				__obj.OnGetPreferredWidth (GLib.Object.GetObject(context) as Gtk.CellAreaContext, GLib.Object.GetObject(widget) as Gtk.Widget, out minimum_width, out natural_width);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideGetPreferredWidth")]
		protected virtual void OnGetPreferredWidth (Gtk.CellAreaContext context, Gtk.Widget widget, out int minimum_width, out int natural_width)
		{
			InternalGetPreferredWidth (context, widget, out minimum_width, out natural_width);
		}

		private void InternalGetPreferredWidth (Gtk.CellAreaContext context, Gtk.Widget widget, out int minimum_width, out int natural_width)
		{
			GetPreferredWidthNativeDelegate unmanaged = class_abi.BaseOverride<GetPreferredWidthNativeDelegate>(this.LookupGType(), "get_preferred_width");
			if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");

			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, out minimum_width, out natural_width);
		}

		static GetPreferredHeightForWidthNativeDelegate GetPreferredHeightForWidth_cb_delegate;
		static GetPreferredHeightForWidthNativeDelegate GetPreferredHeightForWidthVMCallback {
			get {
				if (GetPreferredHeightForWidth_cb_delegate == null)
					GetPreferredHeightForWidth_cb_delegate = new GetPreferredHeightForWidthNativeDelegate (GetPreferredHeightForWidth_cb);
				return GetPreferredHeightForWidth_cb_delegate;
			}
		}

		static void OverrideGetPreferredHeightForWidth (GLib.GType gtype)
		{
			OverrideGetPreferredHeightForWidth (gtype, GetPreferredHeightForWidthVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void GetPreferredHeightForWidthNativeDelegate (IntPtr inst, IntPtr context, IntPtr widget, int width, out int minimum_height, out int natural_height);

		static void GetPreferredHeightForWidth_cb (IntPtr inst, IntPtr context, IntPtr widget, int width, out int minimum_height, out int natural_height)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				__obj.OnGetPreferredHeightForWidth (GLib.Object.GetObject(context) as Gtk.CellAreaContext, GLib.Object.GetObject(widget) as Gtk.Widget, width, out minimum_height, out natural_height);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideGetPreferredHeightForWidth")]
		protected virtual void OnGetPreferredHeightForWidth (Gtk.CellAreaContext context, Gtk.Widget widget, int width, out int minimum_height, out int natural_height)
		{
			InternalGetPreferredHeightForWidth (context, widget, width, out minimum_height, out natural_height);
		}

		private void InternalGetPreferredHeightForWidth (Gtk.CellAreaContext context, Gtk.Widget widget, int width, out int minimum_height, out int natural_height)
		{
			GetPreferredHeightForWidthNativeDelegate unmanaged = class_abi.BaseOverride<GetPreferredHeightForWidthNativeDelegate>(this.LookupGType(), "get_preferred_height_for_width");
			if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");

			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, width, out minimum_height, out natural_height);
		}

		static GetPreferredHeightNativeDelegate GetPreferredHeight_cb_delegate;
		static GetPreferredHeightNativeDelegate GetPreferredHeightVMCallback {
			get {
				if (GetPreferredHeight_cb_delegate == null)
					GetPreferredHeight_cb_delegate = new GetPreferredHeightNativeDelegate (GetPreferredHeight_cb);
				return GetPreferredHeight_cb_delegate;
			}
		}

		static void OverrideGetPreferredHeight (GLib.GType gtype)
		{
			OverrideGetPreferredHeight (gtype, GetPreferredHeightVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void GetPreferredHeightNativeDelegate (IntPtr inst, IntPtr context, IntPtr widget, out int minimum_height, out int natural_height);

		static void GetPreferredHeight_cb (IntPtr inst, IntPtr context, IntPtr widget, out int minimum_height, out int natural_height)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				__obj.OnGetPreferredHeight (GLib.Object.GetObject(context) as Gtk.CellAreaContext, GLib.Object.GetObject(widget) as Gtk.Widget, out minimum_height, out natural_height);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideGetPreferredHeight")]
		protected virtual void OnGetPreferredHeight (Gtk.CellAreaContext context, Gtk.Widget widget, out int minimum_height, out int natural_height)
		{
			InternalGetPreferredHeight (context, widget, out minimum_height, out natural_height);
		}

		private void InternalGetPreferredHeight (Gtk.CellAreaContext context, Gtk.Widget widget, out int minimum_height, out int natural_height)
		{
			GetPreferredHeightNativeDelegate unmanaged = class_abi.BaseOverride<GetPreferredHeightNativeDelegate>(this.LookupGType(), "get_preferred_height");
			if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");

			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, out minimum_height, out natural_height);
		}

		static GetPreferredWidthForHeightNativeDelegate GetPreferredWidthForHeight_cb_delegate;
		static GetPreferredWidthForHeightNativeDelegate GetPreferredWidthForHeightVMCallback {
			get {
				if (GetPreferredWidthForHeight_cb_delegate == null)
					GetPreferredWidthForHeight_cb_delegate = new GetPreferredWidthForHeightNativeDelegate (GetPreferredWidthForHeight_cb);
				return GetPreferredWidthForHeight_cb_delegate;
			}
		}

		static void OverrideGetPreferredWidthForHeight (GLib.GType gtype)
		{
			OverrideGetPreferredWidthForHeight (gtype, GetPreferredWidthForHeightVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void GetPreferredWidthForHeightNativeDelegate (IntPtr inst, IntPtr context, IntPtr widget, int height, out int minimum_width, out int natural_width);

		static void GetPreferredWidthForHeight_cb (IntPtr inst, IntPtr context, IntPtr widget, int height, out int minimum_width, out int natural_width)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				__obj.OnGetPreferredWidthForHeight (GLib.Object.GetObject(context) as Gtk.CellAreaContext, GLib.Object.GetObject(widget) as Gtk.Widget, height, out minimum_width, out natural_width);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideGetPreferredWidthForHeight")]
		protected virtual void OnGetPreferredWidthForHeight (Gtk.CellAreaContext context, Gtk.Widget widget, int height, out int minimum_width, out int natural_width)
		{
			InternalGetPreferredWidthForHeight (context, widget, height, out minimum_width, out natural_width);
		}

		private void InternalGetPreferredWidthForHeight (Gtk.CellAreaContext context, Gtk.Widget widget, int height, out int minimum_width, out int natural_width)
		{
			GetPreferredWidthForHeightNativeDelegate unmanaged = class_abi.BaseOverride<GetPreferredWidthForHeightNativeDelegate>(this.LookupGType(), "get_preferred_width_for_height");
			if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");

			unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, height, out minimum_width, out natural_width);
		}

		static SetCellPropertyNativeDelegate SetCellProperty_cb_delegate;
		static SetCellPropertyNativeDelegate SetCellPropertyVMCallback {
			get {
				if (SetCellProperty_cb_delegate == null)
					SetCellProperty_cb_delegate = new SetCellPropertyNativeDelegate (SetCellProperty_cb);
				return SetCellProperty_cb_delegate;
			}
		}

		static void OverrideSetCellProperty (GLib.GType gtype)
		{
			OverrideSetCellProperty (gtype, SetCellPropertyVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void SetCellPropertyNativeDelegate (IntPtr inst, IntPtr renderer, uint property_id, IntPtr value, IntPtr pspec);

		static void SetCellProperty_cb (IntPtr inst, IntPtr renderer, uint property_id, IntPtr value, IntPtr pspec)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				__obj.OnSetCellProperty (GLib.Object.GetObject(renderer) as Gtk.CellRenderer, property_id, (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value)), pspec);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideSetCellProperty")]
		protected virtual void OnSetCellProperty (Gtk.CellRenderer renderer, uint property_id, GLib.Value value, IntPtr pspec)
		{
			InternalSetCellProperty (renderer, property_id, value, pspec);
		}

		private void InternalSetCellProperty (Gtk.CellRenderer renderer, uint property_id, GLib.Value value, IntPtr pspec)
		{
			SetCellPropertyNativeDelegate unmanaged = class_abi.BaseOverride<SetCellPropertyNativeDelegate>(this.LookupGType(), "set_cell_property");
			if (unmanaged == null) return;

			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			unmanaged (this.Handle, renderer == null ? IntPtr.Zero : renderer.Handle, property_id, native_value, pspec);
			Marshal.FreeHGlobal (native_value);
		}

		static GetCellPropertyNativeDelegate GetCellProperty_cb_delegate;
		static GetCellPropertyNativeDelegate GetCellPropertyVMCallback {
			get {
				if (GetCellProperty_cb_delegate == null)
					GetCellProperty_cb_delegate = new GetCellPropertyNativeDelegate (GetCellProperty_cb);
				return GetCellProperty_cb_delegate;
			}
		}

		static void OverrideGetCellProperty (GLib.GType gtype)
		{
			OverrideGetCellProperty (gtype, GetCellPropertyVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void GetCellPropertyNativeDelegate (IntPtr inst, IntPtr renderer, uint property_id, IntPtr value, IntPtr pspec);

		static void GetCellProperty_cb (IntPtr inst, IntPtr renderer, uint property_id, IntPtr value, IntPtr pspec)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				__obj.OnGetCellProperty (GLib.Object.GetObject(renderer) as Gtk.CellRenderer, property_id, (GLib.Value) Marshal.PtrToStructure (value, typeof (GLib.Value)), pspec);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideGetCellProperty")]
		protected virtual void OnGetCellProperty (Gtk.CellRenderer renderer, uint property_id, GLib.Value value, IntPtr pspec)
		{
			InternalGetCellProperty (renderer, property_id, value, pspec);
		}

		private void InternalGetCellProperty (Gtk.CellRenderer renderer, uint property_id, GLib.Value value, IntPtr pspec)
		{
			GetCellPropertyNativeDelegate unmanaged = class_abi.BaseOverride<GetCellPropertyNativeDelegate>(this.LookupGType(), "get_cell_property");
			if (unmanaged == null) return;

			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			unmanaged (this.Handle, renderer == null ? IntPtr.Zero : renderer.Handle, property_id, native_value, pspec);
			Marshal.FreeHGlobal (native_value);
		}

		static FocusNativeDelegate Focus_cb_delegate;
		static FocusNativeDelegate FocusVMCallback {
			get {
				if (Focus_cb_delegate == null)
					Focus_cb_delegate = new FocusNativeDelegate (Focus_cb);
				return Focus_cb_delegate;
			}
		}

		static void OverrideFocus (GLib.GType gtype)
		{
			OverrideFocus (gtype, FocusVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool FocusNativeDelegate (IntPtr inst, int direction);

		static bool Focus_cb (IntPtr inst, int direction)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				bool __result;
				__result = __obj.OnFocus ((Gtk.DirectionType) direction);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideFocus")]
		protected virtual bool OnFocus (Gtk.DirectionType direction)
		{
			return InternalFocus (direction);
		}

		private bool InternalFocus (Gtk.DirectionType direction)
		{
			FocusNativeDelegate unmanaged = class_abi.BaseOverride<FocusNativeDelegate>(this.LookupGType(), "focus");
			if (unmanaged == null) return false;

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

		static IsActivatableNativeDelegate IsActivatable_cb_delegate;
		static IsActivatableNativeDelegate IsActivatableVMCallback {
			get {
				if (IsActivatable_cb_delegate == null)
					IsActivatable_cb_delegate = new IsActivatableNativeDelegate (IsActivatable_cb);
				return IsActivatable_cb_delegate;
			}
		}

		static void OverrideIsActivatable (GLib.GType gtype)
		{
			OverrideIsActivatable (gtype, IsActivatableVMCallback);
		}

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

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

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

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideIsActivatable")]
		protected virtual bool OnIsActivatable ()
		{
			return InternalIsActivatable ();
		}

		private bool InternalIsActivatable ()
		{
			IsActivatableNativeDelegate unmanaged = class_abi.BaseOverride<IsActivatableNativeDelegate>(this.LookupGType(), "is_activatable");
			if (unmanaged == null) return false;

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

		static ActivateNativeDelegate Activate_cb_delegate;
		static ActivateNativeDelegate ActivateVMCallback {
			get {
				if (Activate_cb_delegate == null)
					Activate_cb_delegate = new ActivateNativeDelegate (Activate_cb);
				return Activate_cb_delegate;
			}
		}

		static void OverrideActivate (GLib.GType gtype)
		{
			OverrideActivate (gtype, ActivateVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool ActivateNativeDelegate (IntPtr inst, IntPtr context, IntPtr widget, IntPtr cell_area, int flags, bool edit_only);

		static bool Activate_cb (IntPtr inst, IntPtr context, IntPtr widget, IntPtr cell_area, int flags, bool edit_only)
		{
			try {
				CellArea __obj = GLib.Object.GetObject (inst, false) as CellArea;
				bool __result;
				__result = __obj.OnActivate (GLib.Object.GetObject(context) as Gtk.CellAreaContext, GLib.Object.GetObject(widget) as Gtk.Widget, (Gdk.Rectangle) Marshal.PtrToStructure (cell_area, typeof (Gdk.Rectangle)), (Gtk.CellRendererState) flags, edit_only);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.CellArea), ConnectionMethod="OverrideActivate")]
		protected virtual bool OnActivate (Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Rectangle cell_area, Gtk.CellRendererState flags, bool edit_only)
		{
			return InternalActivate (context, widget, cell_area, flags, edit_only);
		}

		private bool InternalActivate (Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Rectangle cell_area, Gtk.CellRendererState flags, bool edit_only)
		{
			ActivateNativeDelegate unmanaged = class_abi.BaseOverride<ActivateNativeDelegate>(this.LookupGType(), "activate");
			if (unmanaged == null) return false;

			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			bool __result = unmanaged (this.Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, native_cell_area, (int) flags, edit_only);
			Marshal.FreeHGlobal (native_cell_area);
			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("add"
							, GLib.Object.class_abi.Fields
							, (uint) sizeof( IntPtr ) // add
							, null
							, "remove"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("remove"
							, -1
							, (uint) sizeof( IntPtr ) // remove
							, "add"
							, "foreach"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("foreach"
							, -1
							, (uint) sizeof( IntPtr ) // foreach
							, "remove"
							, "foreach_alloc"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("foreach_alloc"
							, -1
							, (uint) sizeof( IntPtr ) // foreach_alloc
							, "foreach"
							, "event"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("event"
							, -1
							, (uint) sizeof( IntPtr ) // event
							, "foreach_alloc"
							, "render"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render"
							, -1
							, (uint) sizeof( IntPtr ) // render
							, "event"
							, "apply_attributes"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("apply_attributes"
							, -1
							, (uint) sizeof( IntPtr ) // apply_attributes
							, "render"
							, "create_context"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("create_context"
							, -1
							, (uint) sizeof( IntPtr ) // create_context
							, "apply_attributes"
							, "copy_context"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("copy_context"
							, -1
							, (uint) sizeof( IntPtr ) // copy_context
							, "create_context"
							, "get_request_mode"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("get_request_mode"
							, -1
							, (uint) sizeof( IntPtr ) // get_request_mode
							, "copy_context"
							, "get_preferred_width"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("get_preferred_width"
							, -1
							, (uint) sizeof( IntPtr ) // get_preferred_width
							, "get_request_mode"
							, "get_preferred_height_for_width"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("get_preferred_height_for_width"
							, -1
							, (uint) sizeof( IntPtr ) // get_preferred_height_for_width
							, "get_preferred_width"
							, "get_preferred_height"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("get_preferred_height"
							, -1
							, (uint) sizeof( IntPtr ) // get_preferred_height
							, "get_preferred_height_for_width"
							, "get_preferred_width_for_height"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("get_preferred_width_for_height"
							, -1
							, (uint) sizeof( IntPtr ) // get_preferred_width_for_height
							, "get_preferred_height"
							, "set_cell_property"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("set_cell_property"
							, -1
							, (uint) sizeof( IntPtr ) // set_cell_property
							, "get_preferred_width_for_height"
							, "get_cell_property"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("get_cell_property"
							, -1
							, (uint) sizeof( IntPtr ) // get_cell_property
							, "set_cell_property"
							, "focus"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("focus"
							, -1
							, (uint) sizeof( IntPtr ) // focus
							, "get_cell_property"
							, "is_activatable"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("is_activatable"
							, -1
							, (uint) sizeof( IntPtr ) // is_activatable
							, "focus"
							, "activate"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("activate"
							, -1
							, (uint) sizeof( IntPtr ) // activate
							, "is_activatable"
							, "_gtk_reserved1"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved1"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved1
							, "activate"
							, "_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"
							, "_gtk_reserved5"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved5"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved5
							, "_gtk_reserved4"
							, "_gtk_reserved6"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved6"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved6
							, "_gtk_reserved5"
							, "_gtk_reserved7"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved7"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved7
							, "_gtk_reserved6"
							, "_gtk_reserved8"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved8"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved8
							, "_gtk_reserved7"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_cell_area_activate(IntPtr raw, IntPtr context, IntPtr widget, IntPtr cell_area, int flags, bool edit_only);
		static d_gtk_cell_area_activate gtk_cell_area_activate = FuncLoader.LoadFunction<d_gtk_cell_area_activate>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_activate"));

		public bool Activate(Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Rectangle cell_area, Gtk.CellRendererState flags, bool edit_only) {
			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			bool raw_ret = gtk_cell_area_activate(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, native_cell_area, (int) flags, edit_only);
			bool ret = raw_ret;
			Marshal.FreeHGlobal (native_cell_area);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_cell_area_activate_cell(IntPtr raw, IntPtr widget, IntPtr renderer, IntPtr evnt, IntPtr cell_area, int flags);
		static d_gtk_cell_area_activate_cell gtk_cell_area_activate_cell = FuncLoader.LoadFunction<d_gtk_cell_area_activate_cell>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_activate_cell"));

		public bool ActivateCell(Gtk.Widget widget, Gtk.CellRenderer renderer, Gdk.Event evnt, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			bool raw_ret = gtk_cell_area_activate_cell(Handle, widget == null ? IntPtr.Zero : widget.Handle, renderer == null ? IntPtr.Zero : renderer.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, native_cell_area, (int) flags);
			bool ret = raw_ret;
			Marshal.FreeHGlobal (native_cell_area);
			return ret;
		}

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

		public void Add(Gtk.CellRenderer renderer) {
			gtk_cell_area_add(Handle, renderer == null ? IntPtr.Zero : renderer.Handle);
		}

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

		public void AddFocusSibling(Gtk.CellRenderer renderer, Gtk.CellRenderer sibling) {
			gtk_cell_area_add_focus_sibling(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, sibling == null ? IntPtr.Zero : sibling.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_apply_attributes(IntPtr raw, IntPtr tree_model, IntPtr iter, bool is_expander, bool is_expanded);
		static d_gtk_cell_area_apply_attributes gtk_cell_area_apply_attributes = FuncLoader.LoadFunction<d_gtk_cell_area_apply_attributes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_apply_attributes"));

		public void ApplyAttributes(Gtk.ITreeModel tree_model, Gtk.TreeIter iter, bool is_expander, bool is_expanded) {
			IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter);
			gtk_cell_area_apply_attributes(Handle, tree_model == null ? IntPtr.Zero : ((tree_model is GLib.Object) ? (tree_model as GLib.Object).Handle : (tree_model as Gtk.TreeModelAdapter).Handle), native_iter, is_expander, is_expanded);
			Marshal.FreeHGlobal (native_iter);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_attribute_connect(IntPtr raw, IntPtr renderer, IntPtr attribute, int column);
		static d_gtk_cell_area_attribute_connect gtk_cell_area_attribute_connect = FuncLoader.LoadFunction<d_gtk_cell_area_attribute_connect>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_attribute_connect"));

		public void AttributeConnect(Gtk.CellRenderer renderer, string attribute, int column) {
			IntPtr native_attribute = GLib.Marshaller.StringToPtrGStrdup (attribute);
			gtk_cell_area_attribute_connect(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, native_attribute, column);
			GLib.Marshaller.Free (native_attribute);
		}

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

		public void AttributeDisconnect(Gtk.CellRenderer renderer, string attribute) {
			IntPtr native_attribute = GLib.Marshaller.StringToPtrGStrdup (attribute);
			gtk_cell_area_attribute_disconnect(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, native_attribute);
			GLib.Marshaller.Free (native_attribute);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int d_gtk_cell_area_attribute_get_column(IntPtr raw, IntPtr renderer, IntPtr attribute);
		static d_gtk_cell_area_attribute_get_column gtk_cell_area_attribute_get_column = FuncLoader.LoadFunction<d_gtk_cell_area_attribute_get_column>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_attribute_get_column"));

		public int AttributeGetColumn(Gtk.CellRenderer renderer, string attribute) {
			IntPtr native_attribute = GLib.Marshaller.StringToPtrGStrdup (attribute);
			int raw_ret = gtk_cell_area_attribute_get_column(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, native_attribute);
			int ret = raw_ret;
			GLib.Marshaller.Free (native_attribute);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_cell_get_property(IntPtr raw, IntPtr renderer, IntPtr property_name, IntPtr value);
		static d_gtk_cell_area_cell_get_property gtk_cell_area_cell_get_property = FuncLoader.LoadFunction<d_gtk_cell_area_cell_get_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_cell_get_property"));

		public void CellGetProperty(Gtk.CellRenderer renderer, string property_name, GLib.Value value) {
			IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name);
			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			gtk_cell_area_cell_get_property(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, native_property_name, native_value);
			GLib.Marshaller.Free (native_property_name);
			Marshal.FreeHGlobal (native_value);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_cell_get_valist(IntPtr raw, IntPtr renderer, IntPtr first_property_name, IntPtr var_args);
		static d_gtk_cell_area_cell_get_valist gtk_cell_area_cell_get_valist = FuncLoader.LoadFunction<d_gtk_cell_area_cell_get_valist>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_cell_get_valist"));

		public void CellGetValist(Gtk.CellRenderer renderer, string first_property_name, IntPtr var_args) {
			IntPtr native_first_property_name = GLib.Marshaller.StringToPtrGStrdup (first_property_name);
			gtk_cell_area_cell_get_valist(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, native_first_property_name, var_args);
			GLib.Marshaller.Free (native_first_property_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_cell_set_property(IntPtr raw, IntPtr renderer, IntPtr property_name, IntPtr value);
		static d_gtk_cell_area_cell_set_property gtk_cell_area_cell_set_property = FuncLoader.LoadFunction<d_gtk_cell_area_cell_set_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_cell_set_property"));

		public void CellSetProperty(Gtk.CellRenderer renderer, string property_name, GLib.Value value) {
			IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name);
			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			gtk_cell_area_cell_set_property(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, native_property_name, native_value);
			GLib.Marshaller.Free (native_property_name);
			Marshal.FreeHGlobal (native_value);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_cell_set_valist(IntPtr raw, IntPtr renderer, IntPtr first_property_name, IntPtr var_args);
		static d_gtk_cell_area_cell_set_valist gtk_cell_area_cell_set_valist = FuncLoader.LoadFunction<d_gtk_cell_area_cell_set_valist>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_cell_set_valist"));

		public void CellSetValist(Gtk.CellRenderer renderer, string first_property_name, IntPtr var_args) {
			IntPtr native_first_property_name = GLib.Marshaller.StringToPtrGStrdup (first_property_name);
			gtk_cell_area_cell_set_valist(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, native_first_property_name, var_args);
			GLib.Marshaller.Free (native_first_property_name);
		}

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

		public Gtk.CellAreaContext CopyContext(Gtk.CellAreaContext context) {
			IntPtr raw_ret = gtk_cell_area_copy_context(Handle, context == null ? IntPtr.Zero : context.Handle);
			Gtk.CellAreaContext ret = GLib.Object.GetObject(raw_ret) as Gtk.CellAreaContext;
			return ret;
		}

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

		public Gtk.CellAreaContext CreateContext() {
			IntPtr raw_ret = gtk_cell_area_create_context(Handle);
			Gtk.CellAreaContext ret = GLib.Object.GetObject(raw_ret) as Gtk.CellAreaContext;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int d_gtk_cell_area_event(IntPtr raw, IntPtr context, IntPtr widget, IntPtr evnt, IntPtr cell_area, int flags);
		static d_gtk_cell_area_event gtk_cell_area_event = FuncLoader.LoadFunction<d_gtk_cell_area_event>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_event"));

		public int Event(Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Event evnt, Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			int raw_ret = gtk_cell_area_event(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, native_cell_area, (int) flags);
			int ret = raw_ret;
			Marshal.FreeHGlobal (native_cell_area);
			return ret;
		}

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

		public bool Focus(Gtk.DirectionType direction) {
			bool raw_ret = gtk_cell_area_focus(Handle, (int) direction);
			bool ret = raw_ret;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_foreach(IntPtr raw, GtkSharp.CellCallbackNative cb, IntPtr callback_data);
		static d_gtk_cell_area_foreach gtk_cell_area_foreach = FuncLoader.LoadFunction<d_gtk_cell_area_foreach>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_foreach"));

		public void Foreach(Gtk.CellCallback cb) {
			GtkSharp.CellCallbackWrapper cb_wrapper = new GtkSharp.CellCallbackWrapper (cb);
			gtk_cell_area_foreach(Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_foreach_alloc(IntPtr raw, IntPtr context, IntPtr widget, IntPtr cell_area, IntPtr background_area, GtkSharp.CellAllocCallbackNative cb, IntPtr callback_data);
		static d_gtk_cell_area_foreach_alloc gtk_cell_area_foreach_alloc = FuncLoader.LoadFunction<d_gtk_cell_area_foreach_alloc>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_foreach_alloc"));

		public void ForeachAlloc(Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Rectangle cell_area, Gdk.Rectangle background_area, Gtk.CellAllocCallback cb) {
			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			IntPtr native_background_area = GLib.Marshaller.StructureToPtrAlloc (background_area);
			GtkSharp.CellAllocCallbackWrapper cb_wrapper = new GtkSharp.CellAllocCallbackWrapper (cb);
			gtk_cell_area_foreach_alloc(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, native_cell_area, native_background_area, cb_wrapper.NativeDelegate, IntPtr.Zero);
			Marshal.FreeHGlobal (native_cell_area);
			Marshal.FreeHGlobal (native_background_area);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_get_cell_allocation(IntPtr raw, IntPtr context, IntPtr widget, IntPtr renderer, IntPtr cell_area, IntPtr allocation);
		static d_gtk_cell_area_get_cell_allocation gtk_cell_area_get_cell_allocation = FuncLoader.LoadFunction<d_gtk_cell_area_get_cell_allocation>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_get_cell_allocation"));

		public void GetCellAllocation(Gtk.CellAreaContext context, Gtk.Widget widget, Gtk.CellRenderer renderer, Gdk.Rectangle cell_area, Gdk.Rectangle allocation) {
			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			IntPtr native_allocation = GLib.Marshaller.StructureToPtrAlloc (allocation);
			gtk_cell_area_get_cell_allocation(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, renderer == null ? IntPtr.Zero : renderer.Handle, native_cell_area, native_allocation);
			Marshal.FreeHGlobal (native_cell_area);
			Marshal.FreeHGlobal (native_allocation);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_cell_area_get_cell_at_position(IntPtr raw, IntPtr context, IntPtr widget, IntPtr cell_area, int x, int y, IntPtr alloc_area);
		static d_gtk_cell_area_get_cell_at_position gtk_cell_area_get_cell_at_position = FuncLoader.LoadFunction<d_gtk_cell_area_get_cell_at_position>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_get_cell_at_position"));

		public Gtk.CellRenderer GetCellAtPosition(Gtk.CellAreaContext context, Gtk.Widget widget, Gdk.Rectangle cell_area, int x, int y, Gdk.Rectangle alloc_area) {
			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			IntPtr native_alloc_area = GLib.Marshaller.StructureToPtrAlloc (alloc_area);
			IntPtr raw_ret = gtk_cell_area_get_cell_at_position(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, native_cell_area, x, y, native_alloc_area);
			Gtk.CellRenderer ret = GLib.Object.GetObject(raw_ret) as Gtk.CellRenderer;
			Marshal.FreeHGlobal (native_cell_area);
			Marshal.FreeHGlobal (native_alloc_area);
			return ret;
		}

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

		public string CurrentPathString { 
			get {
				IntPtr raw_ret = gtk_cell_area_get_current_path_string(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}

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

		public Gtk.ICellEditable EditWidget { 
			get {
				IntPtr raw_ret = gtk_cell_area_get_edit_widget(Handle);
				Gtk.ICellEditable ret = Gtk.CellEditableAdapter.GetObject (raw_ret, false);
				return ret;
			}
		}

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

		public Gtk.CellRenderer EditedCell { 
			get {
				IntPtr raw_ret = gtk_cell_area_get_edited_cell(Handle);
				Gtk.CellRenderer ret = GLib.Object.GetObject(raw_ret) as Gtk.CellRenderer;
				return ret;
			}
		}

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

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

		public Gtk.CellRenderer FocusCell { 
			get {
				IntPtr raw_ret = gtk_cell_area_get_focus_cell(Handle);
				Gtk.CellRenderer ret = GLib.Object.GetObject(raw_ret) as Gtk.CellRenderer;
				return ret;
			}
			set {
				gtk_cell_area_set_focus_cell(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

		public Gtk.CellRenderer GetFocusFromSibling(Gtk.CellRenderer renderer) {
			IntPtr raw_ret = gtk_cell_area_get_focus_from_sibling(Handle, renderer == null ? IntPtr.Zero : renderer.Handle);
			Gtk.CellRenderer ret = GLib.Object.GetObject(raw_ret) as Gtk.CellRenderer;
			return ret;
		}

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

		public Gtk.CellRenderer[] GetFocusSiblings(Gtk.CellRenderer renderer) {
			IntPtr raw_ret = gtk_cell_area_get_focus_siblings(Handle, renderer == null ? IntPtr.Zero : renderer.Handle);
			Gtk.CellRenderer[] ret = GLib.Marshaller.ListPtrToArray<Gtk.CellRenderer, Gtk.CellRenderer> (raw_ret, false, false);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_get_preferred_height(IntPtr raw, IntPtr context, IntPtr widget, out int minimum_height, out int natural_height);
		static d_gtk_cell_area_get_preferred_height gtk_cell_area_get_preferred_height = FuncLoader.LoadFunction<d_gtk_cell_area_get_preferred_height>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_get_preferred_height"));

		public void GetPreferredHeight(Gtk.CellAreaContext context, Gtk.Widget widget, out int minimum_height, out int natural_height) {
			gtk_cell_area_get_preferred_height(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, out minimum_height, out natural_height);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_get_preferred_height_for_width(IntPtr raw, IntPtr context, IntPtr widget, int width, out int minimum_height, out int natural_height);
		static d_gtk_cell_area_get_preferred_height_for_width gtk_cell_area_get_preferred_height_for_width = FuncLoader.LoadFunction<d_gtk_cell_area_get_preferred_height_for_width>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_get_preferred_height_for_width"));

		public void GetPreferredHeightForWidth(Gtk.CellAreaContext context, Gtk.Widget widget, int width, out int minimum_height, out int natural_height) {
			gtk_cell_area_get_preferred_height_for_width(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, width, out minimum_height, out natural_height);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_get_preferred_width(IntPtr raw, IntPtr context, IntPtr widget, out int minimum_width, out int natural_width);
		static d_gtk_cell_area_get_preferred_width gtk_cell_area_get_preferred_width = FuncLoader.LoadFunction<d_gtk_cell_area_get_preferred_width>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_get_preferred_width"));

		public void GetPreferredWidth(Gtk.CellAreaContext context, Gtk.Widget widget, out int minimum_width, out int natural_width) {
			gtk_cell_area_get_preferred_width(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, out minimum_width, out natural_width);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_get_preferred_width_for_height(IntPtr raw, IntPtr context, IntPtr widget, int height, out int minimum_width, out int natural_width);
		static d_gtk_cell_area_get_preferred_width_for_height gtk_cell_area_get_preferred_width_for_height = FuncLoader.LoadFunction<d_gtk_cell_area_get_preferred_width_for_height>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_get_preferred_width_for_height"));

		public void GetPreferredWidthForHeight(Gtk.CellAreaContext context, Gtk.Widget widget, int height, out int minimum_width, out int natural_width) {
			gtk_cell_area_get_preferred_width_for_height(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, height, out minimum_width, out natural_width);
		}

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

		public Gtk.SizeRequestMode RequestMode { 
			get {
				int raw_ret = gtk_cell_area_get_request_mode(Handle);
				Gtk.SizeRequestMode ret = (Gtk.SizeRequestMode) raw_ret;
				return ret;
			}
		}

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

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

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

		public bool HasRenderer(Gtk.CellRenderer renderer) {
			bool raw_ret = gtk_cell_area_has_renderer(Handle, renderer == null ? IntPtr.Zero : renderer.Handle);
			bool ret = raw_ret;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_inner_cell_area(IntPtr raw, IntPtr widget, IntPtr cell_area, IntPtr inner_area);
		static d_gtk_cell_area_inner_cell_area gtk_cell_area_inner_cell_area = FuncLoader.LoadFunction<d_gtk_cell_area_inner_cell_area>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_inner_cell_area"));

		public void InnerCellArea(Gtk.Widget widget, Gdk.Rectangle cell_area, Gdk.Rectangle inner_area) {
			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			IntPtr native_inner_area = GLib.Marshaller.StructureToPtrAlloc (inner_area);
			gtk_cell_area_inner_cell_area(Handle, widget == null ? IntPtr.Zero : widget.Handle, native_cell_area, native_inner_area);
			Marshal.FreeHGlobal (native_cell_area);
			Marshal.FreeHGlobal (native_inner_area);
		}

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

		public bool IsActivatable { 
			get {
				bool raw_ret = gtk_cell_area_is_activatable(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public bool IsFocusSibling(Gtk.CellRenderer renderer, Gtk.CellRenderer sibling) {
			bool raw_ret = gtk_cell_area_is_focus_sibling(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, sibling == null ? IntPtr.Zero : sibling.Handle);
			bool ret = raw_ret;
			return ret;
		}

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

		public void Remove(Gtk.CellRenderer renderer) {
			gtk_cell_area_remove(Handle, renderer == null ? IntPtr.Zero : renderer.Handle);
		}

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

		public void RemoveFocusSibling(Gtk.CellRenderer renderer, Gtk.CellRenderer sibling) {
			gtk_cell_area_remove_focus_sibling(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, sibling == null ? IntPtr.Zero : sibling.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_render(IntPtr raw, IntPtr context, IntPtr widget, IntPtr cr, IntPtr background_area, IntPtr cell_area, int flags, bool paint_focus);
		static d_gtk_cell_area_render gtk_cell_area_render = FuncLoader.LoadFunction<d_gtk_cell_area_render>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_render"));

		public void Render(Gtk.CellAreaContext context, Gtk.Widget widget, Cairo.Context cr, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gtk.CellRendererState flags, bool paint_focus) {
			IntPtr native_background_area = GLib.Marshaller.StructureToPtrAlloc (background_area);
			IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area);
			gtk_cell_area_render(Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, cr == null ? IntPtr.Zero : cr.Handle, native_background_area, native_cell_area, (int) flags, paint_focus);
			Marshal.FreeHGlobal (native_background_area);
			Marshal.FreeHGlobal (native_cell_area);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_area_request_renderer(IntPtr raw, IntPtr renderer, int orientation, IntPtr widget, int for_size, out int minimum_size, out int natural_size);
		static d_gtk_cell_area_request_renderer gtk_cell_area_request_renderer = FuncLoader.LoadFunction<d_gtk_cell_area_request_renderer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_area_request_renderer"));

		public void RequestRenderer(Gtk.CellRenderer renderer, Gtk.Orientation orientation, Gtk.Widget widget, int for_size, out int minimum_size, out int natural_size) {
			gtk_cell_area_request_renderer(Handle, renderer == null ? IntPtr.Zero : renderer.Handle, (int) orientation, widget == null ? IntPtr.Zero : widget.Handle, for_size, out minimum_size, out natural_size);
		}

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

		public void StopEditing(bool canceled) {
			gtk_cell_area_stop_editing(Handle, canceled);
		}


		// 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"
							, GLib.Object.abi_info.Fields
							, (uint) sizeof( IntPtr ) // priv
							, null
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
