2
* Copyright (C) 2013-2015 Canonical, Ltd.
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.
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.
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/>.
17
#ifndef SESSIONLISTENER_H
18
#define SESSIONLISTENER_H
23
#include <mir/scene/session_listener.h>
24
#include <mir/scene/session.h>
26
#include "creationhints.h"
28
class SurfaceObserver;
30
class SessionListener : public QObject, public mir::scene::SessionListener
34
explicit SessionListener(QObject *parent = 0);
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;
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;
45
void surfaceAboutToBeCreated(mir::scene::Session&, const qtmir::CreationHints &creationHints);
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();
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&);
60
QMap<mir::scene::Session*, qtmir::CreationHints> m_creationHintsForNewSurface;
63
#endif // SESSIONLISTENER_H