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

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_gtk_box_new(int orientation, int spacing);
		static d_gtk_box_new gtk_box_new = FuncLoader.LoadFunction<d_gtk_box_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_box_new"));

		public Box (Gtk.Orientation orientation, int spacing) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Box)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				names.Add ("orientation");
				vals.Add (new GLib.Value (orientation));
				names.Add ("spacing");
				vals.Add (new GLib.Value (spacing));
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = gtk_box_new((int) orientation, spacing);
		}

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

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

		[GLib.Property ("spacing")]
		public int Spacing {
			get  {
				int raw_ret = gtk_box_get_spacing(Handle);
				int ret = raw_ret;
				return ret;
			}
			set  {
				gtk_box_set_spacing(Handle, value);
			}
		}

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

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

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

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

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

		[GLib.Property ("baseline-position")]
		public Gtk.BaselinePosition BaselinePosition {
			get  {
				int raw_ret = gtk_box_get_baseline_position(Handle);
				Gtk.BaselinePosition ret = (Gtk.BaselinePosition) raw_ret;
				return ret;
			}
			set  {
				gtk_box_set_baseline_position(Handle, (int) value);
			}
		}

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

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

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

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

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

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

		}

		public override Gtk.Container.ContainerChild this [Gtk.Widget child] {
			get {
				return new BoxChild (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 IntPtr d_gtk_box_get_center_widget(IntPtr raw);
		static d_gtk_box_get_center_widget gtk_box_get_center_widget = FuncLoader.LoadFunction<d_gtk_box_get_center_widget>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_box_get_center_widget"));

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

		public Gtk.Widget CenterWidget { 
			get {
				IntPtr raw_ret = gtk_box_get_center_widget(Handle);
				Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
				return ret;
			}
			set {
				gtk_box_set_center_widget(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_box_pack_end(IntPtr raw, IntPtr child, bool expand, bool fill, uint padding);
		static d_gtk_box_pack_end gtk_box_pack_end = FuncLoader.LoadFunction<d_gtk_box_pack_end>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_box_pack_end"));

		public void PackEnd(Gtk.Widget child, bool expand, bool fill, uint padding) {
			gtk_box_pack_end(Handle, child == null ? IntPtr.Zero : child.Handle, expand, fill, padding);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_box_pack_start(IntPtr raw, IntPtr child, bool expand, bool fill, uint padding);
		static d_gtk_box_pack_start gtk_box_pack_start = FuncLoader.LoadFunction<d_gtk_box_pack_start>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_box_pack_start"));

		public void PackStart(Gtk.Widget child, bool expand, bool fill, uint padding) {
			gtk_box_pack_start(Handle, child == null ? IntPtr.Zero : child.Handle, expand, fill, padding);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_box_query_child_packing(IntPtr raw, IntPtr child, out bool expand, out bool fill, out uint padding, out int pack_type);
		static d_gtk_box_query_child_packing gtk_box_query_child_packing = FuncLoader.LoadFunction<d_gtk_box_query_child_packing>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_box_query_child_packing"));

		public void QueryChildPacking(Gtk.Widget child, out bool expand, out bool fill, out uint padding, out Gtk.PackType pack_type) {
			int native_pack_type;
			gtk_box_query_child_packing(Handle, child == null ? IntPtr.Zero : child.Handle, out expand, out fill, out padding, out native_pack_type);
			pack_type = (Gtk.PackType) native_pack_type;
		}

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

		public void ReorderChild(Gtk.Widget child, int position) {
			gtk_box_reorder_child(Handle, child == null ? IntPtr.Zero : child.Handle, position);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_box_set_child_packing(IntPtr raw, IntPtr child, bool expand, bool fill, uint padding, int pack_type);
		static d_gtk_box_set_child_packing gtk_box_set_child_packing = FuncLoader.LoadFunction<d_gtk_box_set_child_packing>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_box_set_child_packing"));

		public void SetChildPacking(Gtk.Widget child, bool expand, bool fill, uint padding, Gtk.PackType pack_type) {
			gtk_box_set_child_packing(Handle, child == null ? IntPtr.Zero : child.Handle, expand, fill, padding, (int) pack_type);
		}

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