6#ifndef QTWINDOWSGLOBAL_H
7#define QTWINDOWSGLOBAL_H
9#include <QtCore/qt_windows.h>
10#include <QtCore/qnamespace.h>
12#ifndef WM_DWMCOMPOSITIONCHANGED
13# define WM_DWMCOMPOSITIONCHANGED 0x31E
16#ifndef WM_DWMCOLORIZATIONCOLORCHANGED
17# define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320
20#ifndef WM_SYSCOLORCHANGE
21# define WM_SYSCOLORCHANGE 0x0015
25# define WM_TOUCH 0x0240
29# define WM_GESTURE 0x0119
33# define WM_DPICHANGED 0x02E0
36#ifndef WM_GETDPISCALEDSIZE
37# define WM_GETDPISCALEDSIZE 0x02E4
41#ifndef WM_POINTERUPDATE
42# define WM_NCPOINTERUPDATE 0x0241
43# define WM_NCPOINTERDOWN 0x0242
44# define WM_NCPOINTERUP 0x0243
45# define WM_POINTERUPDATE 0x0245
46# define WM_POINTERDOWN 0x0246
47# define WM_POINTERUP 0x0247
48# define WM_POINTERENTER 0x0249
49# define WM_POINTERLEAVE 0x024A
50# define WM_POINTERACTIVATE 0x024B
51# define WM_POINTERCAPTURECHANGED 0x024C
52# define WM_POINTERWHEEL 0x024E
53# define WM_POINTERHWHEEL 0x024F
56#if !defined(_DPI_AWARENESS_CONTEXTS_)
57# define DPI_AWARENESS_CONTEXT_UNAWARE ((HANDLE)-1
)
58# define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((HANDLE)-2
)
59# define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((HANDLE)-3
)
60# define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((HANDLE)-4
)
61# define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((HANDLE)-5
)
69enum WindowsEventTypeFlags
71 WindowEventFlag = 0x10000,
72 MouseEventFlag = 0x20000,
73 NonClientEventFlag = 0x40000,
74 InputMethodEventFlag = 0x80000,
75 KeyEventFlag = 0x100000,
76 KeyDownEventFlag = 0x200000,
77 TouchEventFlag = 0x400000,
78 ClipboardEventFlag = 0x800000,
79 ApplicationEventFlag = 0x1000000,
80 ThemingEventFlag = 0x2000000,
81 GenericEventFlag = 0x4000000,
82 PointerEventFlag = 0x8000000,
87 ExposeEvent = WindowEventFlag + 1,
88 ActivateWindowEvent = WindowEventFlag + 2,
89 DeactivateWindowEvent = WindowEventFlag + 3,
90 MouseActivateWindowEvent = WindowEventFlag + 4,
91 LeaveEvent = WindowEventFlag + 5,
92 CloseEvent = WindowEventFlag + 6,
93 ShowEvent = WindowEventFlag + 7,
94 ShowEventOnParentRestoring = WindowEventFlag + 20,
95 HideEvent = WindowEventFlag + 8,
96 DestroyEvent = WindowEventFlag + 9,
97 GeometryChangingEvent = WindowEventFlag + 10,
98 MoveEvent = WindowEventFlag + 11,
99 ResizeEvent = WindowEventFlag + 12,
100 QuerySizeHints = WindowEventFlag + 15,
101 CalculateSize = WindowEventFlag + 16,
102 FocusInEvent = WindowEventFlag + 17,
103 FocusOutEvent = WindowEventFlag + 18,
104 WhatsThisEvent = WindowEventFlag + 19,
105 DpiChangedEvent = WindowEventFlag + 21,
106 EnterSizeMoveEvent = WindowEventFlag + 22,
107 ExitSizeMoveEvent = WindowEventFlag + 23,
108 PointerActivateWindowEvent = WindowEventFlag + 24,
109 DpiScaledSizeEvent = WindowEventFlag + 25,
110 DpiChangedAfterParentEvent = WindowEventFlag + 27,
111 TaskbarButtonCreated = WindowEventFlag + 28,
112 MouseEvent = MouseEventFlag + 1,
113 MouseWheelEvent = MouseEventFlag + 2,
114 CursorEvent = MouseEventFlag + 3,
115 TouchEvent = TouchEventFlag + 1,
116 PointerEvent = PointerEventFlag + 1,
117 NonClientMouseEvent = NonClientEventFlag + MouseEventFlag + 1,
118 NonClientHitTest = NonClientEventFlag + 2,
119 NonClientCreate = NonClientEventFlag + 3,
120 NonClientActivate = NonClientEventFlag + 4,
121 NonClientPointerEvent = NonClientEventFlag + PointerEventFlag + 4,
122 KeyEvent = KeyEventFlag + 1,
123 KeyDownEvent = KeyEventFlag + KeyDownEventFlag + 1,
124 InputLanguageChangeEvent = KeyEventFlag + 2,
125 InputMethodKeyEvent = InputMethodEventFlag + KeyEventFlag + 1,
126 InputMethodKeyDownEvent = InputMethodEventFlag + KeyEventFlag + KeyDownEventFlag + 1,
127 ClipboardEvent = ClipboardEventFlag + 1,
128 ActivateApplicationEvent = ApplicationEventFlag + 1,
129 DeactivateApplicationEvent = ApplicationEventFlag + 2,
130 AccessibleObjectFromWindowRequest = ApplicationEventFlag + 3,
131 QueryEndSessionApplicationEvent = ApplicationEventFlag + 4,
132 EndSessionApplicationEvent = ApplicationEventFlag + 5,
133 AppCommandEvent = ApplicationEventFlag + 6,
134 DeviceChangeEvent = ApplicationEventFlag + 7,
135 MenuAboutToShowEvent = ApplicationEventFlag + 8,
136 AcceleratorCommandEvent = ApplicationEventFlag + 9,
137 MenuCommandEvent = ApplicationEventFlag + 10,
138 InputMethodStartCompositionEvent = InputMethodEventFlag + 1,
139 InputMethodCompositionEvent = InputMethodEventFlag + 2,
140 InputMethodEndCompositionEvent = InputMethodEventFlag + 3,
141 InputMethodOpenCandidateWindowEvent = InputMethodEventFlag + 4,
142 InputMethodCloseCandidateWindowEvent = InputMethodEventFlag + 5,
143 InputMethodRequest = InputMethodEventFlag + 6,
144 ThemeChanged = ThemingEventFlag + 1,
145 CompositionSettingsChanged = ThemingEventFlag + 2,
146 SettingChangedEvent = 438,
147 ScrollEvent = GenericEventFlag + 1,
152Q_DECLARE_MIXED_ENUM_OPERATORS(
bool, WindowsEventTypeFlags, WindowsEventType);
153Q_DECLARE_MIXED_ENUM_OPERATORS(
bool, WindowsEventType, WindowsEventTypeFlags);
155enum class DpiAwareness
167inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamIn, LPARAM lParamIn)
169 static const UINT WM_TASKBAR_BUTTON_CREATED = []{
170 UINT message = RegisterWindowMessage(L"TaskbarButtonCreated");
173 ChangeWindowMessageFilter(message, MSGFLT_ADD);
180 return QtWindows::ExposeEvent;
182 return QtWindows::CloseEvent;
184 return QtWindows::DestroyEvent;
186 return (
int)wParamIn ?
187 QtWindows::ActivateApplicationEvent : QtWindows::DeactivateApplicationEvent;
188 case WM_MOUSEACTIVATE:
189 return QtWindows::MouseActivateWindowEvent;
191 return QtWindows::PointerActivateWindowEvent;
193 return LOWORD(wParamIn) == WA_INACTIVE ?
194 QtWindows::DeactivateWindowEvent : QtWindows::ActivateWindowEvent;
196 return QtWindows::CursorEvent;
198 return QtWindows::MouseEvent;
200 return QtWindows::ScrollEvent;
203 return QtWindows::MouseWheelEvent;
204 case WM_WINDOWPOSCHANGING:
205 return QtWindows::GeometryChangingEvent;
207 return QtWindows::MoveEvent;
210 return lParamIn == SW_PARENTOPENING ? QtWindows::ShowEventOnParentRestoring : QtWindows::ShowEvent;
211 return QtWindows::HideEvent;
213 return QtWindows::ResizeEvent;
215 return QtWindows::NonClientCreate;
217 return QtWindows::CalculateSize;
219 return QtWindows::NonClientHitTest;
221 return QtWindows::NonClientActivate;
222 case WM_GETMINMAXINFO:
223 return QtWindows::QuerySizeHints;
226 return QtWindows::KeyDownEvent;
230 return QtWindows::KeyEvent;
232 return QtWindows::InputMethodKeyEvent;
234 return QtWindows::InputMethodKeyDownEvent;
235#ifdef WM_INPUTLANGCHANGE
236 case WM_INPUTLANGCHANGE:
237 return QtWindows::InputLanguageChangeEvent;
240 return QtWindows::TouchEvent;
241 case WM_CHANGECBCHAIN:
242 case WM_DRAWCLIPBOARD:
243 case WM_RENDERFORMAT:
244 case WM_RENDERALLFORMATS:
245 case WM_DESTROYCLIPBOARD:
246 return QtWindows::ClipboardEvent;
247 case WM_IME_STARTCOMPOSITION:
248 return QtWindows::InputMethodStartCompositionEvent;
249 case WM_IME_ENDCOMPOSITION:
250 return QtWindows::InputMethodEndCompositionEvent;
251 case WM_IME_COMPOSITION:
252 return QtWindows::InputMethodCompositionEvent;
254 return QtWindows::InputMethodRequest;
256 switch (
int(wParamIn)) {
257 case IMN_OPENCANDIDATE:
258 return QtWindows::InputMethodOpenCandidateWindowEvent;
259 case IMN_CLOSECANDIDATE:
260 return QtWindows::InputMethodCloseCandidateWindowEvent;
266 return QtWindows::AccessibleObjectFromWindowRequest;
268 return QtWindows::FocusInEvent;
270 return QtWindows::FocusOutEvent;
274 case WM_SETTINGCHANGE:
275 return QtWindows::SettingChangedEvent;
276 case WM_THEMECHANGED:
279 return QtWindows::ThemeChanged;
281 return QtWindows::CompositionSettingsChanged;
282#ifndef QT_NO_CONTEXTMENU
284 return QtWindows::ContextMenu;
287 if ((wParamIn & 0xfff0) == SC_CONTEXTHELP)
288 return QtWindows::WhatsThisEvent;
290 case WM_QUERYENDSESSION:
291 return QtWindows::QueryEndSessionApplicationEvent;
293 return QtWindows::EndSessionApplicationEvent;
294#if defined(WM_APPCOMMAND)
296 return QtWindows::AppCommandEvent;
299 return QtWindows::GestureEvent;
300 case WM_DEVICECHANGE:
301 return QtWindows::DeviceChangeEvent;
303 case WM_INITMENUPOPUP:
304 return QtWindows::MenuAboutToShowEvent;
306 return HIWORD(wParamIn) ? QtWindows::AcceleratorCommandEvent : QtWindows::MenuCommandEvent;
308 return QtWindows::DpiChangedEvent;
309 case WM_DPICHANGED_AFTERPARENT:
310 return QtWindows::DpiChangedAfterParentEvent;
312 return QtWindows::DpiScaledSizeEvent;
313 case WM_ENTERSIZEMOVE:
314 return QtWindows::EnterSizeMoveEvent;
315 case WM_EXITSIZEMOVE:
316 return QtWindows::ExitSizeMoveEvent;
320 if (message >= WM_NCMOUSEMOVE && message <= WM_NCMBUTTONDBLCLK)
321 return QtWindows::NonClientMouseEvent;
322 if ((message >= WM_MOUSEFIRST && message <= WM_MOUSELAST)
323 || (message >= WM_XBUTTONDOWN && message <= WM_XBUTTONDBLCLK))
324 return QtWindows::MouseEvent;
326 return QtWindows::NonClientPointerEvent;
328 return QtWindows::PointerEvent;
329 if (message == WM_TASKBAR_BUTTON_CREATED)
330 return QtWindows::TaskbarButtonCreated;
331 return QtWindows::UnknownEvent;
334#ifndef QT_NO_DEBUG_STREAM
335extern QDebug operator<<(QDebug, QtWindows::DpiAwareness);
Base class for QWindowsForeignWindow, QWindowsWindow.
virtual bool isTopLevel() const
QMargins frameMargins_sys() const
bool isTopLevel_sys() const
void setHasBorderInFullScreen(bool border) override
QMargins customMargins() const override
bool windowEvent(QEvent *event) override
Reimplement this method to be able to do any platform specific event handling.
bool hasBorderInFullScreen() const override
static QWindowsBaseWindow * baseWindowOf(const QWindow *w)
bool hasMaximumWidth() const
virtual QMargins fullFrameMargins() const
QRect geometry() const override
Returns the current geometry of a window.
std::optional< TouchWindowTouchTypes > touchWindowTouchTypes_sys() const
static HWND handleOf(const QWindow *w)
QPoint mapToGlobal(const QPoint &pos) const override
Translates the window coordinate pos to global screen coordinates using native methods.
QMargins frameMargins() const override
QWindowsBaseWindow(QWindow *window)
bool hasMaximumHeight() const
static bool isRtlLayout(HWND hwnd)
QRect frameGeometry_sys() const
WId winId() const override
Reimplement in subclasses to return a handle to the native window.
QRect geometry_sys() const
virtual HWND handle() const =0
QPoint mapFromGlobal(const QPoint &pos) const override
Translates the global screen coordinate pos to window coordinates using native methods.
void setCustomMargins(const QMargins &margins) override
void setGeometry_sys(const QRect &rect) const
bool hasMaximumSize() const
void setWindowTitle_sys(const QString &title)
Platform cursor implementation.
static bool hasOverrideCursor()
static QPoint mousePosition()
void setOverrideCursor(const QCursor &cursor) override
Reimplement this function in subclass to set an override cursor on the associated screen and return t...
static HCURSOR createPixmapCursor(const PixmapCursor &pc, qreal scaleFactor=1)
static HCURSOR createPixmapCursor(QPixmap pixmap, const QPoint &hotSpot, qreal scaleFactor=1)
void changeCursor(QCursor *widgetCursor, QWindow *widget) override
Set a cursor on a window.
static PixmapCursor customCursor(Qt::CursorShape cursorShape, const QPlatformScreen *screen=nullptr)
HCURSOR hCursor(const QCursor &c) const
void clearOverrideCursor() override
Reimplement this function in subclass to clear the override cursor.
CursorHandlePtr standardWindowCursor(Qt::CursorShape s=Qt::ArrowCursor)
Return cached standard cursor resources or create new ones.
static State cursorState()
static HCURSOR createCursorFromShape(Qt::CursorShape cursorShape, const QPlatformScreen *screen=nullptr)
static void enforceOverrideCursor()
QWindowsCursor(const QPlatformScreen *screen)
QPixmap dragDefaultCursor(Qt::DropAction action) const
CursorHandlePtr pixmapWindowCursor(const QCursor &c)
Return cached pixmap cursor or create new one.
QSize size() const override
Returns the size of the cursor, in native pixels.
QPoint pos() const override
void setPos(const QPoint &pos) override
Window wrapping GetDesktopWindow not allowing any manipulation.
HWND handle() const override
QMargins frameMargins() const override
QWindowsDesktopWindow(QWindow *window)
bool isTopLevel() const override
Window wrapping a foreign native window.
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
bool isForeignWindow() const override
HWND handle() const override
void lower() override
Reimplement to be able to let Qt lower windows to the bottom of the desktop.
void setVisible(bool visible) override
Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false.
void setParent(const QPlatformWindow *window) override
This function is called to enable native child window in QPA.
void setWindowTitle(const QString &title) override
Reimplement to set the window title to title.
QWindowsForeignWindow(QWindow *window, HWND hwnd)
void raise() override
Reimplement to be able to let Qt raise windows to the top of the desktop.
static QWindowsStaticOpenGLContext * staticOpenGLContext()
Provides access to native handles.
void * nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override
void * nativeResourceForWindow(const QByteArray &resource, QWindow *window) override
void * nativeResourceForCursor(const QByteArray &resource, const QCursor &cursor) override
void * nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override
Implementation of IDropTarget.
Manages a list of QWindowsScreen.
bool handleScreenChanges()
Synchronizes the screen list, adds new screens, removes deleted ones and propagates resolution change...
const QWindowsScreen * screenForHwnd(HWND hwnd) const
const WindowsScreenList & screens() const
static bool isSingleScreen()
const QWindowsScreen * screenForRect(const RECT *rect) const
qreal refreshRate() const override
Reimplement this function in subclass to return the vertical refresh rate of the screen,...
QString serialNumber() const override
Reimplement this function in subclass to return the serial number of this screen.
QDpi logicalDpi() const override
Reimplement this function in subclass to return the logical horizontal and vertical dots per inch met...
QList< QPlatformScreen * > virtualSiblings() const override
Determine siblings in a virtual desktop system.
Qt::ScreenOrientation orientation() const override
Reimplement this function in subclass to return the current orientation of the screen,...
QPlatformCursor * cursor() const override
Reimplement this function in subclass to return the cursor of the screen.
QPixmap grabWindow(WId window, int qX, int qY, int qWidth, int qHeight) const override
This function is called when Qt needs to be able to grab the content of a window.
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
qreal devicePixelRatio() const override
Reimplement this function in subclass to return the device pixel ratio for the screen.
const CursorPtr & cursorPtr() const
QPlatformScreen::SubpixelAntialiasingType subpixelAntialiasingTypeHint() const override
Queries ClearType settings to check the pixel layout.
static bool setOrientationPreference(Qt::ScreenOrientation o)
QRect availableGeometry() const override
Reimplement in subclass to return the pixel geometry of the available space This normally is the desk...
QString name() const override
QString manufacturer() const override
Reimplement this function in subclass to return the manufacturer of this screen.
QString model() const override
Reimplement this function in subclass to return the model of this screen.
QDpi logicalBaseDpi() const override
Reimplement to return the base logical DPI for the platform.
HMONITOR handle() const override
int depth() const override
Reimplement in subclass to return current depth of the screen.
QSizeF physicalSize() const override
Reimplement this function in subclass to return the physical size of the screen, in millimeters.
const QWindowsScreenData & data() const
QImage::Format format() const override
Reimplement in subclass to return the image format which corresponds to the screen format.
static Qt::ScreenOrientation orientationPreference()
virtual void * moduleHandle() const =0
bool handleNonClientHitTest(const QPoint &globalPos, LRESULT *result) const
void alertWindow(int durationMs=0)
void setWindowFlags(Qt::WindowFlags flags) override
Requests setting the window flags of this surface to flags.
void setCustomMargins(const QMargins &m) override
Sets custom margins to be added to the default margins determined by the windows style in the handlin...
void setMenuBar(QWindowsMenuBar *mb)
static QWindowsWindow * windowsWindowOf(const QWindow *w)
void invalidateSurface() override
Invalidates the window's surface by releasing its surface buffers.
HDC getDC()
Allocates a HDC for the window or returns the temporary one obtained from WinAPI BeginPaint within a ...
QMargins fullFrameMargins() const override
void checkForScreenChanged(ScreenChangeMode mode=FromGeometryChange, const RECT *suggestedRect=nullptr)
void initialize() override
Called as part of QWindow::create(), after constructing the window.
void handleDpiChangedAfterParent(HWND hwnd)
static void setHasBorderInFullScreenStatic(QWindow *window, bool border)
void requestUpdate() override
Requests an QEvent::UpdateRequest event.
bool testFlag(unsigned f) const
static QString formatWindowTitle(const QString &title)
void setFlag(unsigned f) const
void clearFlag(unsigned f) const
void setFrameStrutEventsEnabled(bool enabled) override
Reimplement this method to set whether frame strut events should be sent to enabled.
static void settingsChanged()
static bool handleGeometryChangingMessage(MSG *message, const QWindow *qWindow, const QMargins &marginsDp)
void getSizeHints(MINMAXINFO *mmi) const
static void setHasBorderInFullScreenDefault(bool border)
~QWindowsWindow() override
bool handleWmPaint(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result)
void setParent(const QPlatformWindow *window) override
This function is called to enable native child window in QPA.
static bool hasNoNativeFrame(HWND hwnd, Qt::WindowFlags flags)
QRect restoreGeometry() const
static void * userDataOf(HWND hwnd)
bool setMouseGrabEnabled(bool grab) override
void propagateSizeHints() override
Reimplement to propagate the size hints of the QWindow.
static void setUserDataOf(HWND hwnd, void *ud)
void applyCursor()
Applies to cursor property set on the window to the global cursor.
bool isExposed() const override
Returns if this window is exposed in the windowing system.
bool handleGeometryChanging(MSG *message) const
bool isActive() const override
Returns true if the window should appear active from a style perspective.
void setStyle(unsigned s) const
static QScreen * forcedScreenForGLWindow(const QWindow *w)
QString windowTitle() const override
Reimplement to return the actual window title used in the underlying windowing system unless the titl...
static void displayChanged()
bool setKeyboardGrabEnabled(bool grab) override
static bool setWindowLayered(HWND hwnd, Qt::WindowFlags flags, bool hasAlpha, qreal opacity)
void raise() override
Reimplement to be able to let Qt raise windows to the top of the desktop.
bool windowEvent(QEvent *event) override
Reimplement this method to be able to do any platform specific event handling.
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
void setEnabled(bool enabled)
void setVisible(bool visible) override
Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false.
QSurfaceFormat format() const override
Returns the actual surface format of the window.
static const char * embeddedNativeParentHandleProperty
QWindowsMenuBar * menuBar() const
void handleDpiChanged(HWND hwnd, WPARAM wParam, LPARAM lParam)
void registerTouchWindow()
QMargins frameMargins() const override
void setWindowIcon(const QIcon &icon) override
Reimplement to set the window icon to icon.
bool isClientAreaExpanded() const
void handleResized(int wParam, LPARAM lParam)
void setOpacity(qreal level) override
Reimplement to be able to let Qt set the opacity level of a window.
bool isEmbedded() const override
Returns true if the window is a child of a non-Qt window.
QMargins customMargins() const override
bool handleNonClientActivate(LRESULT *result) const
bool isAncestorOf(const QPlatformWindow *child) const override
Returns true if the window is an ancestor of the given child.
QRect normalGeometry() const override
Returns the geometry of a window in 'normal' state (neither maximized, fullscreen nor minimized) for ...
void setExStyle(unsigned s) const
qreal dpiRelativeScale(const UINT dpi) const
QMargins safeAreaMargins() const override
The safe area margins of a window represent the area that is safe to place content within,...
void setSavedDpi(int dpi)
void requestActivateWindow() override
Reimplement to let Qt be able to request activation/focus for a window.
static QWindow * topLevelOf(QWindow *w)
void handleDpiScaledSize(WPARAM wParam, LPARAM lParam, LRESULT *result)
static bool setDarkBorderToWindow(HWND hwnd, bool d)
void updateFullFrameMargins()
QRect geometry() const override
Returns the current geometry of a window.
bool frameStrutEventsEnabled() const override
Reimplement this method to return whether frame strut events are enabled.
@ SynchronousGeometryChangeEvent
@ OpenGlPixelFormatInitialized
@ WithinSetParent
Automatic mouse capture on button press.
@ DisableNonClientScaling
@ FrameStrutEventsEnabled
QPoint mapToGlobal(const QPoint &pos) const override
Translates the window coordinate pos to global screen coordinates using native methods.
static const char * hasBorderInFullScreenProperty
bool startSystemMove() override
Reimplement this method to start a system move operation if the system supports it and return true to...
bool isTopLevel() const override
void releaseDC()
Releases the HDC for the window or does nothing in case it was obtained from WinAPI BeginPaint within...
void lower() override
Reimplement to be able to let Qt lower windows to the bottom of the desktop.
void updateRestoreGeometry()
void setWindowState(Qt::WindowStates state) override
Requests setting the window state of this surface to type.
void setCursor(const CursorHandlePtr &c)
void updateCustomTitlebar()
bool hasBorderInFullScreen() const override
bool hasMouseCapture() const
void * surface(void *nativeConfig, int *err)
void setHasBorderInFullScreen(bool border) override
QPoint mapFromGlobal(const QPoint &pos) const override
Translates the global screen coordinate pos to window coordinates using native methods.
CursorHandlePtr cursor() const
void handleCompositionSettingsChanged()
void setWindowTitle(const QString &title) override
Reimplement to set the window title to title.
void setDarkBorder(bool d)
QWindowsWindow(QWindow *window, const QWindowsWindowData &data)
bool startSystemResize(Qt::Edges edges) override
Reimplement this method to start a system resize operation if the system supports it and return true ...
void setFullFrameMargins(const QMargins &newMargins)
void setMask(const QRegion ®ion) override
Reimplement to be able to let Qt set the mask of a window.
void setAlertState(bool enabled) override
Reimplement this method to set whether the window demands attention (for example, by flashing the tas...
HWND handle() const override
bool isAlertState() const override
Reimplement this method return whether the window is in an alert state.
Combined button and popup list for selecting options.
#define WM_GETDPISCALEDSIZE
#define WM_SYSCOLORCHANGE
#define WM_DWMCOMPOSITIONCHANGED
#define WM_NCPOINTERUPDATE
#define WM_POINTERACTIVATE
#define WM_DWMCOLORIZATIONCOLORCHANGED
bool operator==(const QWindowsPixmapCursorCacheKey &k1, const QWindowsPixmapCursorCacheKey &k2)
size_t qHash(const QWindowsPixmapCursorCacheKey &k, size_t seed) noexcept
static void clientToScreen(HWND hwnd, POINT *wP)
static void screenToClient(HWND hwnd, POINT *wP)
Active Context for creating windows.
QWindowCreationContext(const QWindow *w, const QScreen *s, const QRect &geometryIn, const QRect &geometry, const QMargins &customMargins, DWORD style, DWORD exStyle)
void applyToMinMaxInfo(MINMAXINFO *mmi) const
QRect requestedGeometryIn
PixmapCursor(const QPixmap &pix=QPixmap(), const QPoint &h=QPoint())
Stores geometry constraints and provides utility functions.
static QMargins frameOnPrimaryScreen(const QWindow *w, DWORD style, DWORD exStyle)
static QMargins frame(const QWindow *w, HWND hwnd)
static QMargins frame(const QWindow *w, const QRect &geometry, DWORD style, DWORD exStyle)
static QMargins frameOnPrimaryScreen(const QWindow *w, HWND hwnd)
static bool positionIncludesFrame(const QWindow *w)
static bool handleCalculateSize(const QWindow *window, const QMargins &customMargins, const MSG &msg, LRESULT *result)
static QPoint mapToGlobal(const QWindow *w, const QPoint &)
static QMargins frame(const QWindow *w, DWORD style, DWORD exStyle, qreal dpi)
static QPoint mapToGlobal(HWND hwnd, const QPoint &)
static QPoint mapFromGlobal(const HWND hwnd, const QPoint &)
static QPoint mapFromGlobal(const QWindow *w, const QPoint &)
static void applyToMinMaxInfo(const QWindow *w, const QMargins &margins, MINMAXINFO *mmi)
static void applyToMinMaxInfo(const QWindow *w, const QScreen *screen, const QMargins &margins, MINMAXINFO *mmi)
QWindowsPixmapCursorCacheKey(const QCursor &c, qreal scaleFactor)
QMargins fullFrameMargins
static QWindowsWindowData create(const QWindow *w, const QWindowsWindowData ¶meters, const QString &title)