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

#include <qxcbscreen.h>

+ Inheritance diagram for QXcbVirtualDesktop:
+ Collaboration diagram for QXcbVirtualDesktop:

Public Member Functions

 QXcbVirtualDesktop (QXcbConnection *connection, xcb_screen_t *screen, int number)
 
 ~QXcbVirtualDesktop ()
 
xcb_screen_t * screen () const
 
int number () const
 
QSize size () const
 
QSize physicalSize () const
 
QDpi dpi () const
 
xcb_window_t root () const
 
QXcbScreenscreenAt (const QPoint &pos) const
 
QList< QPlatformScreen * > screens () const
 
void setScreens (QList< QPlatformScreen * > &&sl)
 
void removeScreen (QPlatformScreen *s)
 
void addScreen (QPlatformScreen *s)
 
void setPrimaryScreen (QPlatformScreen *s)
 
QXcbXSettingsxSettings () const
 
bool compositingActive () const
 
void updateWorkArea ()
 
QRect availableGeometry (const QRect &screenGeometry) const
 
void handleXFixesSelectionNotify (xcb_xfixes_selection_notify_event_t *notify_event)
 
void subscribeToXFixesSelectionNotify ()
 
void handleScreenChange (xcb_randr_screen_change_notify_event_t *change_event)
 handle the XCB screen change event and update properties
 
int forcedDpi () const
 
QFontEngine::HintStyle hintStyle () const
 
QFontEngine::SubpixelAntialiasingType subpixelType () const
 
int antialiasingEnabled () const
 
QString windowManagerName () const
 
QSurfaceFormat surfaceFormatFor (const QSurfaceFormat &format) const
 
const xcb_visualtype_t * visualForFormat (const QSurfaceFormat &format) const
 
const xcb_visualtype_t * visualForId (xcb_visualid_t) const
 
quint8 depthOfVisual (xcb_visualid_t) const
 
xcb_colormap_t colormapForVisual (xcb_visualid_t) const
 
- Public Member Functions inherited from QXcbObject
 QXcbObject (QXcbConnection *connection=nullptr)
 
void setConnection (QXcbConnection *connection)
 
QXcbConnectionconnection () const
 
xcb_atom_t atom (QXcbAtom::Atom atom) const
 
xcb_connection_t * xcb_connection () const
 

Friends

class QXcbConnection
 

Detailed Description

Definition at line 32 of file qxcbscreen.h.

Constructor & Destructor Documentation

◆ QXcbVirtualDesktop()

◆ ~QXcbVirtualDesktop()

QXcbVirtualDesktop::~QXcbVirtualDesktop ( )

Definition at line 91 of file qxcbscreen.cpp.

References QXcbObject::xcb_connection().

+ Here is the call graph for this function:

Member Function Documentation

◆ addScreen()

void QXcbVirtualDesktop::addScreen ( QPlatformScreen * s)

Definition at line 118 of file qxcbscreen.cpp.

References QList< T >::append(), and QList< T >::prepend().

+ Here is the call graph for this function:

◆ antialiasingEnabled()

int QXcbVirtualDesktop::antialiasingEnabled ( ) const
inline

Definition at line 67 of file qxcbscreen.h.

◆ availableGeometry()

QRect QXcbVirtualDesktop::availableGeometry ( const QRect & screenGeometry) const

Definition at line 279 of file qxcbscreen.cpp.

References QRect::width().

Referenced by QXcbScreen::QXcbScreen(), QXcbScreen::setMonitor(), QXcbScreen::updateAvailableGeometry(), and QXcbScreen::updateGeometry().

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

◆ colormapForVisual()

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

+ Here is the call graph for this function:

◆ compositingActive()

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

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

◆ depthOfVisual()

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

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

◆ dpi()

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

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

◆ forcedDpi()

int QXcbVirtualDesktop::forcedDpi ( ) const
inline

Definition at line 64 of file qxcbscreen.h.

Referenced by QXcbVirtualDesktop().

+ Here is the caller graph for this function:

◆ handleScreenChange()

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

+ Here is the call graph for this function:

◆ handleXFixesSelectionNotify()

void QXcbVirtualDesktop::handleXFixesSelectionNotify ( xcb_xfixes_selection_notify_event_t * notify_event)

Definition at line 147 of file qxcbscreen.cpp.

◆ hintStyle()

QFontEngine::HintStyle QXcbVirtualDesktop::hintStyle ( ) const
inline

Definition at line 65 of file qxcbscreen.h.

◆ number()

int QXcbVirtualDesktop::number ( ) const
inline

Definition at line 39 of file qxcbscreen.h.

Referenced by QXcbScreen::defaultName(), and QXcbScreen::getName().

+ Here is the caller graph for this function:

◆ physicalSize()

QSize QXcbVirtualDesktop::physicalSize ( ) const
inline

Definition at line 41 of file qxcbscreen.h.

Referenced by QXcbScreen::QXcbScreen(), dpi(), and QXcbScreen::setMonitor().

+ Here is the caller graph for this function:

◆ removeScreen()

void QXcbVirtualDesktop::removeScreen ( QPlatformScreen * s)
inline

Definition at line 48 of file qxcbscreen.h.

References QList< T >::removeOne().

+ Here is the call graph for this function:

◆ root()

xcb_window_t QXcbVirtualDesktop::root ( ) const
inline

Definition at line 43 of file qxcbscreen.h.

Referenced by colormapForVisual(), QXcbDrag::findXdndAwareTarget(), QXcbDrag::move(), and QXcbCursor::setPos().

+ Here is the caller graph for this function:

◆ screen()

xcb_screen_t * QXcbVirtualDesktop::screen ( ) const
inline

Definition at line 38 of file qxcbscreen.h.

Referenced by QXcbVirtualDesktop(), colormapForVisual(), QXcbConnection::qtSelectionOwner(), screenAt(), surfaceFormatFor(), and updateWorkArea().

+ Here is the caller graph for this function:

◆ screenAt()

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

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

◆ screens()

QList< QPlatformScreen * > QXcbVirtualDesktop::screens ( ) const
inline

Definition at line 46 of file qxcbscreen.h.

Referenced by screenAt(), and QXcbDrag::startDrag().

+ Here is the caller graph for this function:

◆ setPrimaryScreen()

void QXcbVirtualDesktop::setPrimaryScreen ( QPlatformScreen * s)

Definition at line 123 of file qxcbscreen.cpp.

References QListSpecialMethodsBase< T >::indexOf(), Q_ASSERT, and QList< T >::swapItemsAt().

+ Here is the call graph for this function:

◆ setScreens()

void QXcbVirtualDesktop::setScreens ( QList< QPlatformScreen * > && sl)
inline

Definition at line 47 of file qxcbscreen.h.

◆ size()

QSize QXcbVirtualDesktop::size ( ) const
inline

Definition at line 40 of file qxcbscreen.h.

Referenced by QXcbScreen::QXcbScreen(), and dpi().

+ Here is the caller graph for this function:

◆ subpixelType()

QFontEngine::SubpixelAntialiasingType QXcbVirtualDesktop::subpixelType ( ) const
inline

Definition at line 66 of file qxcbscreen.h.

◆ subscribeToXFixesSelectionNotify()

void QXcbVirtualDesktop::subscribeToXFixesSelectionNotify ( )

Definition at line 153 of file qxcbscreen.cpp.

References QXcbObject::connection(), and QXcbObject::xcb_connection().

+ Here is the call graph for this function:

◆ surfaceFormatFor()

QSurfaceFormat QXcbVirtualDesktop::surfaceFormatFor ( const QSurfaceFormat & format) const

Definition at line 401 of file qxcbscreen.cpp.

References QXcbObject::connection(), QXcbConnection::defaultVisualId(), QXcbConnection::hasDefaultVisualId(), qPopulationCount(), screen(), QSurfaceFormat::setRedBufferSize(), and visualForId().

Referenced by QXcbScreen::surfaceFormatFor().

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

◆ updateWorkArea()

void QXcbVirtualDesktop::updateWorkArea ( )

Definition at line 269 of file qxcbscreen.cpp.

References screen().

Referenced by QXcbConnection::handleXcbEvent().

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

◆ visualForFormat()

const xcb_visualtype_t * QXcbVirtualDesktop::visualForFormat ( const QSurfaceFormat & format) const

Definition at line 425 of file qxcbscreen.cpp.

References depthOfVisual(), qCountTrailingZeroBits(), and qPopulationCount().

+ Here is the call graph for this function:

◆ visualForId()

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

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

◆ windowManagerName()

QString QXcbVirtualDesktop::windowManagerName ( ) const
inline

Definition at line 69 of file qxcbscreen.h.

Referenced by QXcbConnection::windowManagerName().

+ Here is the caller graph for this function:

◆ xSettings()

QXcbXSettings * QXcbVirtualDesktop::xSettings ( ) const

Definition at line 130 of file qxcbscreen.cpp.

Referenced by QXcbVirtualDesktop(), and QXcbScreen::xSettings().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QXcbConnection

friend class QXcbConnection
friend

Definition at line 108 of file qxcbscreen.h.


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