2
* Copyright (C) 2016 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 WINDOWCONTROLLERINTERFACE_H
18
#define WINDOWCONTROLLERINTERFACE_H
20
#include "miral/window.h"
22
#include "mir_toolkit/event.h"
31
class WindowControllerInterface {
33
WindowControllerInterface() = default;
34
virtual ~WindowControllerInterface() = default;
36
// focus() asks Mir to bring particular window to the front and recommend to shell that it be focused
37
virtual void focus (const miral::Window &window) = 0;
38
// setActiveFocus() is how shell notifies Mir/application that a window actually has input focus
39
virtual void setActiveFocus(const miral::Window &window, const bool activeFocus) = 0;
41
virtual void resize(const miral::Window &window, const QSize &size) = 0;
42
virtual void move (const miral::Window &window, const QPoint &topLeft) = 0;
44
virtual void requestClose(const miral::Window &window) = 0;
46
virtual void setState(const miral::Window &window, const MirSurfaceState state) = 0;
48
virtual void deliverKeyboardEvent(const miral::Window &window, const MirKeyboardEvent *event) = 0;
49
virtual void deliverTouchEvent (const miral::Window &window, const MirTouchEvent *event) = 0;
50
virtual void deliverPointerEvent (const miral::Window &window, const MirPointerEvent *event) = 0;
55
#endif // WINDOWCONTROLLERINTERFACE_H