![]() |
Qt 6.x
The Qt SDK
|
#include <qcocoawindow.h>
Classes | |
struct | BorderRange |
Public Types | |
enum | RecreationReason { RecreationNotNeeded = 0 , ParentChanged = 0x1 , MissingWindow = 0x2 , WindowModalityChanged = 0x4 , ContentViewChanged = 0x10 , PanelChanged = 0x20 } |
enum | HandleFlags { NoHandleFlags = 0 , HandleUnconditionally = 1 } |
Public Member Functions | |
QCocoaWindow (QWindow *tlw, WId nativeHandle=0) | |
~QCocoaWindow () | |
void | initialize () override |
Called as part of QWindow::create(), after constructing 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 |
the geometry of the window as it will appear when shown as a normal (not maximized or full screen) top-level window. | |
void | setCocoaGeometry (const QRect &rect) |
void | setVisible (bool visible) override |
Reimplemented in subclasses to show the surface if visible is true , and hide it if visible is false . | |
void | setWindowFlags (Qt::WindowFlags flags) override |
Requests setting the window flags of this surface to flags. | |
void | setWindowState (Qt::WindowStates state) override |
Changes the state of the NSWindow, going in/out of minimize/zoomed/fullscreen. | |
void | setWindowTitle (const QString &title) override |
Reimplement to set the window title to title. | |
void | setWindowFilePath (const QString &filePath) override |
Reimplement to set the window file path to filePath. | |
void | setWindowIcon (const QIcon &icon) override |
Reimplement to set the window icon to icon. | |
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 | 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 | isExposed () const override |
Returns if this window is exposed in the windowing system. | |
bool | isEmbedded () const override |
Returns true if the window is a child of a non-Qt window. | |
bool | isOpaque () const |
void | propagateSizeHints () override |
Reimplement to propagate the size hints of the QWindow. | |
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. | |
bool | setKeyboardGrabEnabled (bool grab) override |
bool | setMouseGrabEnabled (bool grab) override |
QMargins | frameMargins () const override |
QSurfaceFormat | format () const override |
Returns the actual surface format of the window. | |
bool | isForeignWindow () const override |
void | requestUpdate () override |
Requests an QEvent::UpdateRequest event. | |
bool | updatesWithDisplayLink () const |
void | deliverUpdateRequest () override |
Delivers an QEvent::UpdateRequest event to the window. | |
void | requestActivateWindow () override |
Reimplement to let Qt be able to request activation/focus for a window. | |
WId | winId () const override |
Reimplement in subclasses to return a handle to the native window. | |
void | setParent (const QPlatformWindow *window) override |
This function is called to enable native child window in QPA. | |
NSView * | view () const |
NSWindow * | nativeWindow () const |
void | setEmbeddedInForeignView () |
Q_NOTIFICATION_HANDLER (NSViewFrameDidChangeNotification) void viewDidChangeFrame() | |
Q_NOTIFICATION_HANDLER (NSViewGlobalFrameDidChangeNotification) void viewDidChangeGlobalFrame() | |
Q_NOTIFICATION_HANDLER (NSWindowDidMoveNotification) void windowDidMove() | |
Q_NOTIFICATION_HANDLER (NSWindowDidResizeNotification) void windowDidResize() | |
Q_NOTIFICATION_HANDLER (NSWindowDidEndLiveResizeNotification) void windowDidEndLiveResize() | |
Q_NOTIFICATION_HANDLER (NSWindowDidBecomeKeyNotification) void windowDidBecomeKey() | |
Q_NOTIFICATION_HANDLER (NSWindowDidResignKeyNotification) void windowDidResignKey() | |
Q_NOTIFICATION_HANDLER (NSWindowDidMiniaturizeNotification) void windowDidMiniaturize() | |
Q_NOTIFICATION_HANDLER (NSWindowDidDeminiaturizeNotification) void windowDidDeminiaturize() | |
Q_NOTIFICATION_HANDLER (NSWindowWillEnterFullScreenNotification) void windowWillEnterFullScreen() | |
Q_NOTIFICATION_HANDLER (NSWindowDidEnterFullScreenNotification) void windowDidEnterFullScreen() | |
Q_NOTIFICATION_HANDLER (NSWindowWillExitFullScreenNotification) void windowWillExitFullScreen() | |
Q_NOTIFICATION_HANDLER (NSWindowDidExitFullScreenNotification) void windowDidExitFullScreen() | |
Q_NOTIFICATION_HANDLER (NSWindowDidOrderOnScreenAndFinishAnimatingNotification) void windowDidOrderOnScreen() | |
Q_NOTIFICATION_HANDLER (NSWindowDidOrderOffScreenNotification) void windowDidOrderOffScreen() | |
Q_NOTIFICATION_HANDLER (NSWindowDidChangeOcclusionStateNotification) void windowDidChangeOcclusionState() | |
Q_NOTIFICATION_HANDLER (NSWindowDidChangeScreenNotification) void windowDidChangeScreen() | |
void | windowWillZoom () |
bool | windowShouldClose () |
bool | windowIsPopupType (Qt::WindowType type=Qt::Widget) const |
NSInteger | windowLevel (Qt::WindowFlags flags) |
NSUInteger | windowStyleMask (Qt::WindowFlags flags) |
void | updateTitleBarButtons (Qt::WindowFlags flags) |
bool | isFixedSize () const |
bool | setWindowModified (bool modified) override |
Reimplement to be able to let Qt indicate that the window has been modified. | |
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. | |
void | setMenubar (QCocoaMenuBar *mb) |
QCocoaMenuBar * | menubar () const |
void | setWindowCursor (NSCursor *cursor) |
void | registerTouch (bool enable) |
void | registerContentBorderArea (quintptr identifier, int upper, int lower) |
void | setContentBorderAreaEnabled (quintptr identifier, bool enable) |
void | setContentBorderEnabled (bool enable) override |
bool | testContentBorderAreaPosition (int position) const |
void | applyContentBorderThickness (NSWindow *window=nullptr) |
qreal | devicePixelRatio () const override |
Reimplement this function in subclass to return the device pixel ratio for the window. | |
QWindow * | childWindowAt (QPoint windowPoint) |
bool | shouldRefuseKeyWindowAndFirstResponder () |
bool | windowEvent (QEvent *event) override |
Reimplement this method to be able to do any platform specific event handling. | |
QPoint | bottomLeftClippedByNSWindowOffset () const override |
void | updateNormalGeometry () |
bool | isContentView () const |
Checks if the window is the content view of its immediate NSWindow. | |
bool | alwaysShowToolWindow () const |
void | handleGeometryChange () |
void | handleWindowStateChanged (HandleFlags flags=NoHandleFlags) |
void | handleExposeEvent (const QRegion ®ion) |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
![]() | |
QPlatformWindow (QWindow *window) | |
Constructs a platform window with the given top level window. | |
~QPlatformWindow () override | |
Virtual destructor does not delete its top level window. | |
virtual void | initialize () |
Called as part of QWindow::create(), after constructing the 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 QSurfaceFormat | format () const override |
Returns the actual surface format of the window. | |
virtual void | setGeometry (const QRect &rect) |
This function is called by Qt whenever a window is moved or resized using the QWindow API. | |
virtual QRect | geometry () const |
Returns the current geometry of a window. | |
virtual QRect | normalGeometry () const |
Returns the geometry of a window in 'normal' state (neither maximized, fullscreen nor minimized) for saving geometries to application settings. | |
virtual QMargins | frameMargins () const |
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 | setVisible (bool visible) |
Reimplemented in subclasses to show the surface if visible is true , and hide it if visible is false . | |
virtual void | setWindowFlags (Qt::WindowFlags flags) |
Requests setting the window flags of this surface to flags. | |
virtual void | setWindowState (Qt::WindowStates state) |
Requests setting the window state of this surface to type. | |
virtual WId | winId () const |
Reimplement in subclasses to return a handle to the native window. | |
virtual void | setParent (const QPlatformWindow *window) |
This function is called to enable native child window in QPA. | |
virtual void | setWindowTitle (const QString &title) |
Reimplement to set the window title to title. | |
virtual void | setWindowFilePath (const QString &title) |
Reimplement to set the window file path to filePath. | |
virtual void | setWindowIcon (const QIcon &icon) |
Reimplement to set the window icon to icon. | |
virtual bool | close () |
Reimplement to let the platform handle non-spontaneous window close. | |
virtual void | raise () |
Reimplement to be able to let Qt raise windows to the top of the desktop. | |
virtual void | lower () |
Reimplement to be able to let Qt lower windows to the bottom of the desktop. | |
virtual bool | isExposed () const |
Returns if this window is exposed in the windowing system. | |
virtual bool | isActive () const |
Returns true if the window should appear active from a style perspective. | |
virtual bool | isAncestorOf (const QPlatformWindow *child) const |
Returns true if the window is an ancestor of the given child. | |
virtual bool | isEmbedded () const |
Returns true if the window is a child of a non-Qt window. | |
virtual bool | isForeignWindow () const |
virtual QPoint | mapToGlobal (const QPoint &pos) const |
Translates the window coordinate pos to global screen coordinates using native methods. | |
QPointF | mapToGlobalF (const QPointF &pos) const |
virtual QPoint | mapFromGlobal (const QPoint &pos) const |
Translates the global screen coordinate pos to window coordinates using native methods. | |
QPointF | mapFromGlobalF (const QPointF &pos) const |
virtual void | propagateSizeHints () |
Reimplement to propagate the size hints of the QWindow. | |
virtual void | setOpacity (qreal level) |
Reimplement to be able to let Qt set the opacity level of a window. | |
virtual void | setMask (const QRegion ®ion) |
Reimplement to be able to let Qt set the mask of a window. | |
virtual void | requestActivateWindow () |
Reimplement to let Qt be able to request activation/focus for a window. | |
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 | setKeyboardGrabEnabled (bool grab) |
virtual bool | setMouseGrabEnabled (bool grab) |
virtual bool | setWindowModified (bool modified) |
Reimplement to be able to let Qt indicate that the window has been modified. | |
virtual bool | windowEvent (QEvent *event) |
Reimplement this method to be able to do any platform specific event handling. | |
virtual bool | startSystemResize (Qt::Edges edges) |
Reimplement this method to start a system resize operation if the system supports it and return true to indicate success. | |
virtual bool | startSystemMove () |
Reimplement this method to start a system move operation if the system supports it and return true to indicate success. | |
virtual void | setFrameStrutEventsEnabled (bool enabled) |
Reimplement this method to set whether frame strut events should be sent to enabled. | |
virtual bool | frameStrutEventsEnabled () const |
Reimplement this method to return whether frame strut events are enabled. | |
virtual void | setAlertState (bool enabled) |
Reimplement this method to set whether the window demands attention (for example, by flashing the taskbar icon) depending on enabled. | |
virtual bool | isAlertState () const |
Reimplement this method return whether the window is in an alert state. | |
virtual void | invalidateSurface () |
Invalidates the window's surface by releasing its surface buffers. | |
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 |
![]() | |
virtual | ~QPlatformSurface () |
virtual QSurfaceFormat | format () const =0 |
QSurface * | surface () const |
virtual QPlatformScreen * | screen () const =0 |
Static Public Member Functions | |
static void | closeAllPopups () |
static void | setupPopupMonitor () |
static void | removePopupMonitor () |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
![]() | |
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 bool | isRasterSurface (QSurface *surface) |
Public Attributes | |
NSView * | m_view = nil |
QCocoaNSWindow * | m_nsWindow = nil |
Qt::WindowStates | m_lastReportedWindowState = Qt::WindowNoState |
Qt::WindowModality | m_windowModality = Qt::NonModal |
bool | m_initialized = false |
bool | m_inSetVisible = false |
bool | m_inSetGeometry = false |
bool | m_inSetStyleMask = false |
QCocoaMenuBar * | m_menubar = nullptr |
bool | m_frameStrutEventsEnabled = false |
QRect | m_exposedRect |
QRect | m_normalGeometry |
int | m_registerTouchCount = 0 |
bool | m_resizableTransientParent = false |
NSInteger | m_alertRequest = NoAlertRequest |
bool | m_drawContentBorderGradient = false |
QHash< quintptr, BorderRange > | m_contentBorderAreas |
QHash< quintptr, bool > | m_enabledContentBorderAreas |
Static Public Attributes | |
static QPointer< QCocoaWindow > | s_windowUnderMouse |
static const int | NoAlertRequest = -1 |
static id | s_globalMouseMonitor = 0 |
static id | s_applicationActivationObserver = 0 |
Protected Member Functions | |
void | recreateWindowIfNeeded () |
Recreates (or removes) the NSWindow for this QWindow, if needed. | |
QCocoaNSWindow * | createNSWindow (bool shouldBePanel) |
Qt::WindowStates | windowState () const |
void | applyWindowState (Qt::WindowStates newState) |
void | toggleMaximized () |
void | toggleFullScreen () |
bool | isTransitioningToFullScreen () const |
bool | startSystemMove () override |
Reimplement this method to start a system move operation if the system supports it and return true to indicate success. | |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
![]() | |
QPlatformScreen * | screenForGeometry (const QRect &newGeometry) const |
Helper function for finding the new screen for newGeometry in response to a geometry changed event. | |
Friends | |
class | QCocoaBackingStore |
class | QCocoaNativeInterface |
Additional Inherited Members | |
![]() | |
void | deleteLater () |
\threadsafe | |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
![]() | |
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]. | |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
QScopedPointer< QPlatformWindowPrivate > | d_ptr |
![]() | |
QString | objectName |
the name of this object | |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 68 of file qcocoawindow.h.
Enumerator | |
---|---|
NoHandleFlags | |
HandleUnconditionally |
Definition at line 210 of file qcocoawindow.h.
Enumerator | |
---|---|
RecreationNotNeeded | |
ParentChanged | |
MissingWindow | |
WindowModalityChanged | |
ContentViewChanged | |
PanelChanged |
Definition at line 178 of file qcocoawindow.h.
QCocoaWindow::QCocoaWindow | ( | QWindow * | tlw, |
WId | nativeHandle = 0 |
||
) |
Definition at line 101 of file qcocoawindow.mm.
References m_view, qCDebug, and QPlatformWindow::window().
QCocoaWindow::~QCocoaWindow | ( | ) |
Definition at line 146 of file qcocoawindow.mm.
References QPlatformWindow::close(), QCocoaIntegration::instance(), isForeignWindow(), m_nsWindow, m_view, pool, qCDebug, QCocoaWindowWillReleaseQNSViewNotification, release(), and QPlatformWindow::window().
bool QCocoaWindow::alwaysShowToolWindow | ( | ) | const |
Definition at line 1763 of file qcocoawindow.mm.
References QPlatformWindow::window().
Referenced by createNSWindow().
Definition at line 1853 of file qcocoawindow.mm.
References QSize::height(), isContentView(), m_contentBorderAreas, m_drawContentBorderGradient, m_enabledContentBorderAreas, m_view, qMax(), QWindow::size(), QHash< Key, T >::value(), and QPlatformWindow::window().
Referenced by createNSWindow(), registerContentBorderArea(), setContentBorderAreaEnabled(), and setContentBorderEnabled().
|
protected |
Definition at line 661 of file qcocoawindow.mm.
References QWindowPrivate::effectiveState(), HandleUnconditionally, handleWindowStateChanged(), isContentView(), m_view, newState(), qCDebug, qWarning, QObject::sender(), toggleFullScreen(), toggleMaximized(), QPlatformWindow::window(), Qt::WindowFullScreen, Qt::WindowMaximized, Qt::WindowMinimized, Qt::WindowNoState, and windowState().
Referenced by setVisible(), and setWindowState().
|
override |
Definition at line 1980 of file qcocoawindow.mm.
Definition at line 1934 of file qcocoawindow.mm.
References child, QObject::children(), childWindowAt(), qobject_cast< QWindow * >(), and QPlatformWindow::window().
Referenced by childWindowAt().
|
static |
Definition at line 1573 of file qcocoawindow.mm.
References QGuiApplicationPrivate::closeAllPopups(), QGuiApplicationPrivate::instance(), and removePopupMonitor().
Referenced by setupPopupMonitor().
|
protected |
Definition at line 1639 of file qcocoawindow.mm.
References alwaysShowToolWindow(), Qt::ApplicationActive, QGuiApplication::applicationState(), applyContentBorderThickness(), QRect::contains(), QWindow::flags, format(), QPlatformScreen::geometry(), QScreen::geometry, geometry(), QSharedPointer< T >::get(), QCocoaScreen::get(), QScreen::handle(), QWindowSystemInterface::handleWindowScreenChanged(), init(), m_windowModality, QCocoaScreen::mapToNative(), QWindow::modality, pool, Qt::Popup, Qt::PortraitOrientation, QScreen::primaryOrientation, QGuiApplication::primaryScreen, qCDebug, qCWarning, rect, release(), QPlatformWindow::screen(), QGuiApplication::screens(), selector, setupPopupMonitor(), Qt::Tool, QRect::topLeft(), QRect::width(), QPlatformWindow::window(), windowLevel(), and windowStyleMask().
Referenced by recreateWindowIfNeeded().
|
overridevirtual |
Delivers an QEvent::UpdateRequest event to the window.
QPlatformWindow subclasses can re-implement this function to provide e.g. logging or tracing of the delivery, but should always call the base class function.
Reimplemented from QPlatformWindow.
Definition at line 1557 of file qcocoawindow.mm.
References QPlatformWindow::deliverUpdateRequest(), qCDebug, and QPlatformWindow::window().
|
overridevirtual |
Reimplement this function in subclass to return the device pixel ratio for the window.
This is the ratio between physical pixels and device-independent pixels.
Reimplemented from QPlatformWindow.
Definition at line 1923 of file qcocoawindow.mm.
References m_view.
|
overridevirtual |
Returns the actual surface format of the window.
Reimplemented from QPlatformWindow.
Definition at line 181 of file qcocoawindow.mm.
References QPlatformWindow::window().
Referenced by createNSWindow(), and updatesWithDisplayLink().
|
overridevirtual |
Reimplemented from QPlatformWindow.
Definition at line 1991 of file qcocoawindow.mm.
References isContentView(), and m_view.
Referenced by setGeometry().
|
inlineoverridevirtual |
Reimplement this method to return whether frame strut events are enabled.
Reimplemented from QPlatformWindow.
Definition at line 152 of file qcocoawindow.h.
References m_frameStrutEventsEnabled.
|
overridevirtual |
Returns the current geometry of a window.
Reimplemented from QPlatformWindow.
Definition at line 211 of file qcocoawindow.mm.
References QPlatformWindow::geometry(), isEmbedded(), m_view, QCocoaScreen::mapFromNative(), position(), QPointF::toPoint(), and QPlatformWindow::window().
Referenced by createNSWindow(), QCocoaEventDispatcherPrivate::currentModalSession(), handleExposeEvent(), handleGeometryChange(), normalGeometry(), propagateSizeHints(), setGeometry(), setParent(), and updateNormalGeometry().
Definition at line 1390 of file qcocoawindow.mm.
References QRegion::boundingRect(), geometry(), QRegion::isEmpty(), isExposed(), m_exposedRect, m_view, qCDebug, and QPlatformWindow::window().
void QCocoaWindow::handleGeometryChange | ( | ) |
Definition at line 1353 of file qcocoawindow.mm.
References QEventLoop::ExcludeSocketNotifiers, QEventLoop::ExcludeUserInputEvents, QWindowSystemInterface::flushWindowSystemEvents(), geometry(), QWindowSystemInterface::handleGeometryChange(), isContentView(), isEmbedded(), m_initialized, m_inSetGeometry, m_inSetStyleMask, m_view, QCocoaScreen::mapFromNative(), qCDebug, and QPlatformWindow::window().
Referenced by setVisible().
void QCocoaWindow::handleWindowStateChanged | ( | HandleFlags | flags = NoHandleFlags | ) |
Definition at line 882 of file qcocoawindow.mm.
References HandleUnconditionally, m_lastReportedWindowState, qCDebug, QPlatformWindow::window(), and windowState().
Referenced by applyWindowState().
|
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 111 of file qcocoawindow.mm.
References QPlatformWindow::d_ptr, defaultWindowHeight, defaultWindowWidth, QPlatformWindow::initialGeometry(), isForeignWindow(), m_initialized, m_view, pool, qCDebug, recreateWindowIfNeeded(), QPlatformWindowPrivate::rect, QPlatformWindow::setGeometry(), setGeometry(), setMask(), QHighDpi::toNativeLocalRegion(), QPlatformWindow::window(), and QPlatformWindow::windowGeometry().
|
overridevirtual |
Reimplement this method return whether the window is in an alert state.
Reimplemented from QPlatformWindow.
Definition at line 960 of file qcocoawindow.mm.
References m_alertRequest, and NoAlertRequest.
bool QCocoaWindow::isContentView | ( | ) | const |
Checks if the window is the content view of its immediate NSWindow.
Being the content view of a NSWindow means the QWindow is the highest accessible NSView object in the window's view hierarchy.
This is the case if the QWindow is a top level window.
Definition at line 1436 of file qcocoawindow.mm.
References m_view.
Referenced by applyContentBorderThickness(), applyWindowState(), frameMargins(), handleGeometryChange(), lower(), normalGeometry(), propagateSizeHints(), raise(), recreateWindowIfNeeded(), setCocoaGeometry(), setOpacity(), setVisible(), setWindowFilePath(), setWindowFlags(), setWindowIcon(), setWindowModified(), setWindowTitle(), testContentBorderAreaPosition(), updateNormalGeometry(), and updateTitleBarButtons().
|
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 1007 of file qcocoawindow.mm.
References m_view, QObject::parent(), and QPlatformWindow::window().
Referenced by geometry(), handleGeometryChange(), recreateWindowIfNeeded(), and setCocoaGeometry().
|
overridevirtual |
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 1002 of file qcocoawindow.mm.
References QRect::isEmpty(), and m_exposedRect.
Referenced by handleExposeEvent().
bool QCocoaWindow::isFixedSize | ( | ) | const |
Definition at line 537 of file qcocoawindow.mm.
References QSize::isValid(), QPlatformWindow::windowMaximumSize(), and QPlatformWindow::windowMinimumSize().
Referenced by updateTitleBarButtons().
|
overridevirtual |
Reimplemented from QPlatformWindow.
Definition at line 206 of file qcocoawindow.mm.
References m_view.
Referenced by ~QCocoaWindow(), initialize(), recreateWindowIfNeeded(), setCocoaGeometry(), setWindowCursor(), and QCocoaMenu::showPopup().
bool QCocoaWindow::isOpaque | ( | ) | const |
Definition at line 1023 of file qcocoawindow.mm.
References QSurfaceFormat::alphaBufferSize(), QWindow::format(), GLint(), QRegion::isEmpty(), QWindow::opacity, QSurface::supportsOpenGL(), QPlatformSurface::surface(), and QPlatformWindow::window().
|
protected |
Definition at line 805 of file qcocoawindow.mm.
References m_view, and QPlatformWindow::window().
Referenced by windowState().
|
overridevirtual |
Reimplement to be able to let Qt lower windows to the bottom of the desktop.
Reimplemented from QPlatformWindow.
Definition at line 990 of file qcocoawindow.mm.
References isContentView(), m_view, qCDebug, and QPlatformWindow::window().
Referenced by registerContentBorderArea().
QCocoaMenuBar * QCocoaWindow::menubar | ( | ) | const |
Definition at line 1782 of file qcocoawindow.mm.
References m_menubar.
Referenced by QCocoaMenuBar::~QCocoaMenuBar().
NSWindow * QCocoaWindow::nativeWindow | ( | ) | const |
Definition at line 1129 of file qcocoawindow.mm.
References m_view.
Referenced by QCocoaEventDispatcherPrivate::currentModalSession(), setVisible(), and windowLevel().
|
overridevirtual |
the geometry of the window as it will appear when shown as a normal (not maximized or full screen) top-level window.
For child windows this property always holds an empty rectangle.
Reimplemented from QPlatformWindow.
Definition at line 236 of file qcocoawindow.mm.
References geometry(), isContentView(), m_normalGeometry, Qt::WindowFullScreen, Qt::WindowMaximized, and windowState().
|
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 1036 of file qcocoawindow.mm.
References geometry(), QSize::height(), isContentView(), QSize::isEmpty(), QSize::isNull(), QSize::isValid(), m_view, pool, qCDebug, rect, updateTitleBarButtons(), QSize::width(), QPlatformWindow::window(), QPlatformWindow::windowBaseSize(), QPlatformWindow::windowMaximumSize(), QPlatformWindow::windowMinimumSize(), and QPlatformWindow::windowSizeIncrement().
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSViewFrameDidChangeNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSViewGlobalFrameDidChangeNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidBecomeKeyNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidChangeOcclusionStateNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidChangeScreenNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidDeminiaturizeNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidEndLiveResizeNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidEnterFullScreenNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidExitFullScreenNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidMiniaturizeNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidMoveNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidOrderOffScreenNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidOrderOnScreenAndFinishAnimatingNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidResignKeyNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowDidResizeNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowWillEnterFullScreenNotification | ) |
QCocoaWindow::Q_NOTIFICATION_HANDLER | ( | NSWindowWillExitFullScreenNotification | ) |
|
overridevirtual |
Reimplement to be able to let Qt raise windows to the top of the desktop.
Reimplemented from QPlatformWindow.
Definition at line 965 of file qcocoawindow.mm.
References isContentView(), m_view, pool, qCDebug, and QPlatformWindow::window().
|
protected |
Recreates (or removes) the NSWindow for this QWindow, if needed.
A QWindow may need a corresponding NSWindow/NSPanel, depending on whether or not it's a top level or not, window flags, etc.
Definition at line 1447 of file qcocoawindow.mm.
References ContentViewChanged, createNSWindow(), Qt::Dialog, isContentView(), isEmbedded(), isForeignWindow(), m_nsWindow, m_view, m_windowModality, MissingWindow, PanelChanged, QPlatformWindow::parent(), ParentChanged, pool, Qt::Popup, Q_ASSERT, qCDebug, qnsview_cast(), RecreationNotNeeded, Qt::SubWindow, QPlatformWindow::window(), and WindowModalityChanged.
Referenced by initialize(), setParent(), and setVisible().
Definition at line 1835 of file qcocoawindow.mm.
References applyContentBorderThickness(), lower(), and m_contentBorderAreas.
void QCocoaWindow::registerTouch | ( | bool | enable | ) |
Definition at line 1826 of file qcocoawindow.mm.
References m_registerTouchCount, and m_view.
|
static |
Definition at line 1580 of file qcocoawindow.mm.
References s_applicationActivationObserver, and s_globalMouseMonitor.
Referenced by closeAllPopups(), and setupPopupMonitor().
|
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::handleWindowActivated(QWindow *w) would be sufficient.
If the window system has some event handling/callbacks then call QWindowSystemInterface::handleWindowActivated(QWindow *w) when the window system gives the notification.
Default implementation calls QWindowSystem::handleWindowActivated(QWindow *w)
Reimplemented from QPlatformWindow.
Definition at line 1563 of file qcocoawindow.mm.
|
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 1535 of file qcocoawindow.mm.
References qCDebug, QPlatformWindow::requestUpdate(), QCocoaScreen::requestUpdate(), QPlatformWindow::screen(), updatesWithDisplayLink(), and QPlatformWindow::window().
|
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 950 of file qcocoawindow.mm.
References m_alertRequest, and NoAlertRequest.
Definition at line 262 of file qcocoawindow.mm.
References isContentView(), isEmbedded(), isForeignWindow(), m_view, QCocoaScreen::mapToNative(), pool, qCDebug, rect, QPlatformWindow::setGeometry(), and QPlatformWindow::window().
Referenced by setGeometry(), and setParent().
Definition at line 1841 of file qcocoawindow.mm.
References applyContentBorderThickness(), QHash< Key, T >::insert(), and m_enabledContentBorderAreas.
|
override |
Definition at line 1847 of file qcocoawindow.mm.
References applyContentBorderThickness(), and m_drawContentBorderGradient.
void QCocoaWindow::setEmbeddedInForeignView | ( | ) |
Definition at line 1134 of file qcocoawindow.mm.
References m_nsWindow.
|
overridevirtual |
Reimplement this method to set whether frame strut events should be sent to enabled.
Reimplemented from QPlatformWindow.
Definition at line 2005 of file qcocoawindow.mm.
References enabled, and m_frameStrutEventsEnabled.
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 186 of file qcocoawindow.mm.
References frameMargins(), geometry(), QMargins::left(), m_inSetGeometry, qCDebug, qt_window_private(), rect, setCocoaGeometry(), QMargins::top(), QPlatformWindow::window(), and QWindowPrivate::WindowFrameInclusive.
Referenced by QCocoaEventDispatcherPrivate::currentModalSession(), initialize(), and setVisible().
|
overridevirtual |
Reimplemented from QPlatformWindow.
Definition at line 1099 of file qcocoawindow.mm.
Reimplement to be able to let Qt set the mask of a window.
Reimplemented from QPlatformWindow.
Definition at line 1083 of file qcocoawindow.mm.
References QRegion::isEmpty(), m_view, qCDebug, and QPlatformWindow::window().
Referenced by initialize().
void QCocoaWindow::setMenubar | ( | QCocoaMenuBar * | mb | ) |
Definition at line 1777 of file qcocoawindow.mm.
References m_menubar.
Referenced by QCocoaMenuBar::~QCocoaMenuBar(), and QCocoaMenuBar::handleReparent().
|
overridevirtual |
Reimplemented from QPlatformWindow.
Definition at line 1104 of file qcocoawindow.mm.
Reimplement to be able to let Qt set the opacity level of a window.
Reimplemented from QPlatformWindow.
Definition at line 1074 of file qcocoawindow.mm.
References isContentView(), m_view, and qCDebug.
|
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 1114 of file qcocoawindow.mm.
References geometry(), qCDebug, recreateWindowIfNeeded(), setCocoaGeometry(), and QPlatformWindow::window().
|
static |
Definition at line 1592 of file qcocoawindow.mm.
References button, closeAllPopups(), cocoaButton2QtButton(), cocoaEvent2QtMouseEvent(), currentlyPressedMouseButtons(), e, QWindowSystemInterface::handleMouseEvent(), QGuiApplicationPrivate::instance(), QCocoaScreen::mapFromNative(), QEvent::MouseMove, QGuiApplicationPrivate::popupActive(), queue, removePopupMonitor(), s_applicationActivationObserver, s_globalMouseMonitor, s_windowUnderMouse, and QPlatformWindow::window().
Referenced by createNSWindow().
|
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 305 of file qcocoawindow.mm.
References Qt::ApplicationModal, applyWindowState(), QEventLoop::ExcludeUserInputEvents, QWindowSystemInterface::flushWindowSystemEvents(), QObjectPrivate::get(), handleGeometryChange(), isContentView(), m_inSetVisible, m_resizableTransientParent, m_view, nativeWindow(), pool, Qt::Popup, Q_ASSERT_X, qApp, qCDebug, recreateWindowIfNeeded(), setGeometry(), Qt::Sheet, QPlatformWindow::window(), QPlatformWindow::windowGeometry(), Qt::WindowMinimized, Qt::WindowModal, and windowState().
void QCocoaWindow::setWindowCursor | ( | NSCursor * | cursor | ) |
Definition at line 1787 of file qcocoawindow.mm.
References context, cursor, isForeignWindow(), m_view, qCDebug, qCInfo, qnsview_cast(), and view().
Reimplement to set the window file path to filePath.
Reimplemented from QPlatformWindow.
Definition at line 912 of file qcocoawindow.mm.
References icon, isContentView(), m_view, pool, setWindowIcon(), title, and QPlatformWindow::window().
Referenced by setWindowTitle().
|
overridevirtual |
Requests setting the window flags of this surface to flags.
Reimplemented from QPlatformWindow.
Definition at line 590 of file qcocoawindow.mm.
References Qt::CustomizeWindowHint, Qt::Dialog, Qt::FramelessWindowHint, isContentView(), m_inSetStyleMask, m_view, Qt::NoDropShadowWindowHint, pool, Qt::Popup, setWindowTitle(), QWindow::title, updateTitleBarButtons(), QPlatformWindow::window(), Qt::WindowFullscreenButtonHint, windowLevel(), windowStyleMask(), Qt::WindowTransparentForInput, and Qt::WindowType_Mask.
Reimplement to set the window icon to icon.
Reimplemented from QPlatformWindow.
Definition at line 928 of file qcocoawindow.mm.
References icon, isContentView(), QIcon::isNull(), m_view, pool, and qGuiApp.
Referenced by setWindowFilePath().
|
overridevirtual |
Reimplement to be able to let Qt indicate that the window has been modified.
Return true if the native window supports setting the modified flag, false otherwise.
Reimplemented from QPlatformWindow.
Definition at line 1768 of file qcocoawindow.mm.
References isContentView(), and m_view.
|
overridevirtual |
Changes the state of the NSWindow, going in/out of minimize/zoomed/fullscreen.
When this is called from QWindow::setWindowState(), the QWindow state has not been updated yet, so window()->windowState() will reflect the previous state that was reported to QtGui.
Reimplemented from QPlatformWindow.
Definition at line 655 of file qcocoawindow.mm.
References applyWindowState(), isVisible(), state, and QPlatformWindow::window().
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.
Reimplemented from QPlatformWindow.
Definition at line 898 of file qcocoawindow.mm.
References isContentView(), QString::isEmpty(), m_view, pool, setWindowFilePath(), title, and QPlatformWindow::window().
Referenced by setWindowFlags().
bool QCocoaWindow::shouldRefuseKeyWindowAndFirstResponder | ( | ) |
Definition at line 1946 of file qcocoawindow.mm.
References QWindowPrivate::get(), QVariant::isValid(), m_inSetVisible, QObject::property(), QVariant::toBool(), QPlatformWindow::window(), Qt::WindowDoesNotAcceptFocus, and Qt::WindowTransparentForInput.
|
overrideprotectedvirtual |
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 286 of file qcocoawindow.mm.
References m_view.
bool QCocoaWindow::testContentBorderAreaPosition | ( | int | position | ) | const |
Definition at line 1908 of file qcocoawindow.mm.
References isContentView(), m_drawContentBorderGradient, m_view, and position().
|
protected |
Definition at line 779 of file qcocoawindow.mm.
References m_view, QObject::sender(), toggleFullScreen(), and QPlatformWindow::window().
Referenced by applyWindowState(), and toggleFullScreen().
|
protected |
Definition at line 758 of file qcocoawindow.mm.
References m_view, QObject::sender(), and QPlatformWindow::window().
Referenced by applyWindowState().
void QCocoaWindow::updateNormalGeometry | ( | ) |
Definition at line 251 of file qcocoawindow.mm.
References geometry(), isContentView(), m_normalGeometry, Qt::WindowNoState, and windowState().
Referenced by windowWillZoom().
bool QCocoaWindow::updatesWithDisplayLink | ( | ) | const |
Definition at line 1551 of file qcocoawindow.mm.
References format(), and QSurfaceFormat::swapInterval().
Referenced by requestUpdate().
void QCocoaWindow::updateTitleBarButtons | ( | Qt::WindowFlags | flags | ) |
Definition at line 543 of file qcocoawindow.mm.
References button, Qt::CustomizeWindowHint, Qt::Dialog, enabled, QWindowPrivate::get(), isContentView(), isFixedSize(), m_view, QPlatformWindow::window(), Qt::WindowCloseButtonHint, Qt::WindowFullscreenButtonHint, Qt::WindowMaximizeButtonHint, and Qt::WindowMinimizeButtonHint.
Referenced by propagateSizeHints(), setWindowFlags(), and windowEvent().
NSView * QCocoaWindow::view | ( | ) | const |
Definition at line 1124 of file qcocoawindow.mm.
References m_view.
Referenced by setWindowCursor(), and QCocoaMenu::showPopup().
|
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 1966 of file qcocoawindow.mm.
References updateTitleBarButtons(), QPlatformWindow::window(), QEvent::WindowBlocked, QPlatformWindow::windowEvent(), and QEvent::WindowUnblocked.
bool QCocoaWindow::windowIsPopupType | ( | Qt::WindowType | type = Qt::Widget | ) | const |
Definition at line 1417 of file qcocoawindow.mm.
References Qt::Popup, Qt::Tool, Qt::Widget, and QPlatformWindow::window().
Referenced by windowStyleMask().
NSInteger QCocoaWindow::windowLevel | ( | Qt::WindowFlags | flags | ) |
Definition at line 429 of file qcocoawindow.mm.
References nativeWindow(), Qt::Popup, qMax(), Qt::Tool, Qt::ToolTip, Qt::Window, QPlatformWindow::window(), windowLevel(), Qt::WindowStaysOnTopHint, and Qt::WindowType_Mask.
Referenced by createNSWindow(), setWindowFlags(), and windowLevel().
bool QCocoaWindow::windowShouldClose | ( | ) |
Definition at line 1332 of file qcocoawindow.mm.
References m_view, qCDebug, and QPlatformWindow::window().
|
protected |
Definition at line 735 of file qcocoawindow.mm.
References isTransitioningToFullScreen(), m_lastReportedWindowState, m_view, QPlatformWindow::window(), Qt::WindowFullScreen, Qt::WindowMaximized, Qt::WindowMinimized, and Qt::WindowNoState.
Referenced by applyWindowState(), handleWindowStateChanged(), normalGeometry(), setVisible(), and updateNormalGeometry().
NSUInteger QCocoaWindow::windowStyleMask | ( | Qt::WindowFlags | flags | ) |
Definition at line 481 of file qcocoawindow.mm.
References Qt::CustomizeWindowHint, Qt::FramelessWindowHint, m_drawContentBorderGradient, m_view, Qt::Popup, Qt::Tool, windowIsPopupType(), Qt::WindowTitleHint, and Qt::WindowType_Mask.
Referenced by createNSWindow(), and setWindowFlags().
void QCocoaWindow::windowWillZoom | ( | ) |
Definition at line 774 of file qcocoawindow.mm.
References updateNormalGeometry().
|
overridevirtual |
Reimplement in subclasses to return a handle to the native window.
Reimplemented from QPlatformWindow.
Definition at line 1109 of file qcocoawindow.mm.
References m_view.
|
friend |
Definition at line 203 of file qcocoawindow.h.
|
friend |
Definition at line 204 of file qcocoawindow.h.
NSInteger QCocoaWindow::m_alertRequest = NoAlertRequest |
Definition at line 245 of file qcocoawindow.h.
Referenced by isAlertState(), and setAlertState().
QHash<quintptr, BorderRange> QCocoaWindow::m_contentBorderAreas |
Definition at line 258 of file qcocoawindow.h.
Referenced by applyContentBorderThickness(), and registerContentBorderArea().
bool QCocoaWindow::m_drawContentBorderGradient = false |
Definition at line 247 of file qcocoawindow.h.
Referenced by applyContentBorderThickness(), setContentBorderEnabled(), testContentBorderAreaPosition(), and windowStyleMask().
Definition at line 259 of file qcocoawindow.h.
Referenced by applyContentBorderThickness(), and setContentBorderAreaEnabled().
QRect QCocoaWindow::m_exposedRect |
Definition at line 239 of file qcocoawindow.h.
Referenced by handleExposeEvent(), and isExposed().
bool QCocoaWindow::m_frameStrutEventsEnabled = false |
Definition at line 238 of file qcocoawindow.h.
Referenced by frameStrutEventsEnabled(), and setFrameStrutEventsEnabled().
bool QCocoaWindow::m_initialized = false |
Definition at line 231 of file qcocoawindow.h.
Referenced by handleGeometryChange(), and initialize().
bool QCocoaWindow::m_inSetGeometry = false |
Definition at line 233 of file qcocoawindow.h.
Referenced by handleGeometryChange(), and setGeometry().
bool QCocoaWindow::m_inSetStyleMask = false |
Definition at line 234 of file qcocoawindow.h.
Referenced by handleGeometryChange(), and setWindowFlags().
bool QCocoaWindow::m_inSetVisible = false |
Definition at line 232 of file qcocoawindow.h.
Referenced by setVisible(), and shouldRefuseKeyWindowAndFirstResponder().
Qt::WindowStates QCocoaWindow::m_lastReportedWindowState = Qt::WindowNoState |
Definition at line 226 of file qcocoawindow.h.
Referenced by handleWindowStateChanged(), and windowState().
QCocoaMenuBar* QCocoaWindow::m_menubar = nullptr |
Definition at line 236 of file qcocoawindow.h.
Referenced by menubar(), and setMenubar().
QRect QCocoaWindow::m_normalGeometry |
Definition at line 240 of file qcocoawindow.h.
Referenced by normalGeometry(), and updateNormalGeometry().
QCocoaNSWindow* QCocoaWindow::m_nsWindow = nil |
Definition at line 224 of file qcocoawindow.h.
Referenced by ~QCocoaWindow(), recreateWindowIfNeeded(), and setEmbeddedInForeignView().
int QCocoaWindow::m_registerTouchCount = 0 |
Definition at line 241 of file qcocoawindow.h.
Referenced by registerTouch().
bool QCocoaWindow::m_resizableTransientParent = false |
Definition at line 242 of file qcocoawindow.h.
Referenced by setVisible().
NSView* QCocoaWindow::m_view = nil |
Definition at line 223 of file qcocoawindow.h.
Referenced by QCocoaWindow(), ~QCocoaWindow(), applyContentBorderThickness(), applyWindowState(), bottomLeftClippedByNSWindowOffset(), devicePixelRatio(), frameMargins(), geometry(), handleExposeEvent(), handleGeometryChange(), initialize(), isContentView(), isEmbedded(), isForeignWindow(), isTransitioningToFullScreen(), lower(), nativeWindow(), propagateSizeHints(), raise(), recreateWindowIfNeeded(), registerTouch(), requestActivateWindow(), setCocoaGeometry(), setMask(), setOpacity(), setVisible(), setWindowCursor(), setWindowFilePath(), setWindowFlags(), setWindowIcon(), setWindowModified(), setWindowTitle(), startSystemMove(), QCocoaVulkanInstance::surface(), testContentBorderAreaPosition(), toggleFullScreen(), toggleMaximized(), updateTitleBarButtons(), view(), windowShouldClose(), windowState(), windowStyleMask(), and winId().
Qt::WindowModality QCocoaWindow::m_windowModality = Qt::NonModal |
Definition at line 227 of file qcocoawindow.h.
Referenced by createNSWindow(), and recreateWindowIfNeeded().
|
static |
Definition at line 244 of file qcocoawindow.h.
Referenced by isAlertState(), and setAlertState().
|
inlinestatic |
Definition at line 262 of file qcocoawindow.h.
Referenced by removePopupMonitor(), and setupPopupMonitor().
|
inlinestatic |
Definition at line 261 of file qcocoawindow.h.
Referenced by removePopupMonitor(), and setupPopupMonitor().
|
static |
Definition at line 229 of file qcocoawindow.h.
Referenced by setupPopupMonitor().