~gerboland/miral/qt-remove-old-WM-state-setting-code

« back to all changes in this revision

Viewing changes to miral-qt/src/common/windowmodelinterface.h

  • Committer: Gerry Boland
  • Date: 2016-07-25 13:43:57 UTC
  • Revision ID: gerry.boland@canonical.com-20160725134357-xn2p7iv9m3h54l0f
Add basic state signal emission to GUI thread

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <QPoint>
23
23
#include <QVector>
24
24
 
 
25
#include <mir/scene/surface.h>
25
26
 
26
27
struct WindowInfo {
27
28
    QSize size;
28
29
    QPoint position;
29
30
    bool focused;
 
31
    const std::shared_ptr<mir::scene::Surface> surface;
30
32
 
31
33
    enum class DirtyStates {
32
34
      Size = 1,
33
35
      Position = 2,
34
 
      Focused = 4
 
36
      Focus = 4
35
37
    };
36
38
};
37
39
 
38
 
struct NumberedWindowList {
 
40
struct NumberedWindow {
39
41
    const unsigned int index;
40
42
    const WindowInfo windowInfo;
41
43
};
42
44
 
43
 
struct ChangedWindowList {
 
45
struct DirtiedWindow {
44
46
    const unsigned int index;
45
47
    const WindowInfo windowInfo;
46
48
    const WindowInfo::DirtyStates dirtyWindowInfo;
54
56
    virtual ~WindowModelInterface() = default;
55
57
 
56
58
Q_SIGNALS:
57
 
    void windowsAdded(const NumberedWindowList);
58
 
    void windowsRemoved(const NumberedWindowList);
59
 
    void windowsChanged(const ChangedWindowList);
 
59
    void windowAdded(const NumberedWindow);
 
60
    void windowRemoved(const unsigned int index);
 
61
    void windowChanged(const DirtiedWindow);
60
62
 
61
63
private:
62
64
    Q_DISABLE_COPY(WindowModelInterface)