![]() |
Qt 6.x
The Qt SDK
|
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor More...
#include <qwaylandsurface.h>
Public Types | |
enum | Origin { OriginTopLeft , OriginBottomLeft } |
This enum type is used to specify the origin of a QWaylandSurface's buffer. More... | |
Signals | |
void | hasContentChanged () |
void | damaged (const QRegion &rect) |
void | parentChanged (QWaylandSurface *newParent, QWaylandSurface *oldParent) |
void | childAdded (QWaylandSurface *child) |
\qmlsignal QtWayland.Compositor::WaylandSurface::childAdded(WaylandSurface child) | |
Q_REVISION (1, 13) void sourceGeometryChanged() | |
Q_REVISION (1, 13) void destinationSizeChanged() | |
Q_REVISION (1, 13) void bufferSizeChanged() | |
void | bufferScaleChanged () |
void | offsetForNextFrame (const QPoint &offset) |
void | contentOrientationChanged () |
void | surfaceDestroyed () |
\qmlsignal QtWayland.Compositor::WaylandSurface::surfaceDestroyed() | |
void | originChanged () |
void | subsurfacePositionChanged (const QPoint &position) |
void | subsurfacePlaceAbove (QWaylandSurface *sibling) |
void | subsurfacePlaceBelow (QWaylandSurface *sibling) |
void | dragStarted (QWaylandDrag *drag) |
\qmlsignal void QtWayland.Compositor::WaylandSurface::dragStarted(WaylandDrag drag) | |
void | cursorSurfaceChanged () |
Q_REVISION (14) void inhibitsIdleChanged() | |
Q_REVISION (6, 4) void isOpaqueChanged() | |
void | configure (bool hasBuffer) |
void | redraw () |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
QWaylandSurface () | |
Constructs a an uninitialized 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. | |
~QWaylandSurface () override | |
Destroys the QWaylandSurface. | |
Q_INVOKABLE void | initialize (QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version) |
\qmlmethod void QtWayland.Compositor::WaylandSurface::initialize(WaylandCompositor compositor, WaylandClient client, int id, int version) | |
bool | isInitialized () const |
Returns true if the QWaylandSurface has been initialized. | |
QWaylandClient * | client () const |
::wl_client * | waylandClient () const |
Holds the wl_client using this QWaylandSurface. | |
bool | setRole (QWaylandSurfaceRole *role, wl_resource *errorResource, uint32_t errorCode) |
Sets a role on the surface. | |
QWaylandSurfaceRole * | role () const |
bool | hasContent () const |
QRectF | sourceGeometry () const |
QSize | destinationSize () const |
QSize | bufferSize () const |
int | bufferScale () const |
Qt::ScreenOrientation | contentOrientation () const |
Origin | origin () const |
QWaylandCompositor * | compositor () const |
Returns the compositor for this QWaylandSurface. | |
bool | inputRegionContains (const QPoint &p) const |
Returns true if the QWaylandSurface's input region contains the point p. | |
bool | inputRegionContains (const QPointF &position) const |
Returns true if the QWaylandSurface's input region contains the point position. | |
Q_INVOKABLE void | destroy () |
\qmlmethod void QtWayland.Compositor::WaylandSurface::destroy() | |
Q_INVOKABLE bool | isDestroyed () const |
\qmlmethod bool QtWayland.Compositor::WaylandSurface::isDestroyed() | |
Q_INVOKABLE void | frameStarted () |
Prepares all frame callbacks for sending. | |
Q_INVOKABLE void | sendFrameCallbacks () |
Sends pending frame callbacks. | |
QWaylandView * | primaryView () const |
Updates the surface with the compositor's retained clipboard selection. | |
void | setPrimaryView (QWaylandView *view) |
Sets this QWaylandSurface's primary view to view, in case there are multiple views of this surface. | |
QList< QWaylandView * > | views () const |
Returns the views for this QWaylandSurface. | |
struct wl_resource * | resource () const |
Returns the Wayland resource corresponding to this QWaylandSurface. | |
void | markAsCursorSurface (bool cursorSurface) |
bool | isCursorSurface () const |
bool | inhibitsIdle () const |
bool | isOpaque () const |
![]() | |
~QWaylandObject () override | |
QWaylandCompositorExtension * | extension (const QByteArray &name) |
Returns the compositor extension which matches name if one has been registered with the QWaylandObject. | |
QWaylandCompositorExtension * | extension (const wl_interface *interface) |
Returns the compositor extension which matches interface if one has been registered with the QWaylandObject. | |
QList< QWaylandCompositorExtension * > | extensions () const |
Returns the list of compositor extensions that have been registered with this QWaylandObject. | |
void | addExtension (QWaylandCompositorExtension *extension) |
Registers extension with this QWaylandObject. | |
void | removeExtension (QWaylandCompositorExtension *extension) |
Removes extension from the list of registered extensions in this QWaylandObject, if it has previously been registered using \l{addExtension()}. | |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Static Public Member Functions | |
static QWaylandSurface * | fromResource (::wl_resource *resource) |
Returns the QWaylandSurface corresponding to the Wayland resource resource. | |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
Protected Member Functions | |
QWaylandSurface (QWaylandSurfacePrivate &dptr) | |
![]() | |
QWaylandObject (QObject *parent=nullptr) | |
Creates a QWaylandObject as a child of parent. | |
QWaylandObject (QObjectPrivate &d, QObject *parent=nullptr) | |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Properties | |
QWaylandClient * | client |
\qmlproperty WaylandClient QtWayland.Compositor::WaylandSurface::client | |
QRectF | sourceGeometry |
\qmlproperty rect QtWayland.Compositor::WaylandSurface::sourceGeometry | |
QSize | destinationSize |
\qmlproperty size QtWayland.Compositor::WaylandSurface::destinationSize | |
QSize | bufferSize |
\qmlproperty size QtWayland.Compositor::WaylandSurface::bufferSize | |
int | bufferScale |
\qmlproperty size QtWayland.Compositor::WaylandSurface::bufferScale | |
Qt::ScreenOrientation | contentOrientation |
\qmlproperty enum QtWayland.Compositor::WaylandSurface::contentOrientation | |
QWaylandSurface::Origin | origin |
\qmlproperty enum QtWayland.Compositor::WaylandSurface::origin | |
bool | hasContent |
\qmlproperty bool QtWayland.Compositor::WaylandSurface::hasContent | |
bool | cursorSurface |
\qmlproperty bool QtWayland.Compositor::WaylandSurface::cursorSurface | |
bool | inhibitsIdle |
\qmlproperty bool QtWayland.Compositor::WaylandSurface::inhibitsIdle | |
bool | isOpaque |
\qmlproperty bool QtWayland.Compositor::WaylandSurface::isOpaque | |
![]() | |
QString | objectName |
the name of this object | |
Additional Inherited Members | |
![]() | |
void | deleteLater () |
\threadsafe | |
![]() | |
QList< QWaylandCompositorExtension * > | extension_vector |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
Represents a rectangular area on an output device.
This type encapsulates a rectangular area of pixels that is displayed on an output device. It corresponds to the interface wl_surface
in the Wayland protocol.
\inmodule QtWaylandCompositor
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.
Definition at line 41 of file qwaylandsurface.h.
This enum type is used to specify the origin of a QWaylandSurface's buffer.
\value OriginTopLeft The origin is the top left corner of the buffer. \value OriginBottomLeft The origin is the bottom left corner of the buffer.
Enumerator | |
---|---|
OriginTopLeft | |
OriginBottomLeft |
Definition at line 63 of file qwaylandsurface.h.
QWaylandSurface::QWaylandSurface | ( | ) |
Constructs a an uninitialized QWaylandSurface.
Definition at line 410 of file qwaylandsurface.cpp.
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.
Definition at line 419 of file qwaylandsurface.cpp.
References client, compositor(), and initialize().
|
override |
Destroys the QWaylandSurface.
Definition at line 436 of file qwaylandsurface.cpp.
References d, QWaylandCompositorPrivate::get(), and QWaylandCompositorPrivate::unregisterSurface().
|
protected |
Definition at line 428 of file qwaylandsurface.cpp.
int QWaylandSurface::bufferScale | ( | ) | const |
Definition at line 627 of file qwaylandsurface.cpp.
References d.
|
signal |
QSize QWaylandSurface::bufferSize | ( | ) | const |
Definition at line 606 of file qwaylandsurface.cpp.
References d.
|
signal |
\qmlsignal QtWayland.Compositor::WaylandSurface::childAdded(WaylandSurface child)
This signal is emitted when a wl_subsurface, child, has been added to the surface.
This signal is emitted when a wl_subsurface, child, has been added to the surface.
QWaylandClient * QWaylandSurface::client | ( | ) | const |
Definition at line 490 of file qwaylandsurface.cpp.
References compositor(), contains(), d, and isDestroyed().
QWaylandCompositor * QWaylandSurface::compositor | ( | ) | const |
Returns the compositor for this QWaylandSurface.
Definition at line 691 of file qwaylandsurface.cpp.
References d.
Referenced by QWaylandQuickSurface::QWaylandQuickSurface(), QWaylandSurface(), client(), QWaylandQtShellSurfacePrivate::configure(), and initialize().
|
signal |
Referenced by QWaylandQuickSurface::setUseTextureAlpha().
Qt::ScreenOrientation QWaylandSurface::contentOrientation | ( | ) | const |
Definition at line 648 of file qwaylandsurface.cpp.
References d.
|
signal |
|
signal |
Referenced by QWaylandQtShellSurface::initialize(), and PresentationFeedback::setSurface().
QSize QWaylandSurface::destinationSize | ( | ) | const |
Definition at line 577 of file qwaylandsurface.cpp.
References d.
void QWaylandSurface::destroy | ( | ) |
\qmlmethod void QtWayland.Compositor::WaylandSurface::destroy()
Destroys the WaylandSurface.
Destroys the QWaylandSurface.
Definition at line 763 of file qwaylandsurface.cpp.
References d.
|
signal |
\qmlsignal void QtWayland.Compositor::WaylandSurface::dragStarted(WaylandDrag drag)
This signal is emitted when a drag has started from this surface.
This signal is emitted when a drag has started from this surface.
void QWaylandSurface::frameStarted | ( | ) |
Prepares all frame callbacks for sending.
Definition at line 700 of file qwaylandsurface.cpp.
References d.
Referenced by Vsp2Layer::enableVspLayer(), QWaylandOutput::frameStarted(), and Vsp2Layer::handleBufferCommitted().
|
static |
Returns the QWaylandSurface corresponding to the Wayland resource resource.
Definition at line 941 of file qwaylandsurface.cpp.
References resource().
Referenced by QWaylandCompositorPrivate::compositor_create_surface(), QWaylandIviApplicationPrivate::ivi_application_surface_create(), QWaylandPointerPrivate::pointer_set_cursor(), QWaylandWlShellPrivate::shell_get_shell_surface(), QWaylandWlShellSurfacePrivate::shell_surface_set_popup(), QWaylandWlShellSurfacePrivate::shell_surface_set_transient(), QWaylandCompositorPrivate::subcompositor_get_subsurface(), QWaylandSurfacePrivate::Subsurface::subsurface_place_above(), QWaylandSurfacePrivate::Subsurface::subsurface_place_below(), QWaylandQtTextInputMethodPrivate::text_input_method_v1_disable(), QWaylandQtTextInputMethodPrivate::text_input_method_v1_enable(), QWaylandPresentationTimePrivate::wp_presentation_feedback(), QWaylandViewporterPrivate::wp_viewporter_get_viewport(), QWaylandXdgShellPrivate::xdg_wm_base_get_xdg_surface(), QWaylandQtShellPrivate::zqt_shell_v1_surface_create(), QWaylandIdleInhibitManagerV1Private::zwp_idle_inhibit_manager_v1_create_inhibitor(), and QWaylandTextInputPrivate::zwp_text_input_v2_enable().
bool QWaylandSurface::hasContent | ( | ) | const |
Definition at line 521 of file qwaylandsurface.cpp.
References d.
|
signal |
Referenced by QtWayland::WlShellIntegration::WlShellIntegration(), and PresentationFeedback::setSurface().
bool QWaylandSurface::inhibitsIdle | ( | ) | const |
Definition at line 830 of file qwaylandsurface.cpp.
References d.
void QWaylandSurface::initialize | ( | QWaylandCompositor * | compositor, |
QWaylandClient * | client, | ||
uint | id, | ||
int | version | ||
) |
\qmlmethod void QtWayland.Compositor::WaylandSurface::initialize(WaylandCompositor compositor, WaylandClient client, int id, int version)
Initializes the WaylandSurface with the given compositor and client, and with the given id and version.
Initializes the QWaylandSurface with the given compositor and client, and with the given id and version.
Definition at line 455 of file qwaylandsurface.cpp.
References QWaylandClient::client(), client, compositor(), d, and QWaylandSurfacePrivate::removeUninitializedSurface().
Referenced by QWaylandCompositorPrivate::compositor_create_surface().
bool QWaylandSurface::inputRegionContains | ( | const QPoint & | p | ) | const |
Returns true
if the QWaylandSurface's input region contains the point p.
Otherwise returns false
.
Definition at line 730 of file qwaylandsurface.cpp.
References d.
bool QWaylandSurface::inputRegionContains | ( | const QPointF & | position | ) | const |
Returns true
if the QWaylandSurface's input region contains the point position.
Otherwise returns false
.
Definition at line 742 of file qwaylandsurface.cpp.
References d, position(), and qFloor().
bool QWaylandSurface::isCursorSurface | ( | ) | const |
Definition at line 805 of file qwaylandsurface.cpp.
References d.
Referenced by QWaylandKeyboardPrivate::focused().
bool QWaylandSurface::isDestroyed | ( | ) | const |
\qmlmethod bool QtWayland.Compositor::WaylandSurface::isDestroyed()
Returns true
if the WaylandSurface has been destroyed. Otherwise returns false
.
Returns true if the QWaylandSurface has been destroyed. Otherwise returns false.
Definition at line 778 of file qwaylandsurface.cpp.
References d.
Referenced by client(), and QWaylandSeat::setKeyboardFocus().
bool QWaylandSurface::isInitialized | ( | ) | const |
Returns true if the QWaylandSurface has been initialized.
Definition at line 473 of file qwaylandsurface.cpp.
References d.
bool QWaylandSurface::isOpaque | ( | ) | const |
Definition at line 851 of file qwaylandsurface.cpp.
References d.
void QWaylandSurface::markAsCursorSurface | ( | bool | cursorSurface | ) |
Definition at line 795 of file qwaylandsurface.cpp.
References cursorSurface, cursorSurfaceChanged(), d, and emit.
Referenced by QtWayland::WlShellIntegration::WlShellIntegration().
QWaylandSurface::Origin QWaylandSurface::origin | ( | ) | const |
Definition at line 682 of file qwaylandsurface.cpp.
References d.
|
signal |
|
signal |
QWaylandView * QWaylandSurface::primaryView | ( | ) | const |
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 this QWaylandSurface's primary view.
Definition at line 890 of file qwaylandsurface.cpp.
References d.
Referenced by QWaylandSurfaceViewMapper::maybePrimaryView(), PresentationFeedback::sendSyncOutput(), and PresentationFeedback::setSurface().
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
Referenced by QtWayland::WlShellIntegration::WlShellIntegration(), and Vsp2Layer::handleSurfaceChanged().
struct wl_resource * QWaylandSurface::resource | ( | ) | const |
Returns the Wayland resource corresponding to this QWaylandSurface.
Definition at line 951 of file qwaylandsurface.cpp.
References d.
Referenced by QWaylandKeyboardPrivate::checkFocusResource(), QWaylandKeyboardPrivate::focused(), fromResource(), QtWayland::QtKeyExtensionGlobal::postQtKeyEvent(), QWaylandTouchPrivate::sendDown(), QWaylandKeyboardPrivate::sendEnter(), QWaylandQtTextInputMethod::setFocus(), QWaylandTextInputPrivate::setFocus(), QWaylandTextInputV4Private::setFocus(), setRole(), and QWaylandXdgShellPrivate::xdg_wm_base_get_xdg_surface().
QWaylandSurfaceRole * QWaylandSurface::role | ( | ) | const |
Definition at line 990 of file qwaylandsurface.cpp.
References d.
Referenced by setRole(), and QWaylandXdgShellPrivate::xdg_wm_base_get_xdg_surface().
void QWaylandSurface::sendFrameCallbacks | ( | ) |
Sends pending frame callbacks.
Definition at line 710 of file qwaylandsurface.cpp.
Referenced by QWaylandOutput::sendFrameCallbacks().
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.
Definition at line 912 of file qwaylandsurface.cpp.
bool QWaylandSurface::setRole | ( | QWaylandSurfaceRole * | role, |
wl_resource * | errorResource, | ||
uint32_t | errorCode | ||
) |
Sets a 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. Once a role is assigned to a surface, this becomes its permanent role. Any subsequent call to setRole()
with a different role will trigger a protocol error to the errorResource and send an errorCode to the client. Enforcing this requirement is the main purpose of the surface role.
The role is compared by pointer value. Any two objects of QWaylandSurfaceRole will be considered different roles, regardless of their names.
The surface role is set internally by protocol implementations when a surface is adopted for a specific purpose, for example in a \l{Shell Extensions - Qt Wayland Compositor}{shell extension}. Unless you are developing extensions which use surfaces in this way, you should not call this function.
Returns true if a role can be assigned; false otherwise.
Definition at line 974 of file qwaylandsurface.cpp.
References QByteArray::constData(), d, QWaylandSurfaceRole::name(), resource(), and role().
Referenced by QWaylandIviApplicationPrivate::ivi_application_surface_create(), QWaylandWlShellPrivate::shell_get_shell_surface(), QWaylandXdgSurfacePrivate::xdg_surface_get_popup(), QWaylandXdgSurfacePrivate::xdg_surface_get_toplevel(), and QWaylandQtShellPrivate::zqt_shell_v1_surface_create().
QRectF QWaylandSurface::sourceGeometry | ( | ) | const |
Definition at line 552 of file qwaylandsurface.cpp.
References d.
|
signal |
|
signal |
|
signal |
\qmlsignal QtWayland.Compositor::WaylandSurface::surfaceDestroyed()
This signal is emitted when the corresponding wl_surface is destroyed.
This signal is emitted when the corresponing wl_surface is destroyed.
QList< QWaylandView * > QWaylandSurface::views | ( | ) | const |
Returns the views for this QWaylandSurface.
Definition at line 932 of file qwaylandsurface.cpp.
References d.
wl_client * QWaylandSurface::waylandClient | ( | ) | const |
Holds the wl_client
using this QWaylandSurface.
Definition at line 502 of file qwaylandsurface.cpp.
References client.
Referenced by QWaylandKeyboardPrivate::focused(), QtWayland::DataDeviceManager::overrideSelection(), QtWayland::QtKeyExtensionGlobal::postQtKeyEvent(), QWaylandQtTextInputMethod::setFocus(), QWaylandTextInputPrivate::setFocus(), and QWaylandTextInputV4Private::setFocus().
|
read |
\qmlproperty size QtWayland.Compositor::WaylandSurface::bufferScale
This property holds the WaylandSurface's buffer scale. The buffer scale lets a client supply higher resolution buffer data for use on high resolution outputs.
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.
Definition at line 38 of file qwaylandsurface.h.
Referenced by QWaylandQuickItem::updatePaintNode().
|
read |
\qmlproperty size QtWayland.Compositor::WaylandSurface::bufferSize
This property holds the size of the current buffer of this WaylandSurface in pixels, not in surface coordinates.
For the size in surface coordinates, use \l destinationSize instead.
This property holds the size of the current buffer of this QWaylandSurface in pixels, not in surface coordinates.
For the size in surface coordinates, use \l destinationSize instead.
Definition at line 38 of file qwaylandsurface.h.
Referenced by QWaylandSurfaceTextureProvider::setBufferRef().
|
read |
\qmlproperty WaylandClient QtWayland.Compositor::WaylandSurface::client
This property holds the client using this WaylandSurface.
This property holds the client using this QWaylandSurface.
Definition at line 38 of file qwaylandsurface.h.
Referenced by QWaylandQuickSurface::QWaylandQuickSurface(), QWaylandSurface(), QWaylandQuickShellEventFilter::eventFilter(), initialize(), QtWayland::TouchExtensionGlobal::postTouchEvent(), QWaylandXdgShellPrivate::registerXdgSurface(), QWaylandTouchPrivate::sendDown(), QWaylandTouch::sendFullTouchEvent(), QWaylandTouch::sendTouchPointEvent(), QWaylandSeat::setKeyboardFocus(), QWaylandCompositorPrivate::subcompositor_get_subsurface(), QWaylandOutput::surfaceEnter(), QWaylandOutput::surfaceLeave(), QWaylandQuickItem::takeFocus(), QWaylandInputMethodControlPrivate::textInput(), QWaylandInputMethodControlPrivate::textInputMethod(), QWaylandQuickItem::touchUngrabEvent(), waylandClient(), and QWaylandPresentationTimePrivate::wp_presentation_feedback().
|
read |
\qmlproperty enum QtWayland.Compositor::WaylandSurface::contentOrientation
This property holds the orientation of the WaylandSurface's contents.
This property holds the orientation of the QWaylandSurface's contents.
Definition at line 38 of file qwaylandsurface.h.
|
readwrite |
\qmlproperty bool QtWayland.Compositor::WaylandSurface::cursorSurface
This property holds whether the WaylandSurface is a cursor surface.
This property holds whether the QWaylandSurface is a cursor surface.
Definition at line 38 of file qwaylandsurface.h.
Referenced by markAsCursorSurface().
|
read |
\qmlproperty size QtWayland.Compositor::WaylandSurface::destinationSize
This property holds the size of this WaylandSurface in surface coordinates.
This property holds the size of this WaylandSurface in surface coordinates.
Definition at line 38 of file qwaylandsurface.h.
Referenced by QWaylandXdgSurfacePrivate::calculateFallbackWindowGeometry(), and QWaylandQuickItem::mapToSurface().
|
read |
\qmlproperty bool QtWayland.Compositor::WaylandSurface::hasContent
This property holds whether the WaylandSurface has content.
This property holds whether the QWaylandSurface has content.
Definition at line 38 of file qwaylandsurface.h.
Referenced by QWaylandOutput::sendFrameCallbacks(), and QWaylandXdgShellPrivate::xdg_wm_base_get_xdg_surface().
|
read |
\qmlproperty bool QtWayland.Compositor::WaylandSurface::inhibitsIdle
This property holds whether this surface is intended to inhibit the idle behavior of the compositor such as screen blanking, locking and screen saving.
This property holds whether this surface is intended to inhibit the idle behavior of the compositor such as screen blanking, locking and screen saving.
Definition at line 38 of file qwaylandsurface.h.
|
read |
\qmlproperty bool QtWayland.Compositor::WaylandSurface::isOpaque
This property holds whether the surface is fully opaque, as reported by the client through the set_opaque_region request.
This property holds whether the surface is fully opaque, as reported by the client through the set_opaque_region request.
Definition at line 38 of file qwaylandsurface.h.
Referenced by QWaylandSurfaceTextureProvider::setBufferRef().
|
read |
\qmlproperty enum QtWayland.Compositor::WaylandSurface::origin
This property holds the origin of the WaylandSurface's buffer, or WaylandSurface.OriginTopLeft if the surface has no buffer.
It can have the following values: \list
This property holds the origin of the QWaylandSurface's buffer, or QWaylandSurface::OriginTopLeft if the surface has no buffer.
Definition at line 38 of file qwaylandsurface.h.
|
read |
\qmlproperty rect QtWayland.Compositor::WaylandSurface::sourceGeometry
This property describes the portion of the attached Wayland buffer that should be drawn on the screen. The coordinates are from the corner of the buffer and are scaled by \l bufferScale.
This property describes the portion of the attached QWaylandBuffer that should be drawn on the screen. The coordinates are from the corner of the buffer and are scaled by \l bufferScale.
Definition at line 38 of file qwaylandsurface.h.
Referenced by QWaylandQuickItem::updatePaintNode().