~cemil-azizoglu/miral/mir-0.26.1-compat

« back to all changes in this revision

Viewing changes to miral-qt/src/common/windowcontrollerinterface.h

  • Committer: Larry Price
  • Date: 2016-09-13 16:19:29 UTC
  • mto: (330.4.1 miral)
  • mto: This revision was merged to the branch mainline in revision 352.
  • 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) 2016 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 WINDOWCONTROLLERINTERFACE_H
18
 
#define WINDOWCONTROLLERINTERFACE_H
19
 
 
20
 
#include "miral/window.h"
21
 
 
22
 
#include "mir_toolkit/event.h"
23
 
 
24
 
#include <QPoint>
25
 
#include <QSize>
26
 
 
27
 
namespace qtmir {
28
 
 
29
 
class MirSurface;
30
 
 
31
 
class WindowControllerInterface {
32
 
public:
33
 
    WindowControllerInterface() = default;
34
 
    virtual ~WindowControllerInterface() = default;
35
 
 
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;
40
 
 
41
 
    virtual void resize(const miral::Window &window, const QSize &size) = 0;
42
 
    virtual void move  (const miral::Window &window, const QPoint &topLeft) = 0;
43
 
 
44
 
    virtual void requestClose(const miral::Window &window) = 0;
45
 
 
46
 
    virtual void setState(const miral::Window &window, const MirSurfaceState state) = 0;
47
 
 
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;
51
 
};
52
 
 
53
 
} // namespace qtmir
54
 
 
55
 
#endif // WINDOWCONTROLLERINTERFACE_H