-
Notifications
You must be signed in to change notification settings - Fork 2
/
embeddedshellsurface.h
78 lines (63 loc) · 2.53 KB
/
embeddedshellsurface.h
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// SPDX-License-Identifier: LGPL-3.0-only
#ifndef EMBEDDEDSHELLSURFACE_H
#define EMBEDDEDSHELLSURFACE_H
#include "embeddedplatform.h"
#include <QObject>
class EmbeddedShellSurfaceView;
class EmbeddedShellSurfaceViewPrivate;
class EmbeddedShellSurfacePrivate;
struct embedded_shell_surface;
struct surface_view;
class QWindow;
namespace QtWaylandClient {
class QWaylandWindow;
class QWaylandShellSurface;
} // namespace QtWaylandClient
class Q_DECL_EXPORT EmbeddedShellSurface : public QObject {
Q_OBJECT
Q_DECLARE_PRIVATE(EmbeddedShellSurface)
QScopedPointer<EmbeddedShellSurfacePrivate> d_ptr;
public:
EmbeddedShellSurface(struct ::embedded_shell_surface *shell_surface,
QtWaylandClient::QWaylandWindow *window,
EmbeddedShellTypes::Anchor anchor, uint32_t margin,
uint32_t sort_index);
~EmbeddedShellSurface() override;
EmbeddedShellTypes::Anchor getAnchor() const;
unsigned int getSortIndex() const;
EmbeddedShellSurfaceView *createView(const QString &label,
const QString &icon,
uint32_t sort_index);
EmbeddedShellSurfaceView *createView(const QString &appId,
const QString &label,
const QString &icon,
uint32_t sort_index);
EmbeddedShellSurfaceView *createView(const QString &appId,
const QString &appLabel,
const QString &appIcon,
const QString &label,
const QString &icon,
uint32_t sort_index);
QtWaylandClient::QWaylandShellSurface *shellSurface();
signals:
public slots:
void sendAnchor(EmbeddedShellTypes::Anchor anchor);
void sendMargin(int margin);
void sendSortIndex(unsigned int sortIndex);
};
class EmbeddedShellSurfaceView : public QObject {
Q_OBJECT
Q_DECLARE_PRIVATE(EmbeddedShellSurfaceView)
QScopedPointer<EmbeddedShellSurfaceViewPrivate> d_ptr;
Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged)
public:
EmbeddedShellSurfaceView(struct ::surface_view *view,
EmbeddedShellSurface *surf, const QString &label);
~EmbeddedShellSurfaceView() override;
const QString &label() const;
void setLabel(const QString &newLabel);
signals:
void selected();
void labelChanged();
};
#endif // EMBEDDEDSHELLSURFACE_H