Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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()

QT_BEGIN_NAMESPACE QXcbVirtualDesktop::QXcbVirtualDesktop ( QXcbConnection * connection,
xcb_screen_t * screen,
int number )

Definition at line 23 of file qxcbscreen.cpp.

◆ ~QXcbVirtualDesktop()

QXcbVirtualDesktop::~QXcbVirtualDesktop ( )

Definition at line 93 of file qxcbscreen.cpp.

Member Function Documentation

◆ addScreen()

void QXcbVirtualDesktop::addScreen ( QPlatformScreen * s)

Definition at line 120 of file qxcbscreen.cpp.

◆ 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 277 of file qxcbscreen.cpp.

◆ colormapForVisual()

xcb_colormap_t QXcbVirtualDesktop::colormapForVisual ( xcb_visualid_t visualid) const

Definition at line 475 of file qxcbscreen.cpp.

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

Here is the call graph for this function:

◆ compositingActive()

bool QXcbVirtualDesktop::compositingActive ( ) const

Definition at line 137 of file qxcbscreen.cpp.

References QXcbObject::connection().

Referenced by QXcbDrag::move().

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 467 of file qxcbscreen.cpp.

◆ dpi()

QDpi QXcbVirtualDesktop::dpi ( ) const

Definition at line 101 of file qxcbscreen.cpp.

◆ forcedDpi()

int QXcbVirtualDesktop::forcedDpi ( ) const
inline

Definition at line 64 of file qxcbscreen.h.

◆ 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 183 of file qxcbscreen.cpp.

◆ handleXFixesSelectionNotify()

void QXcbVirtualDesktop::handleXFixesSelectionNotify ( xcb_xfixes_selection_notify_event_t * notify_event)

Definition at line 145 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.

◆ physicalSize()

QSize QXcbVirtualDesktop::physicalSize ( ) const
inline

Definition at line 41 of file qxcbscreen.h.

◆ removeScreen()

void QXcbVirtualDesktop::removeScreen ( QPlatformScreen * s)
inline

Definition at line 48 of file qxcbscreen.h.

◆ root()

xcb_window_t QXcbVirtualDesktop::root ( ) const
inline

Definition at line 43 of file qxcbscreen.h.

Referenced by 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 colormapForVisual(), and surfaceFormatFor().

Here is the caller graph for this function:

◆ screenAt()

QXcbScreen * QXcbVirtualDesktop::screenAt ( const QPoint & pos) const

Definition at line 110 of file qxcbscreen.cpp.

References QXcbObject::connection().

Here is the call graph for this function:

◆ screens()

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

Definition at line 46 of file qxcbscreen.h.

◆ setPrimaryScreen()

void QXcbVirtualDesktop::setPrimaryScreen ( QPlatformScreen * s)

Definition at line 125 of file qxcbscreen.cpp.

◆ 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.

◆ subpixelType()

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

Definition at line 66 of file qxcbscreen.h.

◆ subscribeToXFixesSelectionNotify()

void QXcbVirtualDesktop::subscribeToXFixesSelectionNotify ( )

Definition at line 151 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 399 of file qxcbscreen.cpp.

References QXcbObject::connection(), screen(), and visualForId().

Here is the call graph for this function:

◆ updateWorkArea()

void QXcbVirtualDesktop::updateWorkArea ( )

Definition at line 267 of file qxcbscreen.cpp.

◆ visualForFormat()

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

Definition at line 423 of file qxcbscreen.cpp.

◆ visualForId()

const xcb_visualtype_t * QXcbVirtualDesktop::visualForId ( xcb_visualid_t visualid) const

Definition at line 459 of file qxcbscreen.cpp.

Referenced by surfaceFormatFor().

Here is the caller graph for this function:

◆ windowManagerName()

QString QXcbVirtualDesktop::windowManagerName ( ) const
inline

Definition at line 69 of file qxcbscreen.h.

◆ xSettings()

QXcbXSettings * QXcbVirtualDesktop::xSettings ( ) const

Definition at line 132 of file qxcbscreen.cpp.

◆ QXcbConnection

friend class QXcbConnection
friend

Definition at line 108 of file qxcbscreen.h.


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