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

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

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

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

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

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

		[GLib.Property ("location")]
		public GLib.IFile Location {
			get  {
				IntPtr raw_ret = gtk_source_file_get_location(Handle);
				GLib.IFile ret = GLib.FileAdapter.GetObject (raw_ret, false);
				return ret;
			}
			set  {
				gtk_source_file_set_location(Handle, value == null ? IntPtr.Zero : ((value is GLib.Object) ? (value as GLib.Object).Handle : (value as GLib.FileAdapter).Handle));
			}
		}

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

		[GLib.Property ("encoding")]
		public GtkSource.Encoding Encoding {
			get  {
				IntPtr raw_ret = gtk_source_file_get_encoding(Handle);
				GtkSource.Encoding ret = raw_ret == IntPtr.Zero ? null : (GtkSource.Encoding) GLib.Opaque.GetOpaque (raw_ret, typeof (GtkSource.Encoding), false);
				return ret;
			}
		}

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

		[GLib.Property ("newline-type")]
		public GtkSource.NewlineType NewlineType {
			get  {
				int raw_ret = gtk_source_file_get_newline_type(Handle);
				GtkSource.NewlineType ret = (GtkSource.NewlineType) raw_ret;
				return ret;
			}
		}

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

		[GLib.Property ("compression-type")]
		public GtkSource.CompressionType CompressionType {
			get  {
				int raw_ret = gtk_source_file_get_compression_type(Handle);
				GtkSource.CompressionType ret = (GtkSource.CompressionType) raw_ret;
				return ret;
			}
		}

		[GLib.Property ("read-only")]
		public bool ReadOnly {
			get {
				GLib.Value val = GetProperty ("read-only");
				bool ret = (bool) val;
				val.Dispose ();
				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"
							, GLib.Object.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 void d_gtk_source_file_check_file_on_disk(IntPtr raw);
		static d_gtk_source_file_check_file_on_disk gtk_source_file_check_file_on_disk = FuncLoader.LoadFunction<d_gtk_source_file_check_file_on_disk>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_file_check_file_on_disk"));

		public void CheckFileOnDisk() {
			gtk_source_file_check_file_on_disk(Handle);
		}

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

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

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

		public bool IsDeleted { 
			get {
				bool raw_ret = gtk_source_file_is_deleted(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public bool IsExternallyModified { 
			get {
				bool raw_ret = gtk_source_file_is_externally_modified(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public bool IsLocal { 
			get {
				bool raw_ret = gtk_source_file_is_local(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

		public bool IsReadonly { 
			get {
				bool raw_ret = gtk_source_file_is_readonly(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_source_file_set_mount_operation_factory(IntPtr raw, GtkSourceSharp.MountOperationFactoryNative cb, IntPtr user_data, GLib.DestroyNotify notify);
		static d_gtk_source_file_set_mount_operation_factory gtk_source_file_set_mount_operation_factory = FuncLoader.LoadFunction<d_gtk_source_file_set_mount_operation_factory>(FuncLoader.GetProcAddress(GLibrary.Load(Library.GtkSource), "gtk_source_file_set_mount_operation_factory"));

		public GtkSource.MountOperationFactory MountOperationFactory { 
			set {
				GtkSourceSharp.MountOperationFactoryWrapper value_wrapper = new GtkSourceSharp.MountOperationFactoryWrapper (value);
				IntPtr user_data;
				GLib.DestroyNotify notify;
				if (value == null) {
					user_data = IntPtr.Zero;
					notify = null;
				} else {
					user_data = (IntPtr) GCHandle.Alloc (value_wrapper);
					notify = GLib.DestroyHelper.NotifyHandler;
				}
				gtk_source_file_set_mount_operation_factory(Handle, value_wrapper.NativeDelegate, user_data, notify);
			}
		}


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

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
