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

namespace Gtk {

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

#region Autogenerated code
	public partial class CellView : Gtk.Widget, Gtk.ICellLayout, Gtk.IOrientable {

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_cell_view_new();
		static d_gtk_cell_view_new gtk_cell_view_new = FuncLoader.LoadFunction<d_gtk_cell_view_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_new"));

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_cell_view_new_with_context(IntPtr area, IntPtr context);
		static d_gtk_cell_view_new_with_context gtk_cell_view_new_with_context = FuncLoader.LoadFunction<d_gtk_cell_view_new_with_context>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_new_with_context"));

		public CellView (Gtk.CellArea area, Gtk.CellAreaContext context) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (CellView)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = gtk_cell_view_new_with_context(area == null ? IntPtr.Zero : area.Handle, context == null ? IntPtr.Zero : context.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_cell_view_new_with_markup(IntPtr markup);
		static d_gtk_cell_view_new_with_markup gtk_cell_view_new_with_markup = FuncLoader.LoadFunction<d_gtk_cell_view_new_with_markup>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_new_with_markup"));

		public CellView (string markup) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (CellView)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			IntPtr native_markup = GLib.Marshaller.StringToPtrGStrdup (markup);
			Raw = gtk_cell_view_new_with_markup(native_markup);
			GLib.Marshaller.Free (native_markup);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_cell_view_new_with_pixbuf(IntPtr pixbuf);
		static d_gtk_cell_view_new_with_pixbuf gtk_cell_view_new_with_pixbuf = FuncLoader.LoadFunction<d_gtk_cell_view_new_with_pixbuf>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_new_with_pixbuf"));

		public CellView (Gdk.Pixbuf pixbuf) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (CellView)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = gtk_cell_view_new_with_pixbuf(pixbuf == null ? IntPtr.Zero : pixbuf.Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_cell_view_new_with_text(IntPtr text);
		static d_gtk_cell_view_new_with_text gtk_cell_view_new_with_text = FuncLoader.LoadFunction<d_gtk_cell_view_new_with_text>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_new_with_text"));

		public static CellView NewWithText(string text)
		{
			IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text);
			CellView result = new CellView (gtk_cell_view_new_with_text(native_text));
			GLib.Marshaller.Free (native_text);
			return result;
		}

		[GLib.Property ("background")]
		public string Background {
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("background", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("background-gdk")]
		public Gdk.Color BackgroundGdk {
			get {
				GLib.Value val = GetProperty ("background-gdk");
				Gdk.Color ret = (Gdk.Color) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = (GLib.Value) value;
				SetProperty("background-gdk", val);
				val.Dispose ();
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_view_set_background_rgba(IntPtr raw, IntPtr value);
		static d_gtk_cell_view_set_background_rgba gtk_cell_view_set_background_rgba = FuncLoader.LoadFunction<d_gtk_cell_view_set_background_rgba>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_set_background_rgba"));

		[GLib.Property ("background-rgba")]
		public Gdk.RGBA BackgroundRgba {
			get {
				GLib.Value val = GetProperty ("background-rgba");
				Gdk.RGBA ret = (Gdk.RGBA) val;
				val.Dispose ();
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
				gtk_cell_view_set_background_rgba(Handle, native_value);
				Marshal.FreeHGlobal (native_value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_view_set_model(IntPtr raw, IntPtr model);
		static d_gtk_cell_view_set_model gtk_cell_view_set_model = FuncLoader.LoadFunction<d_gtk_cell_view_set_model>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_set_model"));

		[GLib.Property ("model")]
		public Gtk.ITreeModel Model {
			get  {
				IntPtr raw_ret = gtk_cell_view_get_model(Handle);
				Gtk.ITreeModel ret = Gtk.TreeModelAdapter.GetObject (raw_ret, false);
				return ret;
			}
			set  {
				gtk_cell_view_set_model(Handle, value == null ? IntPtr.Zero : ((value is GLib.Object) ? (value as GLib.Object).Handle : (value as Gtk.TreeModelAdapter).Handle));
			}
		}

		[GLib.Property ("cell-area")]
		public Gtk.CellArea CellArea {
			get {
				GLib.Value val = GetProperty ("cell-area");
				Gtk.CellArea ret = (Gtk.CellArea) val;
				val.Dispose ();
				return ret;
			}
		}

		[GLib.Property ("cell-area-context")]
		public Gtk.CellAreaContext CellAreaContext {
			get {
				GLib.Value val = GetProperty ("cell-area-context");
				Gtk.CellAreaContext ret = (Gtk.CellAreaContext) val;
				val.Dispose ();
				return ret;
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_view_set_draw_sensitive(IntPtr raw, bool draw_sensitive);
		static d_gtk_cell_view_set_draw_sensitive gtk_cell_view_set_draw_sensitive = FuncLoader.LoadFunction<d_gtk_cell_view_set_draw_sensitive>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_set_draw_sensitive"));

		[GLib.Property ("draw-sensitive")]
		public bool DrawSensitive {
			get  {
				bool raw_ret = gtk_cell_view_get_draw_sensitive(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_cell_view_set_draw_sensitive(Handle, value);
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_view_set_fit_model(IntPtr raw, bool fit_model);
		static d_gtk_cell_view_set_fit_model gtk_cell_view_set_fit_model = FuncLoader.LoadFunction<d_gtk_cell_view_set_fit_model>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_set_fit_model"));

		[GLib.Property ("fit-model")]
		public bool FitModel {
			get  {
				bool raw_ret = gtk_cell_view_get_fit_model(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_cell_view_set_fit_model(Handle, 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("_gtk_reserved1"
							, Gtk.Widget.class_abi.Fields
							, (uint) sizeof( IntPtr ) // _gtk_reserved1
							, null
							, "_gtk_reserved2"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved2"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved2
							, "_gtk_reserved1"
							, "_gtk_reserved3"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved3"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved3
							, "_gtk_reserved2"
							, "_gtk_reserved4"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved4"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved4
							, "_gtk_reserved3"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_view_set_displayed_row(IntPtr raw, IntPtr path);
		static d_gtk_cell_view_set_displayed_row gtk_cell_view_set_displayed_row = FuncLoader.LoadFunction<d_gtk_cell_view_set_displayed_row>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_set_displayed_row"));

		public Gtk.TreePath DisplayedRow { 
			get {
				IntPtr raw_ret = gtk_cell_view_get_displayed_row(Handle);
				Gtk.TreePath ret = raw_ret == IntPtr.Zero ? null : (Gtk.TreePath) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtk.TreePath), false);
				return ret;
			}
			set {
				gtk_cell_view_set_displayed_row(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_gtk_cell_view_get_size_of_row(IntPtr raw, IntPtr path, IntPtr requisition);
		static d_gtk_cell_view_get_size_of_row gtk_cell_view_get_size_of_row = FuncLoader.LoadFunction<d_gtk_cell_view_get_size_of_row>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_get_size_of_row"));

		[Obsolete]
		public bool GetSizeOfRow(Gtk.TreePath path, Gtk.Requisition requisition) {
			IntPtr native_requisition = GLib.Marshaller.StructureToPtrAlloc (requisition);
			bool raw_ret = gtk_cell_view_get_size_of_row(Handle, path == null ? IntPtr.Zero : path.Handle, native_requisition);
			bool ret = raw_ret;
			Marshal.FreeHGlobal (native_requisition);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_cell_view_get_type();
		static d_gtk_cell_view_get_type gtk_cell_view_get_type = FuncLoader.LoadFunction<d_gtk_cell_view_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_get_type"));

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_view_set_background_color(IntPtr raw, IntPtr value);
		static d_gtk_cell_view_set_background_color gtk_cell_view_set_background_color = FuncLoader.LoadFunction<d_gtk_cell_view_set_background_color>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_view_set_background_color"));

		[Obsolete]
		public Gdk.Color BackgroundColor { 
			set {
				IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
				gtk_cell_view_set_background_color(Handle, native_value);
				Marshal.FreeHGlobal (native_value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_layout_add_attribute(IntPtr raw, IntPtr cell, IntPtr attribute, int column);
		static d_gtk_cell_layout_add_attribute gtk_cell_layout_add_attribute = FuncLoader.LoadFunction<d_gtk_cell_layout_add_attribute>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_layout_add_attribute"));

		public void AddAttribute(Gtk.CellRenderer cell, string attribute, int column) {
			IntPtr native_attribute = GLib.Marshaller.StringToPtrGStrdup (attribute);
			gtk_cell_layout_add_attribute(Handle, cell == null ? IntPtr.Zero : cell.Handle, native_attribute, column);
			GLib.Marshaller.Free (native_attribute);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_layout_clear(IntPtr raw);
		static d_gtk_cell_layout_clear gtk_cell_layout_clear = FuncLoader.LoadFunction<d_gtk_cell_layout_clear>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_layout_clear"));

		public void Clear() {
			gtk_cell_layout_clear(Handle);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_layout_clear_attributes(IntPtr raw, IntPtr cell);
		static d_gtk_cell_layout_clear_attributes gtk_cell_layout_clear_attributes = FuncLoader.LoadFunction<d_gtk_cell_layout_clear_attributes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_layout_clear_attributes"));

		public void ClearAttributes(Gtk.CellRenderer cell) {
			gtk_cell_layout_clear_attributes(Handle, cell == null ? IntPtr.Zero : cell.Handle);
		}

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

		public Gtk.CellArea Area { 
			get {
				IntPtr raw_ret = gtk_cell_layout_get_area(Handle);
				Gtk.CellArea ret = GLib.Object.GetObject(raw_ret) as Gtk.CellArea;
				return ret;
			}
		}

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

		public Gtk.CellRenderer[] Cells { 
			get {
				IntPtr raw_ret = gtk_cell_layout_get_cells(Handle);
				Gtk.CellRenderer[] ret = GLib.Marshaller.ListPtrToArray<Gtk.CellRenderer, Gtk.CellRenderer> (raw_ret, true, false);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_layout_pack_end(IntPtr raw, IntPtr cell, bool expand);
		static d_gtk_cell_layout_pack_end gtk_cell_layout_pack_end = FuncLoader.LoadFunction<d_gtk_cell_layout_pack_end>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_layout_pack_end"));

		public void PackEnd(Gtk.CellRenderer cell, bool expand) {
			gtk_cell_layout_pack_end(Handle, cell == null ? IntPtr.Zero : cell.Handle, expand);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_layout_pack_start(IntPtr raw, IntPtr cell, bool expand);
		static d_gtk_cell_layout_pack_start gtk_cell_layout_pack_start = FuncLoader.LoadFunction<d_gtk_cell_layout_pack_start>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_layout_pack_start"));

		public void PackStart(Gtk.CellRenderer cell, bool expand) {
			gtk_cell_layout_pack_start(Handle, cell == null ? IntPtr.Zero : cell.Handle, expand);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_layout_reorder(IntPtr raw, IntPtr cell, int position);
		static d_gtk_cell_layout_reorder gtk_cell_layout_reorder = FuncLoader.LoadFunction<d_gtk_cell_layout_reorder>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_layout_reorder"));

		public void Reorder(Gtk.CellRenderer cell, int position) {
			gtk_cell_layout_reorder(Handle, cell == null ? IntPtr.Zero : cell.Handle, position);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_cell_layout_set_cell_data_func(IntPtr raw, IntPtr cell, GtkSharp.CellLayoutDataFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy);
		static d_gtk_cell_layout_set_cell_data_func gtk_cell_layout_set_cell_data_func = FuncLoader.LoadFunction<d_gtk_cell_layout_set_cell_data_func>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_layout_set_cell_data_func"));

		public void SetCellDataFunc(Gtk.CellRenderer cell, Gtk.CellLayoutDataFunc func) {
			GtkSharp.CellLayoutDataFuncWrapper func_wrapper = new GtkSharp.CellLayoutDataFuncWrapper (func);
			IntPtr func_data;
			GLib.DestroyNotify destroy;
			if (func == null) {
				func_data = IntPtr.Zero;
				destroy = null;
			} else {
				func_data = (IntPtr) GCHandle.Alloc (func_wrapper);
				destroy = GLib.DestroyHelper.NotifyHandler;
			}
			gtk_cell_layout_set_cell_data_func(Handle, cell == null ? IntPtr.Zero : cell.Handle, func_wrapper.NativeDelegate, func_data, destroy);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_orientable_set_orientation(IntPtr raw, int orientation);
		static d_gtk_orientable_set_orientation gtk_orientable_set_orientation = FuncLoader.LoadFunction<d_gtk_orientable_set_orientation>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_orientable_set_orientation"));

		[GLib.Property ("orientation")]
		public Gtk.Orientation Orientation {
			get  {
				int raw_ret = gtk_orientable_get_orientation(Handle);
				Gtk.Orientation ret = (Gtk.Orientation) raw_ret;
				return ret;
			}
			set  {
				gtk_orientable_set_orientation(Handle, (int) value);
			}
		}


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

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
