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

namespace GtkSource {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;
	using static GLib.AbiStructExtension;

#region Autogenerated code
	public partial class GutterRendererText : GtkSource.GutterRenderer {

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_source_gutter_renderer_text_new();
		static d_gtk_source_gutter_renderer_text_new gtk_source_gutter_renderer_text_new = FuncLoader.LoadFunction<d_gtk_source_gutter_renderer_text_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_gutter_renderer_text_new"));

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_gutter_renderer_text_set_markup(IntPtr raw, IntPtr markup, int length);
		static d_gtk_source_gutter_renderer_text_set_markup gtk_source_gutter_renderer_text_set_markup = FuncLoader.LoadFunction<d_gtk_source_gutter_renderer_text_set_markup>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_gutter_renderer_text_set_markup"));

		[GLib.Property ("markup")]
		public string Markup {
			get {
				GLib.Value val = GetProperty ("markup");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_source_gutter_renderer_text_set_markup(Handle, native_value, System.Text.Encoding.UTF8.GetByteCount (value));
				GLib.Marshaller.Free (native_value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_gutter_renderer_text_set_text(IntPtr raw, IntPtr text, int length);
		static d_gtk_source_gutter_renderer_text_set_text gtk_source_gutter_renderer_text_set_text = FuncLoader.LoadFunction<d_gtk_source_gutter_renderer_text_set_text>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_gutter_renderer_text_set_text"));

		[GLib.Property ("text")]
		public string Text {
			get {
				GLib.Value val = GetProperty ("text");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_source_gutter_renderer_text_set_text(Handle, native_value, System.Text.Encoding.UTF8.GetByteCount (value));
				GLib.Marshaller.Free (native_value);
			}
		}


		// 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("padding"
							, GtkSource.GutterRenderer.class_abi.Fields
							, (uint) sizeof( IntPtr ) * 10 // padding
							, null
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_source_gutter_renderer_text_get_type();
		static d_gtk_source_gutter_renderer_text_get_type gtk_source_gutter_renderer_text_get_type = FuncLoader.LoadFunction<d_gtk_source_gutter_renderer_text_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_gutter_renderer_text_get_type"));

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_gutter_renderer_text_measure(IntPtr raw, IntPtr text, out int width, out int height);
		static d_gtk_source_gutter_renderer_text_measure gtk_source_gutter_renderer_text_measure = FuncLoader.LoadFunction<d_gtk_source_gutter_renderer_text_measure>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_gutter_renderer_text_measure"));

		public void Measure(string text, out int width, out int height) {
			IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text);
			gtk_source_gutter_renderer_text_measure(Handle, native_text, out width, out height);
			GLib.Marshaller.Free (native_text);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_gutter_renderer_text_measure_markup(IntPtr raw, IntPtr markup, out int width, out int height);
		static d_gtk_source_gutter_renderer_text_measure_markup gtk_source_gutter_renderer_text_measure_markup = FuncLoader.LoadFunction<d_gtk_source_gutter_renderer_text_measure_markup>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_gutter_renderer_text_measure_markup"));

		public void MeasureMarkup(string markup, out int width, out int height) {
			IntPtr native_markup = GLib.Marshaller.StringToPtrGStrdup (markup);
			gtk_source_gutter_renderer_text_measure_markup(Handle, native_markup, out width, out height);
			GLib.Marshaller.Free (native_markup);
		}


		static GutterRendererText ()
		{
			GtkSharp.GtkSourceSharp.ObjectManager.Initialize ();
		}

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

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
