// 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 ScrolledWindow : Gtk.Bin {

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

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

		public ScrolledWindow (Gtk.Adjustment hadjustment, Gtk.Adjustment vadjustment) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (ScrolledWindow)) {
				var vals = new List<GLib.Value> ();
				var names = new List<string> ();
				if (hadjustment != null) {
					names.Add ("hadjustment");
					vals.Add (new GLib.Value (hadjustment));
				}
				if (vadjustment != null) {
					names.Add ("vadjustment");
					vals.Add (new GLib.Value (vadjustment));
				}
				CreateNativeObject (names.ToArray (), vals.ToArray ());
				return;
			}
			Raw = gtk_scrolled_window_new(hadjustment == null ? IntPtr.Zero : hadjustment.Handle, vadjustment == null ? IntPtr.Zero : vadjustment.Handle);
		}

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

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

		[GLib.Property ("hadjustment")]
		public Gtk.Adjustment Hadjustment {
			get  {
				IntPtr raw_ret = gtk_scrolled_window_get_hadjustment(Handle);
				Gtk.Adjustment ret = GLib.Object.GetObject(raw_ret) as Gtk.Adjustment;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_hadjustment(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

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

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

		[GLib.Property ("vadjustment")]
		public Gtk.Adjustment Vadjustment {
			get  {
				IntPtr raw_ret = gtk_scrolled_window_get_vadjustment(Handle);
				Gtk.Adjustment ret = GLib.Object.GetObject(raw_ret) as Gtk.Adjustment;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_vadjustment(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[GLib.Property ("hscrollbar-policy")]
		public Gtk.PolicyType HscrollbarPolicy {
			get {
				GLib.Value val = GetProperty ("hscrollbar-policy");
				Gtk.PolicyType ret = (Gtk.PolicyType) (Enum) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value((Enum) value);
				SetProperty("hscrollbar-policy", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("vscrollbar-policy")]
		public Gtk.PolicyType VscrollbarPolicy {
			get {
				GLib.Value val = GetProperty ("vscrollbar-policy");
				Gtk.PolicyType ret = (Gtk.PolicyType) (Enum) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value((Enum) value);
				SetProperty("vscrollbar-policy", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("window-placement")]
		public Gtk.CornerType WindowPlacement {
			get {
				GLib.Value val = GetProperty ("window-placement");
				Gtk.CornerType ret = (Gtk.CornerType) (Enum) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value((Enum) value);
				SetProperty("window-placement", val);
				val.Dispose ();
			}
		}

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

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

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

		[GLib.Property ("shadow-type")]
		public Gtk.ShadowType ShadowType {
			get  {
				int raw_ret = gtk_scrolled_window_get_shadow_type(Handle);
				Gtk.ShadowType ret = (Gtk.ShadowType) raw_ret;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_shadow_type(Handle, (int) value);
			}
		}

		[Obsolete]
		public bool ScrollbarsWithinBevel {
			get {
				var val = (bool)StyleGetProperty("scrollbars-within-bevel");
				return val;
			}
		}

		public int ScrollbarSpacing {
			get {
				var val = (int)StyleGetProperty("scrollbar-spacing");
				return val;
			}
		}

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

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

		[GLib.Property ("min-content-width")]
		public int MinContentWidth {
			get  {
				int raw_ret = gtk_scrolled_window_get_min_content_width(Handle);
				int ret = raw_ret;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_min_content_width(Handle, value);
			}
		}

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

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

		[GLib.Property ("min-content-height")]
		public int MinContentHeight {
			get  {
				int raw_ret = gtk_scrolled_window_get_min_content_height(Handle);
				int ret = raw_ret;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_min_content_height(Handle, value);
			}
		}

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

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

		[GLib.Property ("kinetic-scrolling")]
		public bool KineticScrolling {
			get  {
				bool raw_ret = gtk_scrolled_window_get_kinetic_scrolling(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_kinetic_scrolling(Handle, value);
			}
		}

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

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

		[GLib.Property ("overlay-scrolling")]
		public bool OverlayScrolling {
			get  {
				bool raw_ret = gtk_scrolled_window_get_overlay_scrolling(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_overlay_scrolling(Handle, value);
			}
		}

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

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

		[GLib.Property ("max-content-width")]
		public int MaxContentWidth {
			get  {
				int raw_ret = gtk_scrolled_window_get_max_content_width(Handle);
				int ret = raw_ret;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_max_content_width(Handle, value);
			}
		}

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

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

		[GLib.Property ("max-content-height")]
		public int MaxContentHeight {
			get  {
				int raw_ret = gtk_scrolled_window_get_max_content_height(Handle);
				int ret = raw_ret;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_max_content_height(Handle, value);
			}
		}

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

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

		[GLib.Property ("propagate-natural-width")]
		public bool PropagateNaturalWidth {
			get  {
				bool raw_ret = gtk_scrolled_window_get_propagate_natural_width(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_propagate_natural_width(Handle, value);
			}
		}

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

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

		[GLib.Property ("propagate-natural-height")]
		public bool PropagateNaturalHeight {
			get  {
				bool raw_ret = gtk_scrolled_window_get_propagate_natural_height(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set  {
				gtk_scrolled_window_set_propagate_natural_height(Handle, value);
			}
		}

		[GLib.Signal("edge-overshot")]
		public event Gtk.EdgeOvershotHandler EdgeOvershot {
			add {
				this.AddSignalHandler ("edge-overshot", value, typeof (Gtk.EdgeOvershotArgs));
			}
			remove {
				this.RemoveSignalHandler ("edge-overshot", 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("scroll-child")]
		public event Gtk.ScrollChildHandler ScrollChild {
			add {
				this.AddSignalHandler ("scroll-child", value, typeof (Gtk.ScrollChildArgs));
			}
			remove {
				this.RemoveSignalHandler ("scroll-child", value);
			}
		}

		[GLib.Signal("edge-reached")]
		public event Gtk.EdgeReachedHandler EdgeReached {
			add {
				this.AddSignalHandler ("edge-reached", value, typeof (Gtk.EdgeReachedArgs));
			}
			remove {
				this.RemoveSignalHandler ("edge-reached", value);
			}
		}

		static EdgeOvershotNativeDelegate EdgeOvershot_cb_delegate;
		static EdgeOvershotNativeDelegate EdgeOvershotVMCallback {
			get {
				if (EdgeOvershot_cb_delegate == null)
					EdgeOvershot_cb_delegate = new EdgeOvershotNativeDelegate (EdgeOvershot_cb);
				return EdgeOvershot_cb_delegate;
			}
		}

		static void OverrideEdgeOvershot (GLib.GType gtype)
		{
			OverrideEdgeOvershot (gtype, EdgeOvershotVMCallback);
		}

		static void OverrideEdgeOvershot (GLib.GType gtype, EdgeOvershotNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "edge-overshot", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void EdgeOvershotNativeDelegate (IntPtr inst, int p0);

		static void EdgeOvershot_cb (IntPtr inst, int p0)
		{
			try {
				ScrolledWindow __obj = GLib.Object.GetObject (inst, false) as ScrolledWindow;
				__obj.OnEdgeOvershot ((Gtk.PositionType) p0);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ScrolledWindow), ConnectionMethod="OverrideEdgeOvershot")]
		protected virtual void OnEdgeOvershot (Gtk.PositionType p0)
		{
			InternalEdgeOvershot (p0);
		}

		private void InternalEdgeOvershot (Gtk.PositionType p0)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (p0);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static EdgeReachedNativeDelegate EdgeReached_cb_delegate;
		static EdgeReachedNativeDelegate EdgeReachedVMCallback {
			get {
				if (EdgeReached_cb_delegate == null)
					EdgeReached_cb_delegate = new EdgeReachedNativeDelegate (EdgeReached_cb);
				return EdgeReached_cb_delegate;
			}
		}

		static void OverrideEdgeReached (GLib.GType gtype)
		{
			OverrideEdgeReached (gtype, EdgeReachedVMCallback);
		}

		static void OverrideEdgeReached (GLib.GType gtype, EdgeReachedNativeDelegate callback)
		{
			OverrideVirtualMethod (gtype, "edge-reached", callback);
		}
		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void EdgeReachedNativeDelegate (IntPtr inst, int p0);

		static void EdgeReached_cb (IntPtr inst, int p0)
		{
			try {
				ScrolledWindow __obj = GLib.Object.GetObject (inst, false) as ScrolledWindow;
				__obj.OnEdgeReached ((Gtk.PositionType) p0);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ScrolledWindow), ConnectionMethod="OverrideEdgeReached")]
		protected virtual void OnEdgeReached (Gtk.PositionType p0)
		{
			InternalEdgeReached (p0);
		}

		private void InternalEdgeReached (Gtk.PositionType p0)
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
			GLib.Value[] vals = new GLib.Value [2];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			vals [1] = new GLib.Value (p0);
			inst_and_params.Append (vals [1]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		static ScrollChildNativeDelegate ScrollChild_cb_delegate;
		static ScrollChildNativeDelegate ScrollChildVMCallback {
			get {
				if (ScrollChild_cb_delegate == null)
					ScrollChild_cb_delegate = new ScrollChildNativeDelegate (ScrollChild_cb);
				return ScrollChild_cb_delegate;
			}
		}

		static void OverrideScrollChild (GLib.GType gtype)
		{
			OverrideScrollChild (gtype, ScrollChildVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void ScrollChildNativeDelegate (IntPtr inst, int scroll, bool horizontal);

		static void ScrollChild_cb (IntPtr inst, int scroll, bool horizontal)
		{
			try {
				ScrolledWindow __obj = GLib.Object.GetObject (inst, false) as ScrolledWindow;
				__obj.OnScrollChild ((Gtk.ScrollType) scroll, horizontal);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ScrolledWindow), ConnectionMethod="OverrideScrollChild")]
		protected virtual void OnScrollChild (Gtk.ScrollType scroll, bool horizontal)
		{
			InternalScrollChild (scroll, horizontal);
		}

		private void InternalScrollChild (Gtk.ScrollType scroll, bool horizontal)
		{
			ScrollChildNativeDelegate unmanaged = class_abi.BaseOverride<ScrollChildNativeDelegate>(this.LookupGType(), "scroll_child");
			if (unmanaged == null) return;

			unmanaged (this.Handle, (int) scroll, horizontal);
		}

		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 {
				ScrolledWindow __obj = GLib.Object.GetObject (inst, false) as ScrolledWindow;
				__obj.OnMoveFocusOut ((Gtk.DirectionType) direction);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ScrolledWindow), 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);
		}


		// 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("scrollbar_spacing"
							, Gtk.Bin.class_abi.Fields
							, (uint) sizeof( int ) // scrollbar_spacing
							, null
							, "scroll_child"
							, (long) Marshal.OffsetOf<GtkScrolledWindow_scrollbar_spacingAlign>("scrollbar_spacing")
							, 0
							),
						new GLib.AbiField("scroll_child"
							, -1
							, (uint) sizeof( IntPtr ) // scroll_child
							, "scrollbar_spacing"
							, "move_focus_out"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("move_focus_out"
							, -1
							, (uint) sizeof( IntPtr ) // move_focus_out
							, "scroll_child"
							, "_gtk_reserved1"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("_gtk_reserved1"
							, -1
							, (uint) sizeof( IntPtr ) // _gtk_reserved1
							, "move_focus_out"
							, "_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;
			}
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct GtkScrolledWindow_scrollbar_spacingAlign
		{
			sbyte f1;
			private int scrollbar_spacing;
		}


		// End of the ABI representation.

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

		[Obsolete]
		public void AddWithViewport(Gtk.Widget child) {
			gtk_scrolled_window_add_with_viewport(Handle, child == null ? IntPtr.Zero : child.Handle);
		}

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

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

		public bool CaptureButtonPress { 
			get {
				bool raw_ret = gtk_scrolled_window_get_capture_button_press(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				gtk_scrolled_window_set_capture_button_press(Handle, value);
			}
		}

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

		public Gtk.Widget HScrollbar { 
			get {
				IntPtr raw_ret = gtk_scrolled_window_get_hscrollbar(Handle);
				Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
				return ret;
			}
		}

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

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

		public Gtk.CornerType Placement { 
			get {
				int raw_ret = gtk_scrolled_window_get_placement(Handle);
				Gtk.CornerType ret = (Gtk.CornerType) raw_ret;
				return ret;
			}
			set {
				gtk_scrolled_window_set_placement(Handle, (int) value);
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_scrolled_window_get_policy(IntPtr raw, out int hscrollbar_policy, out int vscrollbar_policy);
		static d_gtk_scrolled_window_get_policy gtk_scrolled_window_get_policy = FuncLoader.LoadFunction<d_gtk_scrolled_window_get_policy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_scrolled_window_get_policy"));

		public void GetPolicy(out Gtk.PolicyType hscrollbar_policy, out Gtk.PolicyType vscrollbar_policy) {
			int native_hscrollbar_policy;
			int native_vscrollbar_policy;
			gtk_scrolled_window_get_policy(Handle, out native_hscrollbar_policy, out native_vscrollbar_policy);
			hscrollbar_policy = (Gtk.PolicyType) native_hscrollbar_policy;
			vscrollbar_policy = (Gtk.PolicyType) native_vscrollbar_policy;
		}

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

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

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

		public Gtk.Widget VScrollbar { 
			get {
				IntPtr raw_ret = gtk_scrolled_window_get_vscrollbar(Handle);
				Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_gtk_scrolled_window_set_policy(IntPtr raw, int hscrollbar_policy, int vscrollbar_policy);
		static d_gtk_scrolled_window_set_policy gtk_scrolled_window_set_policy = FuncLoader.LoadFunction<d_gtk_scrolled_window_set_policy>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_scrolled_window_set_policy"));

		public void SetPolicy(Gtk.PolicyType hscrollbar_policy, Gtk.PolicyType vscrollbar_policy) {
			gtk_scrolled_window_set_policy(Handle, (int) hscrollbar_policy, (int) vscrollbar_policy);
		}

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

		public void UnsetPlacement() {
			gtk_scrolled_window_unset_placement(Handle);
		}


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

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
