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

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

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

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

		[GLib.Property ("page")]
		public int Page {
			get {
				GLib.Value val = GetProperty ("page");
				int ret = (int) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("page", val);
				val.Dispose ();
			}
		}

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

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

		[GLib.Property ("tab-pos")]
		public Gtk.PositionType TabPos {
			get  {
				int raw_ret = gtk_notebook_get_tab_pos(Handle);
				Gtk.PositionType ret = (Gtk.PositionType) raw_ret;
				return ret;
			}
			set  {
				gtk_notebook_set_tab_pos(Handle, (int) value);
			}
		}

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

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

		[GLib.Property ("show-tabs")]
		public bool ShowTabs {
			get  {
				bool raw_ret = gtk_notebook_get_show_tabs(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_notebook_set_show_tabs(Handle, value);
			}
		}

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

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

		[GLib.Property ("show-border")]
		public bool ShowBorder {
			get  {
				bool raw_ret = gtk_notebook_get_show_border(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_notebook_set_show_border(Handle, value);
			}
		}

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

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

		[GLib.Property ("scrollable")]
		public bool Scrollable {
			get  {
				bool raw_ret = gtk_notebook_get_scrollable(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_notebook_set_scrollable(Handle, value);
			}
		}

		[GLib.Property ("enable-popup")]
		public bool EnablePopup {
			get {
				GLib.Value val = GetProperty ("enable-popup");
				bool ret = (bool) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("enable-popup", val);
				val.Dispose ();
			}
		}

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

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

		[GLib.Property ("group-name")]
		public string GroupName {
			get  {
				IntPtr raw_ret = gtk_notebook_get_group_name(Handle);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				return ret;
			}
			set  {
				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
				gtk_notebook_set_group_name(Handle, native_value);
				GLib.Marshaller.Free (native_value);
			}
		}

		public bool HasSecondaryBackwardStepper {
			get {
				var val = (bool)StyleGetProperty("has-secondary-backward-stepper");
				return val;
			}
		}

		public bool HasSecondaryForwardStepper {
			get {
				var val = (bool)StyleGetProperty("has-secondary-forward-stepper");
				return val;
			}
		}

		public bool HasBackwardStepper {
			get {
				var val = (bool)StyleGetProperty("has-backward-stepper");
				return val;
			}
		}

		public bool HasForwardStepper {
			get {
				var val = (bool)StyleGetProperty("has-forward-stepper");
				return val;
			}
		}

		[Obsolete]
		public int TabOverlap {
			get {
				var val = (int)StyleGetProperty("tab-overlap");
				return val;
			}
		}

		[Obsolete]
		public int TabCurvature {
			get {
				var val = (int)StyleGetProperty("tab-curvature");
				return val;
			}
		}

		[Obsolete]
		public int ArrowSpacing {
			get {
				var val = (int)StyleGetProperty("arrow-spacing");
				return val;
			}
		}

		[Obsolete]
		public int InitialGap {
			get {
				var val = (int)StyleGetProperty("initial-gap");
				return val;
			}
		}

		[Obsolete]
		public bool HasTabGap {
			get {
				var val = (bool)StyleGetProperty("has-tab-gap");
				return val;
			}
		}

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

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

			[Gtk.ChildProperty ("menu-label")]
			public string MenuLabel {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "menu-label");
					string ret = (string) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "menu-label", 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 ("tab-expand")]
			public bool TabExpand {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "tab-expand");
					bool ret = (bool) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "tab-expand", val);
					val.Dispose ();
				}
			}

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

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

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

		}

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

		[GLib.Signal("change-current-page")]
		public event Gtk.ChangeCurrentPageHandler ChangeCurrentPage {
			add {
				this.AddSignalHandler ("change-current-page", value, typeof (Gtk.ChangeCurrentPageArgs));
			}
			remove {
				this.RemoveSignalHandler ("change-current-page", value);
			}
		}

		[GLib.Signal("page-removed")]
		public event Gtk.PageRemovedHandler PageRemoved {
			add {
				this.AddSignalHandler ("page-removed", value, typeof (Gtk.PageRemovedArgs));
			}
			remove {
				this.RemoveSignalHandler ("page-removed", value);
			}
		}

		[GLib.Signal("page-added")]
		public event Gtk.PageAddedHandler PageAdded {
			add {
				this.AddSignalHandler ("page-added", value, typeof (Gtk.PageAddedArgs));
			}
			remove {
				this.RemoveSignalHandler ("page-added", value);
			}
		}

		[GLib.Signal("move-focus-out")]
		public event Gtk.MoveFocusOutHandler MoveFocusOut {
			add {
				this.AddSignalHandler ("move-focus-out", value, typeof (Gtk.MoveFocusOutArgs));
			}
			remove {
				this.RemoveSignalHandler ("move-focus-out", value);
			}
		}

		[GLib.Signal("select-page")]
		public event Gtk.SelectPageHandler SelectPage {
			add {
				this.AddSignalHandler ("select-page", value, typeof (Gtk.SelectPageArgs));
			}
			remove {
				this.RemoveSignalHandler ("select-page", value);
			}
		}

		[GLib.Signal("focus-tab")]
		public event Gtk.FocusTabHandler FocusTab {
			add {
				this.AddSignalHandler ("focus-tab", value, typeof (Gtk.FocusTabArgs));
			}
			remove {
				this.RemoveSignalHandler ("focus-tab", value);
			}
		}

		[GLib.Signal("create-window")]
		public event Gtk.CreateWindowHandler CreateWindow {
			add {
				this.AddSignalHandler ("create-window", value, typeof (Gtk.CreateWindowArgs));
			}
			remove {
				this.RemoveSignalHandler ("create-window", value);
			}
		}

		[GLib.Signal("reorder-tab")]
		public event Gtk.ReorderTabHandler ReorderTab {
			add {
				this.AddSignalHandler ("reorder-tab", value, typeof (Gtk.ReorderTabArgs));
			}
			remove {
				this.RemoveSignalHandler ("reorder-tab", value);
			}
		}

		[GLib.Signal("switch-page")]
		public event Gtk.SwitchPageHandler SwitchPage {
			add {
				this.AddSignalHandler ("switch-page", value, typeof (Gtk.SwitchPageArgs));
			}
			remove {
				this.RemoveSignalHandler ("switch-page", value);
			}
		}

		[GLib.Signal("page-reordered")]
		public event Gtk.PageReorderedHandler PageReordered {
			add {
				this.AddSignalHandler ("page-reordered", value, typeof (Gtk.PageReorderedArgs));
			}
			remove {
				this.RemoveSignalHandler ("page-reordered", value);
			}
		}

		static SwitchPageNativeDelegate SwitchPage_cb_delegate;
		static SwitchPageNativeDelegate SwitchPageVMCallback {
			get {
				if (SwitchPage_cb_delegate == null)
					SwitchPage_cb_delegate = new SwitchPageNativeDelegate (SwitchPage_cb);
				return SwitchPage_cb_delegate;
			}
		}

		static void OverrideSwitchPage (GLib.GType gtype)
		{
			OverrideSwitchPage (gtype, SwitchPageVMCallback);
		}

		static void OverrideSwitchPage (GLib.GType gtype, SwitchPageNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("switch_page"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void SwitchPageNativeDelegate (IntPtr inst, IntPtr page, uint page_num);

		static void SwitchPage_cb (IntPtr inst, IntPtr page, uint page_num)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				__obj.OnSwitchPage (GLib.Object.GetObject(page) as Gtk.Widget, page_num);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverrideSwitchPage")]
		protected virtual void OnSwitchPage (Gtk.Widget page, uint page_num)
		{
			InternalSwitchPage (page, page_num);
		}

		private void InternalSwitchPage (Gtk.Widget page, uint page_num)
		{
			SwitchPageNativeDelegate unmanaged = class_abi.BaseOverride<SwitchPageNativeDelegate>(this.LookupGType(), "switch_page");
			if (unmanaged == null) return;

			unmanaged (this.Handle, page == null ? IntPtr.Zero : page.Handle, page_num);
		}

		static SelectPageNativeDelegate SelectPage_cb_delegate;
		static SelectPageNativeDelegate SelectPageVMCallback {
			get {
				if (SelectPage_cb_delegate == null)
					SelectPage_cb_delegate = new SelectPageNativeDelegate (SelectPage_cb);
				return SelectPage_cb_delegate;
			}
		}

		static void OverrideSelectPage (GLib.GType gtype)
		{
			OverrideSelectPage (gtype, SelectPageVMCallback);
		}

		static void OverrideSelectPage (GLib.GType gtype, SelectPageNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("select_page"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool SelectPageNativeDelegate (IntPtr inst, bool move_focus);

		static bool SelectPage_cb (IntPtr inst, bool move_focus)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				bool __result;
				__result = __obj.OnSelectPage (move_focus);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverrideSelectPage")]
		protected virtual bool OnSelectPage (bool move_focus)
		{
			return InternalSelectPage (move_focus);
		}

		private bool InternalSelectPage (bool move_focus)
		{
			SelectPageNativeDelegate unmanaged = class_abi.BaseOverride<SelectPageNativeDelegate>(this.LookupGType(), "select_page");
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle, move_focus);
			return __result;
		}

		static FocusTabNativeDelegate FocusTab_cb_delegate;
		static FocusTabNativeDelegate FocusTabVMCallback {
			get {
				if (FocusTab_cb_delegate == null)
					FocusTab_cb_delegate = new FocusTabNativeDelegate (FocusTab_cb);
				return FocusTab_cb_delegate;
			}
		}

		static void OverrideFocusTab (GLib.GType gtype)
		{
			OverrideFocusTab (gtype, FocusTabVMCallback);
		}

		static void OverrideFocusTab (GLib.GType gtype, FocusTabNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("focus_tab"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool FocusTabNativeDelegate (IntPtr inst, int type);

		static bool FocusTab_cb (IntPtr inst, int type)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				bool __result;
				__result = __obj.OnFocusTab ((Gtk.NotebookTab) type);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverrideFocusTab")]
		protected virtual bool OnFocusTab (Gtk.NotebookTab type)
		{
			return InternalFocusTab (type);
		}

		private bool InternalFocusTab (Gtk.NotebookTab type)
		{
			FocusTabNativeDelegate unmanaged = class_abi.BaseOverride<FocusTabNativeDelegate>(this.LookupGType(), "focus_tab");
			if (unmanaged == null) return false;

			bool __result = unmanaged (this.Handle, (int) type);
			return __result;
		}

		static ChangeCurrentPageNativeDelegate ChangeCurrentPage_cb_delegate;
		static ChangeCurrentPageNativeDelegate ChangeCurrentPageVMCallback {
			get {
				if (ChangeCurrentPage_cb_delegate == null)
					ChangeCurrentPage_cb_delegate = new ChangeCurrentPageNativeDelegate (ChangeCurrentPage_cb);
				return ChangeCurrentPage_cb_delegate;
			}
		}

		static void OverrideChangeCurrentPage (GLib.GType gtype)
		{
			OverrideChangeCurrentPage (gtype, ChangeCurrentPageVMCallback);
		}

		static void OverrideChangeCurrentPage (GLib.GType gtype, ChangeCurrentPageNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("change_current_page"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ChangeCurrentPageNativeDelegate (IntPtr inst, int offset);

		static void ChangeCurrentPage_cb (IntPtr inst, int offset)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				__obj.OnChangeCurrentPage (offset);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverrideChangeCurrentPage")]
		protected virtual void OnChangeCurrentPage (int offset)
		{
			InternalChangeCurrentPage (offset);
		}

		private void InternalChangeCurrentPage (int offset)
		{
			ChangeCurrentPageNativeDelegate unmanaged = class_abi.BaseOverride<ChangeCurrentPageNativeDelegate>(this.LookupGType(), "change_current_page");
			if (unmanaged == null) return;

			unmanaged (this.Handle, offset);
		}

		static MoveFocusOutNativeDelegate MoveFocusOut_cb_delegate;
		static MoveFocusOutNativeDelegate MoveFocusOutVMCallback {
			get {
				if (MoveFocusOut_cb_delegate == null)
					MoveFocusOut_cb_delegate = new MoveFocusOutNativeDelegate (MoveFocusOut_cb);
				return MoveFocusOut_cb_delegate;
			}
		}

		static void OverrideMoveFocusOut (GLib.GType gtype)
		{
			OverrideMoveFocusOut (gtype, MoveFocusOutVMCallback);
		}

		static void OverrideMoveFocusOut (GLib.GType gtype, MoveFocusOutNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("move_focus_out"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void MoveFocusOutNativeDelegate (IntPtr inst, int direction);

		static void MoveFocusOut_cb (IntPtr inst, int direction)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				__obj.OnMoveFocusOut ((Gtk.DirectionType) direction);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverrideMoveFocusOut")]
		protected virtual void OnMoveFocusOut (Gtk.DirectionType direction)
		{
			InternalMoveFocusOut (direction);
		}

		private void InternalMoveFocusOut (Gtk.DirectionType direction)
		{
			MoveFocusOutNativeDelegate unmanaged = class_abi.BaseOverride<MoveFocusOutNativeDelegate>(this.LookupGType(), "move_focus_out");
			if (unmanaged == null) return;

			unmanaged (this.Handle, (int) direction);
		}

		static ReorderTabNativeDelegate ReorderTab_cb_delegate;
		static ReorderTabNativeDelegate ReorderTabVMCallback {
			get {
				if (ReorderTab_cb_delegate == null)
					ReorderTab_cb_delegate = new ReorderTabNativeDelegate (ReorderTab_cb);
				return ReorderTab_cb_delegate;
			}
		}

		static void OverrideReorderTab (GLib.GType gtype)
		{
			OverrideReorderTab (gtype, ReorderTabVMCallback);
		}

		static void OverrideReorderTab (GLib.GType gtype, ReorderTabNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reorder_tab"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ReorderTabNativeDelegate (IntPtr inst, int direction, bool move_to_last);

		static void ReorderTab_cb (IntPtr inst, int direction, bool move_to_last)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				__obj.OnReorderTab ((Gtk.DirectionType) direction, move_to_last);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverrideReorderTab")]
		protected virtual void OnReorderTab (Gtk.DirectionType direction, bool move_to_last)
		{
			InternalReorderTab (direction, move_to_last);
		}

		private void InternalReorderTab (Gtk.DirectionType direction, bool move_to_last)
		{
			ReorderTabNativeDelegate unmanaged = class_abi.BaseOverride<ReorderTabNativeDelegate>(this.LookupGType(), "reorder_tab");
			if (unmanaged == null) return;

			unmanaged (this.Handle, (int) direction, move_to_last);
		}

		static InsertPageNativeDelegate InsertPage_cb_delegate;
		static InsertPageNativeDelegate InsertPageVMCallback {
			get {
				if (InsertPage_cb_delegate == null)
					InsertPage_cb_delegate = new InsertPageNativeDelegate (InsertPage_cb);
				return InsertPage_cb_delegate;
			}
		}

		static void OverrideInsertPage (GLib.GType gtype)
		{
			OverrideInsertPage (gtype, InsertPageVMCallback);
		}

		static void OverrideInsertPage (GLib.GType gtype, InsertPageNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("insert_page"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int InsertPageNativeDelegate (IntPtr inst, IntPtr child, IntPtr tab_label, IntPtr menu_label, int position);

		static int InsertPage_cb (IntPtr inst, IntPtr child, IntPtr tab_label, IntPtr menu_label, int position)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				int __result;
				__result = __obj.OnInsertPage (GLib.Object.GetObject(child) as Gtk.Widget, GLib.Object.GetObject(tab_label) as Gtk.Widget, GLib.Object.GetObject(menu_label) as Gtk.Widget, position);
				return __result;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverrideInsertPage")]
		protected virtual int OnInsertPage (Gtk.Widget child, Gtk.Widget tab_label, Gtk.Widget menu_label, int position)
		{
			return InternalInsertPage (child, tab_label, menu_label, position);
		}

		private int InternalInsertPage (Gtk.Widget child, Gtk.Widget tab_label, Gtk.Widget menu_label, int position)
		{
			InsertPageNativeDelegate unmanaged = class_abi.BaseOverride<InsertPageNativeDelegate>(this.LookupGType(), "insert_page");
			if (unmanaged == null) return 0;

			int __result = unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle, tab_label == null ? IntPtr.Zero : tab_label.Handle, menu_label == null ? IntPtr.Zero : menu_label.Handle, position);
			return __result;
		}

		static CreateWindowNativeDelegate CreateWindow_cb_delegate;
		static CreateWindowNativeDelegate CreateWindowVMCallback {
			get {
				if (CreateWindow_cb_delegate == null)
					CreateWindow_cb_delegate = new CreateWindowNativeDelegate (CreateWindow_cb);
				return CreateWindow_cb_delegate;
			}
		}

		static void OverrideCreateWindow (GLib.GType gtype)
		{
			OverrideCreateWindow (gtype, CreateWindowVMCallback);
		}

		static void OverrideCreateWindow (GLib.GType gtype, CreateWindowNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_window"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr CreateWindowNativeDelegate (IntPtr inst, IntPtr page, int x, int y);

		static IntPtr CreateWindow_cb (IntPtr inst, IntPtr page, int x, int y)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				Gtk.Notebook __result;
				__result = __obj.OnCreateWindow (GLib.Object.GetObject(page) as Gtk.Widget, x, y);
				return __result == null ? IntPtr.Zero : __result.Handle;
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, true);
				// NOTREACHED: above call does not return.
				throw;
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverrideCreateWindow")]
		protected virtual Gtk.Notebook OnCreateWindow (Gtk.Widget page, int x, int y)
		{
			return InternalCreateWindow (page, x, y);
		}

		private Gtk.Notebook InternalCreateWindow (Gtk.Widget page, int x, int y)
		{
			CreateWindowNativeDelegate unmanaged = class_abi.BaseOverride<CreateWindowNativeDelegate>(this.LookupGType(), "create_window");
			if (unmanaged == null) return null;

			IntPtr __result = unmanaged (this.Handle, page == null ? IntPtr.Zero : page.Handle, x, y);
			return GLib.Object.GetObject(__result) as Gtk.Notebook;
		}

		static PageReorderedNativeDelegate PageReordered_cb_delegate;
		static PageReorderedNativeDelegate PageReorderedVMCallback {
			get {
				if (PageReordered_cb_delegate == null)
					PageReordered_cb_delegate = new PageReorderedNativeDelegate (PageReordered_cb);
				return PageReordered_cb_delegate;
			}
		}

		static void OverridePageReordered (GLib.GType gtype)
		{
			OverridePageReordered (gtype, PageReorderedVMCallback);
		}

		static void OverridePageReordered (GLib.GType gtype, PageReorderedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("page_reordered"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void PageReorderedNativeDelegate (IntPtr inst, IntPtr child, uint page_num);

		static void PageReordered_cb (IntPtr inst, IntPtr child, uint page_num)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				__obj.OnPageReordered (GLib.Object.GetObject(child) as Gtk.Widget, page_num);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverridePageReordered")]
		protected virtual void OnPageReordered (Gtk.Widget child, uint page_num)
		{
			InternalPageReordered (child, page_num);
		}

		private void InternalPageReordered (Gtk.Widget child, uint page_num)
		{
			PageReorderedNativeDelegate unmanaged = class_abi.BaseOverride<PageReorderedNativeDelegate>(this.LookupGType(), "page_reordered");
			if (unmanaged == null) return;

			unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle, page_num);
		}

		static PageRemovedNativeDelegate PageRemoved_cb_delegate;
		static PageRemovedNativeDelegate PageRemovedVMCallback {
			get {
				if (PageRemoved_cb_delegate == null)
					PageRemoved_cb_delegate = new PageRemovedNativeDelegate (PageRemoved_cb);
				return PageRemoved_cb_delegate;
			}
		}

		static void OverridePageRemoved (GLib.GType gtype)
		{
			OverridePageRemoved (gtype, PageRemovedVMCallback);
		}

		static void OverridePageRemoved (GLib.GType gtype, PageRemovedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("page_removed"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void PageRemovedNativeDelegate (IntPtr inst, IntPtr child, uint page_num);

		static void PageRemoved_cb (IntPtr inst, IntPtr child, uint page_num)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				__obj.OnPageRemoved (GLib.Object.GetObject(child) as Gtk.Widget, page_num);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverridePageRemoved")]
		protected virtual void OnPageRemoved (Gtk.Widget child, uint page_num)
		{
			InternalPageRemoved (child, page_num);
		}

		private void InternalPageRemoved (Gtk.Widget child, uint page_num)
		{
			PageRemovedNativeDelegate unmanaged = class_abi.BaseOverride<PageRemovedNativeDelegate>(this.LookupGType(), "page_removed");
			if (unmanaged == null) return;

			unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle, page_num);
		}

		static PageAddedNativeDelegate PageAdded_cb_delegate;
		static PageAddedNativeDelegate PageAddedVMCallback {
			get {
				if (PageAdded_cb_delegate == null)
					PageAdded_cb_delegate = new PageAddedNativeDelegate (PageAdded_cb);
				return PageAdded_cb_delegate;
			}
		}

		static void OverridePageAdded (GLib.GType gtype)
		{
			OverridePageAdded (gtype, PageAddedVMCallback);
		}

		static void OverridePageAdded (GLib.GType gtype, PageAddedNativeDelegate callback)
		{
			unsafe {
				IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("page_added"));
				*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void PageAddedNativeDelegate (IntPtr inst, IntPtr child, uint page_num);

		static void PageAdded_cb (IntPtr inst, IntPtr child, uint page_num)
		{
			try {
				Notebook __obj = GLib.Object.GetObject (inst, false) as Notebook;
				__obj.OnPageAdded (GLib.Object.GetObject(child) as Gtk.Widget, page_num);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.Notebook), ConnectionMethod="OverridePageAdded")]
		protected virtual void OnPageAdded (Gtk.Widget child, uint page_num)
		{
			InternalPageAdded (child, page_num);
		}

		private void InternalPageAdded (Gtk.Widget child, uint page_num)
		{
			PageAddedNativeDelegate unmanaged = class_abi.BaseOverride<PageAddedNativeDelegate>(this.LookupGType(), "page_added");
			if (unmanaged == null) return;

			unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle, page_num);
		}


		// 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("switch_page"
							, Gtk.Container.class_abi.Fields
							, (uint) sizeof( IntPtr ) // switch_page
							, null
							, "select_page"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("select_page"
							, -1
							, (uint) sizeof( IntPtr ) // select_page
							, "switch_page"
							, "focus_tab"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("focus_tab"
							, -1
							, (uint) sizeof( IntPtr ) // focus_tab
							, "select_page"
							, "change_current_page"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("change_current_page"
							, -1
							, (uint) sizeof( IntPtr ) // change_current_page
							, "focus_tab"
							, "move_focus_out"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("move_focus_out"
							, -1
							, (uint) sizeof( IntPtr ) // move_focus_out
							, "change_current_page"
							, "reorder_tab"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("reorder_tab"
							, -1
							, (uint) sizeof( IntPtr ) // reorder_tab
							, "move_focus_out"
							, "insert_page"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("insert_page"
							, -1
							, (uint) sizeof( IntPtr ) // insert_page
							, "reorder_tab"
							, "create_window"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("create_window"
							, -1
							, (uint) sizeof( IntPtr ) // create_window
							, "insert_page"
							, "page_reordered"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("page_reordered"
							, -1
							, (uint) sizeof( IntPtr ) // page_reordered
							, "create_window"
							, "page_removed"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("page_removed"
							, -1
							, (uint) sizeof( IntPtr ) // page_removed
							, "page_reordered"
							, "page_added"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("page_added"
							, -1
							, (uint) sizeof( IntPtr ) // page_added
							, "page_removed"
							, "_gtk_reserved1"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved1"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved1
							, "page_added"
							, "_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 int d_gtk_notebook_append_page(IntPtr raw, IntPtr child, IntPtr tab_label);
		static d_gtk_notebook_append_page gtk_notebook_append_page = FuncLoader.LoadFunction<d_gtk_notebook_append_page>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_notebook_append_page"));

		public int AppendPage(Gtk.Widget child, Gtk.Widget tab_label) {
			int raw_ret = gtk_notebook_append_page(Handle, child == null ? IntPtr.Zero : child.Handle, tab_label == null ? IntPtr.Zero : tab_label.Handle);
			int ret = raw_ret;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int d_gtk_notebook_append_page_menu(IntPtr raw, IntPtr child, IntPtr tab_label, IntPtr menu_label);
		static d_gtk_notebook_append_page_menu gtk_notebook_append_page_menu = FuncLoader.LoadFunction<d_gtk_notebook_append_page_menu>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_notebook_append_page_menu"));

		public int AppendPageMenu(Gtk.Widget child, Gtk.Widget tab_label, Gtk.Widget menu_label) {
			int raw_ret = gtk_notebook_append_page_menu(Handle, child == null ? IntPtr.Zero : child.Handle, tab_label == null ? IntPtr.Zero : tab_label.Handle, menu_label == null ? IntPtr.Zero : menu_label.Handle);
			int ret = raw_ret;
			return ret;
		}

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

		public void DetachTab(Gtk.Widget child) {
			gtk_notebook_detach_tab(Handle, child == null ? IntPtr.Zero : child.Handle);
		}

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

		public Gtk.Widget GetActionWidget(Gtk.PackType pack_type) {
			IntPtr raw_ret = gtk_notebook_get_action_widget(Handle, (int) pack_type);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			return ret;
		}

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

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

		public int CurrentPage { 
			get {
				int raw_ret = gtk_notebook_get_current_page(Handle);
				int ret = raw_ret;
				return ret;
			}
			set {
				gtk_notebook_set_current_page(Handle, value);
			}
		}

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

		public Gtk.Widget GetMenuLabel(Gtk.Widget child) {
			IntPtr raw_ret = gtk_notebook_get_menu_label(Handle, child == null ? IntPtr.Zero : child.Handle);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			return ret;
		}

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

		public string GetMenuLabelText(Gtk.Widget child) {
			IntPtr raw_ret = gtk_notebook_get_menu_label_text(Handle, child == null ? IntPtr.Zero : child.Handle);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			return ret;
		}

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

		public int NPages { 
			get {
				int raw_ret = gtk_notebook_get_n_pages(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

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

		public Gtk.Widget GetNthPage(int page_num) {
			IntPtr raw_ret = gtk_notebook_get_nth_page(Handle, page_num);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			return ret;
		}

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

		public bool GetTabDetachable(Gtk.Widget child) {
			bool raw_ret = gtk_notebook_get_tab_detachable(Handle, child == null ? IntPtr.Zero : child.Handle);
			bool ret = raw_ret;
			return ret;
		}

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

		[Obsolete]
		public ushort TabHborder { 
			get {
				ushort raw_ret = gtk_notebook_get_tab_hborder(Handle);
				ushort ret = raw_ret;
				return ret;
			}
		}

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

		public Gtk.Widget GetTabLabel(Gtk.Widget child) {
			IntPtr raw_ret = gtk_notebook_get_tab_label(Handle, child == null ? IntPtr.Zero : child.Handle);
			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
			return ret;
		}

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

		public string GetTabLabelText(Gtk.Widget child) {
			IntPtr raw_ret = gtk_notebook_get_tab_label_text(Handle, child == null ? IntPtr.Zero : child.Handle);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			return ret;
		}

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

		public bool GetTabReorderable(Gtk.Widget child) {
			bool raw_ret = gtk_notebook_get_tab_reorderable(Handle, child == null ? IntPtr.Zero : child.Handle);
			bool ret = raw_ret;
			return ret;
		}

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

		[Obsolete]
		public ushort TabVborder { 
			get {
				ushort raw_ret = gtk_notebook_get_tab_vborder(Handle);
				ushort ret = raw_ret;
				return ret;
			}
		}

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

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

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

		public int InsertPage(Gtk.Widget child, Gtk.Widget tab_label, int position) {
			int raw_ret = gtk_notebook_insert_page(Handle, child == null ? IntPtr.Zero : child.Handle, tab_label == null ? IntPtr.Zero : tab_label.Handle, position);
			int ret = raw_ret;
			return ret;
		}

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

		public int InsertPageMenu(Gtk.Widget child, Gtk.Widget tab_label, Gtk.Widget menu_label, int position) {
			int raw_ret = gtk_notebook_insert_page_menu(Handle, child == null ? IntPtr.Zero : child.Handle, tab_label == null ? IntPtr.Zero : tab_label.Handle, menu_label == null ? IntPtr.Zero : menu_label.Handle, position);
			int ret = raw_ret;
			return ret;
		}

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

		public void NextPage() {
			gtk_notebook_next_page(Handle);
		}

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

		public void PopupDisable() {
			gtk_notebook_popup_disable(Handle);
		}

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

		public void PopupEnable() {
			gtk_notebook_popup_enable(Handle);
		}

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

		public int PrependPage(Gtk.Widget child, Gtk.Widget tab_label) {
			int raw_ret = gtk_notebook_prepend_page(Handle, child == null ? IntPtr.Zero : child.Handle, tab_label == null ? IntPtr.Zero : tab_label.Handle);
			int ret = raw_ret;
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate int d_gtk_notebook_prepend_page_menu(IntPtr raw, IntPtr child, IntPtr tab_label, IntPtr menu_label);
		static d_gtk_notebook_prepend_page_menu gtk_notebook_prepend_page_menu = FuncLoader.LoadFunction<d_gtk_notebook_prepend_page_menu>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_notebook_prepend_page_menu"));

		public int PrependPageMenu(Gtk.Widget child, Gtk.Widget tab_label, Gtk.Widget menu_label) {
			int raw_ret = gtk_notebook_prepend_page_menu(Handle, child == null ? IntPtr.Zero : child.Handle, tab_label == null ? IntPtr.Zero : tab_label.Handle, menu_label == null ? IntPtr.Zero : menu_label.Handle);
			int ret = raw_ret;
			return ret;
		}

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

		public void PrevPage() {
			gtk_notebook_prev_page(Handle);
		}

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

		public void RemovePage(int page_num) {
			gtk_notebook_remove_page(Handle, page_num);
		}

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

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

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

		public void SetActionWidget(Gtk.Widget widget, Gtk.PackType pack_type) {
			gtk_notebook_set_action_widget(Handle, widget == null ? IntPtr.Zero : widget.Handle, (int) pack_type);
		}

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

		public void SetMenuLabel(Gtk.Widget child, Gtk.Widget menu_label) {
			gtk_notebook_set_menu_label(Handle, child == null ? IntPtr.Zero : child.Handle, menu_label == null ? IntPtr.Zero : menu_label.Handle);
		}

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

		public void SetMenuLabelText(Gtk.Widget child, string menu_text) {
			IntPtr native_menu_text = GLib.Marshaller.StringToPtrGStrdup (menu_text);
			gtk_notebook_set_menu_label_text(Handle, child == null ? IntPtr.Zero : child.Handle, native_menu_text);
			GLib.Marshaller.Free (native_menu_text);
		}

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

		public void SetTabDetachable(Gtk.Widget child, bool detachable) {
			gtk_notebook_set_tab_detachable(Handle, child == null ? IntPtr.Zero : child.Handle, detachable);
		}

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

		public void SetTabLabel(Gtk.Widget child, Gtk.Widget tab_label) {
			gtk_notebook_set_tab_label(Handle, child == null ? IntPtr.Zero : child.Handle, tab_label == null ? IntPtr.Zero : tab_label.Handle);
		}

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

		public void SetTabLabelText(Gtk.Widget child, string tab_text) {
			IntPtr native_tab_text = GLib.Marshaller.StringToPtrGStrdup (tab_text);
			gtk_notebook_set_tab_label_text(Handle, child == null ? IntPtr.Zero : child.Handle, native_tab_text);
			GLib.Marshaller.Free (native_tab_text);
		}

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

		public void SetTabReorderable(Gtk.Widget child, bool reorderable) {
			gtk_notebook_set_tab_reorderable(Handle, child == null ? IntPtr.Zero : child.Handle, reorderable);
		}


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