GXDE Bernese
Loading...
Searching...
No Matches
bernese::X11Info Class Reference

Static Public Member Functions

static bool IsPlatformX11 ()
 Check whether we're using Qt XCB platform.
static Display * GetDisplay ()
 Access the Xlib display connection.
static xcb_connection_t * GetConnection ()
 Access the XCB connection we already have.
static Time GetTimestamp ()
 Get an X server timestamp.

Member Function Documentation

◆ GetConnection()

xcb_connection_t * bernese::X11Info::GetConnection ( )
static

Access the XCB connection we already have.

Note
Must be called on the Qt GUI thread. The display connection will keep alive till Qt shuts down.
Warning
Don't shut down the connection manually!!
Returns
a XCB connection struct.

◆ GetDisplay()

Display * bernese::X11Info::GetDisplay ( )
static

Access the Xlib display connection.

Note
Must be called on the Qt GUI thread. The display connection will keep alive till Qt shuts down.
Warning
Don't shut down the connection manually!!
Returns
The display borrowed, or nullptr when fails.

◆ GetTimestamp()

Time bernese::X11Info::GetTimestamp ( )
static

Get an X server timestamp.

Note
Must be called on the Qt GUI thread
Returns
X11 Server timestamp, or can be XCB CurrentTime if failed.

◆ IsPlatformX11()

bool bernese::X11Info::IsPlatformX11 ( )
static

Check whether we're using Qt XCB platform.

Note
Note that XCB, D-XCB, and XWayland all counts.
Returns
True when we're using X11 platform.

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