public void Destroy() { #if WINDOWS PInvokeWindows.DestroyWindow(_hwnd); #elif GTKMONO PInvokeGTK.gtk_widget_destroy(_gtkwindow); #endif }
/*public SciterWindow CreateMainWindow(int width, int height, * SciterXDef.SCITER_CREATE_WINDOW_FLAGS creationFlags = DefaultCreateFlags) * { * var frame = new PInvokeUtils.RECT(width, height); * return CreateWindow(frame, creationFlags); * } * * public SciterWindow CreateOwnedWindow(IntPtr owner, int width, int height, * SciterXDef.SCITER_CREATE_WINDOW_FLAGS creationFlags = DefaultCreateFlags) * { * var frame = new PInvokeUtils.RECT(width, height); * return CreateWindow(frame, creationFlags, owner); * }*/ /* * /// <summary> * /// Create an owned top-level Sciter window * /// </summary> * /// <param name="width"></param> * /// <param name="height"></param> * /// <param name="owner_hwnd"></param> * public void CreatePopupAlphaWindow(int width, int height, IntPtr owner_hwnd) * { * PInvokeUtils.RECT frame = new PInvokeUtils.RECT(); * frame.right = width; * frame.bottom = height; * CreateWindow(frame, SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_ALPHA | SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_TOOL, owner_hwnd); * // Sciter BUG: window comes with WM_EX_APPWINDOW style * }*/ /* #if WINDOWS || NETCORE * public SciterWindow CreateChildWindow(IntPtr hwndParent, * SciterXDef.SCITER_CREATE_WINDOW_FLAGS flags = SciterXDef.SCITER_CREATE_WINDOW_FLAGS.SW_CHILD) * { * if (PInvokeWindows.IsWindow(hwndParent) == false) * throw new ArgumentException("Invalid parent window"); * * PInvokeWindows.GetClientRect(hwndParent, out var frame); * #if DEBUG * Api.SciterSetOption(IntPtr.Zero, SciterXDef.SCITER_RT_OPTIONS.SCITER_SET_DEBUG_MODE, new IntPtr(1)); #endif * #if true * string wndclass = Api.SciterClassName(); * * Handle = PInvokeWindows.CreateWindowEx( * (int) (PInvokeWindows.WindowStyles.WS_EX_TRANSPARENT), * wndclass, * null, * (int) PInvokeWindows.WindowStyles.WS_CHILD, * 0, * 0, * frame.Right, * frame.Bottom, * hwndParent, * IntPtr.Zero, * IntPtr.Zero, * IntPtr.Zero); * * //Hwnd = PInvokeWindows.CreateWindowEx(0, wndclass, null, (int)PInvokeWindows.WindowStyles.WS_CHILD, 0, 0, frame.Right, frame.Bottom, hwnd_parent, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); * //SetSciterOption(SciterXDef.SCITER_RT_OPTIONS.SCITER_SET_DEBUG_MODE, new IntPtr(1));// NO, user should opt for it #else * Hwnd = _api.SciterCreateWindow(flags, ref frame, _proc, IntPtr.Zero, hwnd_parent); #endif * * if (Handle == IntPtr.Zero) * throw new Exception("CreateChildWindow() failed"); * * return this; * } #endif*/ public void Destroy(IntPtr handle) { PInvokeWindows.DestroyWindow(handle); }