1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef WLQTKEY_H
5#define WLQTKEY_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWaylandCompositor/QWaylandCompositorExtensionTemplate>
19#include <QtWaylandCompositor/QWaylandCompositor>
20#include <QtWaylandCompositor/private/qwayland-server-qt-key-unstable-v1.h>
21#include <QtCore/private/qglobal_p.h>
22
23#include <wayland-util.h>
24
25QT_BEGIN_NAMESPACE
26
27class QWaylandSurface;
28class QKeyEvent;
29
30namespace QtWayland {
31
32class QtKeyExtensionGlobal : public QWaylandCompositorExtensionTemplate<QtKeyExtensionGlobal>, public QtWaylandServer::zqt_key_v1
33{
34 Q_OBJECT
35public:
36 QtKeyExtensionGlobal(QWaylandCompositor *compositor);
37
38 bool postQtKeyEvent(QKeyEvent *event, QWaylandSurface *surface);
39
40private:
41 QWaylandCompositor *m_compositor = nullptr;
42};
43
44}
45
46QT_END_NAMESPACE
47
48#endif // WLQTKEY_H
49

source code of qtwayland/src/compositor/extensions/qwlqtkey_p.h