Debian Codegraph @

wayland/qtwayland-dev/5.11.3/QtWaylandClient/private/qwaylandshellintegration_p.h

raw symbols SCIP
1 // Copyright (C) 2016 Jolla Ltd
2 //
3 // SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QWAYLANDSHELLINTEGRATION_H
6 #define QWAYLANDSHELLINTEGRATION_H
7
8 //
9 // W A R N I N G
10 // -------------
11 //
12 // This file is not part of the Qt API. It exists purely as an
13 // implementation detail. This header file may change from version to
14 // version without notice, or even be removed.
15 //
16 // We mean it.
17 //
18
19 #include <QtWaylandClient/qtwaylandclientglobal.h>
20 #include <QtWaylandClient/private/qwaylanddisplay_p.h>
21
22 QT_BEGIN_NAMESPACE
23
24 namespace QtWaylandClient {
25
26 class QWaylandWindow;
27 class QWaylandDisplay;
28 class QWaylandShellSurface;
29
30 class Q_WAYLAND_CLIENT_EXPORT QWaylandShellIntegration
31 {
32 public:
33 QWaylandShellIntegration() {}
34 virtual ~QWaylandShellIntegration() {}
35
36 virtual bool initialize(QWaylandDisplay *display) {
37 m_display = display;
38 return true;
39 }
40 virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) = 0;
41 virtual void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) {
42 if (newFocus)
43 m_display->handleWindowActivated(newFocus);
44 if (oldFocus)
45 m_display->handleWindowDeactivated(oldFocus);
46 }
47 virtual void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) {
48 Q_UNUSED(resource);
49 Q_UNUSED(window);
50 return nullptr;
51 }
52
53 protected:
54 QWaylandDisplay *m_display = nullptr;
55 };
56
57 }
58
59 QT_END_NAMESPACE
60
61 #endif // QWAYLANDSHELLINTEGRATION_H