From 1a1f26d9e4ab6a4fe51baa78e40c4cdf3f402bcf Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: ćšć, 07 12æ 2023 14:27:00 +0800 Subject: [PATCH] Add context factory --- src/core/contexts/win32windowcontext_p.h | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/contexts/win32windowcontext_p.h b/src/core/contexts/win32windowcontext_p.h index b99314e..0d7b14b 100644 --- a/src/core/contexts/win32windowcontext_p.h +++ b/src/core/contexts/win32windowcontext_p.h @@ -9,7 +9,7 @@ class QWK_CORE_EXPORT Win32WindowContext : public AbstractWindowContext { Q_OBJECT public: - Win32WindowContext(QWindow *window, WindowItemDelegate *delegate); + Win32WindowContext(); ~Win32WindowContext() override; enum WindowPart { @@ -22,7 +22,7 @@ }; public: - bool setup() override; + bool setup(QObject *host, WindowItemDelegate *delegate) override; bool windowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); @@ -33,6 +33,9 @@ bool snapLayoutHandler(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); + bool customWindowHandler(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, + LRESULT *result); + protected: WId windowId = 0; @@ -42,6 +45,8 @@ // Whether the last mouse leave message is blocked, mainly for handling the unexpected // WM_MOUSELEAVE. bool mouseLeaveBlocked = false; + + bool centered = false; }; } -- Gitblit v1.9.1