// 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 Table : Gtk.Container {

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_table_new(uint rows, uint columns, bool homogeneous);
		static d_gtk_table_new gtk_table_new = FuncLoader.LoadFunction<d_gtk_table_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_table_new"));

		[Obsolete]
		public Table (uint rows, uint columns, bool homogeneous) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Table)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("n_rows");
				vals.Add (new GLib.Value (rows));
				names.Add ("n_columns");
				vals.Add (new GLib.Value (columns));
				names.Add ("homogeneous");
				vals.Add (new GLib.Value (homogeneous));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = gtk_table_new(rows, columns, homogeneous);
		}

		[GLib.Property ("n-rows")]
		public uint NRows {
			get {
				GLib.Value val = GetProperty ("n-rows");
				uint ret = (uint) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("n-rows", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("n-columns")]
		public uint NColumns {
			get {
				GLib.Value val = GetProperty ("n-columns");
				uint ret = (uint) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("n-columns", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("row-spacing")]
		public uint RowSpacing {
			get {
				GLib.Value val = GetProperty ("row-spacing");
				uint ret = (uint) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("row-spacing", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("column-spacing")]
		public uint ColumnSpacing {
			get {
				GLib.Value val = GetProperty ("column-spacing");
				uint ret = (uint) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("column-spacing", val);
				val.Dispose ();
			}
		}

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

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

		[Obsolete]
		[GLib.Property ("homogeneous")]
		public bool Homogeneous {
			get  {
				bool raw_ret = gtk_table_get_homogeneous(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_table_set_homogeneous(Handle, value);
			}
		}

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

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

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

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

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

			[Gtk.ChildProperty ("x-options")]
			public Gtk.AttachOptions XOptions {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "x-options");
					Gtk.AttachOptions ret = (Gtk.AttachOptions) (Enum) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value((Enum) value);
					parent.ChildSetProperty(child, "x-options", val);
					val.Dispose ();
				}
			}

			[Gtk.ChildProperty ("y-options")]
			public Gtk.AttachOptions YOptions {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "y-options");
					Gtk.AttachOptions ret = (Gtk.AttachOptions) (Enum) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value((Enum) value);
					parent.ChildSetProperty(child, "y-options", val);
					val.Dispose ();
				}
			}

			[Gtk.ChildProperty ("x-padding")]
			public uint XPadding {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "x-padding");
					uint ret = (uint) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "x-padding", val);
					val.Dispose ();
				}
			}

			[Gtk.ChildProperty ("y-padding")]
			public uint YPadding {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "y-padding");
					uint ret = (uint) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "y-padding", val);
					val.Dispose ();
				}
			}

		}

		public override Gtk.Container.ContainerChild this [Gtk.Widget child] {
			get {
				return new TableChild (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"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_table_attach(IntPtr raw, IntPtr child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach, int xoptions, int yoptions, uint xpadding, uint ypadding);
		static d_gtk_table_attach gtk_table_attach = FuncLoader.LoadFunction<d_gtk_table_attach>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_table_attach"));

		[Obsolete]
		public void Attach(Gtk.Widget child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach, Gtk.AttachOptions xoptions, Gtk.AttachOptions yoptions, uint xpadding, uint ypadding) {
			gtk_table_attach(Handle, child == null ? IntPtr.Zero : child.Handle, left_attach, right_attach, top_attach, bottom_attach, (int) xoptions, (int) yoptions, xpadding, ypadding);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_table_attach_defaults(IntPtr raw, IntPtr widget, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach);
		static d_gtk_table_attach_defaults gtk_table_attach_defaults = FuncLoader.LoadFunction<d_gtk_table_attach_defaults>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_table_attach_defaults"));

		[Obsolete]
		public void Attach(Gtk.Widget widget, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) {
			gtk_table_attach_defaults(Handle, widget == null ? IntPtr.Zero : widget.Handle, left_attach, right_attach, top_attach, bottom_attach);
		}

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

		[Obsolete]
		public uint GetColSpacing(uint column) {
			uint raw_ret = gtk_table_get_col_spacing(Handle, column);
			uint ret = raw_ret;
			return ret;
		}

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

		[Obsolete]
		public uint DefaultColSpacing { 
			get {
				uint raw_ret = gtk_table_get_default_col_spacing(Handle);
				uint ret = raw_ret;
				return ret;
			}
		}

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

		[Obsolete]
		public uint DefaultRowSpacing { 
			get {
				uint raw_ret = gtk_table_get_default_row_spacing(Handle);
				uint ret = raw_ret;
				return ret;
			}
		}

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

		[Obsolete]
		public uint GetRowSpacing(uint row) {
			uint raw_ret = gtk_table_get_row_spacing(Handle, row);
			uint ret = raw_ret;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_table_get_size(IntPtr raw, out uint rows, out uint columns);
		static d_gtk_table_get_size gtk_table_get_size = FuncLoader.LoadFunction<d_gtk_table_get_size>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_table_get_size"));

		[Obsolete]
		public void GetSize(out uint rows, out uint columns) {
			gtk_table_get_size(Handle, out rows, out columns);
		}

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

		[Obsolete]
		public static new GLib.GType GType { 
			get {
				IntPtr raw_ret = gtk_table_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_table_resize(IntPtr raw, uint rows, uint columns);
		static d_gtk_table_resize gtk_table_resize = FuncLoader.LoadFunction<d_gtk_table_resize>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_table_resize"));

		[Obsolete]
		public void Resize(uint rows, uint columns) {
			gtk_table_resize(Handle, rows, columns);
		}

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

		[Obsolete]
		public void SetColSpacing(uint column, uint spacing) {
			gtk_table_set_col_spacing(Handle, column, spacing);
		}

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

		[Obsolete]
		public void SetRowSpacing(uint row, uint spacing) {
			gtk_table_set_row_spacing(Handle, row, spacing);
		}


		// 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
	}
}
