2
* Copyright (C) 2016 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
#ifndef QTMIR_MIRFOCUSCONTROLLER_H
18
#define QTMIR_MIRFOCUSCONTROLLER_H
21
#include <unity/shell/application/MirFocusControllerInterface.h>
25
#include "mirsurfaceinterface.h"
29
class MirSurfaceInterface;
31
class MirFocusController : public unity::shell::application::MirFocusControllerInterface
35
MirFocusController(){}
36
static MirFocusController* instance();
38
void setFocusedSurface(unity::shell::application::MirSurfaceInterface *surface) override;
39
unity::shell::application::MirSurfaceInterface* focusedSurface() const override;
40
MirSurfaceInterface* previouslyFocusedSurface() { return m_previouslyFocusedSurface.data(); }
42
static MirFocusController *m_instance;
43
QPointer<MirSurfaceInterface> m_previouslyFocusedSurface;
44
QPointer<MirSurfaceInterface> m_focusedSurface;
49
#endif // QTMIR_MIRFOCUSCONTROLLER_H