| | |
| | | |
| | | inline bool isHitTestVisible(const QObject *obj) const; |
| | | bool setHitTestVisible(const QObject *obj, bool visible); |
| | | bool setHitTestVisible(const QRect &rect, bool visible); |
| | | |
| | | inline QObject *systemButton(WindowAgentBase::SystemButton button) const; |
| | | bool setSystemButton(WindowAgentBase::SystemButton button, QObject *obj); |
| | |
| | | inline QObject *titleBar() const; |
| | | bool setTitleBar(QObject *obj); |
| | | |
| | | QRegion hitTestShape() const; |
| | | #ifdef Q_OS_MAC |
| | | inline QRect systemButtonArea() const; |
| | | void setSystemButtonArea(const QRect &rect); |
| | | #endif |
| | | |
| | | bool isInSystemButtons(const QPoint &pos, WindowAgentBase::SystemButton *button) const; |
| | | bool isInTitleBarDraggableArea(const QPoint &pos) const; |
| | | |
| | |
| | | CentralizeHook = 1, |
| | | ShowSystemMenuHook, |
| | | DefaultColorsHook, |
| | | DrawWindows10BorderHook, // Only works on Windows 10 |
| | | DrawWindows10BorderHook, // Only works on Windows 10 |
| | | SystemButtonAreaChangedHook, // Only works on Mac |
| | | }; |
| | | virtual void virtual_hook(int id, void *data); |
| | | |
| | |
| | | QWindow *m_windowHandle{}; |
| | | |
| | | QSet<const QObject *> m_hitTestVisibleItems; |
| | | QList<QRect> m_hitTestVisibleRects; |
| | | #ifdef Q_OS_MAC |
| | | QRect m_systemButtonArea; |
| | | #endif |
| | | |
| | | QObject *m_titleBar{}; |
| | | std::array<QObject *, WindowAgentBase::NumSystemButton> m_systemButtons{}; |
| | | |
| | | // Cached shape |
| | | mutable bool hitTestVisibleShapeDirty{}; |
| | | mutable QRegion hitTestVisibleShape; |
| | | }; |
| | | |
| | | inline QObject *AbstractWindowContext::host() const { |
| | |
| | | return m_titleBar; |
| | | } |
| | | |
| | | #ifdef Q_OS_MAC |
| | | inline QRect AbstractWindowContext::systemButtonArea() const { |
| | | return m_systemButtonArea; |
| | | } |
| | | #endif |
| | | |
| | | } |
| | | |
| | | #endif // ABSTRACTWINDOWCONTEXT_P_H |