// 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 SourceView : Gtk.TextView {

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

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

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

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

		public SourceView (GtkSource.Buffer buffer) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (SourceView)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				if (buffer != null) {
					names.Add ("buffer");
					vals.Add (new GLib.Value (buffer));
				}
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = gtk_source_view_new_with_buffer(buffer == null ? IntPtr.Zero : buffer.Handle);
		}

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

		[GLib.Property ("completion")]
		public GtkSource.Completion Completion {
			get  {
				IntPtr raw_ret = gtk_source_view_get_completion(Handle);
				GtkSource.Completion ret = GLib.Object.GetObject(raw_ret) as GtkSource.Completion;
				return ret;
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_show_line_numbers(IntPtr raw, bool show);
		static d_gtk_source_view_set_show_line_numbers gtk_source_view_set_show_line_numbers = FuncLoader.LoadFunction<d_gtk_source_view_set_show_line_numbers>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_show_line_numbers"));

		[GLib.Property ("show-line-numbers")]
		public bool ShowLineNumbers {
			get  {
				bool raw_ret = gtk_source_view_get_show_line_numbers(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_show_line_numbers(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_show_line_marks(IntPtr raw, bool show);
		static d_gtk_source_view_set_show_line_marks gtk_source_view_set_show_line_marks = FuncLoader.LoadFunction<d_gtk_source_view_set_show_line_marks>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_show_line_marks"));

		[GLib.Property ("show-line-marks")]
		public bool ShowLineMarks {
			get  {
				bool raw_ret = gtk_source_view_get_show_line_marks(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_show_line_marks(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_tab_width(IntPtr raw, uint width);
		static d_gtk_source_view_set_tab_width gtk_source_view_set_tab_width = FuncLoader.LoadFunction<d_gtk_source_view_set_tab_width>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_tab_width"));

		[GLib.Property ("tab-width")]
		public uint TabWidth {
			get  {
				uint raw_ret = gtk_source_view_get_tab_width(Handle);
				uint ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_tab_width(Handle, value);
			}
		}

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

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

		[GLib.Property ("indent-width")]
		public int IndentWidth {
			get  {
				int raw_ret = gtk_source_view_get_indent_width(Handle);
				int ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_indent_width(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_auto_indent(IntPtr raw, bool enable);
		static d_gtk_source_view_set_auto_indent gtk_source_view_set_auto_indent = FuncLoader.LoadFunction<d_gtk_source_view_set_auto_indent>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_auto_indent"));

		[GLib.Property ("auto-indent")]
		public bool AutoIndent {
			get  {
				bool raw_ret = gtk_source_view_get_auto_indent(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_auto_indent(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_insert_spaces_instead_of_tabs(IntPtr raw, bool enable);
		static d_gtk_source_view_set_insert_spaces_instead_of_tabs gtk_source_view_set_insert_spaces_instead_of_tabs = FuncLoader.LoadFunction<d_gtk_source_view_set_insert_spaces_instead_of_tabs>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_insert_spaces_instead_of_tabs"));

		[GLib.Property ("insert-spaces-instead-of-tabs")]
		public bool InsertSpacesInsteadOfTabs {
			get  {
				bool raw_ret = gtk_source_view_get_insert_spaces_instead_of_tabs(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_insert_spaces_instead_of_tabs(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_show_right_margin(IntPtr raw, bool show);
		static d_gtk_source_view_set_show_right_margin gtk_source_view_set_show_right_margin = FuncLoader.LoadFunction<d_gtk_source_view_set_show_right_margin>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_show_right_margin"));

		[GLib.Property ("show-right-margin")]
		public bool ShowRightMargin {
			get  {
				bool raw_ret = gtk_source_view_get_show_right_margin(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_show_right_margin(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_right_margin_position(IntPtr raw, uint pos);
		static d_gtk_source_view_set_right_margin_position gtk_source_view_set_right_margin_position = FuncLoader.LoadFunction<d_gtk_source_view_set_right_margin_position>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_right_margin_position"));

		[GLib.Property ("right-margin-position")]
		public uint RightMarginPosition {
			get  {
				uint raw_ret = gtk_source_view_get_right_margin_position(Handle);
				uint ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_right_margin_position(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_smart_home_end(IntPtr raw, int smart_home_end);
		static d_gtk_source_view_set_smart_home_end gtk_source_view_set_smart_home_end = FuncLoader.LoadFunction<d_gtk_source_view_set_smart_home_end>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_smart_home_end"));

		[GLib.Property ("smart-home-end")]
		public GtkSource.SmartHomeEndType SmartHomeEnd {
			get  {
				int raw_ret = gtk_source_view_get_smart_home_end(Handle);
				GtkSource.SmartHomeEndType ret = (GtkSource.SmartHomeEndType) raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_smart_home_end(Handle, (int) value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_highlight_current_line(IntPtr raw, bool highlight);
		static d_gtk_source_view_set_highlight_current_line gtk_source_view_set_highlight_current_line = FuncLoader.LoadFunction<d_gtk_source_view_set_highlight_current_line>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_highlight_current_line"));

		[GLib.Property ("highlight-current-line")]
		public bool HighlightCurrentLine {
			get  {
				bool raw_ret = gtk_source_view_get_highlight_current_line(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_highlight_current_line(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_indent_on_tab(IntPtr raw, bool enable);
		static d_gtk_source_view_set_indent_on_tab gtk_source_view_set_indent_on_tab = FuncLoader.LoadFunction<d_gtk_source_view_set_indent_on_tab>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_indent_on_tab"));

		[GLib.Property ("indent-on-tab")]
		public bool IndentOnTab {
			get  {
				bool raw_ret = gtk_source_view_get_indent_on_tab(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_indent_on_tab(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_background_pattern(IntPtr raw, int background_pattern);
		static d_gtk_source_view_set_background_pattern gtk_source_view_set_background_pattern = FuncLoader.LoadFunction<d_gtk_source_view_set_background_pattern>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_background_pattern"));

		[GLib.Property ("background-pattern")]
		public GtkSource.BackgroundPatternType BackgroundPattern {
			get  {
				int raw_ret = gtk_source_view_get_background_pattern(Handle);
				GtkSource.BackgroundPatternType ret = (GtkSource.BackgroundPatternType) raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_background_pattern(Handle, (int) value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_smart_backspace(IntPtr raw, bool smart_backspace);
		static d_gtk_source_view_set_smart_backspace gtk_source_view_set_smart_backspace = FuncLoader.LoadFunction<d_gtk_source_view_set_smart_backspace>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_smart_backspace"));

		[GLib.Property ("smart-backspace")]
		public bool SmartBackspace {
			get  {
				bool raw_ret = gtk_source_view_get_smart_backspace(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_source_view_set_smart_backspace(Handle, value);
			}
		}

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

		[GLib.Property ("space-drawer")]
		public GtkSource.SpaceDrawer SpaceDrawer {
			get  {
				IntPtr raw_ret = gtk_source_view_get_space_drawer(Handle);
				GtkSource.SpaceDrawer ret = GLib.Object.GetObject(raw_ret) as GtkSource.SpaceDrawer;
				return ret;
			}
		}

		[GLib.Signal("line-mark-activated")]
		public event GtkSource.LineMarkActivatedHandler LineMarkActivated {
			add {
				this.AddSignalHandler ("line-mark-activated", value, typeof (GtkSource.LineMarkActivatedArgs));
			}
			remove {
				this.RemoveSignalHandler ("line-mark-activated", value);
			}
		}

		[GLib.Signal("show-completion")]
		public event System.EventHandler ShowCompletion {
			add {
				this.AddSignalHandler ("show-completion", value);
			}
			remove {
				this.RemoveSignalHandler ("show-completion", value);
			}
		}

		[GLib.Signal("join-lines")]
		public event System.EventHandler JoinLines {
			add {
				this.AddSignalHandler ("join-lines", value);
			}
			remove {
				this.RemoveSignalHandler ("join-lines", value);
			}
		}

		[GLib.Signal("move-words")]
		public event GtkSource.MoveWordsHandler MoveWords {
			add {
				this.AddSignalHandler ("move-words", value, typeof (GtkSource.MoveWordsArgs));
			}
			remove {
				this.RemoveSignalHandler ("move-words", value);
			}
		}

		[GLib.Signal("smart-home-end")]
		public event GtkSource.SmartHomeEndFiredHandler SmartHomeEndFired {
			add {
				this.AddSignalHandler ("smart-home-end", value, typeof (GtkSource.SmartHomeEndFiredArgs));
			}
			remove {
				this.RemoveSignalHandler ("smart-home-end", value);
			}
		}

		[GLib.Signal("redo")]
		public event System.EventHandler Redo {
			add {
				this.AddSignalHandler ("redo", value);
			}
			remove {
				this.RemoveSignalHandler ("redo", value);
			}
		}

		[GLib.Signal("change-case")]
		public event GtkSource.ChangeCaseHandler ChangeCase {
			add {
				this.AddSignalHandler ("change-case", value, typeof (GtkSource.ChangeCaseArgs));
			}
			remove {
				this.RemoveSignalHandler ("change-case", value);
			}
		}

		[GLib.Signal("change-number")]
		public event GtkSource.ChangeNumberHandler ChangeNumber {
			add {
				this.AddSignalHandler ("change-number", value, typeof (GtkSource.ChangeNumberArgs));
			}
			remove {
				this.RemoveSignalHandler ("change-number", value);
			}
		}

		[GLib.Signal("undo")]
		public event System.EventHandler Undo {
			add {
				this.AddSignalHandler ("undo", value);
			}
			remove {
				this.RemoveSignalHandler ("undo", value);
			}
		}

		[GLib.Signal("move-to-matching-bracket")]
		public event GtkSource.MoveToMatchingBracketHandler MoveToMatchingBracket {
			add {
				this.AddSignalHandler ("move-to-matching-bracket", value, typeof (GtkSource.MoveToMatchingBracketArgs));
			}
			remove {
				this.RemoveSignalHandler ("move-to-matching-bracket", value);
			}
		}

		[GLib.Signal("move-lines")]
		public event GtkSource.MoveLinesHandler MoveLines {
			add {
				this.AddSignalHandler ("move-lines", value, typeof (GtkSource.MoveLinesArgs));
			}
			remove {
				this.RemoveSignalHandler ("move-lines", value);
			}
		}

		static SmartHomeEndFiredNativeDelegate SmartHomeEndFired_cb_delegate;
		static SmartHomeEndFiredNativeDelegate SmartHomeEndFiredVMCallback {
			get {
				if (SmartHomeEndFired_cb_delegate == null)
					SmartHomeEndFired_cb_delegate = new SmartHomeEndFiredNativeDelegate (SmartHomeEndFired_cb);
				return SmartHomeEndFired_cb_delegate;
			}
		}

		static void OverrideSmartHomeEndFired (GLib.GType gtype)
		{
			OverrideSmartHomeEndFired (gtype, SmartHomeEndFiredVMCallback);
		}

		static void OverrideSmartHomeEndFired (GLib.GType gtype, SmartHomeEndFiredNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "smart-home-end", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void SmartHomeEndFiredNativeDelegate (IntPtr inst, IntPtr p0, int p1);

		static void SmartHomeEndFired_cb (IntPtr inst, IntPtr p0, int p1)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnSmartHomeEndFired (Gtk.TextIter.New (p0), p1);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideSmartHomeEndFired")]
		protected virtual void OnSmartHomeEndFired (Gtk.TextIter p0, int p1)
		{
			InternalSmartHomeEndFired (p0, p1);
		}

		private void InternalSmartHomeEndFired (Gtk.TextIter p0, int p1)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (3);
			GLib.Value[] vals = new GLib.Value [3];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (p0);
			inst_and_params.Append (vals [1]);
			vals [2] = new GLib.Value (p1);
			inst_and_params.Append (vals [2]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static MoveToMatchingBracketNativeDelegate MoveToMatchingBracket_cb_delegate;
		static MoveToMatchingBracketNativeDelegate MoveToMatchingBracketVMCallback {
			get {
				if (MoveToMatchingBracket_cb_delegate == null)
					MoveToMatchingBracket_cb_delegate = new MoveToMatchingBracketNativeDelegate (MoveToMatchingBracket_cb);
				return MoveToMatchingBracket_cb_delegate;
			}
		}

		static void OverrideMoveToMatchingBracket (GLib.GType gtype)
		{
			OverrideMoveToMatchingBracket (gtype, MoveToMatchingBracketVMCallback);
		}

		static void OverrideMoveToMatchingBracket (GLib.GType gtype, MoveToMatchingBracketNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "move-to-matching-bracket", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void MoveToMatchingBracketNativeDelegate (IntPtr inst, bool p0);

		static void MoveToMatchingBracket_cb (IntPtr inst, bool p0)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnMoveToMatchingBracket (p0);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideMoveToMatchingBracket")]
		protected virtual void OnMoveToMatchingBracket (bool p0)
		{
			InternalMoveToMatchingBracket (p0);
		}

		private void InternalMoveToMatchingBracket (bool p0)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (p0);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static ChangeNumberNativeDelegate ChangeNumber_cb_delegate;
		static ChangeNumberNativeDelegate ChangeNumberVMCallback {
			get {
				if (ChangeNumber_cb_delegate == null)
					ChangeNumber_cb_delegate = new ChangeNumberNativeDelegate (ChangeNumber_cb);
				return ChangeNumber_cb_delegate;
			}
		}

		static void OverrideChangeNumber (GLib.GType gtype)
		{
			OverrideChangeNumber (gtype, ChangeNumberVMCallback);
		}

		static void OverrideChangeNumber (GLib.GType gtype, ChangeNumberNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "change-number", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ChangeNumberNativeDelegate (IntPtr inst, int p0);

		static void ChangeNumber_cb (IntPtr inst, int p0)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnChangeNumber (p0);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideChangeNumber")]
		protected virtual void OnChangeNumber (int p0)
		{
			InternalChangeNumber (p0);
		}

		private void InternalChangeNumber (int p0)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (p0);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static ChangeCaseNativeDelegate ChangeCase_cb_delegate;
		static ChangeCaseNativeDelegate ChangeCaseVMCallback {
			get {
				if (ChangeCase_cb_delegate == null)
					ChangeCase_cb_delegate = new ChangeCaseNativeDelegate (ChangeCase_cb);
				return ChangeCase_cb_delegate;
			}
		}

		static void OverrideChangeCase (GLib.GType gtype)
		{
			OverrideChangeCase (gtype, ChangeCaseVMCallback);
		}

		static void OverrideChangeCase (GLib.GType gtype, ChangeCaseNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "change-case", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ChangeCaseNativeDelegate (IntPtr inst, int p0);

		static void ChangeCase_cb (IntPtr inst, int p0)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnChangeCase ((GtkSource.ChangeCaseType) p0);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideChangeCase")]
		protected virtual void OnChangeCase (GtkSource.ChangeCaseType p0)
		{
			InternalChangeCase (p0);
		}

		private void InternalChangeCase (GtkSource.ChangeCaseType p0)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (p0);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static JoinLinesNativeDelegate JoinLines_cb_delegate;
		static JoinLinesNativeDelegate JoinLinesVMCallback {
			get {
				if (JoinLines_cb_delegate == null)
					JoinLines_cb_delegate = new JoinLinesNativeDelegate (JoinLines_cb);
				return JoinLines_cb_delegate;
			}
		}

		static void OverrideJoinLines (GLib.GType gtype)
		{
			OverrideJoinLines (gtype, JoinLinesVMCallback);
		}

		static void OverrideJoinLines (GLib.GType gtype, JoinLinesNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "join-lines", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void JoinLinesNativeDelegate (IntPtr inst);

		static void JoinLines_cb (IntPtr inst)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnJoinLines ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideJoinLines")]
		protected virtual void OnJoinLines ()
		{
			InternalJoinLines ();
		}

		private void InternalJoinLines ()
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (1);
			GLib.Value[] vals = new GLib.Value [1];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static UndoNativeDelegate Undo_cb_delegate;
		static UndoNativeDelegate UndoVMCallback {
			get {
				if (Undo_cb_delegate == null)
					Undo_cb_delegate = new UndoNativeDelegate (Undo_cb);
				return Undo_cb_delegate;
			}
		}

		static void OverrideUndo (GLib.GType gtype)
		{
			OverrideUndo (gtype, UndoVMCallback);
		}

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

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

		static void Undo_cb (IntPtr inst)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnUndo ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideUndo")]
		protected virtual void OnUndo ()
		{
			InternalUndo ();
		}

		private void InternalUndo ()
		{
			UndoNativeDelegate unmanaged = class_abi.BaseOverride<UndoNativeDelegate>(this.LookupGType(), "undo");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static RedoNativeDelegate Redo_cb_delegate;
		static RedoNativeDelegate RedoVMCallback {
			get {
				if (Redo_cb_delegate == null)
					Redo_cb_delegate = new RedoNativeDelegate (Redo_cb);
				return Redo_cb_delegate;
			}
		}

		static void OverrideRedo (GLib.GType gtype)
		{
			OverrideRedo (gtype, RedoVMCallback);
		}

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

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

		static void Redo_cb (IntPtr inst)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnRedo ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideRedo")]
		protected virtual void OnRedo ()
		{
			InternalRedo ();
		}

		private void InternalRedo ()
		{
			RedoNativeDelegate unmanaged = class_abi.BaseOverride<RedoNativeDelegate>(this.LookupGType(), "redo");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static LineMarkActivatedNativeDelegate LineMarkActivated_cb_delegate;
		static LineMarkActivatedNativeDelegate LineMarkActivatedVMCallback {
			get {
				if (LineMarkActivated_cb_delegate == null)
					LineMarkActivated_cb_delegate = new LineMarkActivatedNativeDelegate (LineMarkActivated_cb);
				return LineMarkActivated_cb_delegate;
			}
		}

		static void OverrideLineMarkActivated (GLib.GType gtype)
		{
			OverrideLineMarkActivated (gtype, LineMarkActivatedVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void LineMarkActivatedNativeDelegate (IntPtr inst, IntPtr iter, IntPtr evnt);

		static void LineMarkActivated_cb (IntPtr inst, IntPtr iter, IntPtr evnt)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnLineMarkActivated (Gtk.TextIter.New (iter), Gdk.Event.GetEvent (evnt));
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideLineMarkActivated")]
		protected virtual void OnLineMarkActivated (Gtk.TextIter iter, Gdk.Event evnt)
		{
			InternalLineMarkActivated (iter, evnt);
		}

		private void InternalLineMarkActivated (Gtk.TextIter iter, Gdk.Event evnt)
		{
			LineMarkActivatedNativeDelegate unmanaged = class_abi.BaseOverride<LineMarkActivatedNativeDelegate>(this.LookupGType(), "line_mark_activated");
			if (unmanaged == null) return;

			IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter);
			unmanaged (this.Handle, native_iter, evnt == null ? IntPtr.Zero : evnt.Handle);
			Marshal.FreeHGlobal (native_iter);
		}

		static ShowCompletionNativeDelegate ShowCompletion_cb_delegate;
		static ShowCompletionNativeDelegate ShowCompletionVMCallback {
			get {
				if (ShowCompletion_cb_delegate == null)
					ShowCompletion_cb_delegate = new ShowCompletionNativeDelegate (ShowCompletion_cb);
				return ShowCompletion_cb_delegate;
			}
		}

		static void OverrideShowCompletion (GLib.GType gtype)
		{
			OverrideShowCompletion (gtype, ShowCompletionVMCallback);
		}

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

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

		static void ShowCompletion_cb (IntPtr inst)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnShowCompletion ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideShowCompletion")]
		protected virtual void OnShowCompletion ()
		{
			InternalShowCompletion ();
		}

		private void InternalShowCompletion ()
		{
			ShowCompletionNativeDelegate unmanaged = class_abi.BaseOverride<ShowCompletionNativeDelegate>(this.LookupGType(), "show_completion");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static MoveLinesNativeDelegate MoveLines_cb_delegate;
		static MoveLinesNativeDelegate MoveLinesVMCallback {
			get {
				if (MoveLines_cb_delegate == null)
					MoveLines_cb_delegate = new MoveLinesNativeDelegate (MoveLines_cb);
				return MoveLines_cb_delegate;
			}
		}

		static void OverrideMoveLines (GLib.GType gtype)
		{
			OverrideMoveLines (gtype, MoveLinesVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void MoveLinesNativeDelegate (IntPtr inst, bool down);

		static void MoveLines_cb (IntPtr inst, bool down)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnMoveLines (down);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideMoveLines")]
		protected virtual void OnMoveLines (bool down)
		{
			InternalMoveLines (down);
		}

		private void InternalMoveLines (bool down)
		{
			MoveLinesNativeDelegate unmanaged = class_abi.BaseOverride<MoveLinesNativeDelegate>(this.LookupGType(), "move_lines");
			if (unmanaged == null) return;

			unmanaged (this.Handle, down);
		}

		static MoveWordsNativeDelegate MoveWords_cb_delegate;
		static MoveWordsNativeDelegate MoveWordsVMCallback {
			get {
				if (MoveWords_cb_delegate == null)
					MoveWords_cb_delegate = new MoveWordsNativeDelegate (MoveWords_cb);
				return MoveWords_cb_delegate;
			}
		}

		static void OverrideMoveWords (GLib.GType gtype)
		{
			OverrideMoveWords (gtype, MoveWordsVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void MoveWordsNativeDelegate (IntPtr inst, int step);

		static void MoveWords_cb (IntPtr inst, int step)
		{
			try {
				SourceView __obj = GLib.Object.GetObject (inst, false) as SourceView;
				__obj.OnMoveWords (step);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(GtkSource.SourceView), ConnectionMethod="OverrideMoveWords")]
		protected virtual void OnMoveWords (int step)
		{
			InternalMoveWords (step);
		}

		private void InternalMoveWords (int step)
		{
			MoveWordsNativeDelegate unmanaged = class_abi.BaseOverride<MoveWordsNativeDelegate>(this.LookupGType(), "move_words");
			if (unmanaged == null) return;

			unmanaged (this.Handle, step);
		}


		// 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("undo"
							, Gtk.TextView.class_abi.Fields
							, (uint) sizeof( IntPtr ) // undo
							, null
							, "redo"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("redo"
							, -1
							, (uint) sizeof( IntPtr ) // redo
							, "undo"
							, "line_mark_activated"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("line_mark_activated"
							, -1
							, (uint) sizeof( IntPtr ) // line_mark_activated
							, "redo"
							, "show_completion"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("show_completion"
							, -1
							, (uint) sizeof( IntPtr ) // show_completion
							, "line_mark_activated"
							, "move_lines"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("move_lines"
							, -1
							, (uint) sizeof( IntPtr ) // move_lines
							, "show_completion"
							, "move_words"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("move_words"
							, -1
							, (uint) sizeof( IntPtr ) // move_words
							, "move_lines"
							, "padding"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("padding"
							, -1
							, (uint) sizeof( IntPtr ) * 20 // padding
							, "move_words"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_source_view_get_gutter(IntPtr raw, int window_type);
		static d_gtk_source_view_get_gutter gtk_source_view_get_gutter = FuncLoader.LoadFunction<d_gtk_source_view_get_gutter>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_get_gutter"));

		public GtkSource.Gutter GetGutter(Gtk.TextWindowType window_type) {
			IntPtr raw_ret = gtk_source_view_get_gutter(Handle, (int) window_type);
			GtkSource.Gutter ret = GLib.Object.GetObject(raw_ret) as GtkSource.Gutter;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_source_view_get_mark_attributes(IntPtr raw, IntPtr category, out int priority);
		static d_gtk_source_view_get_mark_attributes gtk_source_view_get_mark_attributes = FuncLoader.LoadFunction<d_gtk_source_view_get_mark_attributes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_get_mark_attributes"));

		public GtkSource.MarkAttributes GetMarkAttributes(string category, out int priority) {
			IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category);
			IntPtr raw_ret = gtk_source_view_get_mark_attributes(Handle, native_category, out priority);
			GtkSource.MarkAttributes ret = GLib.Object.GetObject(raw_ret) as GtkSource.MarkAttributes;
			GLib.Marshaller.Free (native_category);
			return ret;
		}

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

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate uint d_gtk_source_view_get_visual_column(IntPtr raw, IntPtr iter);
		static d_gtk_source_view_get_visual_column gtk_source_view_get_visual_column = FuncLoader.LoadFunction<d_gtk_source_view_get_visual_column>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_get_visual_column"));

		public uint GetVisualColumn(Gtk.TextIter iter) {
			IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc (iter);
			uint raw_ret = gtk_source_view_get_visual_column(Handle, native_iter);
			uint ret = raw_ret;
			Marshal.FreeHGlobal (native_iter);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_indent_lines(IntPtr raw, IntPtr start, IntPtr end);
		static d_gtk_source_view_indent_lines gtk_source_view_indent_lines = FuncLoader.LoadFunction<d_gtk_source_view_indent_lines>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_indent_lines"));

		public void IndentLines(Gtk.TextIter start, Gtk.TextIter end) {
			IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start);
			IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end);
			gtk_source_view_indent_lines(Handle, native_start, native_end);
			Marshal.FreeHGlobal (native_start);
			Marshal.FreeHGlobal (native_end);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_set_mark_attributes(IntPtr raw, IntPtr category, IntPtr attributes, int priority);
		static d_gtk_source_view_set_mark_attributes gtk_source_view_set_mark_attributes = FuncLoader.LoadFunction<d_gtk_source_view_set_mark_attributes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_set_mark_attributes"));

		public void SetMarkAttributes(string category, GtkSource.MarkAttributes attributes, int priority) {
			IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category);
			gtk_source_view_set_mark_attributes(Handle, native_category, attributes == null ? IntPtr.Zero : attributes.Handle, priority);
			GLib.Marshaller.Free (native_category);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_view_unindent_lines(IntPtr raw, IntPtr start, IntPtr end);
		static d_gtk_source_view_unindent_lines gtk_source_view_unindent_lines = FuncLoader.LoadFunction<d_gtk_source_view_unindent_lines>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_view_unindent_lines"));

		public void UnindentLines(Gtk.TextIter start, Gtk.TextIter end) {
			IntPtr native_start = GLib.Marshaller.StructureToPtrAlloc (start);
			IntPtr native_end = GLib.Marshaller.StructureToPtrAlloc (end);
			gtk_source_view_unindent_lines(Handle, native_start, native_end);
			Marshal.FreeHGlobal (native_start);
			Marshal.FreeHGlobal (native_end);
		}


		static SourceView ()
		{
			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"
							, Gtk.TextView.abi_info.Fields
							, (uint) sizeof( IntPtr ) // priv
							, null
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
