![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Raster or OpenGL Window. More...
#include <qwindowswindow.h>
Public Member Functions | |
QWindowsWindow (QWindow *window, const QWindowsWindowData &data) | |
~QWindowsWindow () override | |
void | initialize () override |
Called as part of QWindow::create(), after constructing the window. | |
QSurfaceFormat | format () const override |
Returns the actual surface format of the window. | |
void | setGeometry (const QRect &rect) override |
This function is called by Qt whenever a window is moved or resized using the QWindow API. | |
QRect | geometry () const override |
Returns the current geometry of a window. | |
QRect | normalGeometry () const override |
Returns the geometry of a window in 'normal' state (neither maximized, fullscreen nor minimized) for saving geometries to application settings. | |
QMargins | safeAreaMargins () const override |
The safe area margins of a window represent the area that is safe to place content within, without intersecting areas of the screen where system UI is placed, or where a screen bezel may cover the content. | |
QRect | restoreGeometry () const |
void | updateRestoreGeometry () |
void | setVisible (bool visible) override |
Reimplemented in subclasses to show the surface if visible is true , and hide it if visible is false . | |
bool | isVisible () const |
bool | isExposed () const override |
Returns if this window is exposed in the windowing system. | |
bool | isActive () const override |
Returns true if the window should appear active from a style perspective. | |
bool | isAncestorOf (const QPlatformWindow *child) const override |
Returns true if the window is an ancestor of the given child. | |
bool | isEmbedded () const override |
Returns true if the window is a child of a non-Qt window. | |
QPoint | mapToGlobal (const QPoint &pos) const override |
Translates the window coordinate pos to global screen coordinates using native methods. | |
QPoint | mapFromGlobal (const QPoint &pos) const override |
Translates the global screen coordinate pos to window coordinates using native methods. | |
void | setWindowFlags (Qt::WindowFlags flags) override |
Requests setting the window flags of this surface to flags. | |
void | setWindowState (Qt::WindowStates state) override |
Requests setting the window state of this surface to type. | |
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. | |
QString | windowTitle () const override |
Reimplement to return the actual window title used in the underlying windowing system unless the title set for the QWindow which belongs to this QPlatformWindow (i.e. | |
void | raise () override |
Reimplement to be able to let Qt raise windows to the top of the desktop. | |
void | lower () override |
Reimplement to be able to let Qt lower windows to the bottom of the desktop. | |
bool | windowEvent (QEvent *event) override |
Reimplement this method to be able to do any platform specific event handling. | |
void | propagateSizeHints () override |
Reimplement to propagate the size hints of the QWindow. | |
bool | handleGeometryChanging (MSG *message) const |
QMargins | frameMargins () const override |
QMargins | fullFrameMargins () const override |
void | setFullFrameMargins (const QMargins &newMargins) |
void | updateFullFrameMargins () |
void | setOpacity (qreal level) override |
Reimplement to be able to let Qt set the opacity level of a window. | |
void | setMask (const QRegion ®ion) override |
Reimplement to be able to let Qt set the mask of a window. | |
qreal | opacity () const |
void | requestActivateWindow () override |
Reimplement to let Qt be able to request activation/focus for a window. | |
bool | setKeyboardGrabEnabled (bool grab) override |
bool | setMouseGrabEnabled (bool grab) override |
bool | hasMouseCapture () const |
bool | startSystemResize (Qt::Edges edges) override |
Reimplement this method to start a system resize operation if the system supports it and return true to indicate success. | |
bool | startSystemMove () override |
Reimplement this method to start a system move operation if the system supports it and return true to indicate success. | |
void | setFrameStrutEventsEnabled (bool enabled) override |
Reimplement this method to set whether frame strut events should be sent to enabled. | |
bool | frameStrutEventsEnabled () const override |
Reimplement this method to return whether frame strut events are enabled. | |
HWND | handle () const override |
bool | isTopLevel () const override |
void | setDarkBorder (bool d) |
QWindowsMenuBar * | menuBar () const |
void | setMenuBar (QWindowsMenuBar *mb) |
QMargins | customMargins () const override |
void | setCustomMargins (const QMargins &m) override |
Sets custom margins to be added to the default margins determined by the windows style in the handling of the WM_NCCALCSIZE message. | |
void | setStyle (unsigned s) const |
void | setExStyle (unsigned s) const |
bool | handleWmPaint (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result) |
void | handleMoved () |
void | handleResized (int wParam, LPARAM lParam) |
void | handleHidden () |
void | handleCompositionSettingsChanged () |
void | handleDpiScaledSize (WPARAM wParam, LPARAM lParam, LRESULT *result) |
void | handleDpiChanged (HWND hwnd, WPARAM wParam, LPARAM lParam) |
void | handleDpiChangedAfterParent (HWND hwnd) |
bool | isLayered () const |
HDC | getDC () |
Allocates a HDC for the window or returns the temporary one obtained from WinAPI BeginPaint within a WM_PAINT event. | |
void | releaseDC () |
Releases the HDC for the window or does nothing in case it was obtained from WinAPI BeginPaint within a WM_PAINT event. | |
void | getSizeHints (MINMAXINFO *mmi) const |
bool | handleNonClientHitTest (const QPoint &globalPos, LRESULT *result) const |
bool | handleNonClientActivate (LRESULT *result) const |
void | updateCustomTitlebar () |
CursorHandlePtr | cursor () const |
void | setCursor (const CursorHandlePtr &c) |
void | applyCursor () |
Applies to cursor property set on the window to the global cursor. | |
bool | testFlag (unsigned f) const |
void | setFlag (unsigned f) const |
void | clearFlag (unsigned f) const |
void | setEnabled (bool enabled) |
bool | isEnabled () const |
void | setWindowIcon (const QIcon &icon) override |
Reimplement to set the window icon to icon. | |
void * | surface (void *nativeConfig, int *err) |
void | invalidateSurface () override |
Invalidates the window's surface by releasing its surface buffers. | |
void | setAlertState (bool enabled) override |
Reimplement this method to set whether the window demands attention (for example, by flashing the taskbar icon) depending on enabled. | |
bool | isAlertState () const override |
Reimplement this method return whether the window is in an alert state. | |
void | alertWindow (int durationMs=0) |
void | stopAlertWindow () |
void | checkForScreenChanged (ScreenChangeMode mode=FromGeometryChange) |
void | registerTouchWindow () |
void | setHasBorderInFullScreen (bool border) override |
bool | hasBorderInFullScreen () const override |
void | setSavedDpi (int dpi) |
int | savedDpi () const |
qreal | dpiRelativeScale (const UINT dpi) const |
bool | isClientAreaExpanded () const |
void | requestUpdate () override |
Requests an QEvent::UpdateRequest event. | |
QPlatformScreen * | screenForGeometry (const QRect &newGeometry) const |
Helper function for finding the new screen for newGeometry in response to a geometry changed event. | |
Public Member Functions inherited from QWindowsBaseWindow | |
QWindowsBaseWindow (QWindow *window) | |
WId | winId () const override |
Reimplement in subclasses to return a handle to the native window. | |
void | setHasBorderInFullScreen (bool border) override |
bool | hasBorderInFullScreen () const override |
QMargins | customMargins () const override |
void | setCustomMargins (const QMargins &margins) override |
unsigned | style () const |
unsigned | exStyle () const |
QPlatformScreen * | screenForGeometry (const QRect &newGeometry) const |
Helper function for finding the new screen for newGeometry in response to a geometry changed event. | |
Public Member Functions inherited from QPlatformWindow | |
QPlatformWindow (QWindow *window) | |
Constructs a platform window with the given top level window. | |
~QPlatformWindow () override | |
Virtual destructor does not delete its top level window. | |
QWindow * | window () const |
Returns the window which belongs to the QPlatformWindow. | |
QPlatformWindow * | parent () const |
Returns the parent platform window (or \nullptr if orphan). | |
QPlatformScreen * | screen () const override |
Returns the platform screen handle corresponding to this platform window, or null if the window is not associated with a screen. | |
virtual void | setWindowFilePath (const QString &title) |
Reimplement to set the window file path to filePath. | |
virtual bool | close () |
Reimplement to let the platform handle non-spontaneous window close. | |
virtual bool | isForeignWindow () const |
QPointF | mapToGlobalF (const QPointF &pos) const |
QPointF | mapFromGlobalF (const QPointF &pos) const |
virtual void | handleContentOrientationChange (Qt::ScreenOrientation orientation) |
Handle changes to the orientation of the platform window's contents. | |
virtual qreal | devicePixelRatio () const |
Reimplement this function in subclass to return the device pixel ratio for the window. | |
virtual bool | setWindowModified (bool modified) |
Reimplement to be able to let Qt indicate that the window has been modified. | |
bool | hasPendingUpdateRequest () const |
Returns true if the window has a pending update request. | |
virtual void | deliverUpdateRequest () |
Delivers an QEvent::UpdateRequest event to the window. | |
virtual bool | allowsIndependentThreadedRendering () const |
Returns whether applications can render new frames from any thread without co-ordination with the main thread. | |
QSize | windowMinimumSize () const |
Returns the QWindow minimum size. | |
QSize | windowMaximumSize () const |
Returns the QWindow maximum size. | |
QSize | windowBaseSize () const |
Returns the QWindow base size. | |
QSize | windowSizeIncrement () const |
Returns the QWindow size increment. | |
QRect | windowGeometry () const |
Returns the QWindow geometry. | |
QRect | windowFrameGeometry () const |
Returns the QWindow frame geometry. | |
QRectF | windowClosestAcceptableGeometry (const QRectF &nativeRect) const |
Public Member Functions inherited from QPlatformSurface | |
virtual | ~QPlatformSurface () |
QSurface * | surface () const |
Static Public Member Functions | |
static bool | handleGeometryChangingMessage (MSG *message, const QWindow *qWindow, const QMargins &marginsDp) |
static bool | setDarkBorderToWindow (HWND hwnd, bool d) |
static void | displayChanged () |
static void | settingsChanged () |
static QScreen * | forcedScreenForGLWindow (const QWindow *w) |
static QWindowsWindow * | windowsWindowOf (const QWindow *w) |
static QWindow * | topLevelOf (QWindow *w) |
static void * | userDataOf (HWND hwnd) |
static void | setUserDataOf (HWND hwnd, void *ud) |
static bool | hasNoNativeFrame (HWND hwnd, Qt::WindowFlags flags) |
static bool | setWindowLayered (HWND hwnd, Qt::WindowFlags flags, bool hasAlpha, qreal opacity) |
static void | setHasBorderInFullScreenStatic (QWindow *window, bool border) |
static void | setHasBorderInFullScreenDefault (bool border) |
static QString | formatWindowTitle (const QString &title) |
Static Public Member Functions inherited from QWindowsBaseWindow | |
static bool | isRtlLayout (HWND hwnd) |
static QWindowsBaseWindow * | baseWindowOf (const QWindow *w) |
static HWND | handleOf (const QWindow *w) |
Static Public Member Functions inherited from QPlatformWindow | |
static QRect | initialGeometry (const QWindow *w, const QRect &initialGeometry, int defaultWidth, int defaultHeight, const QScreen **resultingScreenReturn=nullptr) |
Helper function to get initial geometry on windowing systems which do not do smart positioning and also do not provide a means of centering a transient window w.r.t. | |
static QRectF | closestAcceptableGeometry (const QWindow *w, const QRectF &nativeRect) |
Returns the closest acceptable geometry for a given geometry before a resize/move event for platforms that support it, for example to implement heightForWidth(). |
Static Public Attributes | |
static const char * | embeddedNativeParentHandleProperty = "_q_embedded_native_parent_handle" |
static const char * | hasBorderInFullScreenProperty = "_q_has_border_in_fullscreen" |
Additional Inherited Members | |
Protected Member Functions inherited from QWindowsBaseWindow | |
HWND | parentHwnd () const |
bool | isTopLevel_sys () const |
bool | hasMaximumHeight () const |
bool | hasMaximumWidth () const |
bool | hasMaximumSize () const |
QRect | frameGeometry_sys () const |
QRect | geometry_sys () const |
void | setGeometry_sys (const QRect &rect) const |
QMargins | frameMargins_sys () const |
std::optional< TouchWindowTouchTypes > | touchWindowTouchTypes_sys () const |
void | hide_sys () |
void | raise_sys () |
void | lower_sys () |
void | setWindowTitle_sys (const QString &title) |
Protected Member Functions inherited from QPlatformWindow | |
QPlatformScreen * | screenForGeometry (const QRect &newGeometry) const |
Helper function for finding the new screen for newGeometry in response to a geometry changed event. | |
Static Protected Member Functions inherited from QPlatformWindow | |
static QString | formatWindowTitle (const QString &title, const QString &separator) |
Call this method to put together a window title composed of title separator the application display name. | |
static QSize | constrainWindowSize (const QSize &size) |
Returns a size with both dimensions bounded to [0, QWINDOWSIZE_MAX]. | |
Protected Attributes inherited from QPlatformWindow | |
QScopedPointer< QPlatformWindowPrivate > | d_ptr |
Raster or OpenGL Window.
\list
Definition at line 186 of file qwindowswindow.h.
Definition at line 189 of file qwindowswindow.h.
Enumerator | |
---|---|
FromGeometryChange | |
FromDpiChange | |
FromScreenAdded |
Definition at line 344 of file qwindowswindow.h.
QWindowsWindow::QWindowsWindow | ( | QWindow * | window, |
const QWindowsWindowData & | data ) |
Definition at line 1590 of file qwindowswindow.cpp.
References clearFlag(), Direct3DSurface, HasBorderInFullScreen, hasBorderInFullScreenProperty, registerTouchWindow(), setFlag(), and WithinCreate.
|
override |
Definition at line 1635 of file qwindowswindow.cpp.
References setFlag(), and WithinDestroy.
void QWindowsWindow::alertWindow | ( | int | durationMs = 0 | ) |
Definition at line 3736 of file qwindowswindow.cpp.
Referenced by setAlertState(), and QWindowsContext::windowsProc().
void QWindowsWindow::applyCursor | ( | ) |
Applies to cursor property set on the window to the global cursor.
Definition at line 3681 of file qwindowswindow.cpp.
References applyCursor(), QWindowsCursor::enforceOverrideCursor(), QWindowsCursor::hasOverrideCursor(), and isTopLevel().
Referenced by applyCursor(), and setCursor().
void QWindowsWindow::checkForScreenChanged | ( | ScreenChangeMode | mode = FromGeometryChange | ) |
Definition at line 2354 of file qwindowswindow.cpp.
References FromGeometryChange, QWindowsContext::instance(), QWindowsScreenManager::isSingleScreen(), QWindowsContext::screenManager(), and updateFullFrameMargins().
Referenced by handleDpiChanged(), handleDpiChangedAfterParent(), and QWindowsContext::windowsProc().
|
inline |
Definition at line 330 of file qwindowswindow.h.
Referenced by QWindowsWindow(), setAlertState(), setCursor(), setFrameStrutEventsEnabled(), setGeometry(), setHasBorderInFullScreen(), setMouseGrabEnabled(), setStyle(), windowEvent(), and QWindowsContext::windowsProc().
|
inline |
Definition at line 323 of file qwindowswindow.h.
|
override |
Returns the margin to be used when handling the WM_NCCALCSIZE
message.
Definition at line 3848 of file qwindowswindow.cpp.
|
static |
Definition at line 1781 of file qwindowswindow.cpp.
qreal QWindowsWindow::dpiRelativeScale | ( | const UINT | dpi | ) | const |
Definition at line 2075 of file qwindowswindow.cpp.
Definition at line 1791 of file qwindowswindow.cpp.
References GpuDescription::detect().
|
overridevirtual |
Returns the actual surface format of the window.
Reimplemented from QPlatformWindow.
Definition at line 1670 of file qwindowswindow.cpp.
Definition at line 3999 of file qwindowswindow.cpp.
|
overridevirtual |
Reimplemented from QWindowsBaseWindow.
Definition at line 3045 of file qwindowswindow.cpp.
|
inlineoverridevirtual |
Reimplement this method to return whether frame strut events are enabled.
Reimplemented from QPlatformWindow.
Definition at line 275 of file qwindowswindow.h.
References FrameStrutEventsEnabled, and testFlag().
Referenced by QWindowsContext::windowsProc().
|
overridevirtual |
Reimplemented from QWindowsBaseWindow.
Definition at line 3053 of file qwindowswindow.cpp.
|
inlineoverridevirtual |
Returns the current geometry of a window.
Reimplemented from QWindowsBaseWindow.
Definition at line 227 of file qwindowswindow.h.
HDC QWindowsWindow::getDC | ( | ) |
Allocates a HDC for the window or returns the temporary one obtained from WinAPI BeginPaint within a WM_PAINT event.
Definition at line 2461 of file qwindowswindow.cpp.
void QWindowsWindow::getSizeHints | ( | MINMAXINFO * | mmi | ) | const |
Definition at line 3286 of file qwindowswindow.cpp.
|
inlineoverridevirtual |
Implements QWindowsBaseWindow.
Definition at line 278 of file qwindowswindow.h.
void QWindowsWindow::handleCompositionSettingsChanged | ( | ) |
Definition at line 2068 of file qwindowswindow.cpp.
Referenced by QWindowsContext::windowsProc().
void QWindowsWindow::handleDpiChanged | ( | HWND | hwnd, |
WPARAM | wParam, | ||
LPARAM | lParam ) |
Definition at line 2107 of file qwindowswindow.cpp.
References checkForScreenChanged(), FromDpiChange, setSavedDpi(), and updateFullFrameMargins().
void QWindowsWindow::handleDpiChangedAfterParent | ( | HWND | hwnd | ) |
Definition at line 2155 of file qwindowswindow.cpp.
References checkForScreenChanged(), FromDpiChange, and setSavedDpi().
void QWindowsWindow::handleDpiScaledSize | ( | WPARAM | wParam, |
LPARAM | lParam, | ||
LRESULT * | result ) |
Definition at line 2081 of file qwindowswindow.cpp.
bool QWindowsWindow::handleGeometryChanging | ( | MSG * | message | ) | const |
Definition at line 2975 of file qwindowswindow.cpp.
|
static |
Definition at line 2933 of file qwindowswindow.cpp.
void QWindowsWindow::handleHidden | ( | ) |
Definition at line 2063 of file qwindowswindow.cpp.
Referenced by QWindowsContext::windowsProc().
void QWindowsWindow::handleMoved | ( | ) |
Definition at line 2279 of file qwindowswindow.cpp.
Referenced by QWindowsContext::windowsProc().
bool QWindowsWindow::handleNonClientActivate | ( | LRESULT * | result | ) | const |
Definition at line 3475 of file qwindowswindow.cpp.
bool QWindowsWindow::handleNonClientHitTest | ( | const QPoint & | globalPos, |
LRESULT * | result ) const |
Definition at line 3292 of file qwindowswindow.cpp.
void QWindowsWindow::handleResized | ( | int | wParam, |
LPARAM | lParam ) |
Definition at line 2286 of file qwindowswindow.cpp.
References testFlag(), WithinSetGeometry, and WithinSetStyle.
bool QWindowsWindow::handleWmPaint | ( | HWND | hwnd, |
UINT | message, | ||
WPARAM | wParam, | ||
LPARAM | lParam, | ||
LRESULT * | result ) |
Definition at line 2496 of file qwindowswindow.cpp.
References isSoftwareGl(), OpenGLSurface, and testFlag().
|
override |
Returns whether the WS_BORDER flag will be set for the window in full screen mode.
Definition at line 3975 of file qwindowswindow.cpp.
References HasBorderInFullScreen, and testFlag().
Referenced by setHasBorderInFullScreen().
|
inline |
Definition at line 269 of file qwindowswindow.h.
Referenced by setMouseGrabEnabled(), setVisible(), startDoDragDrop(), and windowEvent().
|
static |
Definition at line 480 of file qwindowswindow.cpp.
|
overridevirtual |
Called as part of QWindow::create(), after constructing the window.
Platforms should prefer to do initialization here instead of in the constructor, as the platform window object will be fully constructed, and associated to the corresponding QWindow, allowing synchronous event delivery.
Reimplemented from QPlatformWindow.
Definition at line 1647 of file qwindowswindow.cpp.
References QWindowsContext::instance().
|
overridevirtual |
Invalidates the window's surface by releasing its surface buffers.
Many platforms do not support releasing the surface memory, and the default implementation does nothing.
The platform window is expected to recreate the surface again if it is needed. For instance, if an OpenGL context is made current on this window.
Reimplemented from QPlatformWindow.
Definition at line 3919 of file qwindowswindow.cpp.
References QWindowsStaticOpenGLContext::destroyWindowSurface(), and QWindowsIntegration::staticOpenGLContext().
|
overridevirtual |
Returns true
if the window should appear active from a style perspective.
This function can make platform-specific isActive checks, such as checking if the QWindow is embedded in an active native window.
Reimplemented from QPlatformWindow.
Definition at line 1872 of file qwindowswindow.cpp.
|
inlineoverridevirtual |
Reimplement this method return whether the window is in an alert state.
Reimplemented from QPlatformWindow.
Definition at line 340 of file qwindowswindow.h.
References AlertState, and testFlag().
Referenced by setAlertState().
|
overridevirtual |
Returns true
if the window is an ancestor of the given child.
Platform overrides should iterate the native window hierarchy of the child, to ensure that ancestary is reflected even with native windows in the window hierarchy.
Reimplemented from QPlatformWindow.
Definition at line 1881 of file qwindowswindow.cpp.
|
inline |
Definition at line 361 of file qwindowswindow.h.
|
overridevirtual |
Returns true
if the window is a child of a non-Qt window.
A embedded window has no parent platform window as reflected though parent(), but will have a native parent window.
Reimplemented from QPlatformWindow.
Definition at line 1887 of file qwindowswindow.cpp.
bool QWindowsWindow::isEnabled | ( | ) | const |
Definition at line 3762 of file qwindowswindow.cpp.
|
inlineoverridevirtual |
Returns if this window is exposed in the windowing system.
An exposeEvent() is sent every time this value changes.
Reimplemented from QPlatformWindow.
Definition at line 235 of file qwindowswindow.h.
References Exposed, and testFlag().
|
inline |
Definition at line 499 of file qwindowswindow.h.
Referenced by setVisible().
|
overridevirtual |
Reimplemented from QWindowsBaseWindow.
Definition at line 3809 of file qwindowswindow.cpp.
Referenced by applyCursor().
bool QWindowsWindow::isVisible | ( | ) | const |
Definition at line 1867 of file qwindowswindow.cpp.
Referenced by setMouseGrabEnabled().
|
inlineoverridevirtual |
Reimplement to be able to let Qt lower windows to the bottom of the desktop.
Reimplemented from QPlatformWindow.
Definition at line 250 of file qwindowswindow.h.
References QWindowsBaseWindow::lower_sys().
Translates the global screen coordinate pos to window coordinates using native methods.
This is required for embedded windows, where the topmost QWindow coordinates are not global screen coordinates.
Returns pos if there is no platform specific implementation.
Reimplemented from QWindowsBaseWindow.
Definition at line 1897 of file qwindowswindow.cpp.
Translates the window coordinate pos to global screen coordinates using native methods.
This is required for embedded windows, where the topmost QWindow coordinates are not global screen coordinates.
Returns pos if there is no platform specific implementation.
Reimplemented from QWindowsBaseWindow.
Definition at line 1892 of file qwindowswindow.cpp.
QWindowsMenuBar * QWindowsWindow::menuBar | ( | ) | const |
Definition at line 3838 of file qwindowswindow.cpp.
Referenced by QWindowsContext::windowsProc().
|
overridevirtual |
Returns the geometry of a window in 'normal' state (neither maximized, fullscreen nor minimized) for saving geometries to application settings.
Reimplemented from QPlatformWindow.
Definition at line 2181 of file qwindowswindow.cpp.
|
inline |
Definition at line 264 of file qwindowswindow.h.
|
overridevirtual |
Reimplement to propagate the size hints of the QWindow.
The size hints include QWindow::minimumSize(), QWindow::maximumSize(), QWindow::sizeIncrement(), and QWindow::baseSize().
Reimplemented from QPlatformWindow.
Definition at line 2917 of file qwindowswindow.cpp.
|
inlineoverridevirtual |
Reimplement to be able to let Qt raise windows to the top of the desktop.
Reimplemented from QPlatformWindow.
Definition at line 249 of file qwindowswindow.h.
References QWindowsBaseWindow::raise_sys().
void QWindowsWindow::registerTouchWindow | ( | ) |
Definition at line 3938 of file qwindowswindow.cpp.
References QWindowsContext::instance(), QWindowsIntegration::instance(), setFlag(), QWindowsContext::SI_SupportsTouch, QWindowsContext::systemInfo(), testFlag(), and TouchRegistered.
Referenced by QWindowsWindow().
void QWindowsWindow::releaseDC | ( | ) |
Releases the HDC for the window or does nothing in case it was obtained from WinAPI BeginPaint within a WM_PAINT event.
Definition at line 2478 of file qwindowswindow.cpp.
|
overridevirtual |
Reimplement to let Qt be able to request activation/focus for a window.
Some window systems will probably not have callbacks for this functionality, and then calling QWindowSystemInterface::handleFocusWindowChanged(QWindow *w) would be sufficient.
If the window system has some event handling/callbacks then call QWindowSystemInterface::handleFocusWindowChanged(QWindow *w) when the window system gives the notification.
Default implementation calls QWindowSystem::handleFocusWindowChanged(QWindow *w)
Reimplemented from QPlatformWindow.
Definition at line 3120 of file qwindowswindow.cpp.
References QWindowsIntegration::instance().
|
overridevirtual |
Requests an QEvent::UpdateRequest event.
The event will be delivered to the QWindow.
QPlatformWindow subclasses can re-implement this function to provide display refresh synchronized updates. The event should be delivered using QPlatformWindow::deliverUpdateRequest() to not get out of sync with the internal state of QWindow.
The default implementation posts an UpdateRequest event to the window after an interval that is at most 5 ms. If the window's associated screen reports a \l{QPlatformScreen::refreshRate()}{refresh rate} higher than 60 Hz, the interval is scaled down to a valid smaller than 5. The additional time is there to give the event loop a bit of idle time to gather system events.
Reimplemented from QPlatformWindow.
Definition at line 4004 of file qwindowswindow.cpp.
|
inline |
Definition at line 230 of file qwindowswindow.h.
|
overridevirtual |
The safe area margins of a window represent the area that is safe to place content within, without intersecting areas of the screen where system UI is placed, or where a screen bezel may cover the content.
Reimplemented from QPlatformWindow.
Definition at line 2193 of file qwindowswindow.cpp.
|
inline |
Definition at line 358 of file qwindowswindow.h.
QPlatformScreen * QPlatformWindow::screenForGeometry | ( | const QRect & | newGeometry | ) | const |
Helper function for finding the new screen for newGeometry in response to a geometry changed event.
Returns the new screen if the window was moved to another virtual sibling. If the screen changes, the platform plugin should call QWindowSystemInterface::handleWindowScreenChanged().
Definition at line 136 of file qplatformwindow.cpp.
|
overridevirtual |
Reimplement this method to set whether the window demands attention (for example, by flashing the taskbar icon) depending on enabled.
Reimplemented from QPlatformWindow.
Definition at line 3723 of file qwindowswindow.cpp.
References AlertState, alertWindow(), clearFlag(), isAlertState(), setFlag(), and stopAlertWindow().
void QWindowsWindow::setCursor | ( | const CursorHandlePtr & | c | ) |
Definition at line 3702 of file qwindowswindow.cpp.
References applyCursor(), clearFlag(), RestoreOverrideCursor, and testFlag().
Sets custom margins to be added to the default margins determined by the windows style in the handling of the WM_NCCALCSIZE message.
Sets themargins to be used when handling the WM_NCCALCSIZE
message. It is possible to remove a frame border by specifying a negative value.
This is currently used to give the Aero-style QWizard a smaller top margin. The property can be set using QPlatformNativeInterface::setWindowProperty() or, before platform window creation, by setting a dynamic property on the QWindow (see QWindowsIntegration::createPlatformWindow()).
Definition at line 3865 of file qwindowswindow.cpp.
void QWindowsWindow::setDarkBorder | ( | bool | d | ) |
Definition at line 3830 of file qwindowswindow.cpp.
|
static |
Definition at line 3819 of file qwindowswindow.cpp.
References DwmwaUseImmersiveDarkMode, and DwmwaUseImmersiveDarkModeBefore20h1.
void QWindowsWindow::setEnabled | ( | bool | enabled | ) |
Definition at line 3767 of file qwindowswindow.cpp.
References setStyle(), and QWindowsBaseWindow::style().
Referenced by windowEvent().
void QWindowsWindow::setExStyle | ( | unsigned | s | ) | const |
Definition at line 2888 of file qwindowswindow.cpp.
|
inline |
Definition at line 329 of file qwindowswindow.h.
Referenced by QWindowsWindow(), ~QWindowsWindow(), QWindowsIntegration::createPlatformWindow(), registerTouchWindow(), setAlertState(), setFrameStrutEventsEnabled(), setGeometry(), setHasBorderInFullScreen(), setStyle(), startSystemResize(), windowEvent(), and QWindowsContext::windowsProc().
|
overridevirtual |
Reimplement this method to set whether frame strut events should be sent to enabled.
Reimplemented from QPlatformWindow.
Definition at line 3277 of file qwindowswindow.cpp.
References clearFlag(), FrameStrutEventsEnabled, and setFlag().
Definition at line 2981 of file qwindowswindow.cpp.
This function is called by Qt whenever a window is moved or resized using the QWindow API.
Unless you also override QPlatformWindow::geometry(), you need to call the baseclass implementation of this function in any override of QPlatformWindow::setGeometry(), as QWindow::geometry() is expected to report back the set geometry until a confirmation (or rejection) of the new geometry comes back from the window manager and is reported via QWindowSystemInterface::handleGeometryChange().
Window move/resizes can also be triggered spontaneously by the window manager, or as a response to an earlier requested move/resize via the Qt APIs. There is no need to call this function from the window manager callback, instead call QWindowSystemInterface::handleGeometryChange().
The position(x, y) part of the rect might be inclusive or exclusive of the window frame as returned by frameMargins(). You can detect this in the plugin by checking qt_window_private(window())->positionPolicy.
Reimplemented from QPlatformWindow.
Definition at line 2248 of file qwindowswindow.cpp.
References clearFlag(), setFlag(), and WithinSetGeometry.
|
override |
Sets whether the WS_BORDER flag will be set for the window in full screen mode to border.
See also \l [QtDoc] {Fullscreen OpenGL Based Windows}
Definition at line 3980 of file qwindowswindow.cpp.
References clearFlag(), HasBorderInFullScreen, hasBorderInFullScreen(), and setFlag().
|
static |
Definition at line 3970 of file qwindowswindow.cpp.
Referenced by QWindowsApplication::setHasBorderInFullScreenDefault().
Definition at line 3962 of file qwindowswindow.cpp.
References hasBorderInFullScreenProperty.
|
overridevirtual |
Reimplemented from QPlatformWindow.
Definition at line 3194 of file qwindowswindow.cpp.
References QWindowsContext::instance().
Reimplement to be able to let Qt set the mask of a window.
Reimplemented from QPlatformWindow.
Definition at line 3101 of file qwindowswindow.cpp.
void QWindowsWindow::setMenuBar | ( | QWindowsMenuBar * | mb | ) |
Definition at line 3843 of file qwindowswindow.cpp.
Referenced by QWindowsMenuBar::install().
|
overridevirtual |
Reimplemented from QPlatformWindow.
Definition at line 3212 of file qwindowswindow.cpp.
References AutoMouseCapture, clearFlag(), hasMouseCapture(), and isVisible().
Referenced by setVisible().
Reimplement to be able to let Qt set the opacity level of a window.
Reimplemented from QPlatformWindow.
Definition at line 3060 of file qwindowswindow.cpp.
|
overridevirtual |
This function is called to enable native child window in QPA.
It is common not to support this feature in Window systems, but can be faked. When this function is called all geometry of this platform window will be relative to the parent.
Reimplemented from QPlatformWindow.
Definition at line 2018 of file qwindowswindow.cpp.
|
inline |
Definition at line 357 of file qwindowswindow.h.
Referenced by handleDpiChanged(), and handleDpiChangedAfterParent().
void QWindowsWindow::setStyle | ( | unsigned | s | ) | const |
Definition at line 2880 of file qwindowswindow.cpp.
References clearFlag(), setFlag(), and WithinSetStyle.
Referenced by setEnabled().
|
static |
Definition at line 1786 of file qwindowswindow.cpp.
Referenced by QWindowsContext::windowsProc().
Definition at line 482 of file qwindowswindow.h.
|
overridevirtual |
Reimplemented in subclasses to show the surface if visible is true
, and hide it if visible is false
.
The default implementation sends a synchronous expose event.
Reimplemented from QPlatformWindow.
Definition at line 1837 of file qwindowswindow.cpp.
References hasMouseCapture(), QWindowsBaseWindow::hide_sys(), isLayered(), and setMouseGrabEnabled().
|
overridevirtual |
Requests setting the window flags of this surface to flags.
Reimplemented from QPlatformWindow.
Definition at line 2540 of file qwindowswindow.cpp.
Reimplement to set the window icon to icon.
Reimplemented from QPlatformWindow.
Definition at line 3791 of file qwindowswindow.cpp.
|
static |
Definition at line 489 of file qwindowswindow.cpp.
|
overridevirtual |
Requests setting the window state of this surface to type.
Qt::WindowActive can be ignored.
Reimplemented from QPlatformWindow.
Definition at line 2703 of file qwindowswindow.cpp.
Reimplement to set the window title to title.
The implementation might want to append the application display name to the window title, like Windows and Linux do.
\l QPlatformWindow::windowTitle() can be used to retrieve the actual window title.
Reimplemented from QPlatformWindow.
Definition at line 2529 of file qwindowswindow.cpp.
|
overridevirtual |
Reimplement this method to start a system move operation if the system supports it and return true to indicate success.
The default implementation is empty and does nothing.
Reimplemented from QPlatformWindow.
Definition at line 3270 of file qwindowswindow.cpp.
|
overridevirtual |
Reimplement this method to start a system resize operation if the system supports it and return true to indicate success.
The default implementation is empty and does nothing with edges.
Reimplemented from QPlatformWindow.
Definition at line 3259 of file qwindowswindow.cpp.
References setFlag(), and SizeGripOperation.
void QWindowsWindow::stopAlertWindow | ( | ) |
Definition at line 3751 of file qwindowswindow.cpp.
Referenced by setAlertState().
Definition at line 3885 of file qwindowswindow.cpp.
|
inline |
Definition at line 328 of file qwindowswindow.h.
Referenced by frameStrutEventsEnabled(), handleResized(), handleWmPaint(), hasBorderInFullScreen(), isAlertState(), isExposed(), isValidWheelReceiver(), registerTouchWindow(), setCursor(), and QWindowsContext::windowsProc().
Definition at line 1803 of file qwindowswindow.cpp.
References QWindowsContext::instance().
void QWindowsWindow::updateCustomTitlebar | ( | ) |
Definition at line 3487 of file qwindowswindow.cpp.
References QWindowsIntegration::instance().
Referenced by QWindowsContext::windowsProc().
void QWindowsWindow::updateFullFrameMargins | ( | ) |
Definition at line 2991 of file qwindowswindow.cpp.
Referenced by checkForScreenChanged(), and handleDpiChanged().
void QWindowsWindow::updateRestoreGeometry | ( | ) |
Definition at line 2698 of file qwindowswindow.cpp.
Referenced by QWindowsContext::windowsProc().
|
inlinestatic |
Definition at line 477 of file qwindowswindow.h.
|
overridevirtual |
Reimplement this method to be able to do any platform specific event handling.
All non-synthetic events for window() are passed to this function before being sent to QWindow::event().
Return true if the event should not be passed on to the QWindow.
Subclasses should always call the base class implementation.
Reimplemented from QWindowsBaseWindow.
Definition at line 2894 of file qwindowswindow.cpp.
References BlockedByModal, clearFlag(), hasMouseCapture(), setEnabled(), and setFlag().
|
inlinestatic |
Definition at line 469 of file qwindowswindow.h.
|
overridevirtual |
Reimplement to return the actual window title used in the underlying windowing system unless the title set for the QWindow which belongs to this QPlatformWindow (i.e.
the window returned by \l QPlatformWindow::window) is always used without modification.
Reimplemented from QPlatformWindow.
Definition at line 2535 of file qwindowswindow.cpp.
|
static |
Definition at line 354 of file qwindowswindow.h.
Referenced by QWindowsContext::shouldHaveNonClientDpiScaling().
|
static |
Definition at line 355 of file qwindowswindow.h.
Referenced by QWindowsWindow(), and setHasBorderInFullScreenStatic().