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 Class Reference

Raster or OpenGL Window. More...

#include <qwindowswindow.h>

+ Inheritance diagram for QWindowsWindow:
+ Collaboration diagram for QWindowsWindow:

Public Types

enum  Flags {
  AutoMouseCapture = 0x1 , WithinSetParent = 0x2 , WithinSetGeometry = 0x8 , OpenGLSurface = 0x10 ,
  OpenGLDoubleBuffered = 0x40 , OpenGlPixelFormatInitialized = 0x80 , BlockedByModal = 0x100 , SizeGripOperation = 0x200 ,
  FrameStrutEventsEnabled = 0x400 , SynchronousGeometryChangeEvent = 0x800 , WithinSetStyle = 0x1000 , WithinDestroy = 0x2000 ,
  TouchRegistered = 0x4000 , AlertState = 0x8000 , Exposed = 0x10000 , WithinCreate = 0x20000 ,
  WithinMaximize = 0x40000 , MaximizeToFullScreen = 0x80000 , Compositing = 0x100000 , HasBorderInFullScreen = 0x200000 ,
  VulkanSurface = 0x400000 , ResizeMoveActive = 0x800000 , DisableNonClientScaling = 0x1000000 , Direct3DSurface = 0x2000000 ,
  RestoreOverrideCursor = 0x4000000
}
 
enum  ScreenChangeMode { FromGeometryChange , FromDpiChange }
 
- Public Types inherited from QWindowsBaseWindow
using TouchWindowTouchType = QNativeInterface::Private::QWindowsApplication::TouchWindowTouchType
 
using TouchWindowTouchTypes = QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes
 

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.
 
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.
 
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 &region) 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)
 
QWindowsMenuBarmenuBar () 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
 
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.
 
voidsurface (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
 
QPlatformScreenscreenForGeometry (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
 
QPlatformScreenscreenForGeometry (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.
 
QWindowwindow () const
 Returns the window which belongs to the QPlatformWindow.
 
QPlatformWindowparent () const
 Returns the parent platform window (or \nullptr if orphan).
 
QPlatformScreenscreen () const override
 Returns the platform screen handle corresponding to this platform window, or null if the window is not associated with a screen.
 
virtual QMargins safeAreaMargins () const
 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.
 
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.
 
virtual void requestUpdate ()
 Requests an QEvent::UpdateRequest event.
 
bool hasPendingUpdateRequest () const
 Returns true if the window has a pending update request.
 
virtual void deliverUpdateRequest ()
 Delivers an QEvent::UpdateRequest event to the window.
 
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 ()
 
QSurfacesurface () 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 QScreenforcedScreenForGLWindow (const QWindow *w)
 
static QWindowsWindowwindowsWindowOf (const QWindow *w)
 
static QWindowtopLevelOf (QWindow *w)
 
static voiduserDataOf (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 QWindowsBaseWindowbaseWindowOf (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 Member Functions inherited from QPlatformSurface
static bool isRasterSurface (QSurface *surface)
 

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
 
QRect frameGeometry_sys () const
 
QRect geometry_sys () const
 
void setGeometry_sys (const QRect &rect) const
 
QMargins frameMargins_sys () const
 
std::optional< TouchWindowTouchTypestouchWindowTouchTypes_sys () const
 
void hide_sys ()
 
void raise_sys ()
 
void lower_sys ()
 
void setWindowTitle_sys (const QString &title)
 
- Protected Member Functions inherited from QPlatformWindow
QPlatformScreenscreenForGeometry (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< QPlatformWindowPrivated_ptr
 

Detailed Description

Raster or OpenGL Window.

\list

  • Raster type: handleWmPaint() is implemented to to bitblt the image. The DC can be accessed via getDC/releaseDC, which has special handling when within a paint event (in that case, the DC obtained from BeginPaint() is returned).
  • Open GL: The first time QWindowsGLContext accesses the handle, it sets up the pixelformat on the DC which in turn sets it on the window (see flag PixelFormatInitialized). handleWmPaint() is empty (although required). \endlist

Definition at line 179 of file qwindowswindow.h.

Member Enumeration Documentation

◆ Flags

Enumerator
AutoMouseCapture 
WithinSetParent 

Automatic mouse capture on button press.

WithinSetGeometry 
OpenGLSurface 
OpenGLDoubleBuffered 
OpenGlPixelFormatInitialized 
BlockedByModal 
SizeGripOperation 
FrameStrutEventsEnabled 
SynchronousGeometryChangeEvent 
WithinSetStyle 
WithinDestroy 
TouchRegistered 
AlertState 
Exposed 
WithinCreate 
WithinMaximize 
MaximizeToFullScreen 
Compositing 
HasBorderInFullScreen 
VulkanSurface 
ResizeMoveActive 
DisableNonClientScaling 
Direct3DSurface 
RestoreOverrideCursor 

Definition at line 182 of file qwindowswindow.h.

◆ ScreenChangeMode

Enumerator
FromGeometryChange 
FromDpiChange 

Definition at line 333 of file qwindowswindow.h.

Constructor & Destructor Documentation

◆ QWindowsWindow()

◆ ~QWindowsWindow()

QWindowsWindow::~QWindowsWindow ( )
override

Definition at line 1535 of file qwindowswindow.cpp.

References QWindowsThemeCache::clearThemeCache(), QWindowsWindowData::hwnd, setFlag(), testFlag(), TouchRegistered, and WithinDestroy.

+ Here is the call graph for this function:

Member Function Documentation

◆ alertWindow()

void QWindowsWindow::alertWindow ( int durationMs = 0)

Definition at line 3206 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd, and info.

Referenced by setAlertState().

+ Here is the caller graph for this function:

◆ applyCursor()

void QWindowsWindow::applyCursor ( )

Applies to cursor property set on the window to the global cursor.

See also
QWindowsCursor

Definition at line 3151 of file qwindowswindow.cpp.

References applyCursor(), defaultCursor(), QWindowsCursor::enforceOverrideCursor(), CursorHandle::handle(), handle(), QWindowsCursor::hasOverrideCursor(), CursorHandle::isNull(), isTopLevel(), QPlatformWindow::parent(), QPlatformWindow::window(), and windowsWindowOf().

Referenced by applyCursor(), and setCursor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkForScreenChanged()

void QWindowsWindow::checkForScreenChanged ( ScreenChangeMode mode = FromGeometryChange)

Definition at line 2253 of file qwindowswindow.cpp.

References equalDpi(), FromGeometryChange, QWindowsWindowData::hwnd, QWindowsContext::instance(), QPlatformWindow::isForeignWindow(), QWindowsScreenManager::isSingleScreen(), QWindowsBaseWindow::isTopLevel_sys(), QPlatformWindow::parent(), qCDebug, savedDpi(), QPlatformWindow::screen(), updateFullFrameMargins(), and QPlatformWindow::window().

Referenced by handleDpiChanged(), and handleDpiChangedAfterParent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearFlag()

void QWindowsWindow::clearFlag ( unsigned f) const
inline

Definition at line 319 of file qwindowswindow.h.

Referenced by QWindowsWindow(), setAlertState(), setCursor(), setFrameStrutEventsEnabled(), setGeometry(), setHasBorderInFullScreen(), setMouseGrabEnabled(), setStyle(), and windowEvent().

+ Here is the caller graph for this function:

◆ cursor()

CursorHandlePtr QWindowsWindow::cursor ( ) const
inline

Definition at line 312 of file qwindowswindow.h.

Referenced by applyNewCursor().

+ Here is the caller graph for this function:

◆ customMargins()

QMargins QWindowsWindow::customMargins ( ) const
override

Returns the margin to be used when handling the WM_NCCALCSIZE message.

Definition at line 3318 of file qwindowswindow.cpp.

References QWindowsWindowData::customMargins, QWindowsWindowData::flags, and Qt::FramelessWindowHint.

Referenced by handleDpiScaledSize(), and setGeometry().

+ Here is the caller graph for this function:

◆ displayChanged()

void QWindowsWindow::displayChanged ( )
static

Definition at line 1681 of file qwindowswindow.cpp.

Referenced by qDisplayChangeObserverWndProc().

+ Here is the caller graph for this function:

◆ dpiRelativeScale()

qreal QWindowsWindow::dpiRelativeScale ( const UINT dpi) const

Definition at line 1980 of file qwindowswindow.cpp.

References QWindowsScreen::baseDpi, QHighDpiScaling::roundScaleFactor(), and savedDpi().

Referenced by handleDpiChanged(), handleDpiChangedAfterParent(), and handleDpiScaledSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forcedScreenForGLWindow()

QScreen * QWindowsWindow::forcedScreenForGLWindow ( const QWindow * w)
static

Definition at line 1691 of file qwindowswindow.cpp.

References GpuDescription::detect(), nullptr, and screenForDeviceName().

Referenced by calcPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format()

QSurfaceFormat QWindowsWindow::format ( ) const
overridevirtual

Returns the actual surface format of the window.

Reimplemented from QPlatformWindow.

Definition at line 1570 of file qwindowswindow.cpp.

References QPlatformWindow::window().

Referenced by QWindowsDirect2DWindow::copyBackBuffer(), and setOpacity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formatWindowTitle()

QString QWindowsWindow::formatWindowTitle ( const QString & title)
static

Definition at line 3469 of file qwindowswindow.cpp.

References QPlatformWindow::formatWindowTitle(), QStringLiteral, and title.

Referenced by QWindowsIntegration::createPlatformWindow(), and setWindowTitle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ frameMargins()

QMargins QWindowsWindow::frameMargins ( ) const
overridevirtual

Reimplemented from QWindowsBaseWindow.

Definition at line 2828 of file qwindowswindow.cpp.

References fullFrameMargins(), QWindowsWindowData::hasFrame, QWindowsWindowData::hwnd, invisibleMargins(), and isTopLevel().

Referenced by handleNonClientHitTest(), and setGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ frameStrutEventsEnabled()

bool QWindowsWindow::frameStrutEventsEnabled ( ) const
inlineoverridevirtual

Reimplement this method to return whether frame strut events are enabled.

Reimplemented from QPlatformWindow.

Definition at line 266 of file qwindowswindow.h.

References FrameStrutEventsEnabled, and testFlag().

+ Here is the call graph for this function:

◆ fullFrameMargins()

QMargins QWindowsWindow::fullFrameMargins ( ) const
overridevirtual

Reimplemented from QWindowsBaseWindow.

Definition at line 2836 of file qwindowswindow.cpp.

References QWindowsWindowData::flags, QWindowsWindowData::fullFrameMargins, QWindowsWindowData::hwnd, and shouldOmitFrameAdjustment().

Referenced by frameMargins(), getSizeHints(), handleDpiScaledSize(), handleGeometryChanging(), normalGeometry(), setGeometry(), and setMask().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ geometry()

QRect QWindowsWindow::geometry ( ) const
inlineoverridevirtual

Returns the current geometry of a window.

Reimplemented from QWindowsBaseWindow.

Definition at line 220 of file qwindowswindow.h.

References QWindowsWindowData::geometry.

Referenced by QWindowsDirect2DWindow::flush(), handleDpiChangedAfterParent(), handleDpiScaledSize(), and setWindowFlags().

+ Here is the caller graph for this function:

◆ getDC()

HDC QWindowsWindow::getDC ( )

Allocates a HDC for the window or returns the temporary one obtained from WinAPI BeginPaint within a WM_PAINT event.

See also
releaseDC()

Definition at line 2355 of file qwindowswindow.cpp.

References handle(), QGuiApplication::layoutDirection, and Qt::RightToLeft.

+ Here is the call graph for this function:

◆ getSizeHints()

void QWindowsWindow::getSizeHints ( MINMAXINFO * mmi) const

Definition at line 3069 of file qwindowswindow.cpp.

References QWindowsGeometryHint::applyToMinMaxInfo(), fullFrameMargins(), qCDebug, and QPlatformWindow::window().

Referenced by msgUnableToSetGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handle()

HWND QWindowsWindow::handle ( ) const
inlineoverridevirtual

◆ handleCompositionSettingsChanged()

void QWindowsWindow::handleCompositionSettingsChanged ( )

Definition at line 1968 of file qwindowswindow.cpp.

References applyBlurBehindWindow(), QSurface::Direct3DSurface, handle(), QSurface::OpenGLSurface, QSurface::VulkanSurface, and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ handleDpiChanged()

void QWindowsWindow::handleDpiChanged ( HWND hwnd,
WPARAM wParam,
LPARAM lParam )

◆ handleDpiChangedAfterParent()

void QWindowsWindow::handleDpiChangedAfterParent ( HWND hwnd)

Definition at line 2060 of file qwindowswindow.cpp.

References checkForScreenChanged(), dpiRelativeScale(), FromDpiChange, geometry(), setGeometry(), and setSavedDpi().

+ Here is the call graph for this function:

◆ handleDpiScaledSize()

void QWindowsWindow::handleDpiScaledSize ( WPARAM wParam,
LPARAM lParam,
LRESULT * result )

Definition at line 1986 of file qwindowswindow.cpp.

References QWindowsWindowData::customMargins, customMargins(), dpiRelativeScale(), QWindowsWindowData::flags, Qt::FramelessWindowHint, fullFrameMargins(), geometry(), QSize::height(), QRect::size(), SIZE, and QSize::width().

+ Here is the call graph for this function:

◆ handleGeometryChanging()

bool QWindowsWindow::handleGeometryChanging ( MSG * message) const

Definition at line 2759 of file qwindowswindow.cpp.

References fullFrameMargins(), handleGeometryChangingMessage(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ handleGeometryChangingMessage()

bool QWindowsWindow::handleGeometryChangingMessage ( MSG * message,
const QWindow * qWindow,
const QMargins & marginsDp )
static

Definition at line 2717 of file qwindowswindow.cpp.

References QPlatformWindow::closestAcceptableGeometry(), QWindowsWindowData::embedded, QMargins::left(), Qt::WindowStaysOnBottomHint, and windowsWindowOf().

Referenced by handleGeometryChanging(), and QWindowsContext::windowsProc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleHidden()

void QWindowsWindow::handleHidden ( )

Definition at line 1963 of file qwindowswindow.cpp.

◆ handleMoved()

void QWindowsWindow::handleMoved ( )

Definition at line 2178 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd, testFlag(), and WithinSetParent.

+ Here is the call graph for this function:

◆ handleNonClientHitTest()

bool QWindowsWindow::handleNonClientHitTest ( const QPoint & globalPos,
LRESULT * result ) const

Definition at line 3075 of file qwindowswindow.cpp.

References QWindowsWindowData::flags, Qt::FramelessWindowHint, frameMargins(), QHighDpi::fromNativePixels(), QSize::height(), QWindowsWindowData::hwnd, invisibleMargins(), isActive(), QSize::isEmpty(), QMargins::top(), QSize::width(), QPlatformWindow::window(), Qt::WindowNoState, QPoint::x(), and QPoint::y().

+ Here is the call graph for this function:

◆ handleResized()

void QWindowsWindow::handleResized ( int wParam,
LPARAM lParam )

Definition at line 2185 of file qwindowswindow.cpp.

References Qt::CustomizeWindowHint, QWindowsWindowData::flags, Qt::FramelessWindowHint, QWindowsWindowData::hwnd, invisibleMargins(), MaximizeToFullScreen, qCDebug, testFlag(), Qt::WindowFullScreen, Qt::WindowMaximized, Qt::WindowMinimized, Qt::WindowNoState, Qt::WindowTitleHint, WithinSetGeometry, and WithinSetStyle.

+ Here is the call graph for this function:

◆ handleWmPaint()

bool QWindowsWindow::handleWmPaint ( HWND hwnd,
UINT message,
WPARAM wParam,
LPARAM lParam,
LRESULT * result )

Definition at line 2390 of file qwindowswindow.cpp.

References QEventLoop::ExcludeUserInputEvents, QWindowSystemInterface::flushWindowSystemEvents(), QWindowsWindowData::hwnd, QWindowsContext::instance(), isSoftwareGl(), isVisible(), OpenGLSurface, qrectFromRECT(), testFlag(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ hasBorderInFullScreen()

bool QWindowsWindow::hasBorderInFullScreen ( ) const
override

Returns whether the WS_BORDER flag will be set for the window in full screen mode.

Definition at line 3445 of file qwindowswindow.cpp.

References HasBorderInFullScreen, and testFlag().

Referenced by setHasBorderInFullScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasMouseCapture()

bool QWindowsWindow::hasMouseCapture ( ) const
inline

Definition at line 260 of file qwindowswindow.h.

References QWindowsWindowData::hwnd.

Referenced by getWindowUnderPointer(), setMouseGrabEnabled(), setVisible(), and windowEvent().

+ Here is the caller graph for this function:

◆ hasNoNativeFrame()

bool QWindowsWindow::hasNoNativeFrame ( HWND hwnd,
Qt::WindowFlags flags )
static

Definition at line 469 of file qwindowswindow.cpp.

References Qt::FramelessWindowHint, and QWindowsBaseWindow::style().

Referenced by setWindowLayered(), and setWindowOpacity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialize()

void QWindowsWindow::initialize ( )
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 1545 of file qwindowswindow.cpp.

References Qt::Desktop, handle(), QWindowsContext::instance(), QWindowCreationContext::obtainedPos, QWindowCreationContext::obtainedSize, QWindowCreationContext::requestedGeometryIn, QPlatformWindow::screen(), screenForGeometry(), setSavedDpi(), setWindowState(), state, QPlatformWindow::window(), Qt::WindowFullScreen, and Qt::WindowMaximized.

+ Here is the call graph for this function:

◆ invalidateSurface()

void QWindowsWindow::invalidateSurface ( )
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 3389 of file qwindowswindow.cpp.

References QWindowsIntegration::staticOpenGLContext(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ isActive()

bool QWindowsWindow::isActive ( ) const
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 1772 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd.

Referenced by handleNonClientHitTest().

+ Here is the caller graph for this function:

◆ isAlertState()

bool QWindowsWindow::isAlertState ( ) const
inlineoverridevirtual

Reimplement this method return whether the window is in an alert state.

See also
setAlertState()
Since
5.1

Reimplemented from QPlatformWindow.

Definition at line 329 of file qwindowswindow.h.

References AlertState, and testFlag().

Referenced by setAlertState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAncestorOf()

bool QWindowsWindow::isAncestorOf ( const QPlatformWindow * child) const
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 1781 of file qwindowswindow.cpp.

References child, and QWindowsWindowData::hwnd.

◆ isEmbedded()

bool QWindowsWindow::isEmbedded ( ) const
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 1787 of file qwindowswindow.cpp.

References QWindowsWindowData::embedded.

◆ isEnabled()

bool QWindowsWindow::isEnabled ( ) const

Definition at line 3232 of file qwindowswindow.cpp.

References QWindowsBaseWindow::style().

+ Here is the call graph for this function:

◆ isExposed()

bool QWindowsWindow::isExposed ( ) const
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 227 of file qwindowswindow.h.

References Exposed, and testFlag().

+ Here is the call graph for this function:

◆ isLayered()

bool QWindowsWindow::isLayered ( ) const
inline

Definition at line 483 of file qwindowswindow.h.

References QWindowsWindowData::hwnd.

Referenced by setVisible(), and setWindowLayered().

+ Here is the caller graph for this function:

◆ isTopLevel()

bool QWindowsWindow::isTopLevel ( ) const
overridevirtual

Reimplemented from QWindowsBaseWindow.

Definition at line 3279 of file qwindowswindow.cpp.

References QWindowsWindowData::embedded, and QPlatformWindow::window().

Referenced by QWindowsWindow(), applyCursor(), frameMargins(), setMask(), and setWindowFlags().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isVisible()

bool QWindowsWindow::isVisible ( ) const

Definition at line 1767 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd.

Referenced by handleWmPaint(), setGeometry(), and setMouseGrabEnabled().

+ Here is the caller graph for this function:

◆ lower()

void QWindowsWindow::lower ( )
inlineoverridevirtual

Reimplement to be able to let Qt lower windows to the bottom of the desktop.

Reimplemented from QPlatformWindow.

Definition at line 241 of file qwindowswindow.h.

References QWindowsBaseWindow::lower_sys().

+ Here is the call graph for this function:

◆ mapFromGlobal()

QPoint QWindowsWindow::mapFromGlobal ( const QPoint & pos) const
overridevirtual

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 1797 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd, QWindowsGeometryHint::mapFromGlobal(), and pos.

+ Here is the call graph for this function:

◆ mapToGlobal()

QPoint QWindowsWindow::mapToGlobal ( const QPoint & pos) const
overridevirtual

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 1792 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd, QWindowsGeometryHint::mapToGlobal(), and pos.

+ Here is the call graph for this function:

◆ menuBar()

QWindowsMenuBar * QWindowsWindow::menuBar ( ) const

Definition at line 3308 of file qwindowswindow.cpp.

References QPointer< T >::data().

+ Here is the call graph for this function:

◆ normalGeometry()

QRect QWindowsWindow::normalGeometry ( ) const
overridevirtual

Returns the geometry of a window in 'normal' state (neither maximized, fullscreen nor minimized) for saving geometries to application settings.

Since
5.3

Reimplemented from QPlatformWindow.

Definition at line 2086 of file qwindowswindow.cpp.

References QWindowsGeometryHint::frame(), frame, fullFrameMargins(), handle(), QWindowsWindowData::hwnd, QRect::isValid(), normalFrameGeometry(), QPlatformWindow::window(), and Qt::WindowFullScreen.

+ Here is the call graph for this function:

◆ opacity()

qreal QWindowsWindow::opacity ( ) const
inline

Definition at line 255 of file qwindowswindow.h.

Referenced by QWindowsWindow(), QWindowsDirect2DWindow::present(), and setWindowLayered().

+ Here is the caller graph for this function:

◆ propagateSizeHints()

void QWindowsWindow::propagateSizeHints ( )
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 2712 of file qwindowswindow.cpp.

References qCDebug, and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ raise()

void QWindowsWindow::raise ( )
inlineoverridevirtual

Reimplement to be able to let Qt raise windows to the top of the desktop.

Reimplemented from QPlatformWindow.

Definition at line 240 of file qwindowswindow.h.

References QWindowsBaseWindow::raise_sys().

+ Here is the call graph for this function:

◆ registerTouchWindow()

void QWindowsWindow::registerTouchWindow ( )

Definition at line 3408 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd, QWindowsContext::instance(), QWindowsIntegration::instance(), qErrnoWarning(), qPrintable, setFlag(), QWindowsContext::SI_SupportsTouch, testFlag(), TouchRegistered, QWindowsBaseWindow::touchWindowTouchTypes_sys(), and QPlatformWindow::window().

Referenced by QWindowsWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ releaseDC()

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.

See also
getDC()

Definition at line 2372 of file qwindowswindow.cpp.

References handle().

+ Here is the call graph for this function:

◆ requestActivateWindow()

void QWindowsWindow::requestActivateWindow ( )
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 2903 of file qwindowswindow.cpp.

References Qt::ApplicationActive, QGuiApplication::applicationState(), QWindowsWindowData::flags, QWindowsWindowData::hwnd, QWindowsIntegration::instance(), qCDebug, qCWarning, qScopeGuard(), Qt::ToolTip, QPlatformWindow::window(), Qt::WindowStaysOnBottomHint, and Qt::WindowStaysOnTopHint.

+ Here is the call graph for this function:

◆ restoreGeometry()

QRect QWindowsWindow::restoreGeometry ( ) const
inline

Definition at line 222 of file qwindowswindow.h.

References QWindowsWindowData::restoreGeometry.

◆ savedDpi()

int QWindowsWindow::savedDpi ( ) const
inline

Definition at line 347 of file qwindowswindow.h.

Referenced by checkForScreenChanged(), and dpiRelativeScale().

+ Here is the caller graph for this function:

◆ screenForGeometry()

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().

Note
: The current screen will always be returned for child windows since they should never signal screen changes.
Since
5.4
See also
QWindowSystemInterface::handleWindowScreenChanged()

Definition at line 134 of file qplatformwindow.cpp.

Referenced by initialize().

+ Here is the caller graph for this function:

◆ setAlertState()

void QWindowsWindow::setAlertState ( bool enable)
overridevirtual

Reimplement this method to set whether the window demands attention (for example, by flashing the taskbar icon) depending on enabled.

See also
isAlertState()
Since
5.1

Reimplemented from QPlatformWindow.

Definition at line 3193 of file qwindowswindow.cpp.

References AlertState, alertWindow(), clearFlag(), isAlertState(), setFlag(), and stopAlertWindow().

+ Here is the call graph for this function:

◆ setCursor()

void QWindowsWindow::setCursor ( const CursorHandlePtr & c)

Definition at line 3172 of file qwindowswindow.cpp.

References applyCursor(), applyNewCursor(), clearFlag(), CursorHandle::handle(), qCDebug, RestoreOverrideCursor, testFlag(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setCustomMargins()

void QWindowsWindow::setCustomMargins ( const QMargins & newCustomMargins)
override

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 3335 of file qwindowswindow.cpp.

References QWindowsWindowData::customMargins, QWindowsWindowData::flags, QWindowsBaseWindow::frameGeometry_sys(), Qt::FramelessWindowHint, QRect::height(), QWindowsWindowData::hwnd, QRect::marginsRemoved(), QRect::moveTo(), qCDebug, qCWarning, QRect::width(), QRect::x(), and QRect::y().

+ Here is the call graph for this function:

◆ setDarkBorder()

void QWindowsWindow::setDarkBorder ( bool d)

Definition at line 3300 of file qwindowswindow.cpp.

References d, QWindowsWindowData::hwnd, setDarkBorderToWindow(), shouldApplyDarkFrame(), and QPlatformWindow::window().

Referenced by windowEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDarkBorderToWindow()

bool QWindowsWindow::setDarkBorderToWindow ( HWND hwnd,
bool d )
static

Definition at line 3289 of file qwindowswindow.cpp.

References d, DwmwaUseImmersiveDarkMode, DwmwaUseImmersiveDarkModeBefore20h1, ok, and qCWarning.

Referenced by WindowCreationData::create(), and setDarkBorder().

+ Here is the caller graph for this function:

◆ setEnabled()

void QWindowsWindow::setEnabled ( bool enabled)

Definition at line 3237 of file qwindowswindow.cpp.

References setStyle(), and QWindowsBaseWindow::style().

Referenced by windowEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setExStyle()

void QWindowsWindow::setExStyle ( unsigned s) const

Definition at line 2683 of file qwindowswindow.cpp.

References debugWinExStyle(), QWindowsWindowData::hwnd, qCDebug, and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setFlag()

void QWindowsWindow::setFlag ( unsigned f) const
inline

Definition at line 318 of file qwindowswindow.h.

Referenced by QWindowsWindow(), ~QWindowsWindow(), registerTouchWindow(), setAlertState(), setFrameStrutEventsEnabled(), setGeometry(), setHasBorderInFullScreen(), setStyle(), startSystemResize(), and windowEvent().

+ Here is the caller graph for this function:

◆ setFrameStrutEventsEnabled()

void QWindowsWindow::setFrameStrutEventsEnabled ( bool enabled)
overridevirtual

Reimplement this method to set whether frame strut events should be sent to enabled.

See also
frameStrutEventsEnabled

Reimplemented from QPlatformWindow.

Definition at line 3060 of file qwindowswindow.cpp.

References clearFlag(), FrameStrutEventsEnabled, and setFlag().

+ Here is the call graph for this function:

◆ setFullFrameMargins()

void QWindowsWindow::setFullFrameMargins ( const QMargins & newMargins)

Definition at line 2765 of file qwindowswindow.cpp.

References QWindowsWindowData::flags, QWindowsWindowData::fullFrameMargins, QWindowsWindowData::hwnd, qCDebug, shouldOmitFrameAdjustment(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setGeometry()

void QWindowsWindow::setGeometry ( const QRect & rect)
overridevirtual

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 2143 of file qwindowswindow.cpp.

References clearFlag(), customMargins(), frameMargins(), fullFrameMargins(), QWindowsWindowData::geometry, QWindowsWindowData::hwnd, QLibraryInfo::isDebugBuild(), isVisible(), QMargins::left(), msgUnableToSetGeometry(), QWindowsGeometryHint::positionIncludesFrame(), qPrintable, qWarning, rect, setFlag(), QPlatformWindow::setGeometry(), QWindowsBaseWindow::setGeometry_sys(), setWindowState(), QMargins::top(), warning(), QPlatformWindow::window(), Qt::WindowMinimized, Qt::WindowNoState, and WithinSetGeometry.

Referenced by handleDpiChangedAfterParent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHasBorderInFullScreen()

void QWindowsWindow::setHasBorderInFullScreen ( bool border)
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 3450 of file qwindowswindow.cpp.

References clearFlag(), handle(), HasBorderInFullScreen, hasBorderInFullScreen(), setFlag(), QWindowsBaseWindow::style(), and Qt::WindowFullScreen.

Referenced by setHasBorderInFullScreenStatic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHasBorderInFullScreenDefault()

void QWindowsWindow::setHasBorderInFullScreenDefault ( bool border)
static

Definition at line 3440 of file qwindowswindow.cpp.

Referenced by QWindowsApplication::setHasBorderInFullScreenDefault().

+ Here is the caller graph for this function:

◆ setHasBorderInFullScreenStatic()

void QWindowsWindow::setHasBorderInFullScreenStatic ( QWindow * window,
bool border )
static

Definition at line 3432 of file qwindowswindow.cpp.

References handle(), hasBorderInFullScreenProperty, setHasBorderInFullScreen(), QObject::setProperty(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setKeyboardGrabEnabled()

bool QWindowsWindow::setKeyboardGrabEnabled ( bool grab)
overridevirtual

Reimplemented from QPlatformWindow.

Definition at line 2977 of file qwindowswindow.cpp.

References context, QWindowsWindowData::hwnd, QWindowsContext::instance(), qCDebug, qWarning, and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setMask()

void QWindowsWindow::setMask ( const QRegion & region)
overridevirtual

Reimplement to be able to let Qt set the mask of a window.

Reimplemented from QPlatformWindow.

Definition at line 2884 of file qwindowswindow.cpp.

References fullFrameMargins(), QWindowsWindowData::hwnd, QRegion::isEmpty(), isTopLevel(), QMargins::left(), qRegionToWinRegion(), QMargins::top(), and QPlatformWindow::window().

Referenced by QWindowsWindow(), and handleDpiChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMenuBar()

void QWindowsWindow::setMenuBar ( QWindowsMenuBar * mb)

Definition at line 3313 of file qwindowswindow.cpp.

◆ setMouseGrabEnabled()

bool QWindowsWindow::setMouseGrabEnabled ( bool grab)
overridevirtual

Reimplemented from QPlatformWindow.

Definition at line 2995 of file qwindowswindow.cpp.

References AutoMouseCapture, className, clearFlag(), hasMouseCapture(), QWindowsWindowData::hwnd, isVisible(), metaObject(), qCDebug, qPrintable, qWarning, and QPlatformWindow::window().

Referenced by setVisible().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOpacity()

void QWindowsWindow::setOpacity ( qreal level)
overridevirtual

Reimplement to be able to let Qt set the opacity level of a window.

Reimplemented from QPlatformWindow.

Definition at line 2843 of file qwindowswindow.cpp.

References Direct3DSurface, QWindowsWindowData::flags, format(), hasAlpha(), QWindowsWindowData::hwnd, OpenGLSurface, qCDebug, qFuzzyCompare(), setWindowOpacity(), testFlag(), VulkanSurface, and QPlatformWindow::window().

Referenced by QWindowsWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setParent()

void QWindowsWindow::setParent ( const QPlatformWindow * parent)
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 1918 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd, qCDebug, and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setSavedDpi()

void QWindowsWindow::setSavedDpi ( int dpi)
inline

Definition at line 346 of file qwindowswindow.h.

Referenced by handleDpiChanged(), handleDpiChangedAfterParent(), and initialize().

+ Here is the caller graph for this function:

◆ setStyle()

void QWindowsWindow::setStyle ( unsigned s) const

Definition at line 2675 of file qwindowswindow.cpp.

References clearFlag(), debugWinStyle(), QWindowsWindowData::hwnd, qCDebug, setFlag(), QPlatformWindow::window(), and WithinSetStyle.

Referenced by setEnabled().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ settingsChanged()

void QWindowsWindow::settingsChanged ( )
static

Definition at line 1686 of file qwindowswindow.cpp.

Referenced by QWindowsContext::windowsProc().

+ Here is the caller graph for this function:

◆ setUserDataOf()

void QWindowsWindow::setUserDataOf ( HWND hwnd,
void * ud )
inlinestatic

Definition at line 466 of file qwindowswindow.h.

◆ setVisible()

void QWindowsWindow::setVisible ( bool visible)
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 1737 of file qwindowswindow.cpp.

References QGuiApplication::focusWindow(), hasMouseCapture(), QWindowsBaseWindow::hide_sys(), QWindowsWindowData::hwnd, isLayered(), QObject::parent(), Qt::Popup, qCDebug, setMouseGrabEnabled(), win, and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ setWindowFlags()

void QWindowsWindow::setWindowFlags ( Qt::WindowFlags flags)
overridevirtual

Requests setting the window flags of this surface to flags.

Reimplemented from QPlatformWindow.

Definition at line 2428 of file qwindowswindow.cpp.

References QWindowsWindowData::flags, geometry(), QWindowsBaseWindow::geometry_sys(), QWindowsWindowData::hwnd, isTopLevel(), qCDebug, and QPlatformWindow::window().

Referenced by QWindowsDirect2DWindow::setWindowFlags().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setWindowIcon()

void QWindowsWindow::setWindowIcon ( const QIcon & icon)
overridevirtual

Reimplement to set the window icon to icon.

Reimplemented from QPlatformWindow.

Definition at line 3261 of file qwindowswindow.cpp.

References createHIcon(), QWindowsWindowData::hwnd, and icon.

Referenced by QWindowsWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setWindowLayered()

bool QWindowsWindow::setWindowLayered ( HWND hwnd,
Qt::WindowFlags flags,
bool hasAlpha,
qreal opacity )
static

Definition at line 478 of file qwindowswindow.cpp.

References QWindowsBaseWindow::exStyle(), hasAlpha(), hasNoNativeFrame(), isLayered(), opacity(), and Qt::WindowTransparentForInput.

Referenced by QWindowsBackingStore::flush(), and setWindowOpacity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setWindowState()

void QWindowsWindow::setWindowState ( Qt::WindowStates state)
overridevirtual

Requests setting the window state of this surface to type.

Qt::WindowActive can be ignored.

Reimplemented from QPlatformWindow.

Definition at line 2514 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd, and state.

Referenced by initialize(), and setGeometry().

+ Here is the caller graph for this function:

◆ setWindowTitle()

void QWindowsWindow::setWindowTitle ( const QString & title)
overridevirtual

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.

See also
QGuiApplication::applicationDisplayName()

Reimplemented from QPlatformWindow.

Definition at line 2423 of file qwindowswindow.cpp.

References formatWindowTitle(), QWindowsBaseWindow::setWindowTitle_sys(), and title.

+ Here is the call graph for this function:

◆ startSystemMove()

bool QWindowsWindow::startSystemMove ( )
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.

Since
5.15

Reimplemented from QPlatformWindow.

Definition at line 3053 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd.

◆ startSystemResize()

bool QWindowsWindow::startSystemResize ( Qt::Edges edges)
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.

Since
5.15

Reimplemented from QPlatformWindow.

Definition at line 3042 of file qwindowswindow.cpp.

References edgesToWinOrientation(), QWindowsWindowData::hwnd, Qt::MSWindowsFixedSizeDialogHint, Q_UNLIKELY, setFlag(), SizeGripOperation, testFlag(), and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ stopAlertWindow()

void QWindowsWindow::stopAlertWindow ( )

Definition at line 3221 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd, and info.

Referenced by setAlertState().

+ Here is the caller graph for this function:

◆ surface()

void * QWindowsWindow::surface ( void * nativeConfig,
int * err )

Definition at line 3355 of file qwindowswindow.cpp.

References handle(), QWindowsWindowData::hwnd, Q_UNUSED, qWarning, QWindowsIntegration::staticOpenGLContext(), QSurface::VulkanSurface, and QPlatformWindow::window().

+ Here is the call graph for this function:

◆ testFlag()

bool QWindowsWindow::testFlag ( unsigned f) const
inline

Definition at line 317 of file qwindowswindow.h.

Referenced by ~QWindowsWindow(), frameStrutEventsEnabled(), handleMoved(), handleResized(), handleWmPaint(), hasBorderInFullScreen(), isAlertState(), isExposed(), registerTouchWindow(), setCursor(), setOpacity(), and startSystemResize().

+ Here is the caller graph for this function:

◆ topLevelOf()

QWindow * QWindowsWindow::topLevelOf ( QWindow * w)
static

Definition at line 1703 of file qwindowswindow.cpp.

References handle(), QWindowsContext::instance(), QPlatformWindow::parent(), and topLevelOf().

Referenced by isValidWheelReceiver(), isValidWheelReceiver(), showSystemMenu(), QWindowsScreen::topLevelAt(), and topLevelOf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateFullFrameMargins()

void QWindowsWindow::updateFullFrameMargins ( )

Definition at line 2775 of file qwindowswindow.cpp.

References QWindowsContext::forceNcCalcSize(), and QWindowsWindowData::hwnd.

Referenced by checkForScreenChanged(), and handleDpiChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateRestoreGeometry()

void QWindowsWindow::updateRestoreGeometry ( )

Definition at line 2509 of file qwindowswindow.cpp.

References QWindowsWindowData::hwnd, normalFrameGeometry(), and QWindowsWindowData::restoreGeometry.

+ Here is the call graph for this function:

◆ userDataOf()

void * QWindowsWindow::userDataOf ( HWND hwnd)
inlinestatic

Definition at line 461 of file qwindowswindow.h.

◆ windowEvent()

bool QWindowsWindow::windowEvent ( QEvent * event)
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 QPlatformWindow.

Definition at line 2689 of file qwindowswindow.cpp.

References QEvent::ApplicationPaletteChange, BlockedByModal, clearFlag(), Qt::Dark, hasMouseCapture(), QWindowsTheme::instance(), setDarkBorder(), setEnabled(), setFlag(), QEvent::WindowBlocked, QPlatformWindow::windowEvent(), and QEvent::WindowUnblocked.

+ Here is the call graph for this function:

◆ windowsWindowOf()

QWindowsWindow * QWindowsWindow::windowsWindowOf ( const QWindow * w)
inlinestatic

Member Data Documentation

◆ embeddedNativeParentHandleProperty

const char * QWindowsWindow::embeddedNativeParentHandleProperty = "_q_embedded_native_parent_handle"
static

◆ hasBorderInFullScreenProperty

const char * QWindowsWindow::hasBorderInFullScreenProperty = "_q_has_border_in_fullscreen"
static

Definition at line 344 of file qwindowswindow.h.

Referenced by QWindowsWindow(), and setHasBorderInFullScreenStatic().


The documentation for this class was generated from the following files: