// 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 Mark : Gtk.TextMark {

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

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

		public Mark (string name, string category) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Mark)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("name");
				vals.Add (new GLib.Value (name));
				names.Add ("category");
				vals.Add (new GLib.Value (category));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category);
			Raw = gtk_source_mark_new(native_name, native_category);
			GLib.Marshaller.Free (native_name);
			GLib.Marshaller.Free (native_category);
		}

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

		[GLib.Property ("category")]
		public string Category {
			get  {
				IntPtr raw_ret = gtk_source_mark_get_category(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
		}


		// 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"
							, Gtk.TextMark.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_mark_get_type();
		static d_gtk_source_mark_get_type gtk_source_mark_get_type = FuncLoader.LoadFunction<d_gtk_source_mark_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_mark_get_type"));

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

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

		public GtkSource.Mark Next(string category) {
			IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category);
			IntPtr raw_ret = gtk_source_mark_next(Handle, native_category);
			GtkSource.Mark ret = GLib.Object.GetObject(raw_ret) as GtkSource.Mark;
			GLib.Marshaller.Free (native_category);
			return ret;
		}

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

		public GtkSource.Mark Prev(string category) {
			IntPtr native_category = GLib.Marshaller.StringToPtrGStrdup (category);
			IntPtr raw_ret = gtk_source_mark_prev(Handle, native_category);
			GtkSource.Mark ret = GLib.Object.GetObject(raw_ret) as GtkSource.Mark;
			GLib.Marshaller.Free (native_category);
			return ret;
		}


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

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
