QX11Info Class
Provides information about the X display configuration. More...
| Header: | #include <QX11Info> |
| qmake: | QT += x11extras |
| Since: | Qt 5.1 |
This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
This class was introduced in Qt 5.1.
Public Types
| enum | PeekOption { PeekDefault, PeekFromCachedIndex } |
| typedef | PeekerCallback |
Detailed Description
The class provides two APIs: a set of non-static functions that provide information about a specific widget or pixmap, and a set of static functions that provide the default information for the application.
Warning: This class is only available on X11. For querying per-screen information in a portable way, use QDesktopWidget.
Member Type Documentation
enum QX11Info::PeekOption
An enum to tune the behavior of QX11Info::peekEventQueue().
| Constant | Value | Description |
|---|---|---|
QX11Info::PeekDefault | 0 | Peek from the beginning of the buffered native event queue. A peeker id is optional with PeekDefault. If a peeker id is provided to peekEventQueue() when using PeekDefault, then peeking starts from the beginning of the queue, not from the cached index; thus, this can be used to manually reset a cached index to peek from the start of the queue. When this operation completes, the associated index will be updated to the new position in the queue. |
QX11Info::PeekFromCachedIndex | 1 | QX11Info::peekEventQueue() can optimize the peeking algorithm by skipping events that it already has seen in earlier calls to peekEventQueue(). When control returns to the main event loop, which causes the buffered native event queue to be flushed to Qt's event queue, the cached indices are marked invalid and will be reset on the next access. The same is true if the program explicitly flushes the buffered native event queue by QCoreApplication::processEvents(). |
This enum was introduced or modified in Qt 5.10.
typedef QX11Info::PeekerCallback
Typedef for a pointer to a function with the following signature:
bool (*PeekerCallback)(xcb_generic_event_t *event, void *peekerData);
The event is a native XCB event. The peekerData is a pointer to data, passed in via peekEventQueue().
Return true from this function to stop examining the buffered native event queue or false to continue.
Note: A non-capturing lambda can serve as a PeekerCallback.
This typedef was introduced in Qt 5.10.