![]() |
Qt 6.x
The Qt SDK
|
#include <qxcbscreen.h>
Friends | |
class | QXcbConnection |
Definition at line 32 of file qxcbscreen.h.
QT_BEGIN_NAMESPACE QXcbVirtualDesktop::QXcbVirtualDesktop | ( | QXcbConnection * | connection, |
xcb_screen_t * | screen, | ||
int | number | ||
) |
Definition at line 22 of file qxcbscreen.cpp.
References QXcbObject::atom(), QXcbAtom::Atom_NET_SUPPORTING_WM_CHECK, QXcbObject::connection(), QByteArray::constData(), dpi(), forcedDpi(), QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(), QMap< Key, T >::insert(), QXcbBasicConnection::internAtom(), QByteArray::number(), property, Q_XCB_REPLY_UNCHECKED, QXcbXSettings::registerCallbackForProperty(), reply, screen(), QXcbConnection::screens(), QXcbConnection::selectionOwner(), QXcbWindow::windowTitle(), QXcbObject::xcb_connection(), and xSettings().
QXcbVirtualDesktop::~QXcbVirtualDesktop | ( | ) |
Definition at line 91 of file qxcbscreen.cpp.
References QXcbObject::xcb_connection().
void QXcbVirtualDesktop::addScreen | ( | QPlatformScreen * | s | ) |
Definition at line 118 of file qxcbscreen.cpp.
References QList< T >::append(), and QList< T >::prepend().
|
inline |
Definition at line 67 of file qxcbscreen.h.
Definition at line 279 of file qxcbscreen.cpp.
References QRect::width().
Referenced by QXcbScreen::QXcbScreen(), QXcbScreen::setMonitor(), QXcbScreen::updateAvailableGeometry(), and QXcbScreen::updateGeometry().
xcb_colormap_t QXcbVirtualDesktop::colormapForVisual | ( | xcb_visualid_t | visualid | ) | const |
Definition at line 477 of file qxcbscreen.cpp.
References QMap< Key, T >::constEnd(), QMap< Key, T >::constFind(), QMap< Key, T >::insert(), it, root(), screen(), and QXcbObject::xcb_connection().
bool QXcbVirtualDesktop::compositingActive | ( | ) | const |
Definition at line 139 of file qxcbscreen.cpp.
References QXcbObject::connection(), and QXcbConnection::selectionOwner().
Referenced by QXcbDrag::move(), and QXcbDrag::startDrag().
quint8 QXcbVirtualDesktop::depthOfVisual | ( | xcb_visualid_t | visualid | ) | const |
Definition at line 469 of file qxcbscreen.cpp.
References QMap< Key, T >::constEnd(), QMap< Key, T >::find(), and it.
Referenced by visualForFormat().
QDpi QXcbVirtualDesktop::dpi | ( | ) | const |
Definition at line 99 of file qxcbscreen.cpp.
References QSize::height(), physicalSize(), Q_MM_PER_INCH, size(), and QSize::width().
Referenced by QXcbVirtualDesktop(), and QXcbScreen::updateGeometry().
|
inline |
Definition at line 64 of file qxcbscreen.h.
Referenced by QXcbVirtualDesktop().
void QXcbVirtualDesktop::handleScreenChange | ( | xcb_randr_screen_change_notify_event_t * | change_event | ) |
handle the XCB screen change event and update properties
On a mobile device, the ideal use case is that the accelerometer would drive the orientation. This could be achieved by using QSensors to read the accelerometer and adjusting the rotation in QML, or by reading the orientation from the QScreen object and doing the same, or in many other ways. However, on X we have the XRandR extension, which makes it possible to have the whole screen rotated, so that individual apps DO NOT have to rotate themselves. Apps could optionally use the QScreen::primaryOrientation property to optimize layout though. Furthermore, there is no support in X for accelerometer events anyway. So it makes more sense on a Linux system running X to just run a daemon which monitors the accelerometer and runs xrandr automatically to do the rotation, then apps do not have to be aware of it (but probably the window manager would resize them accordingly). updateGeometry() is written with this design in mind. Therefore the physical geometry, available geometry, virtual geometry, orientation and primaryOrientation should all change at the same time. On a system which cannot rotate the whole screen, it would be correct for only the orientation (not the primary orientation) to change.
Definition at line 185 of file qxcbscreen.cpp.
References QWindowSystemInterface::handleScreenLogicalDotsPerInchChange().
void QXcbVirtualDesktop::handleXFixesSelectionNotify | ( | xcb_xfixes_selection_notify_event_t * | notify_event | ) |
Definition at line 147 of file qxcbscreen.cpp.
|
inline |
Definition at line 65 of file qxcbscreen.h.
|
inline |
Definition at line 39 of file qxcbscreen.h.
Referenced by QXcbScreen::defaultName(), and QXcbScreen::getName().
|
inline |
Definition at line 41 of file qxcbscreen.h.
Referenced by QXcbScreen::QXcbScreen(), dpi(), and QXcbScreen::setMonitor().
|
inline |
Definition at line 48 of file qxcbscreen.h.
References QList< T >::removeOne().
|
inline |
Definition at line 43 of file qxcbscreen.h.
Referenced by colormapForVisual(), QXcbDrag::findXdndAwareTarget(), QXcbDrag::move(), and QXcbCursor::setPos().
|
inline |
Definition at line 38 of file qxcbscreen.h.
Referenced by QXcbVirtualDesktop(), colormapForVisual(), QXcbConnection::qtSelectionOwner(), screenAt(), surfaceFormatFor(), and updateWorkArea().
QXcbScreen * QXcbVirtualDesktop::screenAt | ( | const QPoint & | pos | ) | const |
Definition at line 108 of file qxcbscreen.cpp.
References QXcbObject::connection(), pos, screen(), QXcbConnection::screens(), and screens().
Referenced by QXcbDrag::move().
|
inline |
Definition at line 46 of file qxcbscreen.h.
Referenced by screenAt(), and QXcbDrag::startDrag().
void QXcbVirtualDesktop::setPrimaryScreen | ( | QPlatformScreen * | s | ) |
Definition at line 123 of file qxcbscreen.cpp.
References QListSpecialMethodsBase< T >::indexOf(), Q_ASSERT, and QList< T >::swapItemsAt().
|
inline |
Definition at line 47 of file qxcbscreen.h.
|
inline |
Definition at line 40 of file qxcbscreen.h.
Referenced by QXcbScreen::QXcbScreen(), and dpi().
|
inline |
Definition at line 66 of file qxcbscreen.h.
void QXcbVirtualDesktop::subscribeToXFixesSelectionNotify | ( | ) |
Definition at line 153 of file qxcbscreen.cpp.
References QXcbObject::connection(), and QXcbObject::xcb_connection().
QSurfaceFormat QXcbVirtualDesktop::surfaceFormatFor | ( | const QSurfaceFormat & | format | ) | const |
Definition at line 401 of file qxcbscreen.cpp.
References QXcbObject::connection(), QXcbConnection::defaultVisualId(), QXcbConnection::hasDefaultVisualId(), qPopulationCount(), screen(), and visualForId().
Referenced by QXcbScreen::surfaceFormatFor().
void QXcbVirtualDesktop::updateWorkArea | ( | ) |
Definition at line 269 of file qxcbscreen.cpp.
References screen().
Referenced by QXcbConnection::handleXcbEvent().
const xcb_visualtype_t * QXcbVirtualDesktop::visualForFormat | ( | const QSurfaceFormat & | format | ) | const |
Definition at line 425 of file qxcbscreen.cpp.
References depthOfVisual(), qCountTrailingZeroBits(), and qPopulationCount().
const xcb_visualtype_t * QXcbVirtualDesktop::visualForId | ( | xcb_visualid_t | visualid | ) | const |
Definition at line 461 of file qxcbscreen.cpp.
References QMap< Key, T >::constEnd(), QMap< Key, T >::find(), and it.
Referenced by surfaceFormatFor(), and QXcbScreen::visualForId().
|
inline |
Definition at line 69 of file qxcbscreen.h.
Referenced by QXcbConnection::windowManagerName().
QXcbXSettings * QXcbVirtualDesktop::xSettings | ( | ) | const |
Definition at line 130 of file qxcbscreen.cpp.
Referenced by QXcbVirtualDesktop(), and QXcbScreen::xSettings().
|
friend |
Definition at line 108 of file qxcbscreen.h.