First integration of new HMI design
[staging/HomeScreen.git] / HomeScreen / src / layouthandler.h
1 #ifndef LAYOUTHANDLER_H
2 #define LAYOUTHANDLER_H
3
4 #include <QObject>
5 #include "windowmanager_proxy.h"
6 #include "popup_proxy.h"
7
8 class LayoutHandler : public QObject
9 {
10     Q_OBJECT
11 public:
12     explicit LayoutHandler(QObject *parent = 0);
13     ~LayoutHandler();
14
15 signals:
16
17 public slots:
18     void showAppLayer();
19     void hideAppLayer();
20     void makeMeVisible(int pid);
21 private:
22     void checkToDoQueue();
23 public slots:
24     QList<int> requestGetAllSurfacesOfProcess(int pid);
25     int requestGetSurfaceStatus(int surfaceId);
26     void requestRenderSurfaceToArea(int surfaceId, int layoutArea);
27     bool requestRenderSurfaceToAreaAllowed(int surfaceId, int layoutArea);
28     void requestSurfaceIdToFullScreen(int surfaceId);
29     void setLayoutByName(QString layoutName);
30
31     // this will receive the surfaceVisibilityChanged signal of the windowmanager
32     void requestSurfaceVisibilityChanged(int surfaceId, bool visible);
33
34 Q_SIGNALS: // SIGNALS
35     void surfaceVisibilityChanged(int surfaceId, bool visible);
36
37 protected:
38     void timerEvent(QTimerEvent *e);
39 private:
40     int m_secondsTimerId;
41     org::agl::windowmanager *mp_dBusWindowManagerProxy;
42     org::agl::popup *mp_dBusPopupProxy;
43
44     QList<int> m_requestsToBeVisiblePids;
45     QList<int> m_visibleSurfaces;
46     QList<int> m_invisibleSurfaces;
47     QList<int> m_requestsToBeVisibleSurfaces;
48 };
49
50 #endif // LAYOUTHANDLER_H