提供 X 显示配置的有关信息。 更多 …
def
appDpiX
([screen=-1])
def
appDpiY
([screen=-1])
def
appRootWindow
([screen=-1])
def
appScreen
()
def
appTime
()
def
appUserTime
()
def
generatePeekerId
()
def
getTimestamp
()
def
isCompositingManagerRunning
([screen=-1])
def
isPlatformX11
()
def
nextStartupId
()
def
removePeekerId
(peekerId)
def
setAppTime
(time)
def
setAppUserTime
(time)
def
setNextStartupId
(id)
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.
警告
This class is only available on X11. For querying per-screen information in a portable way, use
QDesktopWidget.
PySide2.QtX11Extras.QX11Info.
PeekOption
¶
An enum to tune the behavior of
peekEventQueue()
.
|
常量 |
描述 |
|---|---|
|
QX11Info.PeekDefault |
Peek from the beginning of the buffered native event queue. A peeker id is optional with . If a peeker id is provided to
|
|
QX11Info.PeekFromCachedIndex |
|
New in version 5.10.
PySide2.QtX11Extras.QX11Info.
appDpiX
(
[
screen=-1
]
)
¶
screen
–
int
int
Returns the horizontal resolution of the given
screen
in terms of the number of dots per inch.
screen
argument is an X screen number. Be aware that if the user’s system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use
QDesktopWidget
to query for information about Xinerama screens.
另请参阅
PySide2.QtX11Extras.QX11Info.
appDpiY
(
[
screen=-1
]
)
¶
screen
–
int
int
Returns the vertical resolution of the given
screen
in terms of the number of dots per inch.
screen
argument is an X screen number. Be aware that if the user’s system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use
QDesktopWidget
to query for information about Xinerama screens.
另请参阅
PySide2.QtX11Extras.QX11Info.
appRootWindow
(
[
screen=-1
]
)
¶
screen
–
int
long
Returns a handle for the applications root window on the given
screen
.
screen
argument is an X screen number. Be aware that if the user’s system uses Xinerama (as opposed to traditional X11 multiscreen), there is only one X screen. Use
QDesktopWidget
to query for information about Xinerama screens.
另请参阅
desktop()
PySide2.QtX11Extras.QX11Info.
appScreen
(
)
¶
int
Returns the number of the screen where the application is being displayed.
This method refers to screens in the original X11 meaning with a different DISPLAY environment variable per screen. This information is only useful if your application needs to know on which X screen it is running.
In a typical multi-head configuration, multiple physical monitors are combined in one X11 screen. This means this method returns the same number for each of the physical monitors. In such a setup you are interested in the monitor information as provided by the X11 RandR extension. This is available through
QDesktopWidget
and
QScreen
.
另请参阅
display()
PySide2.QtX11Extras.QX11Info.
appTime
(
)
¶
long
返回 X11 时间。
PySide2.QtX11Extras.QX11Info.
appUserTime
(
)
¶
long
返回 X11 用户时间。
PySide2.QtX11Extras.QX11Info.
generatePeekerId
(
)
¶
qint32
Returns a new peeker id or -1 if some interal error has occurred. Each peeker id is associated with an index in the buffered native event queue.
更多细节见
PeekOption
and
peekEventQueue()
.
另请参阅
peekEventQueue()
removePeekerId()
PySide2.QtX11Extras.QX11Info.
getTimestamp
(
)
¶
long
从 X 服务器抓取当前 X11 时间戳。
This method creates a property notify event and blocks till it is received back from the X Server.
PySide2.QtX11Extras.QX11Info.
isCompositingManagerRunning
(
[
screen=-1
]
)
¶
screen
–
int
bool
Returns true if there is a compositing manager running for the connection attached to
screen
.
若
screen
equals -1, the application’s primary screen is used.
PySide2.QtX11Extras.QX11Info.
isPlatformX11
(
)
¶
bool
Returns true if the application is currently running on X11.
PySide2.QtX11Extras.QX11Info.
nextStartupId
(
)
¶
QByteArray
Returns the startup ID that will be used for the next window to be shown by this process.
After the next window is shown, the next startup ID will be empty.
http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt
另请参阅
PySide2.QtX11Extras.QX11Info.
removePeekerId
(
peekerId
)
¶
peekerId
–
qint32
bool
移除
peekerId
, which was earlier obtained via
generatePeekerId()
.
返回
true
on success or
false
if unknown peeker id was provided or some interal error has occurred.
另请参阅
PySide2.QtX11Extras.QX11Info.
setAppTime
(
time
)
¶
time – long
Sets the X11 time to the value specified by
time
.
PySide2.QtX11Extras.QX11Info.
setAppUserTime
(
time
)
¶
time – long
Sets the X11 user time as specified by
time
.
PySide2.QtX11Extras.QX11Info.
setNextStartupId
(
id
)
¶
id
–
QByteArray
Sets the next startup ID to
id
.
This is the startup ID that will be used for the next window to be shown by this process.
The startup ID of the first window comes from the environment variable DESKTOP_STARTUP_ID. This method is useful for subsequent windows, when the request comes from another process (e.g. via DBus).
另请参阅