9#if QT_WAYLAND_TEXT_INPUT_V4_WIP
14#include <QtWaylandCompositor/qwaylandcompositor.h>
15#include <QtWaylandCompositor/qwaylandseat.h>
16#include <QtWaylandCompositor/qwaylandbufferref.h>
17#if QT_CONFIG(draganddrop)
18#include <QtWaylandCompositor/QWaylandDrag>
20#include <QtWaylandCompositor/private/qwlclientbufferintegration_p.h>
21#include <QtWaylandCompositor/private/qwaylandsurface_p.h>
24# include <QtOpenGL/QOpenGLTexture>
25# include <QtGui/QOpenGLFunctions>
28#include <QtGui/QKeyEvent>
29#include <QtGui/QGuiApplication>
30#include <QtGui/QScreen>
32#include <QtQuick/QSGSimpleTextureNode>
33#include <QtQuick/QQuickWindow>
34#include <QtQuick/qsgtexture.h>
36#include <QtCore/QFile>
37#include <QtCore/QMutexLocker>
38#include <QtCore/QMutex>
40#include <wayland-server-core.h>
44#include <QtGui/private/qshaderdescription_p.h>
47#ifndef GL_TEXTURE_EXTERNAL_OES
48#define GL_TEXTURE_EXTERNAL_OES 0x8D65
55 const char *
const vertexShaderSourceFile;
56 const char *
const fragmentShaderSourceFile;
59 bool canProvideTexture;
60 QSGMaterial::Flags materialFlags;
64 {
"",
"", 0, 0,
false, {}, {} },
68 ":/qt-project.org/wayland/compositor/shaders/surface.vert.qsb",
69 ":/qt-project.org/wayland/compositor/shaders/surface_rgbx.frag.qsb",
70 GL_TEXTURE_2D, 1,
true,
77 ":/qt-project.org/wayland/compositor/shaders/surface.vert.qsb",
78 ":/qt-project.org/wayland/compositor/shaders/surface_rgba.frag.qsb",
79 GL_TEXTURE_2D, 1,
true,
86 ":/qt-project.org/wayland/compositor/shaders/surface.vert.qsb",
87 ":/qt-project.org/wayland/compositor/shaders/surface_oes_external.frag",
95 ":/qt-project.org/wayland/compositor/shaders/surface.vert.qsb",
96 ":/qt-project.org/wayland/compositor/shaders/surface_y_u_v.frag.qsb",
97 GL_TEXTURE_2D, 3,
false,
104 ":/qt-project.org/wayland/compositor/shaders/surface.vert.qsb",
105 ":/qt-project.org/wayland/compositor/shaders/surface_y_uv.frag.qsb",
106 GL_TEXTURE_2D, 2,
false,
113 ":/qt-project.org/wayland/compositor/shaders/surface.vert.qsb",
114 ":/qt-project.org/wayland/compositor/shaders/surface_y_xuxv.frag.qsb",
115 GL_TEXTURE_2D, 2,
false,
128 setupExternalOESShader(fragmentShaderSourceFile);
130 setShaderFileName(FragmentStage, fragmentShaderSourceFile);
133void QWaylandBufferMaterialShader::setupExternalOESShader(
const QString &shaderFilename)
136 QFile shaderFile(shaderFilename);
138 qCWarning(qLcWaylandCompositor) <<
"Cannot find external OES shader file:" << shaderFilename;
143 static const char *FS_GLES_PREAMBLE =
144 "#extension GL_OES_EGL_image_external : require\n"
145 "precision highp float;\n";
146 static const char *FS_GL_PREAMBLE =
148 "#extension GL_OES_EGL_image_external : require\n";
156 texCoordInput.
name =
"v_texcoord";
160 descData->
inVars = { texCoordInput };
163 texCoordInput.
name =
"gl_FragColor";
167 descData->
outVars = { fragColorOutput };
170 matrixBlockVar.
name =
"qt_Matrix";
172 matrixBlockVar.
offset = 0;
173 matrixBlockVar.
size = 64;
176 opacityBlockVar.
name =
"qt_Opacity";
178 opacityBlockVar.
offset = 64;
179 opacityBlockVar.
size = 4;
184 ubufStruct.
size = 64 + 4;
186 ubufStruct.
members = { matrixBlockVar, opacityBlockVar };
191 samplerTex0.
name =
"tex0";
203 setShader(FragmentStage, shaderPack);
211 bool changed =
false;
215 if (
state.isMatrixDirty()) {
217 memcpy(
buf->data(),
m.constData(), 64);
221 if (
state.isOpacityDirty()) {
222 const float opacity =
state.opacity();
223 memcpy(
buf->data() + 64, &opacity, 4);
230void QWaylandBufferMaterialShader::updateSampledImage(RenderState &
state,
int binding,
QSGTexture **
texture,
235 QWaylandBufferMaterial *material =
static_cast<QWaylandBufferMaterial *
>(newMaterial);
238 *
texture = material->m_scenegraphTextures.at(0);
241 *
texture = material->m_scenegraphTextures.at(1);
244 *
texture = material->m_scenegraphTextures.at(2);
254 (*texture)->commitTextureOperations(
state.rhi(),
state.resourceUpdateBatch());
260 setFlag(bufferTypes[m_format].materialFlags);
263QWaylandBufferMaterial::~QWaylandBufferMaterial()
268void QWaylandBufferMaterial::setTextureForPlane(
int plane,
272 if (plane < 0 || plane >= bufferTypes[m_format].planeCount) {
273 qWarning(
"plane index is out of range");
278 setTextureParameters(
texture->target());
280 ensureTextures(plane - 1);
282 if (m_textures.size() <= plane) {
284 m_scenegraphTextures << scenegraphTexture;
286 delete m_scenegraphTextures[plane];
289 m_scenegraphTextures[plane] = scenegraphTexture;
293void QWaylandBufferMaterial::bind()
295 ensureTextures(bufferTypes[m_format].planeCount);
297 switch (m_textures.size()) {
300 m_textures[2]->bind(2);
304 m_textures[1]->bind(1);
308 m_textures[0]->bind(0);
314 return const_cast<QSGMaterialType *
>(&bufferTypes[m_format].materialType);
320 return new QWaylandBufferMaterialShader(m_format);
324void QWaylandBufferMaterial::setTextureParameters(
GLenum target)
334void QWaylandBufferMaterial::ensureTextures(
int count)
336 for (
int plane = m_textures.size(); plane <
count; plane++) {
337 m_textures <<
nullptr;
338 m_scenegraphTextures <<
nullptr;
345 for (
int plane = 0; plane < bufferTypes[
ref.bufferFormatEgl()].planeCount; plane++) {
346 if (
auto texture =
ref.toOpenGLTexture(plane)) {
347 QQuickWindow::CreateTextureOptions
opt;
350 opt |= QQuickWindow::TextureHasAlphaChannel;
353 scenegraphTexture = QNativeInterface::QSGOpenGLTexture::fromNativeExternalOES(
texture->textureId(),
358 scenegraphTexture = QNativeInterface::QSGOpenGLTexture::fromNative(
texture->textureId(),
364 setTextureForPlane(plane,
texture, scenegraphTexture);
393 if (
buffer.isSharedMemory()) {
394 m_sgTex = surfaceItem->
window()->createTextureFromImage(
buffer.image());
397 QQuickWindow::CreateTextureOptions
opt;
400 opt |= QQuickWindow::TextureHasAlphaChannel;
406 m_sgTex = QNativeInterface::QSGOpenGLTexture::fromNative(textureId, surfaceItem->
window(),
size,
opt);
408 qCWarning(qLcWaylandCompositor) <<
"Without OpenGL support only shared memory textures are supported";
424 bool m_smooth =
false;
476 disconnect(
this, &QQuickItem::windowChanged,
this, &QWaylandQuickItem::updateWindow);
481 d->provider->deleteLater();
499 return d->view->surface() ?
d->view->surface()->compositor() :
nullptr;
508 return d->view.data();
526 return d->view->surface();
536 if (oldComp != newComp)
587 if (!
d->shouldSendInputEvents()) {
604 d->hoverPos =
event->position();
613 if (
d->shouldSendInputEvents()) {
615#if QT_CONFIG(draganddrop)
624 seat->drag()->dragMove(targetSurface, surfacePosition);
630 d->hoverPos =
event->position();
644 if (
d->shouldSendInputEvents()) {
646#if QT_CONFIG(draganddrop)
648 d->isDragging =
false;
649 seat->drag()->drop();
671 if (
d->shouldSendInputEvents()) {
674 d->hoverPos =
event->position();
692 if (
d->shouldSendInputEvents()) {
694 if (
event->position() !=
d->hoverPos) {
696 d->hoverPos =
event->position();
709 if (
d->shouldSendInputEvents()) {
717#if QT_CONFIG(wheelevent)
721void QWaylandQuickItem::wheelEvent(QWheelEvent *
event)
724 if (
d->shouldSendInputEvents()) {
732 if (
event->angleDelta().x() != 0)
734 if (
event->angleDelta().y() != 0)
748 if (
d->shouldSendInputEvents()) {
753 qWarning() <<
"Unable to set keyboard focus, cannot send key press event";
765 if (
d->shouldSendInputEvents() &&
hasFocus()) {
779 if (
d->shouldSendInputEvents() &&
d->touchEventsEnabled) {
785 pointPos =
points.at(0).position();
799 d->touchingSeats.append(seat);
801 d->touchingSeats.removeOne(seat);
815 if (
d->shouldSendInputEvents())
816 for (
auto seat :
d->touchingSeats)
819 d->touchingSeats.clear();
829 if (
d->shouldSendInputEvents()) {
830 d->oldSurface->inputMethodControl()->inputMethodEvent(
event);
846void QWaylandQuickItem::handleSubsurfaceAdded(
QWaylandSurface *childSurface)
849 if (
d->subsurfaceHandler.isNull()) {
864 qWarning(
"QWaylandQuickItem: subsurfaceHandler does not implement handleSubsurfaceAdded()");
868void QWaylandQuickItem::handlePlaceAbove(
QWaylandSurface *referenceSurface)
875 if (
parent->surface() == referenceSurface) {
876 d->placeAboveParent();
877 }
else if (
auto *sibling =
d->findSibling(referenceSurface)) {
878 d->placeAboveSibling(sibling);
880 qWarning() <<
"Couldn't find QWaylandQuickItem for surface" << referenceSurface
881 <<
"when handling wl_subsurface.place_above";
885void QWaylandQuickItem::handlePlaceBelow(
QWaylandSurface *referenceSurface)
892 if (
parent->surface() == referenceSurface) {
893 d->placeBelowParent();
894 }
else if (
auto *sibling =
d->findSibling(referenceSurface)) {
895 d->placeBelowSibling(sibling);
897 qWarning() <<
"Couldn't find QWaylandQuickItem for surface" << referenceSurface
898 <<
"when handling wl_subsurface.place_below";
902void QWaylandQuickItem::updateFocus()
906 compositor()->defaultSeat()->setKeyboardFocus(
d->view->surface());
936 return d->subsurfaceHandler.data();
942 if (
d->subsurfaceHandler.data() != handler) {
943 d->subsurfaceHandler = handler;
956 return d->view->output();
984 return d->view->isBufferLocked();
990 d->view->setBufferLocked(locked);
1008 return d->view->allowDiscardFrontBuffer();
1014 d->view->setAllowDiscardFrontBuffer(discard);
1031 d->view->setPrimary();
1037void QWaylandQuickItem::handleSurfaceChanged()
1040 if (
d->oldSurface) {
1043 disconnect(
d->oldSurface.data(), &QWaylandSurface::destinationSizeChanged,
this, &QWaylandQuickItem::updateSize);
1050#if QT_CONFIG(draganddrop)
1060 connect(newSurface, &QWaylandSurface::destinationSizeChanged,
this, &QWaylandQuickItem::updateSize);
1067#if QT_CONFIG(draganddrop)
1074 if (newSurface->origin() !=
d->origin) {
1075 d->origin = newSurface->origin();
1083 if (!subsurface.isNull())
1084 handleSubsurfaceAdded(subsurface.data());
1090 d->oldSurface =
d->view->surface();
1122#if QT_WAYLAND_TEXT_INPUT_V4_WIP
1132 if (textInputMethod)
1140void QWaylandQuickItem::surfaceMappedChanged()
1163void QWaylandQuickItem::updateSize()
1169 qWarning() <<
"No update on item size as the buffer is currently locked";
1200 return d->focusOnClick;
1206 if (
d->focusOnClick ==
focus)
1241 return point /
d->scaleFactor();
1246 return QPointF(point.
x() / xScale, point.
y() / yScale);
1263QPointF QWaylandQuickItem::mapFromSurface(
const QPointF &point)
const
1267 return point *
d->scaleFactor();
1272 return QPointF(point.
x() * xScale, point.
y() * yScale);
1289 return d->oldSurface->inputMethodControl()->inputMethodQuery(
query,
argument);
1315 return d->paintEnabled;
1346 return d->touchEventsEnabled;
1349void QWaylandQuickItem::updateBuffer(
bool hasBuffer)
1359void QWaylandQuickItem::updateWindow()
1364 if (newWindow ==
d->connectedWindow)
1367 if (
d->connectedWindow) {
1372 d->connectedWindow = newWindow;
1374 if (
d->connectedWindow) {
1388void QWaylandQuickItem::updateOutput()
1391 if (
d->view->output() ==
d->connectedOutput)
1394 if (
d->connectedOutput)
1397 d->connectedOutput =
d->view->output();
1399 if (
d->connectedOutput)
1405void QWaylandQuickItem::beforeSync()
1408 if (
d->view->advance()) {
1409 d->newTexture =
true;
1415void QWaylandQuickItem::updateInputMethod(Qt::InputMethodQueries queries)
1419 setFlag(QQuickItem::ItemAcceptsInputMethod,
1420 d->oldSurface ?
d->oldSurface->inputMethodControl()->enabled() :
false);
1454 d->lastMatrix =
data->transformNode->combinedMatrix();
1455 const bool bufferHasContent =
d->view->currentBuffer().hasContent();
1457 if (
d->view->isBufferLocked() &&
d->paintEnabled)
1460 if (!bufferHasContent || !
d->paintEnabled || !
surface()) {
1470 if (
ref.isSharedMemory()
1472 || bufferTypes[
ref.bufferFormatEgl()].canProvideTexture
1475#if QT_CONFIG(opengl)
1476 if (oldNode && !
d->paintByProvider) {
1481 d->paintByProvider =
true;
1490 d->newTexture =
true;
1496 d->texProviderConnection =
1503 if (itemPriv->provider) {
1504 itemPriv->provider->deleteLater();
1505 itemPriv->provider =
nullptr;
1507 disconnect(itemPriv->texProviderConnection); }
1512 if (
d->newTexture) {
1513 d->newTexture =
false;
1514 d->provider->setBufferRef(
this,
ref);
1518 d->provider->setSmooth(
smooth());
1528#if QT_CONFIG(opengl)
1531 if (oldNode &&
d->paintByProvider) {
1536 d->paintByProvider =
false;
1542 d->newTexture =
true;
1546 QWaylandBufferMaterial *material =
static_cast<QWaylandBufferMaterial *
>(node->
material());
1552 material =
new QWaylandBufferMaterial(
ref.bufferFormatEgl());
1554 if (
d->newTexture) {
1555 d->newTexture =
false;
1556 material->setBufferRef(
this,
ref);
1561 const QRectF normalizedCoordinates =
1564 sourceGeometry.
y() / surfaceSize.
height(),
1565 sourceGeometry.
width() / surfaceSize.
width(),
1579 qCWarning(qLcWaylandCompositor) <<
"Without OpenGL support only shared memory textures are supported";
1587 if (
d->touchEventsEnabled !=
enabled) {
1596 return d->inputEventsEnabled;
1602 if (
d->inputEventsEnabled !=
enabled) {
1644 if (seat ==
nullptr)
1648 qWarning() <<
"No seat, can't send mouse event";
1660void QWaylandQuickItem::handleSubsurfacePosition(
const QPoint &
pos)
1666#if QT_CONFIG(draganddrop)
1667void QWaylandQuickItem::handleDragStarted(
QWaylandDrag *drag)
1672 d->isDragging =
true;
1679#if !defined(Q_OS_MACOS)
1681 f /=
window->devicePixelRatio();
1689 auto *
parent =
q->parentItem();
1693 const auto siblings =
q->parentItem()->childItems();
1694 for (
auto *sibling : siblings) {
1695 auto *waylandItem = qobject_cast<QWaylandQuickItem *>(sibling);
1696 if (waylandItem && waylandItem->surface() == surface)
1705 q->stackAfter(sibling);
1706 q->setZ(sibling->
z());
1713 q->stackBefore(sibling);
1714 q->setZ(sibling->
z());
1722 const auto siblings =
q->parentItem()->childItems();
1725 bool foundSibling =
false;
1728 if (sibling && !sibling->d_func()->belowParent) {
1729 q->stackBefore(sibling);
1730 foundSibling =
true;
1736 if (!foundSibling && siblings.last() !=
q)
1737 q->stackAfter(siblings.last());
1739 q->setZ(
q->parentItem()->z());
1747 const auto siblings =
q->parentItem()->childItems();
1750 bool foundSibling =
false;
1751 for (
auto it = siblings.crbegin();
it != siblings.crend(); ++
it) {
1753 if (sibling && sibling->d_func()->belowParent) {
1754 q->stackAfter(sibling);
1755 foundSibling =
true;
1761 if (!foundSibling && siblings.first() !=
q)
1762 q->stackBefore(siblings.first());
1764 q->setZ(
q->parentItem()->z() - 1.0);
1770#include "moc_qwaylandquickitem.cpp"
IOBluetoothDevice * device
The QKeyEvent class describes a key event.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void setParent(QObject *parent)
Makes the object a child of parent.
QThread * thread() const
Returns the thread in which the object lives.
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
void deleteLater()
\threadsafe
static QOpenGLContext * currentContext()
Returns the last context which called makeCurrent in the current thread, or \nullptr,...
QOpenGLFunctions * functions() const
Get the QOpenGLFunctions instance for this context.
The QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API.
void glTexParameteri(GLenum target, GLenum pname, GLint param)
Convenience function that calls glTexParameteri(target, pname, param).
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
\inmodule QtCore\reentrant
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
QPointF mapToScene(const QPointF &point) const
Maps the given point in this item's coordinate system to the equivalent point within the scene's coor...
Flags flags() const
Returns the item flags for this item.
void activeFocusChanged(bool)
void setFlag(Flag flag, bool enabled=true)
Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disable...
Q_INVOKABLE QPointF mapToItem(const QQuickItem *item, const QPointF &point) const
Maps the given point in this item's coordinate system to the equivalent point within item's coordinat...
void setParentItem(QQuickItem *parent)
qreal z
\qmlproperty real QtQuick::Item::z
bool hasActiveFocus() const
virtual QSGTextureProvider * textureProvider() const
Returns the texture provider for an item.
QQuickWindow * window() const
Returns the window in which this item is rendered.
qreal width
This property holds the width of this item.
QQuickItem * parentItem() const
QQuickItem * parent
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
Q_INVOKABLE void forceActiveFocus()
\qmlmethod point QtQuick::Item::mapToItem(Item item, real x, real y) \qmlmethod point QtQuick::Item::...
bool smooth
\qmlproperty bool QtQuick::Item::smooth
qreal height
This property holds the height of this item.
void setPosition(const QPointF &)
bool enabled
\qmlproperty bool QtQuick::Item::enabled
void update()
Schedules a call to updatePaintNode() for this item.
virtual bool isTextureProvider() const
Returns true if this item is a texture provider.
void setImplicitSize(qreal, qreal)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
void beforeSynchronizing()
This signal is emitted before the scene graph is synchronized with the QML state.
\inmodule QtCore\reentrant
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr bool isValid() const noexcept
Returns true if the rectangle is valid, otherwise returns false.
const QSGGeometry * geometry() const
Returns this node's geometry.
void setGeometry(QSGGeometry *geometry)
Sets the geometry of this node to geometry.
The QSGGeometryNode class is used for all rendered content in the scene graph.
QSGMaterial * material() const
Returns the material of the QSGGeometryNode.
void setMaterial(QSGMaterial *material)
Sets the material of this geometry node to material.
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
static const AttributeSet & defaultAttributes_TexturedPoint2D()
Convenience function which returns attributes to be used for textured 2D drawing.
static void updateTexturedRectGeometry(QSGGeometry *g, const QRectF &rect, const QRectF &sourceRect)
Updates the geometry g with the coordinates in rect and texture coordinates from textureRect.
The QSGMaterialShader class represents a graphics API independent shader program.
The QSGMaterial class encapsulates rendering state for a shader program.
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
void setFlag(Flag, bool=true)
Sets the flag f on this node if enabled is true; otherwise clears the flag.
RenderMode
\value RenderMode2D Normal 2D rendering \value RenderMode2DNoDepthBuffer Normal 2D rendering with dep...
The QSGSimpleTextureNode class is provided for convenience to easily draw textured content using the ...
void setRect(const QRectF &rect)
Sets the target rect of this texture node to r.
void setFiltering(QSGTexture::Filtering filtering)
Sets the filtering to be used for this texture node to filtering.
void setTexture(QSGTexture *texture)
Sets the texture of this texture node to texture.
void setSourceRect(const QRectF &r)
Sets the source rect of this texture node to r.
The QSGTextureProvider class encapsulates texture based entities in QML.
void textureChanged()
This signal is emitted when the texture changes.
void setFiltering(Filtering filter)
Sets the sampling mode to filter.
const_iterator cend() const noexcept
const_iterator cbegin() const noexcept
void setShader(const QShaderKey &key, const QShaderCode &shader)
Stores the source or binary shader code for a given shader version specified by key.
void setDescription(const QShaderDescription &desc)
Sets the reflection metadata to desc.
void setStage(Stage stage)
Sets the pipeline stage.
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QThread * currentThread()
The QTouchEvent class contains parameters that describe a touch event.
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
\inmodule QtWaylandCompositor
@ BufferFormatEgl_EXTERNAL_OES
bool hasBuffer() const
Returns true if this QWaylandBufferRef references a buffer.
TextInputProtocols textInputProtocols() const
static QWaylandTextInput * findIn(QWaylandObject *container)
If any instance of the interface has been registered with container, this is returned.
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
QWaylandSeat * seat() const
QWaylandSurface * origin() const
\qmltype WaylandOutput \instantiates QWaylandOutput \inqmlmodule QtWayland.Compositor
void scaleFactorChanged()
int scaleFactor
\qmlproperty int QtWayland.Compositor::WaylandOutput::scaleFactor
QWaylandCompositor * compositor
void setFocus(QWaylandSurface *surface)
QWaylandQuickItem * findSibling(QWaylandSurface *surface) const
qreal scaleFactor() const
QScopedPointer< QWaylandView > view
void placeBelowSibling(QWaylandQuickItem *sibling)
void placeAboveSibling(QWaylandQuickItem *sibling)
static const QWaylandQuickItemPrivate * get(const QWaylandQuickItem *item)
\qmltype WaylandQuickItem \instantiates QWaylandQuickItem \inqmlmodule QtWayland.Compositor
void keyPressEvent(QKeyEvent *event) override
Q_INVOKABLE void setPrimary()
\qmlmethod WaylandQuickItem::setPrimary()
bool isBufferLocked() const
Q_INVOKABLE QPointF mapToSurface(const QPointF &point) const
\qmlmethod point WaylandQuickItem::mapToSurface(point point)
void mousePressEvent(QMouseEvent *event) override
void setAllowDiscardFrontBuffer(bool discard)
void setInputEventsEnabled(bool enabled)
void hoverEnterEvent(QHoverEvent *event) override
virtual void takeFocus(QWaylandSeat *device=nullptr)
Calling this function causes the item to take the focus of the input device.
void setPaintEnabled(bool paintEnabled)
void touchEventsEnabledChanged()
QSGTextureProvider * textureProvider() const override
Returns the texture provider of this QWaylandQuickItem.
QWaylandOutput * output
This property holds the output on which this item is displayed.
~QWaylandQuickItem() override
Destroy the QWaylandQuickItem.
bool isTextureProvider() const override
Returns true if this item is a texture provider.
bool touchEventsEnabled
\qmlproperty bool QtWayland.Compositor::WaylandQuickItem::touchEventsEnabled
bool focusOnClick
\qmlproperty bool QtWayland.Compositor::WaylandQuickItem::focusOnClick
void inputEventsEnabledChanged()
void sendMouseMoveEvent(const QPointF &position, QWaylandSeat *seat=nullptr)
void setFocusOnClick(bool focus)
void hoverLeaveEvent(QHoverEvent *event) override
void paintEnabledChanged()
virtual void surfaceChangedEvent(QWaylandSurface *newSurface, QWaylandSurface *oldSurface)
void mouseReleaseEvent(QMouseEvent *event) override
bool isPaintEnabled() const
void subsurfaceHandlerChanged()
void touchEvent(QTouchEvent *event) override
QWaylandView * view() const
Returns the view rendered by this QWaylandQuickItem.
void setTouchEventsEnabled(bool enabled)
QWaylandSurface::Origin origin
\qmlproperty enum QtWayland.Compositor::WaylandQuickItem::origin
QObject * subsurfaceHandler
QWaylandQuickItem(QQuickItem *parent=nullptr)
Constructs a QWaylandQuickItem with the given parent.
bool inputRegionContains(const QPointF &localPosition) const
Returns true if the input region of this item's surface contains the position given by localPosition.
void setSurface(QWaylandSurface *surface)
void setSubsurfaceHandler(QObject *)
void hoverMoveEvent(QHoverEvent *event) override
void focusOnClickChanged()
void setBufferLocked(bool locked)
QWaylandCompositor * compositor
\qmlproperty WaylandCompositor QtWayland.Compositor::WaylandQuickItem::compositor
void keyReleaseEvent(QKeyEvent *event) override
QSGNode * updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override
Called on the render thread when it is time to sync the state of the item with the scene graph.
void mouseMoveEvent(QMouseEvent *event) override
bool allowDiscardFrontBuffer
By default, the item locks the current buffer until a new buffer is available and updatePaintNode() i...
void mouseMove(const QPointF &windowPosition)
QWaylandSurface * surface
\qmlproperty WaylandSurface QtWayland.Compositor::WaylandQuickItem::surface
void touchUngrabEvent() override
This event handler can be reimplemented in a subclass to be notified when a touch ungrab event has oc...
void setOutput(QWaylandOutput *output)
QQuickItem * pickClickableItem(const QPointF &position)
\qmltype WaylandSeat \instantiates QWaylandSeat \inqmlmodule QtWayland.Compositor
void sendMouseMoveEvent(QWaylandView *surface, const QPointF &localPos, const QPointF &outputSpacePos=QPointF())
Sets the mouse focus to view and sends a mouse move event to the pointer device with the local positi...
void sendMouseReleaseEvent(Qt::MouseButton button)
Sends a mouse release event for button to the QWaylandSeat's pointer device.
void setMouseFocus(QWaylandView *view)
Sets the current mouse focus to view.
void sendFullTouchEvent(QWaylandSurface *surface, QTouchEvent *event)
Sends the event to the specified surface on the touch device.
void sendMousePressEvent(Qt::MouseButton button)
Sends a mouse press event for button to the QWaylandSeat's pointer device.
void sendFullKeyEvent(QKeyEvent *event)
Sends the event to the keyboard device.
QWaylandView * mouseFocus() const
Returns the view that currently has mouse focus.
bool setKeyboardFocus(QWaylandSurface *surface)
Sets the current keyboard focus to surface.
void sendMouseWheelEvent(Qt::Orientation orientation, int delta)
Sends a mouse wheel event to the QWaylandSeat's pointer device with the given orientation and delta.
Q_INVOKABLE void sendTouchCancelEvent(QWaylandClient *client)
\qmlmethod void QtWayland.Compositor::WaylandSeat::sendTouchCancelEvent(WaylandClient client)
QWaylandSurfaceTextureProvider()
QSGTexture * texture() const override
Returns a pointer to the texture object.
void setBufferRef(QWaylandQuickItem *surfaceItem, const QWaylandBufferRef &buffer)
void setSmooth(bool smooth)
~QWaylandSurfaceTextureProvider() override
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
QSize destinationSize
\qmlproperty size QtWayland.Compositor::WaylandSurface::destinationSize
QWaylandSurface::Origin origin
\qmlproperty enum QtWayland.Compositor::WaylandSurface::origin
void parentChanged(QWaylandSurface *newParent, QWaylandSurface *oldParent)
void dragStarted(QWaylandDrag *drag)
\qmlsignal void QtWayland.Compositor::WaylandSurface::dragStarted(WaylandDrag drag)
void subsurfacePlaceAbove(QWaylandSurface *sibling)
void childAdded(QWaylandSurface *child)
\qmlsignal QtWayland.Compositor::WaylandSurface::childAdded(WaylandSurface child)
void configure(bool hasBuffer)
int bufferScale
\qmlproperty size QtWayland.Compositor::WaylandSurface::bufferScale
void subsurfacePositionChanged(const QPoint &position)
QSize bufferSize
\qmlproperty size QtWayland.Compositor::WaylandSurface::bufferSize
QWaylandClient * client
\qmlproperty WaylandClient QtWayland.Compositor::WaylandSurface::client
Origin
This enum type is used to specify the origin of a QWaylandSurface's buffer.
bool isOpaque
\qmlproperty bool QtWayland.Compositor::WaylandSurface::isOpaque
void subsurfacePlaceBelow(QWaylandSurface *sibling)
QRectF sourceGeometry
\qmlproperty rect QtWayland.Compositor::WaylandSurface::sourceGeometry
void bufferScaleChanged()
void setFocus(QWaylandSurface *surface)
void setFocus(QWaylandSurface *surface)
\qmltype WaylandView \instantiates QWaylandView \inqmlmodule QtWayland.Compositor
QWaylandOutput * output
\qmlproperty WaylandOutput QtWayland.Compositor::WaylandView::output
void screenChanged(QScreen *screen)
This signal is emitted when a window's screen changes, either by being set explicitly with setScreen(...
qDeleteAll(list.begin(), list.end())
QSet< QString >::iterator it
Combined button and popup list for selecting options.
static QDBusError::ErrorType get(const char *name)
#define qCWarning(category,...)
#define qCDebug(category,...)
#define Q_ARG(Type, data)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble top
GLenum GLenum GLsizei count
GLenum GLenum GLsizei const GLuint GLboolean enabled
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
GLsizei GLsizei GLchar * source
GLfixed GLfixed GLint GLint GLfixed points
GLdouble GLdouble GLdouble GLdouble q
GLenum GLenum GLenum GLenum GLenum scale
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define QT_CONFIG(feature)
QT_BEGIN_NAMESPACE typedef uchar * output
#define GL_TEXTURE_EXTERNAL_OES
bool testFlag(MaskType mask, FlagType flag)
myObject disconnect()
[26]
socketLayer bind(QHostAddress::Any, 4000)
The QSGMaterialType class is used as a unique type token in combination with QSGMaterial.
QList< QShaderDescription::InOutVariable > inVars
static QShaderDescriptionPrivate * get(QShaderDescription *desc)
QList< QShaderDescription::InOutVariable > combinedImageSamplers
QList< QShaderDescription::InOutVariable > outVars
QList< QShaderDescription::UniformBlock > uniformBlocks
\variable QShaderDescription::InOutVariable::name
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent