Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwindowswindow.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWINDOWSWINDOW_H
5#define QWINDOWSWINDOW_H
6
7#include <QtCore/qt_windows.h>
8#include <QtCore/qpointer.h>
10#include "qwindowscursor.h"
11
12#include <qpa/qplatformwindow.h>
13#include <qpa/qplatformwindow_p.h>
14
15#if QT_CONFIG(vulkan)
17#endif
18
19#include <optional>
20
22
24class QWindowsMenuBar;
25class QDebug;
26
28{
29 static QMargins frameOnPrimaryScreen(const QWindow *w, DWORD style, DWORD exStyle);
30 static QMargins frameOnPrimaryScreen(const QWindow *w, HWND hwnd);
31 static QMargins frame(const QWindow *w, DWORD style, DWORD exStyle, qreal dpi);
32 static QMargins frame(const QWindow *w, HWND hwnd, DWORD style, DWORD exStyle);
33 static QMargins frame(const QWindow *w, HWND hwnd);
34 static QMargins frame(const QWindow *w, const QRect &geometry,
35 DWORD style, DWORD exStyle);
36 static bool handleCalculateSize(const QMargins &customMargins, const MSG &msg, LRESULT *result);
37 static void applyToMinMaxInfo(const QWindow *w, const QScreen *screen,
38 const QMargins &margins, MINMAXINFO *mmi);
39 static void applyToMinMaxInfo(const QWindow *w, const QMargins &margins,
40 MINMAXINFO *mmi);
41 static void frameSizeConstraints(const QWindow *w, const QScreen *screen,
42 const QMargins &margins,
43 QSize *minimumSize, QSize *maximumSize);
44 static inline QPoint mapToGlobal(HWND hwnd, const QPoint &);
45 static inline QPoint mapToGlobal(const QWindow *w, const QPoint &);
46 static inline QPoint mapFromGlobal(const HWND hwnd, const QPoint &);
47 static inline QPoint mapFromGlobal(const QWindow *w, const QPoint &);
48
49 static bool positionIncludesFrame(const QWindow *w);
50};
51
53{
54 explicit QWindowCreationContext(const QWindow *w, const QScreen *s,
55 const QRect &geometryIn, const QRect &geometry,
57 DWORD style, DWORD exStyle);
58 void applyToMinMaxInfo(MINMAXINFO *mmi) const;
59
61 // The screen to use to scale size constraints, etc. Might differ from the
62 // screen of the window after QPlatformWindow::initialGeometry() (QTBUG-77307).
64 QRect requestedGeometryIn; // QWindow scaled
65 QRect requestedGeometry; // after QPlatformWindow::initialGeometry()
69 QMargins customMargins; // User-defined, additional frame for WM_NCCALCSIZE
70 int frameX = CW_USEDEFAULT; // Passed on to CreateWindowEx(), including frame.
71 int frameY = CW_USEDEFAULT;
72 int frameWidth = CW_USEDEFAULT;
73 int frameHeight = CW_USEDEFAULT;
74 int menuHeight = 0;
75};
76
78{
79 Qt::WindowFlags flags;
82 QMargins fullFrameMargins; // Do not use directly for windows, see FrameDirty.
83 QMargins customMargins; // User-defined, additional frame for NCCALCSIZE
84 HWND hwnd = nullptr;
85 bool embedded = false;
86 bool hasFrame = false;
87
88 static QWindowsWindowData create(const QWindow *w,
89 const QWindowsWindowData &parameters,
90 const QString &title);
91};
92
95{
96 Q_DISABLE_COPY_MOVE(QWindowsBaseWindow)
97public:
98 using TouchWindowTouchType = QNativeInterface::Private::QWindowsApplication::TouchWindowTouchType;
99 using TouchWindowTouchTypes = QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes;
100
102
103 WId winId() const override { return WId(handle()); }
104 QRect geometry() const override { return geometry_sys(); }
105 QMargins frameMargins() const override { return fullFrameMargins(); }
106 QPoint mapToGlobal(const QPoint &pos) const override;
107 QPoint mapFromGlobal(const QPoint &pos) const override;
108 virtual QMargins fullFrameMargins() const { return frameMargins_sys(); }
109
110 void setHasBorderInFullScreen(bool border) override;
111 bool hasBorderInFullScreen() const override;
112
113 QMargins customMargins() const override;
114 void setCustomMargins(const QMargins &margins) override;
115
117
118 virtual HWND handle() const = 0;
119 virtual bool isTopLevel() const { return isTopLevel_sys(); }
120
121 unsigned style() const { return GetWindowLongPtr(handle(), GWL_STYLE); }
122 unsigned exStyle() const { return GetWindowLongPtr(handle(), GWL_EXSTYLE); }
123 static bool isRtlLayout(HWND hwnd);
124
126 static HWND handleOf(const QWindow *w);
127
128protected:
129 HWND parentHwnd() const { return GetAncestor(handle(), GA_PARENT); }
130 bool isTopLevel_sys() const;
131 QRect frameGeometry_sys() const;
132 QRect geometry_sys() const;
133 void setGeometry_sys(const QRect &rect) const;
135 std::optional<TouchWindowTouchTypes> touchWindowTouchTypes_sys() const;
136 void hide_sys();
137 void raise_sys();
138 void lower_sys();
139 void setWindowTitle_sys(const QString &title);
140};
141
143{
144public:
146 : QWindowsBaseWindow(window), m_hwnd(GetDesktopWindow()) {}
147
148 QMargins frameMargins() const override { return QMargins(); }
149 bool isTopLevel() const override { return true; }
150
151protected:
152 HWND handle() const override { return m_hwnd; }
153
154private:
155 const HWND m_hwnd;
156};
157
159{
160public:
161 explicit QWindowsForeignWindow(QWindow *window, HWND hwnd);
162
163 void setParent(const QPlatformWindow *window) override;
164 void setGeometry(const QRect &rect) override { setGeometry_sys(rect); }
165 void setVisible(bool visible) override;
166 void raise() override { raise_sys(); }
167 void lower() override { lower_sys(); }
169 bool isForeignWindow() const override { return true; }
170
171protected:
172 HWND handle() const override { return m_hwnd; }
173
174private:
175 const HWND m_hwnd;
176 DWORD m_topLevelStyle;
177};
178
180{
181public:
210
212 ~QWindowsWindow() override;
213
214 void initialize() override;
215
217
218 QSurfaceFormat format() const override;
219 void setGeometry(const QRect &rect) override;
220 QRect geometry() const override { return m_data.geometry; }
221 QRect normalGeometry() const override;
222 QRect restoreGeometry() const { return m_data.restoreGeometry; }
224
225 void setVisible(bool visible) override;
226 bool isVisible() const;
227 bool isExposed() const override { return testFlag(Exposed); }
228 bool isActive() const override;
229 bool isAncestorOf(const QPlatformWindow *child) const override;
230 bool isEmbedded() const override;
231 QPoint mapToGlobal(const QPoint &pos) const override;
232 QPoint mapFromGlobal(const QPoint &pos) const override;
233
234 void setWindowFlags(Qt::WindowFlags flags) override;
235 void setWindowState(Qt::WindowStates state) override;
236
237 void setParent(const QPlatformWindow *window) override;
238
239 void setWindowTitle(const QString &title) override;
240 void raise() override { raise_sys(); }
241 void lower() override { lower_sys(); }
242
243 bool windowEvent(QEvent *event) override;
244
245 void propagateSizeHints() override;
246 static bool handleGeometryChangingMessage(MSG *message, const QWindow *qWindow, const QMargins &marginsDp);
248 QMargins frameMargins() const override;
249 QMargins fullFrameMargins() const override;
250 void setFullFrameMargins(const QMargins &newMargins);
252
253 void setOpacity(qreal level) override;
254 void setMask(const QRegion &region) override;
255 qreal opacity() const { return m_opacity; }
256 void requestActivateWindow() override;
257
258 bool setKeyboardGrabEnabled(bool grab) override;
259 bool setMouseGrabEnabled(bool grab) override;
260 inline bool hasMouseCapture() const { return GetCapture() == m_data.hwnd; }
261
262 bool startSystemResize(Qt::Edges edges) override;
263 bool startSystemMove() override;
264
265 void setFrameStrutEventsEnabled(bool enabled) override;
267
268 // QWindowsBaseWindow overrides
269 HWND handle() const override { return m_data.hwnd; }
270 bool isTopLevel() const override;
271
272 static bool setDarkBorderToWindow(HWND hwnd, bool d);
273 void setDarkBorder(bool d);
274
275 QWindowsMenuBar *menuBar() const;
276 void setMenuBar(QWindowsMenuBar *mb);
277
278 QMargins customMargins() const override;
279 void setCustomMargins(const QMargins &m) override;
280
281 void setStyle(unsigned s) const;
282 void setExStyle(unsigned s) const;
283
284 bool handleWmPaint(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result);
285
286 void handleMoved();
287 void handleResized(int wParam, LPARAM lParam);
288 void handleHidden();
290 void handleDpiScaledSize(WPARAM wParam, LPARAM lParam, LRESULT *result);
291 void handleDpiChanged(HWND hwnd, WPARAM wParam, LPARAM lParam);
292 void handleDpiChangedAfterParent(HWND hwnd);
293
294 static void displayChanged();
295 static void settingsChanged();
297 static QWindowsWindow *windowsWindowOf(const QWindow *w);
298 static QWindow *topLevelOf(QWindow *w);
299 static inline void *userDataOf(HWND hwnd);
300 static inline void setUserDataOf(HWND hwnd, void *ud);
301
302 static bool hasNoNativeFrame(HWND hwnd, Qt::WindowFlags flags);
303 static bool setWindowLayered(HWND hwnd, Qt::WindowFlags flags, bool hasAlpha, qreal opacity);
304 bool isLayered() const;
305
306 HDC getDC();
307 void releaseDC();
308 void getSizeHints(MINMAXINFO *mmi) const;
309 bool handleNonClientHitTest(const QPoint &globalPos, LRESULT *result) const;
310
311#ifndef QT_NO_CURSOR
312 CursorHandlePtr cursor() const { return m_cursor; }
313#endif
314 void setCursor(const CursorHandlePtr &c);
315 void applyCursor();
316
317 inline bool testFlag(unsigned f) const { return (m_flags & f) != 0; }
318 inline void setFlag(unsigned f) const { m_flags |= f; }
319 inline void clearFlag(unsigned f) const { m_flags &= ~f; }
320
321 void setEnabled(bool enabled);
322 bool isEnabled() const;
323 void setWindowIcon(const QIcon &icon) override;
324
325 void *surface(void *nativeConfig, int *err);
326 void invalidateSurface() override;
327
328 void setAlertState(bool enabled) override;
329 bool isAlertState() const override { return testFlag(AlertState); }
330 void alertWindow(int durationMs = 0);
331 void stopAlertWindow();
332
335
336 void registerTouchWindow();
338 static void setHasBorderInFullScreenDefault(bool border);
339 void setHasBorderInFullScreen(bool border) override;
340 bool hasBorderInFullScreen() const override;
341 static QString formatWindowTitle(const QString &title);
342
345
346 void setSavedDpi(int dpi) { m_savedDpi = dpi; }
347 int savedDpi() const { return m_savedDpi; }
348 qreal dpiRelativeScale(const UINT dpi) const;
349
350private:
351 inline void show_sys() const;
352 inline QWindowsWindowData setWindowFlags_sys(Qt::WindowFlags wt, unsigned flags = 0) const;
353 inline bool isFullScreen_sys() const;
354 inline void setWindowState_sys(Qt::WindowStates newState);
355 inline void setParent_sys(const QPlatformWindow *parent);
356 inline void updateTransientParent() const;
357 void destroyWindow();
358 inline bool isDropSiteEnabled() const { return m_dropTarget != nullptr; }
359 void setDropSiteEnabled(bool enabled);
360 void updateDropSite(bool topLevel);
361 void handleGeometryChange();
362 void handleWindowStateChange(Qt::WindowStates state);
363 inline void destroyIcon();
364 void fireExpose(const QRegion &region, bool force=false);
365 void fireFullExpose(bool force=false);
366 void calculateFullFrameMargins();
367
368 mutable QWindowsWindowData m_data;
369 QPointer<QWindowsMenuBar> m_menuBar;
370 mutable unsigned m_flags = WithinCreate;
371 HDC m_hdc = nullptr;
372 Qt::WindowStates m_windowState = Qt::WindowNoState;
373 qreal m_opacity = 1;
374#ifndef QT_NO_CURSOR
375 CursorHandlePtr m_cursor;
376#endif
377 QWindowsOleDropTarget *m_dropTarget = nullptr;
378 unsigned m_savedStyle = 0;
379 QRect m_savedFrameGeometry;
380 HICON m_iconSmall = nullptr;
381 HICON m_iconBig = nullptr;
382 void *m_surface = nullptr;
383 int m_savedDpi = 96;
384
385 static bool m_screenForGLInitialized;
386
387#if QT_CONFIG(vulkan)
388 // note: intentionally not using void * in order to avoid breaking x86
389 VkSurfaceKHR m_vkSurface = VK_NULL_HANDLE;
390#endif
391 static bool m_borderInFullScreenDefault;
392 static bool m_inSetgeometry;
393};
394
395#ifndef QT_NO_DEBUG_STREAM
396QDebug operator<<(QDebug d, const RECT &r);
397QDebug operator<<(QDebug d, const POINT &);
398QDebug operator<<(QDebug d, const MINMAXINFO &i);
399QDebug operator<<(QDebug d, const NCCALCSIZE_PARAMS &p);
400QDebug operator<<(QDebug d, const WINDOWPLACEMENT &);
401QDebug operator<<(QDebug d, const WINDOWPOS &);
402QDebug operator<<(QDebug d, const GUID &guid);
403#endif // !QT_NO_DEBUG_STREAM
404
405static inline void clientToScreen(HWND hwnd, POINT *wP)
406{
408 RECT clientArea;
409 GetClientRect(hwnd, &clientArea);
410 wP->x = clientArea.right - wP->x;
411 }
412 ClientToScreen(hwnd, wP);
413}
414
415static inline void screenToClient(HWND hwnd, POINT *wP)
416{
417 ScreenToClient(hwnd, wP);
419 RECT clientArea;
420 GetClientRect(hwnd, &clientArea);
421 wP->x = clientArea.right - wP->x;
422 }
423}
424
425// ---------- QWindowsGeometryHint inline functions.
427{
428 POINT p = { qp.x(), qp.y() };
429 clientToScreen(hwnd, &p);
430 return QPoint(p.x, p.y);
431}
432
434{
435 POINT p = { qp.x(), qp.y() };
436 screenToClient(hwnd, &p);
437 return QPoint(p.x, p.y);
438}
439
442
445
446
447// ---------- QWindowsBaseWindow inline functions.
448
450{
451 if (!w || !w->handle())
452 return nullptr;
453
454 const Qt::WindowType type = w->type();
455 if (type == Qt::Desktop || w->handle()->isForeignWindow())
456 return nullptr;
457
458 return static_cast<QWindowsWindow *>(w->handle());
459}
460
462{
463 return reinterpret_cast<void *>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
464}
465
466void QWindowsWindow::setUserDataOf(HWND hwnd, void *ud)
467{
468 SetWindowLongPtr(hwnd, GWLP_USERDATA, LONG_PTR(ud));
469}
470
471inline void QWindowsWindow::destroyIcon()
472{
473 if (m_iconBig) {
474 DestroyIcon(m_iconBig);
475 m_iconBig = nullptr;
476 }
477 if (m_iconSmall) {
478 DestroyIcon(m_iconSmall);
479 m_iconSmall = nullptr;
480 }
481}
482
483inline bool QWindowsWindow::isLayered() const
484{
485 return GetWindowLongPtr(m_data.hwnd, GWL_EXSTYLE) & WS_EX_LAYERED;
486}
487
489
491
492#endif // QWINDOWSWINDOW_H
\inmodule QtCore
\inmodule QtCore
Definition qcoreevent.h:45
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
\inmodule QtCore
Definition qmargins.h:24
Native interface to QPlatformWindow. \inmodule QtGui.
QSurface * surface() const
The QPlatformWindow class provides an abstraction for top-level windows.
QWindow * window() const
Returns the window which belongs to the QPlatformWindow.
QPlatformScreen * screenForGeometry(const QRect &newGeometry) const
Helper function for finding the new screen for newGeometry in response to a geometry changed event.
QPlatformWindow * parent() const
Returns the parent platform window (or \nullptr if orphan).
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:30
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
\inmodule QtGui
Definition qwindow.h:63
Base class for QWindowsForeignWindow, QWindowsWindow.
virtual bool isTopLevel() const
QMargins frameMargins_sys() const
bool isTopLevel_sys() const
unsigned exStyle() const
void setHasBorderInFullScreen(bool border) override
QMargins customMargins() const override
bool hasBorderInFullScreen() const override
static QWindowsBaseWindow * baseWindowOf(const QWindow *w)
HWND parentHwnd() const
virtual QMargins fullFrameMargins() const
unsigned style() 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)
static bool isRtlLayout(HWND hwnd)
QRect frameGeometry_sys() const
QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes TouchWindowTouchTypes
WId winId() const override
Reimplement in subclasses to return a handle to the native window.
QRect geometry_sys() const
virtual HWND handle() const =0
QNativeInterface::Private::QWindowsApplication::TouchWindowTouchType TouchWindowTouchType
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
void setWindowTitle_sys(const QString &title)
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.
Windows native menu bar.
Implementation of IDropTarget.
Raster or OpenGL Window.
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 initialize() override
Called as part of QWindow::create(), after constructing the window.
void handleDpiChangedAfterParent(HWND hwnd)
static void setHasBorderInFullScreenStatic(QWindow *window, bool border)
int savedDpi() const
void checkForScreenChanged(ScreenChangeMode mode=FromGeometryChange)
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)
qreal opacity() const
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)
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
bool isLayered() const
void handleDpiChanged(HWND hwnd, WPARAM wParam, LPARAM lParam)
QMargins frameMargins() const override
void setWindowIcon(const QIcon &icon) override
Reimplement to set the window icon to icon.
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 isEnabled() 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
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)
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.
@ WithinSetParent
Automatic mouse capture on button press.
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 setWindowState(Qt::WindowStates state) override
Requests setting the window state of this surface to type.
void setCursor(const CursorHandlePtr &c)
bool hasBorderInFullScreen() const override
bool hasMouseCapture() const
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
bool isVisible() 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 &region) 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.
rect
[4]
else opt state
[0]
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
Combined button and popup list for selecting options.
@ WindowNoState
Definition qnamespace.h:252
WindowType
Definition qnamespace.h:205
@ Desktop
Definition qnamespace.h:215
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1525
GLenum mode
const GLfloat * m
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLboolean r
[2]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLenum GLsizei GLsizei GLsizei GLint border
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLfloat GLfloat f
GLenum type
GLbitfield flags
GLuint GLsizei const GLchar * message
struct _cl_event * event
GLdouble s
[6]
Definition qopenglext.h:235
const GLubyte * c
GLuint64EXT * result
[6]
GLfloat GLfloat p
[1]
static bool hasAlpha(const QImage &image)
QScreen * screen
[1]
Definition main.cpp:29
double qreal
Definition qtypes.h:187
struct tagMSG MSG
static void clientToScreen(HWND hwnd, POINT *wP)
QDebug operator<<(QDebug d, const RECT &r)
static void screenToClient(HWND hwnd, POINT *wP)
QString title
[35]
QLayoutItem * child
[0]
QFrame frame
[0]
view create()
Active Context for creating windows.
const QScreen * screen
const QWindow * window
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
Stores geometry constraints and provides utility functions.
static QMargins frameOnPrimaryScreen(const QWindow *w, DWORD style, DWORD exStyle)
static bool positionIncludesFrame(const QWindow *w)
static void frameSizeConstraints(const QWindow *w, const QScreen *screen, const QMargins &margins, QSize *minimumSize, QSize *maximumSize)
static QPoint mapToGlobal(HWND hwnd, const QPoint &)
static QPoint mapFromGlobal(const HWND hwnd, const QPoint &)
static void applyToMinMaxInfo(const QWindow *w, const QScreen *screen, const QMargins &margins, MINMAXINFO *mmi)
static bool handleCalculateSize(const QMargins &customMargins, const MSG &msg, LRESULT *result)
Qt::WindowFlags flags