b68a2b251f7d39f52978a16224a4b92725a413e8
[apps/homescreen.git] / homescreen / src / homescreencontrolinterface.h
1 /*
2  * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef HOMESCREENCONTROLINTERFACE_H
18 #define HOMESCREENCONTROLINTERFACE_H
19
20 #include <QObject>
21 #include "include/homescreen.hpp"
22 #include "homescreen_adaptor.h"
23
24 class HomeScreenControlInterface : public QObject
25 {
26     Q_OBJECT
27 public:
28     explicit HomeScreenControlInterface(QObject *parent = 0);
29
30 signals:
31     void newRequestsToBeVisibleApp(int pid);
32
33     QList<int> newRequestGetAllSurfacesOfProcess(int pid);
34     int newRequestGetSurfaceStatus(int surfaceId);
35     void newRequestRenderSurfaceToArea(int surfaceId, int layoutArea);
36     bool newRequestRenderSurfaceToAreaAllowed(int surfaceId, int layoutArea);
37     void newRequestSurfaceIdToFullScreen(int surfaceId);
38
39 //from homescreen_adaptor.h
40 public Q_SLOTS: // METHODS
41     QList<int> getAllSurfacesOfProcess(int pid);
42     int getSurfaceStatus(int surfaceId);
43     void hardKeyPressed(int key);
44     void renderSurfaceToArea(int surfaceId, int layoutArea);
45     bool renderAppToAreaAllowed(int appCategory, int layoutArea);
46     void requestSurfaceIdToFullScreen(int surfaceId);
47
48 private:
49     HomescreenAdaptor *mp_homeScreenAdaptor;
50 };
51
52 #endif // HOMESCREENCONTROLINTERFACE_H