2 * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef WINDOWMANAGER_HPP
18 #define WINDOWMANAGER_HPP
24 #include "windowmanager_adapter.h"
29 #include "ilm/ilm_control.h"
33 class WindowManager : public QObject
38 explicit WindowManager(QObject *parent = 0);
43 WindowmanagerAdaptor *mp_windowManagerAdaptor;
44 QList<Layout> m_layouts;
45 QList<int> m_surfaces;
46 QMap<int, unsigned int> *mp_layoutAreaToSurfaceIdAssignment;
50 int m_homeScreenSurfaceId;
55 void createNewLayer(int layerId);
56 void addSurfaceToLayer(int surfaceId, int layerId);
65 // for general notifications
66 void notificationFunc_non_static(ilmObjectType object,
69 static void notificationFunc_static(ilmObjectType object,
75 // for surface notifications
76 void surfaceCallbackFunction_non_static(t_ilm_surface surface,
77 struct ilmSurfaceProperties* surfaceProperties,
78 t_ilm_notification_mask mask);
79 static void surfaceCallbackFunction_static(t_ilm_surface surface,
80 struct ilmSurfaceProperties* surfaceProperties,
81 t_ilm_notification_mask mask);
87 // from windowmanager_adapter.h
89 Q_PROPERTY(int homeScreenPid READ homeScreenPid WRITE setHomeScreenPid)
90 int homeScreenPid() const;
91 void setHomeScreenPid(int value);
93 Q_PROPERTY(int layoutId READ layoutId)
96 Q_PROPERTY(QString layoutName READ layoutName)
97 QString layoutName() const;
99 public Q_SLOTS: // METHODS
100 int addLayout(int layoutId, const QString &layoutName, const QList<LayoutArea> &surfaceAreas);
101 QList<Layout> getAllLayouts();
102 QList<int> getAvailableLayouts(int numberOfAppSurfaces);
103 QList<int> getAvailableSurfaces();
104 QString getLayoutName(int layoutId);
105 int setLayoutById(int layoutId);
106 int setLayoutByName(const QString &layoutName);
107 int setSurfaceToLayoutArea(int surfaceId, int layoutAreaId);
111 #endif // WINDOWMANAGER_HPP