~ci-train-bot/miral/miral-ubuntu-zesty-2534

« back to all changes in this revision

Viewing changes to miral-qt/src/platforms/mirserver/sessionlistener.h

  • Committer: Larry Price
  • Date: 2016-09-13 16:19:29 UTC
  • mto: This revision was merged to the branch mainline in revision 331.
  • Revision ID: larry.price@canonical.com-20160913161929-vs9ka1capmljq1es
Removing miral-qt from release branch, updating copyright file, and adding GPL3 license to root dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2013-2015 Canonical, Ltd.
3
 
 *
4
 
 * This program is free software: you can redistribute it and/or modify it under
5
 
 * the terms of the GNU Lesser General Public License version 3, as published by
6
 
 * the Free Software Foundation.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 
 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10
 
 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 
 * Lesser General Public License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU Lesser General Public License
14
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 */
16
 
 
17
 
#ifndef SESSIONLISTENER_H
18
 
#define SESSIONLISTENER_H
19
 
 
20
 
#include <QObject>
21
 
#include <QMap>
22
 
 
23
 
#include <mir/scene/session_listener.h>
24
 
#include <mir/scene/session.h>
25
 
 
26
 
#include "creationhints.h"
27
 
 
28
 
class SurfaceObserver;
29
 
 
30
 
class SessionListener : public QObject, public mir::scene::SessionListener
31
 
{
32
 
    Q_OBJECT
33
 
public:
34
 
    explicit SessionListener(QObject *parent = 0);
35
 
    ~SessionListener();
36
 
 
37
 
    void starting(std::shared_ptr<mir::scene::Session> const& session) override;
38
 
    void stopping(std::shared_ptr<mir::scene::Session> const& session) override;
39
 
    void focused(std::shared_ptr<mir::scene::Session> const& session) override;
40
 
    void unfocused() override;
41
 
 
42
 
    void surface_created(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;
43
 
    void destroying_surface(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;
44
 
 
45
 
    void surfaceAboutToBeCreated(mir::scene::Session&, const qtmir::CreationHints &creationHints);
46
 
 
47
 
Q_SIGNALS:
48
 
    void sessionStarting(std::shared_ptr<mir::scene::Session> const& session);
49
 
    void sessionStopping(std::shared_ptr<mir::scene::Session> const& session);
50
 
    void sessionFocused(std::shared_ptr<mir::scene::Session> const& session);
51
 
    void sessionUnfocused();
52
 
 
53
 
    void sessionCreatedSurface(mir::scene::Session const*,
54
 
                               std::shared_ptr<mir::scene::Surface> const&,
55
 
                               std::shared_ptr<SurfaceObserver> const&,
56
 
                               qtmir::CreationHints);
57
 
    void sessionDestroyingSurface(mir::scene::Session const*, std::shared_ptr<mir::scene::Surface> const&);
58
 
 
59
 
private:
60
 
    QMap<mir::scene::Session*, qtmir::CreationHints> m_creationHintsForNewSurface;
61
 
};
62
 
 
63
 
#endif // SESSIONLISTENER_H