summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor/compositor/testseat.h
blob: a71abc1221f1114e4b7e618328f54daaef6878d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#include <QWaylandSeat>
#include <QList>

QT_BEGIN_NAMESPACE
class QInputEvent;
class QMouseEvent;
QT_END_NAMESPACE

class TestSeat : public QWaylandSeat
{
    Q_OBJECT
public:

    TestSeat(QWaylandCompositor *compositor, QWaylandSeat::CapabilityFlags caps);
    ~TestSeat() override;

    bool isOwner(QInputEvent *inputEvent) const override;

    QList<QMouseEvent *> createMouseEvents(int count);

    int queryCount() { return m_queryCount; }

private:
    mutable int m_queryCount;
    QList<QMouseEvent *> m_events;
};