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_WINDOW_H
18
#define QTMIR_WINDOW_H
21
#include <unity/shell/application/WindowInterface.h>
27
class Window : public unity::shell::application::WindowInterface
33
QPoint position() const override;
34
QPoint requestedPosition() const override;
35
void setRequestedPosition(const QPoint &) override;
36
Mir::State state() const override;
37
bool focused() const override;
38
bool confinesMousePointer() const override;
39
int id() const override;
40
unity::shell::application::MirSurfaceInterface* surface() const override;
42
void setSurface(MirSurface *surface);
43
void setFocused(bool value);
46
void requestState(Mir::State state) override;
47
void requestFocus() override;
48
void close() override;
51
void closeRequested();
54
void updatePosition();
59
QPoint m_requestedPosition;
60
bool m_focused{false};
62
Mir::State m_state{Mir::RestoredState};
63
MirSurface *m_surface{nullptr};
66
} // namespace qtmir {
67
#endif // QTMIR_WINDOW_H