summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor/compositor/testkeyboardgrabber.h
blob: 749bf0ed9bf386efc27f5e148223690b0c693999 (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
// Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "qwaylandkeyboard.h"

class TestKeyboardGrabber : public QWaylandKeyboard
{
    Q_OBJECT
public:
    TestKeyboardGrabber(QWaylandSeat *seat);

    void setFocus(QWaylandSurface *surface) override;
    void sendKeyModifiers(QWaylandClient *client, uint32_t serial) override;
    void sendKeyPressEvent(uint code) override;
    void sendKeyReleaseEvent(uint code) override;

signals:
    void focusedCalled();
    void keyPressCalled();
    void keyReleaseCalled();
    void modifiersCalled();
};