QWaylandSurface Class
The QWaylandSurface class represents a rectangular area on an output device. 更多...
头文件: | #include <QWaylandSurface> |
qmake: | QT += waylandcompositor |
开始支持版本: | Qt 5.8 |
基类: | QWaylandObject |
公有类型
enum | Origin { OriginTopLeft, OriginBottomLeft } |
属性
|
|
公有函数
QWaylandSurface() | |
QWaylandSurface(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version) | |
virtual | ~QWaylandSurface() |
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) |
Origin | origin() const |
QWaylandView * | primaryView() const |
QWaylandSurfaceRole * | role() const |
void | sendFrameCallbacks() |
void | setPrimaryView(QWaylandView *view) |
QSize | size() const |
QList<QWaylandView *> | views() const |
- 5 个公有函数继承自 QWaylandObject
公有槽函数
void | updateSelection() |
信号
void | bufferScaleChanged() |
void | childAdded(QWaylandSurface *child) |
void | configure(bool hasBuffer) |
void | contentOrientationChanged() |
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() |
详细描述
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.
成员类型
enum QWaylandSurface::Origin
This enum type is used to specify the origin of a QWaylandSurface's buffer.
Constant | Value | Description |
---|---|---|
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. |
属性
bufferScale : const int
This property holds the QWaylandSurface's buffer scale. The buffer scale lets a client supply higher resolution buffer data for use on high resolution outputs.
访问函数:
int | bufferScale() const |
Notifier signal:
void | bufferScaleChanged() |
client : QWaylandClient * const
This property holds the client using this QWaylandSurface.
访问函数:
QWaylandClient * | client() const |
contentOrientation : const Qt::ScreenOrientation
This property holds the orientation of the QWaylandSurface's contents.
访问函数:
Qt::ScreenOrientation | contentOrientation() const |
Notifier signal:
void | contentOrientationChanged() |
cursorSurface : bool
This property holds whether the QWaylandSurface is a cursor surface.
访问函数:
bool | isCursorSurface() const |
void | markAsCursorSurface(bool cursorSurface) |
hasContent : const bool
This property holds whether the QWaylandSurface has content.
访问函数:
bool | hasContent() const |
Notifier signal:
void | hasContentChanged() |
origin : const QWaylandSurface::Origin
This property holds the origin of the QWaylandSurface's buffer, or QWaylandSurface::OriginTopLeft if the surface has no buffer.
访问函数:
Origin | origin() const |
Notifier signal:
void | originChanged() |
size : const QSize
This property holds the QWaylandSurface's size in pixels.
访问函数:
QSize | size() const |
Notifier signal:
void | sizeChanged() |
成员函数
QWaylandSurface::QWaylandSurface()
Constructs a an uninitialized QWaylandSurface.
QWaylandSurface::QWaylandSurface(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)
Constructs and initializes a QWaylandSurface for the given compositor and client, and with the given id and version.
[virtual]
QWaylandSurface::~QWaylandSurface()
Destroys the QWaylandSurface.
[signal]
void QWaylandSurface::childAdded(QWaylandSurface *child)
QWaylandCompositor *QWaylandSurface::compositor() const
Returns the compositor for this QWaylandSurface.
[signal]
void QWaylandSurface::configure(bool hasBuffer)
[signal]
void QWaylandSurface::damaged(const QRegion &rect)
void QWaylandSurface::destroy()
Destroys the QWaylandSurface.
[signal]
void QWaylandSurface::dragStarted(QWaylandDrag *drag)
This signal is emitted when a drag has started from this surface.
void QWaylandSurface::frameStarted()
Prepares all frame callbacks for sending.
void QWaylandSurface::initialize(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)
Initializes the QWaylandSurface with the given compositor and client, and with the given id and version.
QWaylandInputMethodControl *QWaylandSurface::inputMethodControl() const
bool QWaylandSurface::inputRegionContains(const QPoint &p) const
Returns true
if the QWaylandSurface's input region contains the point p. Otherwise returns false
.
bool QWaylandSurface::isDestroyed() const
Returns true if the QWaylandSurface has been destroyed. Otherwise returns false.
bool QWaylandSurface::isInitialized() const
Returns true if the QWaylandSurface has been initialized.
[signal]
void QWaylandSurface::offsetForNextFrame(const QPoint &offset)
[signal]
void QWaylandSurface::parentChanged(QWaylandSurface *newParent, QWaylandSurface *oldParent)
QWaylandView *QWaylandSurface::primaryView() const
Returns this QWaylandSurface's primary view.
参见 QWaylandView::advance() and QWaylandSurface::setPrimaryView().
[signal]
void QWaylandSurface::redraw()
QWaylandSurfaceRole *QWaylandSurface::role() const
void QWaylandSurface::sendFrameCallbacks()
Sends pending frame callbacks.
void QWaylandSurface::setPrimaryView(QWaylandView *view)
Sets this 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() for more details.
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() and QWaylandView::advance().
[signal]
void QWaylandSurface::subsurfacePlaceAbove(QWaylandSurface *sibling)
[signal]
void QWaylandSurface::subsurfacePlaceBelow(QWaylandSurface *sibling)
[signal]
void QWaylandSurface::subsurfacePositionChanged(const QPoint &position)
[signal]
void QWaylandSurface::surfaceDestroyed()
[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.
QList<QWaylandView *> QWaylandSurface::views() const
Returns the views for this QWaylandSurface.