54290ac1e8abfeb3bdbd199a66bc5dee8c3466eb
[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     void setUpLayouts();
16
17 signals:
18
19 public slots:
20     void showAppLayer();
21     void hideAppLayer();
22     void makeMeVisible(int pid);
23 private:
24     void checkToDoQueue();
25 public slots:
26     QList<int> requestGetAllSurfacesOfProcess(int pid);
27     int requestGetSurfaceStatus(int surfaceId);
28     void requestRenderSurfaceToArea(int surfaceId, int layoutArea);
29     bool requestRenderSurfaceToAreaAllowed(int surfaceId, int layoutArea);
30     void requestSurfaceIdToFullScreen(int surfaceId);
31     void setLayoutByName(QString layoutName);
32
33     // this will receive the surfaceVisibilityChanged signal of the windowmanager
34     void requestSurfaceVisibilityChanged(int surfaceId, bool visible);
35
36 Q_SIGNALS: // SIGNALS
37     void surfaceVisibilityChanged(int surfaceId, bool visible);
38
39 protected:
40     void timerEvent(QTimerEvent *e);
41 private:
42     int m_secondsTimerId;
43     org::agl::windowmanager *mp_dBusWindowManagerProxy;
44     org::agl::popup *mp_dBusPopupProxy;
45
46     QList<int> m_requestsToBeVisiblePids;
47     QList<int> m_visibleSurfaces;
48     QList<int> m_invisibleSurfaces;
49     QList<int> m_requestsToBeVisibleSurfaces;
50 };
51
52 #endif // LAYOUTHANDLER_H