7#include <QtWaylandCompositor/QWaylandCompositor>
8#include <QtWaylandCompositor/QWaylandSeat>
9#include <QtWaylandCompositor/QWaylandView>
10#include <QtWaylandCompositor/QWaylandClient>
12#include <QtWaylandCompositor/private/qwlqttouch_p.h>
24 wl_resource_destroy(resource->handle);
30 auto focusResource = resourceMap().value(surface->
client()->
client());
34 uint32_t serial =
q->compositor()->nextSerial();
36 wl_touch_send_down(focusResource->handle, serial,
time, surface->
resource(), touch_id,
43 auto focusResource = resourceMap().value(client->
client());
50 wl_touch_send_up(focusResource->handle, serial,
time, touch_id);
56 auto focusResource = resourceMap().value(client->
client());
61 wl_touch_send_motion(focusResource->handle,
time, touch_id,
65int QWaylandTouchPrivate::toSequentialWaylandId(
int touchId)
67 const int waylandId =
ids.indexOf(touchId);
70 const int availableId =
ids.indexOf(-1);
71 if (availableId != -1) {
72 ids[availableId] = touchId;
76 return ids.size() - 1;
112 return d->compositor();
154 auto focusResource =
d->resourceMap().value(client->
client());
156 d->send_frame(focusResource->handle);
165 auto focusResource =
d->resourceMap().value(client->
client());
167 d->send_cancel(focusResource->handle);
193 for (
int i = 0;
i < pointCount; ++
i) {
196 const int id =
d->toSequentialWaylandId(tp.
id());
210 d->add(client->
client(),
id, qMin<uint32_t>(QtWaylandServer::wl_touch::interfaceVersion(), version));
215#include "moc_qwaylandtouch.cpp"
The QEventPoint class provides information about a point in a QPointerEvent.
int id
the ID number of this event point.
State state
the current state of the event point.
QPointF position
the position of this point.
qsizetype size() const noexcept
\inmodule QtCore\reentrant
The QTouchEvent class contains parameters that describe a touch event.
\qmltype WaylandClient \instantiates QWaylandClient \inqmlmodule QtWayland.Compositor
wl_client * client() const
Returns the Wayland client of this QWaylandClient.
static TouchExtensionGlobal * findIn(QWaylandObject *container)
If any instance of the interface has been registered with container, this is returned.
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
\inmodule QtWaylandCompositor
\qmltype WaylandSeat \instantiates QWaylandSeat \inqmlmodule QtWayland.Compositor
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
struct wl_resource * resource() const
Returns the Wayland resource corresponding to this QWaylandSurface.
QWaylandClient * client
\qmlproperty WaylandClient QtWayland.Compositor::WaylandSurface::client
void touch_release(Resource *resource) override
QWaylandCompositor * compositor() const
QWaylandTouchPrivate(QWaylandTouch *touch, QWaylandSeat *seat)
uint sendDown(QWaylandSurface *surface, uint32_t time, int touch_id, const QPointF &position)
void sendMotion(QWaylandClient *client, uint32_t time, int touch_id, const QPointF &position)
uint sendUp(QWaylandClient *client, uint32_t time, int touch_id)
\inmodule QtWaylandCompositor
virtual void sendFullTouchEvent(QWaylandSurface *surface, QTouchEvent *event)
Sends all touch points in event to the specified surface, followed by a touch frame event.
virtual uint sendTouchPointEvent(QWaylandSurface *surface, int id, const QPointF &position, Qt::TouchPointState state)
Sends a touch point event to the touch device of surface with the given id, position,...
virtual void sendFrameEvent(QWaylandClient *client)
Sends a touch frame event to the touch device of a client.
QWaylandSeat * seat() const
Returns the input device for this QWaylandTouch.
virtual void sendCancelEvent(QWaylandClient *client)
Sends a touch cancel event to the touch device of a client.
virtual void addClient(QWaylandClient *client, uint32_t id, uint32_t version)
QWaylandTouch(QWaylandSeat *seat, QObject *parent=nullptr)
Constructs a QWaylandTouch for the seat and with the given parent.
QWaylandCompositor * compositor() const
Returns the compositor for this QWaylandTouch.
Combined button and popup list for selecting options.
GLenum GLenum GLsizei const GLuint * ids
GLfixed GLfixed GLint GLint GLfixed points
GLdouble GLdouble GLdouble GLdouble q
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent