// 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 Grid : Gtk.Container, Gtk.IOrientable {

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

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

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

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

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

		[GLib.Property ("row-spacing")]
		public uint RowSpacing {
			get  {
				uint raw_ret = gtk_grid_get_row_spacing(Handle);
				uint ret = raw_ret;
				return ret;
			}
			set  {
				gtk_grid_set_row_spacing(Handle, value);
			}
		}

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

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

		[GLib.Property ("column-spacing")]
		public uint ColumnSpacing {
			get  {
				uint raw_ret = gtk_grid_get_column_spacing(Handle);
				uint ret = raw_ret;
				return ret;
			}
			set  {
				gtk_grid_set_column_spacing(Handle, value);
			}
		}

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

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

		[GLib.Property ("row-homogeneous")]
		public bool RowHomogeneous {
			get  {
				bool raw_ret = gtk_grid_get_row_homogeneous(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_grid_set_row_homogeneous(Handle, value);
			}
		}

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

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

		[GLib.Property ("column-homogeneous")]
		public bool ColumnHomogeneous {
			get  {
				bool raw_ret = gtk_grid_get_column_homogeneous(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_grid_set_column_homogeneous(Handle, value);
			}
		}

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

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

		[GLib.Property ("baseline-row")]
		public int BaselineRow {
			get  {
				int raw_ret = gtk_grid_get_baseline_row(Handle);
				int ret = raw_ret;
				return ret;
			}
			set  {
				gtk_grid_set_baseline_row(Handle, value);
			}
		}

		public class GridChild : Gtk.Container.ContainerChild {
			protected internal GridChild (Gtk.Container parent, Gtk.Widget child) : base (parent, child) {}

			[Gtk.ChildProperty ("left-attach")]
			public int LeftAttach {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "left-attach");
					int ret = (int) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "left-attach", val);
					val.Dispose ();
				}
			}

			[Gtk.ChildProperty ("top-attach")]
			public int TopAttach {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "top-attach");
					int ret = (int) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "top-attach", val);
					val.Dispose ();
				}
			}

			[Gtk.ChildProperty ("width")]
			public int Width {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "width");
					int ret = (int) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "width", val);
					val.Dispose ();
				}
			}

			[Gtk.ChildProperty ("height")]
			public int Height {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "height");
					int ret = (int) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "height", val);
					val.Dispose ();
				}
			}

		}

		public override Gtk.Container.ContainerChild this [Gtk.Widget child] {
			get {
				return new GridChild (this, child);
			}
		}


		// 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.Container.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"
							, "_gtk_reserved5"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved5"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved5
							, "_gtk_reserved4"
							, "_gtk_reserved6"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved6"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved6
							, "_gtk_reserved5"
							, "_gtk_reserved7"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved7"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved7
							, "_gtk_reserved6"
							, "_gtk_reserved8"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved8"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved8
							, "_gtk_reserved7"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_grid_attach(IntPtr raw, IntPtr child, int left, int top, int width, int height);
		static d_gtk_grid_attach gtk_grid_attach = FuncLoader.LoadFunction<d_gtk_grid_attach>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_grid_attach"));

		public void Attach(Gtk.Widget child, int left, int top, int width, int height) {
			gtk_grid_attach(Handle, child == null ? IntPtr.Zero : child.Handle, left, top, width, height);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_grid_attach_next_to(IntPtr raw, IntPtr child, IntPtr sibling, int side, int width, int height);
		static d_gtk_grid_attach_next_to gtk_grid_attach_next_to = FuncLoader.LoadFunction<d_gtk_grid_attach_next_to>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_grid_attach_next_to"));

		public void AttachNextTo(Gtk.Widget child, Gtk.Widget sibling, Gtk.PositionType side, int width, int height) {
			gtk_grid_attach_next_to(Handle, child == null ? IntPtr.Zero : child.Handle, sibling == null ? IntPtr.Zero : sibling.Handle, (int) side, width, height);
		}

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

		public Gtk.Widget GetChildAt(int left, int top) {
			IntPtr raw_ret = gtk_grid_get_child_at(Handle, left, top);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			return ret;
		}

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

		public Gtk.BaselinePosition GetRowBaselinePosition(int row) {
			int raw_ret = gtk_grid_get_row_baseline_position(Handle, row);
			Gtk.BaselinePosition ret = (Gtk.BaselinePosition) raw_ret;
			return ret;
		}

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

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

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

		public void InsertColumn(int position) {
			gtk_grid_insert_column(Handle, position);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_grid_insert_next_to(IntPtr raw, IntPtr sibling, int side);
		static d_gtk_grid_insert_next_to gtk_grid_insert_next_to = FuncLoader.LoadFunction<d_gtk_grid_insert_next_to>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_grid_insert_next_to"));

		public void InsertNextTo(Gtk.Widget sibling, Gtk.PositionType side) {
			gtk_grid_insert_next_to(Handle, sibling == null ? IntPtr.Zero : sibling.Handle, (int) side);
		}

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

		public void InsertRow(int position) {
			gtk_grid_insert_row(Handle, position);
		}

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

		public void RemoveColumn(int position) {
			gtk_grid_remove_column(Handle, position);
		}

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

		public void RemoveRow(int position) {
			gtk_grid_remove_row(Handle, position);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_grid_set_row_baseline_position(IntPtr raw, int row, int pos);
		static d_gtk_grid_set_row_baseline_position gtk_grid_set_row_baseline_position = FuncLoader.LoadFunction<d_gtk_grid_set_row_baseline_position>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_grid_set_row_baseline_position"));

		public void SetRowBaselinePosition(int row, Gtk.BaselinePosition pos) {
			gtk_grid_set_row_baseline_position(Handle, row, (int) pos);
		}

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

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
