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

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

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

		[GLib.Property ("name")]
		public string Name {
			get {
				GLib.Value val = GetProperty ("name");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
		}

		static RenderLineNativeDelegate RenderLine_cb_delegate;
		static RenderLineNativeDelegate RenderLineVMCallback {
			get {
				if (RenderLine_cb_delegate == null)
					RenderLine_cb_delegate = new RenderLineNativeDelegate (RenderLine_cb);
				return RenderLine_cb_delegate;
			}
		}

		static void OverrideRenderLine (GLib.GType gtype)
		{
			OverrideRenderLine (gtype, RenderLineVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderLineNativeDelegate (IntPtr inst, IntPtr cr, double x0, double y0, double x1, double y1);

		static void RenderLine_cb (IntPtr inst, IntPtr cr, double x0, double y0, double x1, double y1)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderLine (mycr, x0, y0, x1, y1);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderLine")]
		protected virtual void OnRenderLine (Cairo.Context cr, double x0, double y0, double x1, double y1)
		{
			InternalRenderLine (cr, x0, y0, x1, y1);
		}

		private void InternalRenderLine (Cairo.Context cr, double x0, double y0, double x1, double y1)
		{
			RenderLineNativeDelegate unmanaged = class_abi.BaseOverride<RenderLineNativeDelegate>(this.LookupGType(), "render_line");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x0, y0, x1, y1);
		}

		static RenderBackgroundNativeDelegate RenderBackground_cb_delegate;
		static RenderBackgroundNativeDelegate RenderBackgroundVMCallback {
			get {
				if (RenderBackground_cb_delegate == null)
					RenderBackground_cb_delegate = new RenderBackgroundNativeDelegate (RenderBackground_cb);
				return RenderBackground_cb_delegate;
			}
		}

		static void OverrideRenderBackground (GLib.GType gtype)
		{
			OverrideRenderBackground (gtype, RenderBackgroundVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderBackgroundNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height);

		static void RenderBackground_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderBackground (mycr, x, y, width, height);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderBackground")]
		protected virtual void OnRenderBackground (Cairo.Context cr, double x, double y, double width, double height)
		{
			InternalRenderBackground (cr, x, y, width, height);
		}

		private void InternalRenderBackground (Cairo.Context cr, double x, double y, double width, double height)
		{
			RenderBackgroundNativeDelegate unmanaged = class_abi.BaseOverride<RenderBackgroundNativeDelegate>(this.LookupGType(), "render_background");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		static RenderFrameNativeDelegate RenderFrame_cb_delegate;
		static RenderFrameNativeDelegate RenderFrameVMCallback {
			get {
				if (RenderFrame_cb_delegate == null)
					RenderFrame_cb_delegate = new RenderFrameNativeDelegate (RenderFrame_cb);
				return RenderFrame_cb_delegate;
			}
		}

		static void OverrideRenderFrame (GLib.GType gtype)
		{
			OverrideRenderFrame (gtype, RenderFrameVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderFrameNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height);

		static void RenderFrame_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderFrame (mycr, x, y, width, height);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderFrame")]
		protected virtual void OnRenderFrame (Cairo.Context cr, double x, double y, double width, double height)
		{
			InternalRenderFrame (cr, x, y, width, height);
		}

		private void InternalRenderFrame (Cairo.Context cr, double x, double y, double width, double height)
		{
			RenderFrameNativeDelegate unmanaged = class_abi.BaseOverride<RenderFrameNativeDelegate>(this.LookupGType(), "render_frame");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		static RenderFrameGapNativeDelegate RenderFrameGap_cb_delegate;
		static RenderFrameGapNativeDelegate RenderFrameGapVMCallback {
			get {
				if (RenderFrameGap_cb_delegate == null)
					RenderFrameGap_cb_delegate = new RenderFrameGapNativeDelegate (RenderFrameGap_cb);
				return RenderFrameGap_cb_delegate;
			}
		}

		static void OverrideRenderFrameGap (GLib.GType gtype)
		{
			OverrideRenderFrameGap (gtype, RenderFrameGapVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderFrameGapNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height, int gap_side, double xy0_gap, double xy1_gap);

		static void RenderFrameGap_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height, int gap_side, double xy0_gap, double xy1_gap)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderFrameGap (mycr, x, y, width, height, (Gtk.PositionType) gap_side, xy0_gap, xy1_gap);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderFrameGap")]
		protected virtual void OnRenderFrameGap (Cairo.Context cr, double x, double y, double width, double height, Gtk.PositionType gap_side, double xy0_gap, double xy1_gap)
		{
			InternalRenderFrameGap (cr, x, y, width, height, gap_side, xy0_gap, xy1_gap);
		}

		private void InternalRenderFrameGap (Cairo.Context cr, double x, double y, double width, double height, Gtk.PositionType gap_side, double xy0_gap, double xy1_gap)
		{
			RenderFrameGapNativeDelegate unmanaged = class_abi.BaseOverride<RenderFrameGapNativeDelegate>(this.LookupGType(), "render_frame_gap");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height, (int) gap_side, xy0_gap, xy1_gap);
		}

		static RenderExtensionNativeDelegate RenderExtension_cb_delegate;
		static RenderExtensionNativeDelegate RenderExtensionVMCallback {
			get {
				if (RenderExtension_cb_delegate == null)
					RenderExtension_cb_delegate = new RenderExtensionNativeDelegate (RenderExtension_cb);
				return RenderExtension_cb_delegate;
			}
		}

		static void OverrideRenderExtension (GLib.GType gtype)
		{
			OverrideRenderExtension (gtype, RenderExtensionVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderExtensionNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height, int gap_side);

		static void RenderExtension_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height, int gap_side)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderExtension (mycr, x, y, width, height, (Gtk.PositionType) gap_side);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderExtension")]
		protected virtual void OnRenderExtension (Cairo.Context cr, double x, double y, double width, double height, Gtk.PositionType gap_side)
		{
			InternalRenderExtension (cr, x, y, width, height, gap_side);
		}

		private void InternalRenderExtension (Cairo.Context cr, double x, double y, double width, double height, Gtk.PositionType gap_side)
		{
			RenderExtensionNativeDelegate unmanaged = class_abi.BaseOverride<RenderExtensionNativeDelegate>(this.LookupGType(), "render_extension");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height, (int) gap_side);
		}

		static RenderCheckNativeDelegate RenderCheck_cb_delegate;
		static RenderCheckNativeDelegate RenderCheckVMCallback {
			get {
				if (RenderCheck_cb_delegate == null)
					RenderCheck_cb_delegate = new RenderCheckNativeDelegate (RenderCheck_cb);
				return RenderCheck_cb_delegate;
			}
		}

		static void OverrideRenderCheck (GLib.GType gtype)
		{
			OverrideRenderCheck (gtype, RenderCheckVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderCheckNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height);

		static void RenderCheck_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderCheck (mycr, x, y, width, height);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderCheck")]
		protected virtual void OnRenderCheck (Cairo.Context cr, double x, double y, double width, double height)
		{
			InternalRenderCheck (cr, x, y, width, height);
		}

		private void InternalRenderCheck (Cairo.Context cr, double x, double y, double width, double height)
		{
			RenderCheckNativeDelegate unmanaged = class_abi.BaseOverride<RenderCheckNativeDelegate>(this.LookupGType(), "render_check");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		static RenderOptionNativeDelegate RenderOption_cb_delegate;
		static RenderOptionNativeDelegate RenderOptionVMCallback {
			get {
				if (RenderOption_cb_delegate == null)
					RenderOption_cb_delegate = new RenderOptionNativeDelegate (RenderOption_cb);
				return RenderOption_cb_delegate;
			}
		}

		static void OverrideRenderOption (GLib.GType gtype)
		{
			OverrideRenderOption (gtype, RenderOptionVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderOptionNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height);

		static void RenderOption_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderOption (mycr, x, y, width, height);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderOption")]
		protected virtual void OnRenderOption (Cairo.Context cr, double x, double y, double width, double height)
		{
			InternalRenderOption (cr, x, y, width, height);
		}

		private void InternalRenderOption (Cairo.Context cr, double x, double y, double width, double height)
		{
			RenderOptionNativeDelegate unmanaged = class_abi.BaseOverride<RenderOptionNativeDelegate>(this.LookupGType(), "render_option");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		static RenderArrowNativeDelegate RenderArrow_cb_delegate;
		static RenderArrowNativeDelegate RenderArrowVMCallback {
			get {
				if (RenderArrow_cb_delegate == null)
					RenderArrow_cb_delegate = new RenderArrowNativeDelegate (RenderArrow_cb);
				return RenderArrow_cb_delegate;
			}
		}

		static void OverrideRenderArrow (GLib.GType gtype)
		{
			OverrideRenderArrow (gtype, RenderArrowVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderArrowNativeDelegate (IntPtr inst, IntPtr cr, double angle, double x, double y, double size);

		static void RenderArrow_cb (IntPtr inst, IntPtr cr, double angle, double x, double y, double size)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderArrow (mycr, angle, x, y, size);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderArrow")]
		protected virtual void OnRenderArrow (Cairo.Context cr, double angle, double x, double y, double size)
		{
			InternalRenderArrow (cr, angle, x, y, size);
		}

		private void InternalRenderArrow (Cairo.Context cr, double angle, double x, double y, double size)
		{
			RenderArrowNativeDelegate unmanaged = class_abi.BaseOverride<RenderArrowNativeDelegate>(this.LookupGType(), "render_arrow");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, angle, x, y, size);
		}

		static RenderExpanderNativeDelegate RenderExpander_cb_delegate;
		static RenderExpanderNativeDelegate RenderExpanderVMCallback {
			get {
				if (RenderExpander_cb_delegate == null)
					RenderExpander_cb_delegate = new RenderExpanderNativeDelegate (RenderExpander_cb);
				return RenderExpander_cb_delegate;
			}
		}

		static void OverrideRenderExpander (GLib.GType gtype)
		{
			OverrideRenderExpander (gtype, RenderExpanderVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderExpanderNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height);

		static void RenderExpander_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderExpander (mycr, x, y, width, height);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderExpander")]
		protected virtual void OnRenderExpander (Cairo.Context cr, double x, double y, double width, double height)
		{
			InternalRenderExpander (cr, x, y, width, height);
		}

		private void InternalRenderExpander (Cairo.Context cr, double x, double y, double width, double height)
		{
			RenderExpanderNativeDelegate unmanaged = class_abi.BaseOverride<RenderExpanderNativeDelegate>(this.LookupGType(), "render_expander");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		static RenderFocusNativeDelegate RenderFocus_cb_delegate;
		static RenderFocusNativeDelegate RenderFocusVMCallback {
			get {
				if (RenderFocus_cb_delegate == null)
					RenderFocus_cb_delegate = new RenderFocusNativeDelegate (RenderFocus_cb);
				return RenderFocus_cb_delegate;
			}
		}

		static void OverrideRenderFocus (GLib.GType gtype)
		{
			OverrideRenderFocus (gtype, RenderFocusVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderFocusNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height);

		static void RenderFocus_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderFocus (mycr, x, y, width, height);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderFocus")]
		protected virtual void OnRenderFocus (Cairo.Context cr, double x, double y, double width, double height)
		{
			InternalRenderFocus (cr, x, y, width, height);
		}

		private void InternalRenderFocus (Cairo.Context cr, double x, double y, double width, double height)
		{
			RenderFocusNativeDelegate unmanaged = class_abi.BaseOverride<RenderFocusNativeDelegate>(this.LookupGType(), "render_focus");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		static RenderLayoutNativeDelegate RenderLayout_cb_delegate;
		static RenderLayoutNativeDelegate RenderLayoutVMCallback {
			get {
				if (RenderLayout_cb_delegate == null)
					RenderLayout_cb_delegate = new RenderLayoutNativeDelegate (RenderLayout_cb);
				return RenderLayout_cb_delegate;
			}
		}

		static void OverrideRenderLayout (GLib.GType gtype)
		{
			OverrideRenderLayout (gtype, RenderLayoutVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderLayoutNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, IntPtr layout);

		static void RenderLayout_cb (IntPtr inst, IntPtr cr, double x, double y, IntPtr layout)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderLayout (mycr, x, y, GLib.Object.GetObject(layout) as Pango.Layout);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderLayout")]
		protected virtual void OnRenderLayout (Cairo.Context cr, double x, double y, Pango.Layout layout)
		{
			InternalRenderLayout (cr, x, y, layout);
		}

		private void InternalRenderLayout (Cairo.Context cr, double x, double y, Pango.Layout layout)
		{
			RenderLayoutNativeDelegate unmanaged = class_abi.BaseOverride<RenderLayoutNativeDelegate>(this.LookupGType(), "render_layout");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, layout == null ? IntPtr.Zero : layout.Handle);
		}

		static RenderSliderNativeDelegate RenderSlider_cb_delegate;
		static RenderSliderNativeDelegate RenderSliderVMCallback {
			get {
				if (RenderSlider_cb_delegate == null)
					RenderSlider_cb_delegate = new RenderSliderNativeDelegate (RenderSlider_cb);
				return RenderSlider_cb_delegate;
			}
		}

		static void OverrideRenderSlider (GLib.GType gtype)
		{
			OverrideRenderSlider (gtype, RenderSliderVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderSliderNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height, int orientation);

		static void RenderSlider_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height, int orientation)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderSlider (mycr, x, y, width, height, (Gtk.Orientation) orientation);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderSlider")]
		protected virtual void OnRenderSlider (Cairo.Context cr, double x, double y, double width, double height, Gtk.Orientation orientation)
		{
			InternalRenderSlider (cr, x, y, width, height, orientation);
		}

		private void InternalRenderSlider (Cairo.Context cr, double x, double y, double width, double height, Gtk.Orientation orientation)
		{
			RenderSliderNativeDelegate unmanaged = class_abi.BaseOverride<RenderSliderNativeDelegate>(this.LookupGType(), "render_slider");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height, (int) orientation);
		}

		static RenderHandleNativeDelegate RenderHandle_cb_delegate;
		static RenderHandleNativeDelegate RenderHandleVMCallback {
			get {
				if (RenderHandle_cb_delegate == null)
					RenderHandle_cb_delegate = new RenderHandleNativeDelegate (RenderHandle_cb);
				return RenderHandle_cb_delegate;
			}
		}

		static void OverrideRenderHandle (GLib.GType gtype)
		{
			OverrideRenderHandle (gtype, RenderHandleVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderHandleNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height);

		static void RenderHandle_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderHandle (mycr, x, y, width, height);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderHandle")]
		protected virtual void OnRenderHandle (Cairo.Context cr, double x, double y, double width, double height)
		{
			InternalRenderHandle (cr, x, y, width, height);
		}

		private void InternalRenderHandle (Cairo.Context cr, double x, double y, double width, double height)
		{
			RenderHandleNativeDelegate unmanaged = class_abi.BaseOverride<RenderHandleNativeDelegate>(this.LookupGType(), "render_handle");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		static RenderActivityNativeDelegate RenderActivity_cb_delegate;
		static RenderActivityNativeDelegate RenderActivityVMCallback {
			get {
				if (RenderActivity_cb_delegate == null)
					RenderActivity_cb_delegate = new RenderActivityNativeDelegate (RenderActivity_cb);
				return RenderActivity_cb_delegate;
			}
		}

		static void OverrideRenderActivity (GLib.GType gtype)
		{
			OverrideRenderActivity (gtype, RenderActivityVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderActivityNativeDelegate (IntPtr inst, IntPtr cr, double x, double y, double width, double height);

		static void RenderActivity_cb (IntPtr inst, IntPtr cr, double x, double y, double width, double height)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderActivity (mycr, x, y, width, height);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderActivity")]
		protected virtual void OnRenderActivity (Cairo.Context cr, double x, double y, double width, double height)
		{
			InternalRenderActivity (cr, x, y, width, height);
		}

		private void InternalRenderActivity (Cairo.Context cr, double x, double y, double width, double height)
		{
			RenderActivityNativeDelegate unmanaged = class_abi.BaseOverride<RenderActivityNativeDelegate>(this.LookupGType(), "render_activity");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		static RenderIconPixbufNativeDelegate RenderIconPixbuf_cb_delegate;
		static RenderIconPixbufNativeDelegate RenderIconPixbufVMCallback {
			get {
				if (RenderIconPixbuf_cb_delegate == null)
					RenderIconPixbuf_cb_delegate = new RenderIconPixbufNativeDelegate (RenderIconPixbuf_cb);
				return RenderIconPixbuf_cb_delegate;
			}
		}

		static void OverrideRenderIconPixbuf (GLib.GType gtype)
		{
			OverrideRenderIconPixbuf (gtype, RenderIconPixbufVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr RenderIconPixbufNativeDelegate (IntPtr inst, IntPtr source, int size);

		static IntPtr RenderIconPixbuf_cb (IntPtr inst, IntPtr source, int size)
		{
			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				Gdk.Pixbuf __result;
				__result = __obj.OnRenderIconPixbuf (source == IntPtr.Zero ? null : (Gtk.IconSource) GLib.Opaque.GetOpaque (source, typeof (Gtk.IconSource), false), (Gtk.IconSize) size);
				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.ThemingEngine), ConnectionMethod="OverrideRenderIconPixbuf")]
		protected virtual Gdk.Pixbuf OnRenderIconPixbuf (Gtk.IconSource source, Gtk.IconSize size)
		{
			return InternalRenderIconPixbuf (source, size);
		}

		private Gdk.Pixbuf InternalRenderIconPixbuf (Gtk.IconSource source, Gtk.IconSize size)
		{
			RenderIconPixbufNativeDelegate unmanaged = class_abi.BaseOverride<RenderIconPixbufNativeDelegate>(this.LookupGType(), "render_icon_pixbuf");
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle, source == null ? IntPtr.Zero : source.Handle, (int) size);
			return GLib.Object.GetObject(__result) as Gdk.Pixbuf;
		}

		static RenderIconNativeDelegate RenderIcon_cb_delegate;
		static RenderIconNativeDelegate RenderIconVMCallback {
			get {
				if (RenderIcon_cb_delegate == null)
					RenderIcon_cb_delegate = new RenderIconNativeDelegate (RenderIcon_cb);
				return RenderIcon_cb_delegate;
			}
		}

		static void OverrideRenderIcon (GLib.GType gtype)
		{
			OverrideRenderIcon (gtype, RenderIconVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderIconNativeDelegate (IntPtr inst, IntPtr cr, IntPtr pixbuf, double x, double y);

		static void RenderIcon_cb (IntPtr inst, IntPtr cr, IntPtr pixbuf, double x, double y)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderIcon (mycr, GLib.Object.GetObject(pixbuf) as Gdk.Pixbuf, x, y);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderIcon")]
		protected virtual void OnRenderIcon (Cairo.Context cr, Gdk.Pixbuf pixbuf, double x, double y)
		{
			InternalRenderIcon (cr, pixbuf, x, y);
		}

		private void InternalRenderIcon (Cairo.Context cr, Gdk.Pixbuf pixbuf, double x, double y)
		{
			RenderIconNativeDelegate unmanaged = class_abi.BaseOverride<RenderIconNativeDelegate>(this.LookupGType(), "render_icon");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, pixbuf == null ? IntPtr.Zero : pixbuf.Handle, x, y);
		}

		static RenderIconSurfaceNativeDelegate RenderIconSurface_cb_delegate;
		static RenderIconSurfaceNativeDelegate RenderIconSurfaceVMCallback {
			get {
				if (RenderIconSurface_cb_delegate == null)
					RenderIconSurface_cb_delegate = new RenderIconSurfaceNativeDelegate (RenderIconSurface_cb);
				return RenderIconSurface_cb_delegate;
			}
		}

		static void OverrideRenderIconSurface (GLib.GType gtype)
		{
			OverrideRenderIconSurface (gtype, RenderIconSurfaceVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void RenderIconSurfaceNativeDelegate (IntPtr inst, IntPtr cr, IntPtr surface, double x, double y);

		static void RenderIconSurface_cb (IntPtr inst, IntPtr cr, IntPtr surface, double x, double y)
		{
			Cairo.Context mycr = null;

			try {
				ThemingEngine __obj = GLib.Object.GetObject (inst, false) as ThemingEngine;
				mycr = new Cairo.Context (cr, false);
				__obj.OnRenderIconSurface (mycr, Cairo.Surface.Lookup (surface, true), x, y);
			} 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.ThemingEngine), ConnectionMethod="OverrideRenderIconSurface")]
		protected virtual void OnRenderIconSurface (Cairo.Context cr, Cairo.Surface surface, double x, double y)
		{
			InternalRenderIconSurface (cr, surface, x, y);
		}

		private void InternalRenderIconSurface (Cairo.Context cr, Cairo.Surface surface, double x, double y)
		{
			RenderIconSurfaceNativeDelegate unmanaged = class_abi.BaseOverride<RenderIconSurfaceNativeDelegate>(this.LookupGType(), "render_icon_surface");
			if (unmanaged == null) return;

			unmanaged (this.Handle, cr == null ? IntPtr.Zero : cr.Handle, surface.Handle, x, y);
		}


		// 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("render_line"
							, GLib.Object.class_abi.Fields
							, (uint) sizeof( IntPtr ) // render_line
							, null
							, "render_background"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_background"
							, -1
							, (uint) sizeof( IntPtr ) // render_background
							, "render_line"
							, "render_frame"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_frame"
							, -1
							, (uint) sizeof( IntPtr ) // render_frame
							, "render_background"
							, "render_frame_gap"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_frame_gap"
							, -1
							, (uint) sizeof( IntPtr ) // render_frame_gap
							, "render_frame"
							, "render_extension"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_extension"
							, -1
							, (uint) sizeof( IntPtr ) // render_extension
							, "render_frame_gap"
							, "render_check"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_check"
							, -1
							, (uint) sizeof( IntPtr ) // render_check
							, "render_extension"
							, "render_option"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_option"
							, -1
							, (uint) sizeof( IntPtr ) // render_option
							, "render_check"
							, "render_arrow"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_arrow"
							, -1
							, (uint) sizeof( IntPtr ) // render_arrow
							, "render_option"
							, "render_expander"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_expander"
							, -1
							, (uint) sizeof( IntPtr ) // render_expander
							, "render_arrow"
							, "render_focus"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_focus"
							, -1
							, (uint) sizeof( IntPtr ) // render_focus
							, "render_expander"
							, "render_layout"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_layout"
							, -1
							, (uint) sizeof( IntPtr ) // render_layout
							, "render_focus"
							, "render_slider"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_slider"
							, -1
							, (uint) sizeof( IntPtr ) // render_slider
							, "render_layout"
							, "render_handle"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_handle"
							, -1
							, (uint) sizeof( IntPtr ) // render_handle
							, "render_slider"
							, "render_activity"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_activity"
							, -1
							, (uint) sizeof( IntPtr ) // render_activity
							, "render_handle"
							, "render_icon_pixbuf"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_icon_pixbuf"
							, -1
							, (uint) sizeof( IntPtr ) // render_icon_pixbuf
							, "render_activity"
							, "render_icon"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_icon"
							, -1
							, (uint) sizeof( IntPtr ) // render_icon
							, "render_icon_pixbuf"
							, "render_icon_surface"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("render_icon_surface"
							, -1
							, (uint) sizeof( IntPtr ) // render_icon_surface
							, "render_icon"
							, "padding"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("padding"
							, -1
							, (uint) sizeof( IntPtr ) * 14 // padding
							, "render_icon_surface"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_theming_engine_get_background_color(IntPtr raw, int state, IntPtr color);
		static d_gtk_theming_engine_get_background_color gtk_theming_engine_get_background_color = FuncLoader.LoadFunction<d_gtk_theming_engine_get_background_color>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_get_background_color"));

		[Obsolete]
		public void GetBackgroundColor(Gtk.StateFlags state, Gdk.RGBA color) {
			IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color);
			gtk_theming_engine_get_background_color(Handle, (int) state, native_color);
			Marshal.FreeHGlobal (native_color);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_theming_engine_get_border(IntPtr raw, int state, IntPtr border);
		static d_gtk_theming_engine_get_border gtk_theming_engine_get_border = FuncLoader.LoadFunction<d_gtk_theming_engine_get_border>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_get_border"));

		[Obsolete]
		public void GetBorder(Gtk.StateFlags state, Gtk.Border border) {
			IntPtr native_border = GLib.Marshaller.StructureToPtrAlloc (border);
			gtk_theming_engine_get_border(Handle, (int) state, native_border);
			Marshal.FreeHGlobal (native_border);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_theming_engine_get_border_color(IntPtr raw, int state, IntPtr color);
		static d_gtk_theming_engine_get_border_color gtk_theming_engine_get_border_color = FuncLoader.LoadFunction<d_gtk_theming_engine_get_border_color>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_get_border_color"));

		[Obsolete]
		public void GetBorderColor(Gtk.StateFlags state, Gdk.RGBA color) {
			IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color);
			gtk_theming_engine_get_border_color(Handle, (int) state, native_color);
			Marshal.FreeHGlobal (native_color);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_theming_engine_get_color(IntPtr raw, int state, IntPtr color);
		static d_gtk_theming_engine_get_color gtk_theming_engine_get_color = FuncLoader.LoadFunction<d_gtk_theming_engine_get_color>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_get_color"));

		[Obsolete]
		public void GetColor(Gtk.StateFlags state, Gdk.RGBA color) {
			IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color);
			gtk_theming_engine_get_color(Handle, (int) state, native_color);
			Marshal.FreeHGlobal (native_color);
		}

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

		[Obsolete]
		public Gtk.TextDirection Direction { 
			get {
				int raw_ret = gtk_theming_engine_get_direction(Handle);
				Gtk.TextDirection ret = (Gtk.TextDirection) raw_ret;
				return ret;
			}
		}

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

		[Obsolete]
		public Pango.FontDescription GetFont(Gtk.StateFlags state) {
			IntPtr raw_ret = gtk_theming_engine_get_font(Handle, (int) state);
			Pango.FontDescription ret = raw_ret == IntPtr.Zero ? null : (Pango.FontDescription) GLib.Opaque.GetOpaque (raw_ret, typeof (Pango.FontDescription), false);
			return ret;
		}

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

		[Obsolete]
		public Gtk.JunctionSides JunctionSides { 
			get {
				int raw_ret = gtk_theming_engine_get_junction_sides(Handle);
				Gtk.JunctionSides ret = (Gtk.JunctionSides) raw_ret;
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_theming_engine_get_margin(IntPtr raw, int state, IntPtr margin);
		static d_gtk_theming_engine_get_margin gtk_theming_engine_get_margin = FuncLoader.LoadFunction<d_gtk_theming_engine_get_margin>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_get_margin"));

		[Obsolete]
		public void GetMargin(Gtk.StateFlags state, Gtk.Border margin) {
			IntPtr native_margin = GLib.Marshaller.StructureToPtrAlloc (margin);
			gtk_theming_engine_get_margin(Handle, (int) state, native_margin);
			Marshal.FreeHGlobal (native_margin);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_theming_engine_get_padding(IntPtr raw, int state, IntPtr padding);
		static d_gtk_theming_engine_get_padding gtk_theming_engine_get_padding = FuncLoader.LoadFunction<d_gtk_theming_engine_get_padding>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_get_padding"));

		[Obsolete]
		public void GetPadding(Gtk.StateFlags state, Gtk.Border padding) {
			IntPtr native_padding = GLib.Marshaller.StructureToPtrAlloc (padding);
			gtk_theming_engine_get_padding(Handle, (int) state, native_padding);
			Marshal.FreeHGlobal (native_padding);
		}

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

		[Obsolete]
		public Gtk.WidgetPath Path { 
			get {
				IntPtr raw_ret = gtk_theming_engine_get_path(Handle);
				Gtk.WidgetPath ret = raw_ret == IntPtr.Zero ? null : (Gtk.WidgetPath) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.WidgetPath), false);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_theming_engine_get_property(IntPtr raw, IntPtr property, int state, IntPtr value);
		static d_gtk_theming_engine_get_property gtk_theming_engine_get_property = FuncLoader.LoadFunction<d_gtk_theming_engine_get_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_get_property"));

		[Obsolete]
		public void GetProperty(string property, Gtk.StateFlags state, GLib.Value value) {
			IntPtr native_property = GLib.Marshaller.StringToPtrGStrdup (property);
			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			gtk_theming_engine_get_property(Handle, native_property, (int) state, native_value);
			GLib.Marshaller.Free (native_property);
			Marshal.FreeHGlobal (native_value);
		}

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

		[Obsolete]
		public Gdk.Screen Screen { 
			get {
				IntPtr raw_ret = gtk_theming_engine_get_screen(Handle);
				Gdk.Screen ret = GLib.Object.GetObject(raw_ret) as Gdk.Screen;
				return ret;
			}
		}

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

		[Obsolete]
		public Gtk.StateFlags State { 
			get {
				int raw_ret = gtk_theming_engine_get_state(Handle);
				Gtk.StateFlags ret = (Gtk.StateFlags) raw_ret;
				return ret;
			}
		}

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

		[Obsolete]
		public void GetStyleProperty(string property_name, GLib.Value value) {
			IntPtr native_property_name = GLib.Marshaller.StringToPtrGStrdup (property_name);
			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
			gtk_theming_engine_get_style_property(Handle, native_property_name, native_value);
			GLib.Marshaller.Free (native_property_name);
			Marshal.FreeHGlobal (native_value);
		}

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

		[Obsolete]
		public void GetStyleValist(IntPtr args) {
			gtk_theming_engine_get_style_valist(Handle, args);
		}

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

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_theming_engine_get_valist(IntPtr raw, int state, IntPtr args);
		static d_gtk_theming_engine_get_valist gtk_theming_engine_get_valist = FuncLoader.LoadFunction<d_gtk_theming_engine_get_valist>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_get_valist"));

		[Obsolete]
		public void GetValist(Gtk.StateFlags state, IntPtr args) {
			gtk_theming_engine_get_valist(Handle, (int) state, args);
		}

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

		[Obsolete]
		public bool HasClass(string style_class) {
			IntPtr native_style_class = GLib.Marshaller.StringToPtrGStrdup (style_class);
			bool raw_ret = gtk_theming_engine_has_class(Handle, native_style_class);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_style_class);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_theming_engine_has_region(IntPtr raw, IntPtr style_region, out int flags);
		static d_gtk_theming_engine_has_region gtk_theming_engine_has_region = FuncLoader.LoadFunction<d_gtk_theming_engine_has_region>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_has_region"));

		[Obsolete]
		public bool HasRegion(string style_region, out Gtk.RegionFlags flags) {
			IntPtr native_style_region = GLib.Marshaller.StringToPtrGStrdup (style_region);
			int native_flags;
			bool raw_ret = gtk_theming_engine_has_region(Handle, native_style_region, out native_flags);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_style_region);
			flags = (Gtk.RegionFlags) native_flags;
			return ret;
		}

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

		[Obsolete]
		public static Gtk.ThemingEngine Load(string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr raw_ret = gtk_theming_engine_load(native_name);
			Gtk.ThemingEngine ret = GLib.Object.GetObject(raw_ret) as Gtk.ThemingEngine;
			GLib.Marshaller.Free (native_name);
			return ret;
		}

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

		[Obsolete]
		public bool LookupColor(string color_name, Gdk.RGBA color) {
			IntPtr native_color_name = GLib.Marshaller.StringToPtrGStrdup (color_name);
			IntPtr native_color = GLib.Marshaller.StructureToPtrAlloc (color);
			bool raw_ret = gtk_theming_engine_lookup_color(Handle, native_color_name, native_color);
			bool ret = raw_ret;
			GLib.Marshaller.Free (native_color_name);
			Marshal.FreeHGlobal (native_color);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_theming_engine_register_property(IntPtr name_space, GtkSharp.StylePropertyParserNative parse_func, IntPtr pspec);
		static d_gtk_theming_engine_register_property gtk_theming_engine_register_property = FuncLoader.LoadFunction<d_gtk_theming_engine_register_property>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_register_property"));

		[Obsolete]
		public static void RegisterProperty(string name_space, Gtk.StylePropertyParser parse_func, IntPtr pspec) {
			IntPtr native_name_space = GLib.Marshaller.StringToPtrGStrdup (name_space);
			GtkSharp.StylePropertyParserWrapper parse_func_wrapper = new GtkSharp.StylePropertyParserWrapper (parse_func);
			gtk_theming_engine_register_property(native_name_space, parse_func_wrapper.NativeDelegate, pspec);
			GLib.Marshaller.Free (native_name_space);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_theming_engine_state_is_running(IntPtr raw, int state, out double progress);
		static d_gtk_theming_engine_state_is_running gtk_theming_engine_state_is_running = FuncLoader.LoadFunction<d_gtk_theming_engine_state_is_running>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_theming_engine_state_is_running"));

		[Obsolete]
		public bool StateIsRunning(Gtk.StateType state, out double progress) {
			bool raw_ret = gtk_theming_engine_state_is_running(Handle, (int) state, out progress);
			bool ret = raw_ret;
			return ret;
		}


		// 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
	}
}
