~michael-sheldon/ubuntu/utopic/maliit-framework/fix-orientation-updates

« back to all changes in this revision

Viewing changes to src/windowgroup.h

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo, Sergio Schvezov, Ricardo Salveti de Araujo
  • Date: 2013-07-23 19:47:04 UTC
  • mfrom: (1.1.2) (1.2.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130723194704-1lsy1kmlda069cea
Tags: 0.99.0+git20130615+97e8335-0ubuntu1
[ Sergio Schvezov ]
* New build from HEAD 97e8335.
* Packaging import from lp:phablet-extras/maliit-framework.

[ Ricardo Salveti de Araujo ]
* debian/control: adding vcs and fixing dependencies
* General package cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* * This file is part of Maliit framework *
 
2
 *
 
3
 * Copyright (C) 2013 Openismus GmbH
 
4
 *
 
5
 * Contact: maliit-discuss@lists.maliit.org
 
6
 *
 
7
 * This library is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU Lesser General Public
 
9
 * License version 2.1 as published by the Free Software Foundation
 
10
 * and appearing in the file LICENSE.LGPL included in the packaging
 
11
 * of this file.
 
12
 */
 
13
 
 
14
#ifndef MALIIT_SERVER_WINDOW_GROUP_H
 
15
#define MALIIT_SERVER_WINDOW_GROUP_H
 
16
 
 
17
#include <QObject>
 
18
#include <QSharedPointer>
 
19
#include <QTimer>
 
20
#include <QRegion>
 
21
#include <QVector>
 
22
#include <QWindow>
 
23
 
 
24
#include "windowdata.h"
 
25
 
 
26
#include <maliit/namespace.h>
 
27
 
 
28
class QWindow;
 
29
 
 
30
namespace Maliit
 
31
{
 
32
 
 
33
class AbstractPlatform;
 
34
class WindowGroupPrivate;
 
35
 
 
36
class WindowGroup : public QObject
 
37
{
 
38
    Q_OBJECT
 
39
    Q_DECLARE_PRIVATE(WindowGroup)
 
40
 
 
41
public:
 
42
    enum HideMode {
 
43
        HideImmediate,
 
44
        HideDelayed
 
45
    };
 
46
 
 
47
    WindowGroup(const QSharedPointer<AbstractPlatform> &platform);
 
48
    ~WindowGroup();
 
49
 
 
50
    void activate();
 
51
    void deactivate(HideMode mode);
 
52
 
 
53
    void setupWindow(QWindow *window, Maliit::Position position);
 
54
    void setScreenRegion(const QRegion &region, QWindow *window);
 
55
    void setInputMethodArea(const QRegion &region, QWindow *window);
 
56
    void setApplicationWindow(WId id);
 
57
 
 
58
Q_SIGNALS:
 
59
    void inputMethodAreaChanged(const QRegion &inputMethodArea);
 
60
 
 
61
private Q_SLOTS:
 
62
    void hideWindows();
 
63
    void onVisibleChanged(bool visible);
 
64
    void updateInputMethodArea();
 
65
 
 
66
private:
 
67
    bool containsWindow(QWindow *window);
 
68
 
 
69
    QSharedPointer<AbstractPlatform> m_platform;
 
70
    QVector<WindowData> m_window_list;
 
71
    QRegion m_last_im_area;
 
72
    bool m_active;
 
73
    QTimer m_hideTimer;
 
74
};
 
75
 
 
76
} // namespace Maliit
 
77
 
 
78
#endif // MALIIT_SERVER_WINDOW_GROUP_H