The QWaylandSurface class represents a rectangular area on an output device. 更多...
头: | #include <QWaylandSurface> |
qmake: | QT += waylandcompositor |
Since: | Qt 5.8 |
继承: | QWaylandObject |
enum | Origin { OriginTopLeft, OriginBottomLeft } |
|
|
QWaylandSurface () | |
QWaylandSurface (QWaylandCompositor * compositor , QWaylandClient * client , uint id , int version ) | |
virtual | ~QWaylandSurface () override |
int | bufferScale () const |
QWaylandClient * | client () const |
QWaylandCompositor * | compositor () const |
Qt::ScreenOrientation | contentOrientation () const |
void | destroy () |
void | frameStarted () |
bool | hasContent () const |
void | initialize (QWaylandCompositor * compositor , QWaylandClient * client , uint id , int version ) |
QWaylandInputMethodControl * | inputMethodControl () const |
bool | inputRegionContains (const QPoint & p ) const |
bool | isCursorSurface () const |
bool | isDestroyed () const |
bool | isInitialized () const |
void | markAsCursorSurface (bool cursorSurface ) |
QWaylandSurface::Origin | origin () const |
QWaylandView * | primaryView () const |
struct wl_resource * | resource () const |
QWaylandSurfaceRole * | role () const |
void | sendFrameCallbacks () |
void | setPrimaryView (QWaylandView * view ) |
bool | setRole (QWaylandSurfaceRole * role , wl_resource * errorResource , uint32_t errorCode ) |
QSize | size () const |
QList<QWaylandView *> | views () const |
::wl_client * | waylandClient () const |
void | updateSelection () |
void | bufferScaleChanged () |
void | childAdded (QWaylandSurface * child ) |
void | configure (bool hasBuffer ) |
void | contentOrientationChanged () |
void | cursorSurfaceChanged () |
void | damaged (const QRegion & rect ) |
void | dragStarted (QWaylandDrag * drag ) |
void | hasContentChanged () |
void | offsetForNextFrame (const QPoint & offset ) |
void | originChanged () |
void | parentChanged (QWaylandSurface * newParent , QWaylandSurface * oldParent ) |
void | redraw () |
void | sizeChanged () |
void | subsurfacePlaceAbove (QWaylandSurface * sibling ) |
void | subsurfacePlaceBelow (QWaylandSurface * sibling ) |
void | subsurfacePositionChanged (const QPoint & position ) |
void | surfaceDestroyed () |
QWaylandSurface * | fromResource (::wl_resource * res ) |
const QMetaObject | staticMetaObject |
The QWaylandSurface class represents a rectangular area on an output device.
This class encapsulates a rectangular area of pixels that is displayed on an output device. It corresponds to the interface
wl_surface
in the Wayland protocol.
This enum type is used to specify the origin of a QWaylandSurface 's buffer.
常量 | 值 | 描述 |
---|---|---|
QWaylandSurface::OriginTopLeft
|
0
|
The origin is the top left corner of the buffer. |
QWaylandSurface::OriginBottomLeft
|
1
|
The origin is the bottom left corner of the buffer. |
此特性保持 QWaylandSurface 's buffer scale. The buffer scale lets a client supply higher resolution buffer data for use on high resolution outputs.
访问函数:
int | bufferScale () const |
通知程序信号:
void | bufferScaleChanged () |
This property holds the client using this QWaylandSurface .
访问函数:
QWaylandClient * | client () const |
This property holds the orientation of the QWaylandSurface 's contents.
访问函数:
Qt::ScreenOrientation | contentOrientation () const |
通知程序信号:
void | contentOrientationChanged () |
另请参阅 QWaylandOutput::transform .
This property holds whether the QWaylandSurface is a cursor surface.
访问函数:
bool | isCursorSurface () const |
void | markAsCursorSurface (bool cursorSurface ) |
通知程序信号:
void | cursorSurfaceChanged () |
This property holds whether the QWaylandSurface has content.
访问函数:
bool | hasContent () const |
通知程序信号:
void | hasContentChanged () |
This property holds the origin of the QWaylandSurface 's buffer, or QWaylandSurface::OriginTopLeft if the surface has no buffer.
访问函数:
QWaylandSurface::Origin | origin () const |
通知程序信号:
void | originChanged () |
此特性保持 QWaylandSurface 's size in pixels.
访问函数:
QSize | size () const |
通知程序信号:
void | sizeChanged () |
Constructs a an uninitialized QWaylandSurface .
Constructs and initializes a QWaylandSurface 为给定 compositor and client ,和采用给定 id and version .
[override virtual]
QWaylandSurface::
~QWaylandSurface
()
销毁 QWaylandSurface .
[signal]
void
QWaylandSurface::
childAdded
(
QWaylandSurface
*
child
)
This signal is emitted when a wl_subsurface, child , has been added to the surface.
Returns the compositor for this QWaylandSurface .
[signal]
void
QWaylandSurface::
configure
(
bool
hasBuffer
)
[signal]
void
QWaylandSurface::
damaged
(const
QRegion
&
rect
)
销毁 QWaylandSurface .
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
[signal]
void
QWaylandSurface::
dragStarted
(
QWaylandDrag
*
drag
)
This signal is emitted when a drag has started from this surface.
Prepares all frame callbacks for sending.
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
[static]
QWaylandSurface
*QWaylandSurface::
fromResource
(
::wl_resource
*
res
)
返回 QWaylandSurface corresponding to the Wayland resource res .
初始化 QWaylandSurface 采用给定 compositor and client ,和采用给定 id and version .
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
返回
true
若
QWaylandSurface
's input region contains the point
p
. Otherwise returns
false
.
返回 true 若 QWaylandSurface has been destroyed. Otherwise returns false.
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
返回 true 若 QWaylandSurface has been initialized.
[signal]
void
QWaylandSurface::
offsetForNextFrame
(const
QPoint
&
offset
)
[signal]
void
QWaylandSurface::
parentChanged
(
QWaylandSurface
*
newParent
,
QWaylandSurface
*
oldParent
)
Returns this QWaylandSurface 's primary view.
另请参阅 QWaylandView::advance () 和 QWaylandSurface::setPrimaryView ().
[signal]
void
QWaylandSurface::
redraw
()
Returns the Wayland resource corresponding to this QWaylandSurface .
另请参阅 setRole ().
Sends pending frame callbacks.
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
设置此 QWaylandSurface 's primary view to view , in case there are multiple views of this surface. The primary view is the view that governs the client's refresh rate. It takes care of discarding buffer references when QWaylandView::advance () is called. See the documentation for QWaylandView::advance () 了解更多细节。
In shell surface integrations, such as QWaylandWlShellIntegration and QWaylandXdgShellV5Integration, maximize and fullscreen requests from the client will only have an effect if the integration has the primary view of the surface.
另请参阅 primaryView () 和 QWaylandView::advance ().
设置 role on the surface. A role defines how a surface will be mapped on screen, without a role a surface is supposed to be hidden. Only one role at all times can be set on a surface. Although setting the same role many times is allowed, attempting to change the role of a surface will trigger a protocol error to the errorResource and send an errorCode to the client.
另请参阅 role ().
[signal]
void
QWaylandSurface::
subsurfacePlaceAbove
(
QWaylandSurface
*
sibling
)
[signal]
void
QWaylandSurface::
subsurfacePlaceBelow
(
QWaylandSurface
*
sibling
)
[signal]
void
QWaylandSurface::
subsurfacePositionChanged
(const
QPoint
&
position
)
[signal]
void
QWaylandSurface::
surfaceDestroyed
()
This signal is emitted when the corresponing wl_surface is destroyed.
[slot]
void
QWaylandSurface::
updateSelection
()
Updates the surface with the compositor's retained clipboard selection. Although this is done automatically when the surface receives keyboard focus, this function is useful for updating clients which do not have keyboard focus.
Returns the views for this QWaylandSurface .