// 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 ShortcutsWindow : Gtk.Window {

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

		protected ShortcutsWindow() : base(IntPtr.Zero)
		{
			CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
		}

		[GLib.Property ("section-name")]
		public string SectionName {
			get {
				GLib.Value val = GetProperty ("section-name");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("section-name", val);
				val.Dispose ();
			}
		}

		[GLib.Property ("view-name")]
		public string ViewName {
			get {
				GLib.Value val = GetProperty ("view-name");
				string ret = (string) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("view-name", val);
				val.Dispose ();
			}
		}

		[GLib.Signal("search")]
		public event System.EventHandler Search {
			add {
				this.AddSignalHandler ("search", value);
			}
			remove {
				this.RemoveSignalHandler ("search", value);
			}
		}

		[GLib.Signal("close")]
		public event System.EventHandler Close {
			add {
				this.AddSignalHandler ("close", value);
			}
			remove {
				this.RemoveSignalHandler ("close", value);
			}
		}

		static CloseNativeDelegate Close_cb_delegate;
		static CloseNativeDelegate CloseVMCallback {
			get {
				if (Close_cb_delegate == null)
					Close_cb_delegate = new CloseNativeDelegate (Close_cb);
				return Close_cb_delegate;
			}
		}

		static void OverrideClose (GLib.GType gtype)
		{
			OverrideClose (gtype, CloseVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void CloseNativeDelegate (IntPtr inst);

		static void Close_cb (IntPtr inst)
		{
			try {
				ShortcutsWindow __obj = GLib.Object.GetObject (inst, false) as ShortcutsWindow;
				__obj.OnClose ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ShortcutsWindow), ConnectionMethod="OverrideClose")]
		protected virtual void OnClose ()
		{
			InternalClose ();
		}

		private void InternalClose ()
		{
			CloseNativeDelegate unmanaged = class_abi.BaseOverride<CloseNativeDelegate>(this.LookupGType(), "close");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}

		static SearchNativeDelegate Search_cb_delegate;
		static SearchNativeDelegate SearchVMCallback {
			get {
				if (Search_cb_delegate == null)
					Search_cb_delegate = new SearchNativeDelegate (Search_cb);
				return Search_cb_delegate;
			}
		}

		static void OverrideSearch (GLib.GType gtype)
		{
			OverrideSearch (gtype, SearchVMCallback);
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void SearchNativeDelegate (IntPtr inst);

		static void Search_cb (IntPtr inst)
		{
			try {
				ShortcutsWindow __obj = GLib.Object.GetObject (inst, false) as ShortcutsWindow;
				__obj.OnSearch ();
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}
		}

		[GLib.DefaultSignalHandler(Type=typeof(Gtk.ShortcutsWindow), ConnectionMethod="OverrideSearch")]
		protected virtual void OnSearch ()
		{
			InternalSearch ();
		}

		private void InternalSearch ()
		{
			SearchNativeDelegate unmanaged = class_abi.BaseOverride<SearchNativeDelegate>(this.LookupGType(), "search");
			if (unmanaged == null) return;

			unmanaged (this.Handle);
		}


		// 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("close"
							, Gtk.Window.class_abi.Fields
							, (uint) sizeof( IntPtr ) // close
							, null
							, "search"
							, (uint) sizeof(IntPtr)
							, 0
							),
						new GLib.AbiField("search"
							, -1
							, (uint) sizeof( IntPtr ) // search
							, "close"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _class_abi;
			}
		}


		// End of the ABI representation.

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

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


		// 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.Window.abi_info.Fields);

				return _abi_info;
			}
		}


		// End of the ABI representation.

#endregion
	}
}
