~unity-team/qtmir/qtmir.api

« back to all changes in this revision

Viewing changes to src/modules/Unity/Application/surfacemanager.h

  • Committer: Nick Dedekind
  • Date: 2017-03-24 09:44:29 UTC
  • mfrom: (579.7.28 qtmir.storage)
  • Revision ID: nick.dedekind@canonical.com-20170324094429-muce29a5k536yudz
merged parent

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
namespace qtmir {
32
32
 
33
33
class MirSurface;
 
34
class SessionMapInterface;
34
35
class WindowControllerInterface;
35
36
 
36
37
class SurfaceManager : public unity::shell::application::SurfaceManagerInterface
38
39
    Q_OBJECT
39
40
 
40
41
public:
41
 
    explicit SurfaceManager(QObject *parent = 0);
 
42
    explicit SurfaceManager();
 
43
    SurfaceManager(WindowControllerInterface *windowController,
 
44
                   WindowModelNotifier *windowModel,
 
45
                   SessionMapInterface *sessionMap);
42
46
    virtual ~SurfaceManager() {}
43
47
 
44
48
    void raise(unity::shell::application::MirSurfaceInterface *surface) override;
45
49
    void activate(unity::shell::application::MirSurfaceInterface *surface) override;
46
50
 
 
51
    // mainly for test usage
 
52
    MirSurface* find(const miral::WindowInfo &needle) const;
 
53
 
47
54
private Q_SLOTS:
48
55
    void onWindowAdded(const qtmir::NewWindow &windowInfo);
49
56
    void onWindowRemoved(const miral::WindowInfo &windowInfo);
58
65
    void connectToWindowModelNotifier(WindowModelNotifier *notifier);
59
66
    void rememberMirSurface(MirSurface *surface);
60
67
    void forgetMirSurface(const miral::Window &window);
61
 
    MirSurface* find(const miral::WindowInfo &needle) const;
62
68
    MirSurface* find(const miral::Window &needle) const;
63
 
    MirSurface* find(const std::shared_ptr<mir::scene::Surface> &needle) const;
64
69
 
65
70
    QVector<MirSurface*> m_allSurfaces;
66
71
 
67
72
    WindowControllerInterface *m_windowController;
 
73
    SessionMapInterface *m_sessionMap;
68
74
};
69
75
 
70
76
} // namespace qtmir