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

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

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

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

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

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

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

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

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

		[GLib.Property ("hhomogeneous")]
		public bool Hhomogeneous {
			get  {
				bool raw_ret = gtk_stack_get_hhomogeneous(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_stack_set_hhomogeneous(Handle, value);
			}
		}

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

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

		[GLib.Property ("vhomogeneous")]
		public bool Vhomogeneous {
			get  {
				bool raw_ret = gtk_stack_get_vhomogeneous(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_stack_set_vhomogeneous(Handle, value);
			}
		}

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

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

		[GLib.Property ("visible-child")]
		public Gtk.Widget VisibleChild {
			get  {
				IntPtr raw_ret = gtk_stack_get_visible_child(Handle);
				Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
				return ret;
			}
			set  {
				gtk_stack_set_visible_child(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

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

		[GLib.Property ("visible-child-name")]
		public string VisibleChildName {
			get  {
				IntPtr raw_ret = gtk_stack_get_visible_child_name(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_stack_set_visible_child_name(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

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

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

		[GLib.Property ("transition-duration")]
		public uint TransitionDuration {
			get  {
				uint raw_ret = gtk_stack_get_transition_duration(Handle);
				uint ret = raw_ret;
				return ret;
			}
			set  {
				gtk_stack_set_transition_duration(Handle, value);
			}
		}

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

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

		[GLib.Property ("transition-type")]
		public Gtk.StackTransitionType TransitionType {
			get  {
				int raw_ret = gtk_stack_get_transition_type(Handle);
				Gtk.StackTransitionType ret = (Gtk.StackTransitionType) raw_ret;
				return ret;
			}
			set  {
				gtk_stack_set_transition_type(Handle, (int) value);
			}
		}

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

		[GLib.Property ("transition-running")]
		public bool TransitionRunning {
			get  {
				bool raw_ret = gtk_stack_get_transition_running(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

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

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

		[GLib.Property ("interpolate-size")]
		public bool InterpolateSize {
			get  {
				bool raw_ret = gtk_stack_get_interpolate_size(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_stack_set_interpolate_size(Handle, value);
			}
		}

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

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

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

			[Gtk.ChildProperty ("icon-name")]
			public string IconName {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "icon-name");
					string ret = (string) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "icon-name", 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 ();
				}
			}

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

		}

		public override Gtk.Container.ContainerChild this [Gtk.Widget child] {
			get {
				return new StackChild (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 (Gtk.Container.class_abi.Fields);

				return _class_abi;
			}
		}


		// End of the ABI representation.

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

		public void AddNamed(Gtk.Widget child, string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			gtk_stack_add_named(Handle, child == null ? IntPtr.Zero : child.Handle, native_name);
			GLib.Marshaller.Free (native_name);
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_stack_add_titled(IntPtr raw, IntPtr child, IntPtr name, IntPtr title);
		static d_gtk_stack_add_titled gtk_stack_add_titled = FuncLoader.LoadFunction<d_gtk_stack_add_titled>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stack_add_titled"));

		public void AddTitled(Gtk.Widget child, string name, string title) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr native_title = GLib.Marshaller.StringToPtrGStrdup (title);
			gtk_stack_add_titled(Handle, child == null ? IntPtr.Zero : child.Handle, native_name, native_title);
			GLib.Marshaller.Free (native_name);
			GLib.Marshaller.Free (native_title);
		}

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

		public Gtk.Widget GetChildByName(string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			IntPtr raw_ret = gtk_stack_get_child_by_name(Handle, native_name);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			GLib.Marshaller.Free (native_name);
			return ret;
		}

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

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_stack_set_visible_child_full(IntPtr raw, IntPtr name, int transition);
		static d_gtk_stack_set_visible_child_full gtk_stack_set_visible_child_full = FuncLoader.LoadFunction<d_gtk_stack_set_visible_child_full>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stack_set_visible_child_full"));

		public void SetVisibleChildFull(string name, Gtk.StackTransitionType transition) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			gtk_stack_set_visible_child_full(Handle, native_name, (int) transition);
			GLib.Marshaller.Free (native_name);
		}


		// 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 (Gtk.Container.abi_info.Fields);

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
