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

namespace Pango {

	using System;
	using System.Runtime.InteropServices;

#region Autogenerated code
	public partial class CairoHelper {

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate double d_pango_cairo_context_get_resolution(IntPtr context);
		static d_pango_cairo_context_get_resolution pango_cairo_context_get_resolution = FuncLoader.LoadFunction<d_pango_cairo_context_get_resolution>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_context_get_resolution"));

		public static double ContextGetResolution(Pango.Context context) {
			double raw_ret = pango_cairo_context_get_resolution(context == null ? IntPtr.Zero : context.Handle);
			double ret = raw_ret;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate PangoSharp.CairoShapeRendererFuncNative d_pango_cairo_context_get_shape_renderer(IntPtr context, IntPtr data);
		static d_pango_cairo_context_get_shape_renderer pango_cairo_context_get_shape_renderer = FuncLoader.LoadFunction<d_pango_cairo_context_get_shape_renderer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_context_get_shape_renderer"));

		public static Pango.CairoShapeRendererFunc ContextGetShapeRenderer(Pango.Context context, IntPtr data) {
			PangoSharp.CairoShapeRendererFuncNative raw_ret = pango_cairo_context_get_shape_renderer(context == null ? IntPtr.Zero : context.Handle, data);
			Pango.CairoShapeRendererFunc ret = PangoSharp.CairoShapeRendererFuncWrapper.GetManagedDelegate (raw_ret);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_context_set_resolution(IntPtr context, double dpi);
		static d_pango_cairo_context_set_resolution pango_cairo_context_set_resolution = FuncLoader.LoadFunction<d_pango_cairo_context_set_resolution>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_context_set_resolution"));

		public static void ContextSetResolution(Pango.Context context, double dpi) {
			pango_cairo_context_set_resolution(context == null ? IntPtr.Zero : context.Handle, dpi);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_context_set_shape_renderer(IntPtr context, PangoSharp.CairoShapeRendererFuncNative func, IntPtr data, GLib.DestroyNotify dnotify);
		static d_pango_cairo_context_set_shape_renderer pango_cairo_context_set_shape_renderer = FuncLoader.LoadFunction<d_pango_cairo_context_set_shape_renderer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_context_set_shape_renderer"));

		public static void ContextSetShapeRenderer(Pango.Context context, Pango.CairoShapeRendererFunc func) {
			PangoSharp.CairoShapeRendererFuncWrapper func_wrapper = new PangoSharp.CairoShapeRendererFuncWrapper (func);
			IntPtr data;
			GLib.DestroyNotify dnotify;
			if (func == null) {
				data = IntPtr.Zero;
				dnotify = null;
			} else {
				data = (IntPtr) GCHandle.Alloc (func_wrapper);
				dnotify = GLib.DestroyHelper.NotifyHandler;
			}
			pango_cairo_context_set_shape_renderer(context == null ? IntPtr.Zero : context.Handle, func_wrapper.NativeDelegate, data, dnotify);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_pango_cairo_create_context(IntPtr cr);
		static d_pango_cairo_create_context pango_cairo_create_context = FuncLoader.LoadFunction<d_pango_cairo_create_context>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_create_context"));

		public static Pango.Context CreateContext(Cairo.Context cr) {
			IntPtr raw_ret = pango_cairo_create_context(cr == null ? IntPtr.Zero : cr.Handle);
			Pango.Context ret = GLib.Object.GetObject(raw_ret, true) as Pango.Context;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_pango_cairo_create_layout(IntPtr cr);
		static d_pango_cairo_create_layout pango_cairo_create_layout = FuncLoader.LoadFunction<d_pango_cairo_create_layout>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_create_layout"));

		public static Pango.Layout CreateLayout(Cairo.Context cr) {
			IntPtr raw_ret = pango_cairo_create_layout(cr == null ? IntPtr.Zero : cr.Handle);
			Pango.Layout ret = GLib.Object.GetObject(raw_ret, true) as Pango.Layout;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_error_underline_path(IntPtr cr, double x, double y, double width, double height);
		static d_pango_cairo_error_underline_path pango_cairo_error_underline_path = FuncLoader.LoadFunction<d_pango_cairo_error_underline_path>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_error_underline_path"));

		public static void ErrorUnderlinePath(Cairo.Context cr, double x, double y, double width, double height) {
			pango_cairo_error_underline_path(cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_glyph_string_path(IntPtr cr, IntPtr font, IntPtr glyphs);
		static d_pango_cairo_glyph_string_path pango_cairo_glyph_string_path = FuncLoader.LoadFunction<d_pango_cairo_glyph_string_path>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_glyph_string_path"));

		public static void GlyphStringPath(Cairo.Context cr, Pango.Font font, Pango.GlyphString glyphs) {
			pango_cairo_glyph_string_path(cr == null ? IntPtr.Zero : cr.Handle, font == null ? IntPtr.Zero : font.Handle, glyphs == null ? IntPtr.Zero : glyphs.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_layout_line_path(IntPtr cr, IntPtr line);
		static d_pango_cairo_layout_line_path pango_cairo_layout_line_path = FuncLoader.LoadFunction<d_pango_cairo_layout_line_path>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_layout_line_path"));

		public static void LayoutLinePath(Cairo.Context cr, Pango.LayoutLine line) {
			pango_cairo_layout_line_path(cr == null ? IntPtr.Zero : cr.Handle, line == null ? IntPtr.Zero : line.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_layout_path(IntPtr cr, IntPtr layout);
		static d_pango_cairo_layout_path pango_cairo_layout_path = FuncLoader.LoadFunction<d_pango_cairo_layout_path>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_layout_path"));

		public static void LayoutPath(Cairo.Context cr, Pango.Layout layout) {
			pango_cairo_layout_path(cr == null ? IntPtr.Zero : cr.Handle, layout == null ? IntPtr.Zero : layout.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_show_error_underline(IntPtr cr, double x, double y, double width, double height);
		static d_pango_cairo_show_error_underline pango_cairo_show_error_underline = FuncLoader.LoadFunction<d_pango_cairo_show_error_underline>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_show_error_underline"));

		public static void ShowErrorUnderline(Cairo.Context cr, double x, double y, double width, double height) {
			pango_cairo_show_error_underline(cr == null ? IntPtr.Zero : cr.Handle, x, y, width, height);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_show_glyph_item(IntPtr cr, IntPtr text, IntPtr glyph_item);
		static d_pango_cairo_show_glyph_item pango_cairo_show_glyph_item = FuncLoader.LoadFunction<d_pango_cairo_show_glyph_item>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_show_glyph_item"));

		public static void ShowGlyphItem(Cairo.Context cr, string text, Pango.GlyphItem glyph_item) {
			IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text);
			IntPtr native_glyph_item = GLib.Marshaller.StructureToPtrAlloc (glyph_item);
			pango_cairo_show_glyph_item(cr == null ? IntPtr.Zero : cr.Handle, native_text, native_glyph_item);
			GLib.Marshaller.Free (native_text);
			Marshal.FreeHGlobal (native_glyph_item);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_show_glyph_string(IntPtr cr, IntPtr font, IntPtr glyphs);
		static d_pango_cairo_show_glyph_string pango_cairo_show_glyph_string = FuncLoader.LoadFunction<d_pango_cairo_show_glyph_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_show_glyph_string"));

		public static void ShowGlyphString(Cairo.Context cr, Pango.Font font, Pango.GlyphString glyphs) {
			pango_cairo_show_glyph_string(cr == null ? IntPtr.Zero : cr.Handle, font == null ? IntPtr.Zero : font.Handle, glyphs == null ? IntPtr.Zero : glyphs.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_show_layout(IntPtr cr, IntPtr layout);
		static d_pango_cairo_show_layout pango_cairo_show_layout = FuncLoader.LoadFunction<d_pango_cairo_show_layout>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_show_layout"));

		public static void ShowLayout(Cairo.Context cr, Pango.Layout layout) {
			pango_cairo_show_layout(cr == null ? IntPtr.Zero : cr.Handle, layout == null ? IntPtr.Zero : layout.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_show_layout_line(IntPtr cr, IntPtr line);
		static d_pango_cairo_show_layout_line pango_cairo_show_layout_line = FuncLoader.LoadFunction<d_pango_cairo_show_layout_line>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_show_layout_line"));

		public static void ShowLayoutLine(Cairo.Context cr, Pango.LayoutLine line) {
			pango_cairo_show_layout_line(cr == null ? IntPtr.Zero : cr.Handle, line == null ? IntPtr.Zero : line.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_update_context(IntPtr cr, IntPtr context);
		static d_pango_cairo_update_context pango_cairo_update_context = FuncLoader.LoadFunction<d_pango_cairo_update_context>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_update_context"));

		public static void UpdateContext(Cairo.Context cr, Pango.Context context) {
			pango_cairo_update_context(cr == null ? IntPtr.Zero : cr.Handle, context == null ? IntPtr.Zero : context.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_pango_cairo_update_layout(IntPtr cr, IntPtr layout);
		static d_pango_cairo_update_layout pango_cairo_update_layout = FuncLoader.LoadFunction<d_pango_cairo_update_layout>(FuncLoader.GetProcAddress(GLibrary.Load(Library.PangoCairo), "pango_cairo_update_layout"));

		public static void UpdateLayout(Cairo.Context cr, Pango.Layout layout) {
			pango_cairo_update_layout(cr == null ? IntPtr.Zero : cr.Handle, layout == null ? IntPtr.Zero : layout.Handle);
		}

#endregion
	}
}
