QWaylandBufferRef Class
The QWaylandBufferRef class holds the reference to a surface buffer. More...
Header: | #include <QWaylandBufferRef> |
qmake: | QT += waylandcompositor |
Since: | Qt 5.8 |
This class was introduced in Qt 5.8.
Public Functions
QWaylandBufferRef(const QWaylandBufferRef &ref) | |
QWaylandBufferRef() | |
QWaylandBufferRef & | operator=(const QWaylandBufferRef &ref) |
~QWaylandBufferRef() | |
bool | hasBuffer() const |
bool | hasContent() const |
int | image() const |
bool | isDestroyed() const |
bool | isNull() const |
bool | isSharedMemory() const |
int | origin() const |
int | size() const |
struct wl_resource * | wl_buffer() const |
bool | operator!=(const QWaylandBufferRef &ref) |
bool | operator==(const QWaylandBufferRef &ref) |
Detailed Description
This class can be used to reference a surface buffer. As long as a reference to the buffer exists, it is owned by the compositor and the client cannot modify it.
Member Function Documentation
QWaylandBufferRef::QWaylandBufferRef(const QWaylandBufferRef &ref)
Creates a new reference to the buffer referenced by ref.
QWaylandBufferRef::QWaylandBufferRef()
Constructs a null buffer ref.
QWaylandBufferRef &QWaylandBufferRef::operator=(const QWaylandBufferRef &ref)
Assigns ref to this buffer and adds a reference to it. The previously referenced buffer is dereferenced.
QWaylandBufferRef::~QWaylandBufferRef()
Dereferences the buffer.
bool QWaylandBufferRef::hasBuffer() const
Returns true if this QWaylandBufferRef references a buffer. Otherwise returns false.
See also isNull() and hasContent().
bool QWaylandBufferRef::hasContent() const
Returns true if this QWaylandBufferRef references a buffer that has content. Otherwise returns false.
See also isNull() and hasBuffer().
int QWaylandBufferRef::image() const
Returns an image with the contents of the buffer.
bool QWaylandBufferRef::isDestroyed() const
Returns true if this QWaylandBufferRef references a buffer that has been destroyed. Otherwise returns false.
bool QWaylandBufferRef::isNull() const
Returns true if this QWaylandBufferRef does not reference a buffer. Otherwise returns false.
See also hasBuffer() and hasContent().
bool QWaylandBufferRef::isSharedMemory() const
Returns true if the buffer is a shared memory buffer. Otherwise returns false.
int QWaylandBufferRef::origin() const
Returns the origin of the buffer. If the buffer referenced is null, QWaylandSurface::OriginBottomLeft is returned.
int QWaylandBufferRef::size() const
Returns the size of the buffer. If the buffer referenced is null, an invalid QSize() is returned.
struct wl_resource *QWaylandBufferRef::wl_buffer() const
Returns the Wayland resource for the buffer.
bool QWaylandBufferRef::operator!=(const QWaylandBufferRef &ref)
Returns false if this QWaylandBufferRef references the same buffer as ref. Otherwise returns true.
bool QWaylandBufferRef::operator==(const QWaylandBufferRef &ref)
Returns true if this QWaylandBufferRef references the same buffer as ref. Otherwise returns false.