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"
35 #include "ilm/ilm_control.h"
39 class WindowManager : public QObject
44 explicit WindowManager(QObject *parent = 0);
49 WindowmanagerAdaptor *mp_windowManagerAdaptor;
50 QMap<int, QList<SimpleRect> > m_layouts;
51 QMap<int, QString> m_layoutNames;
57 void createNewLayer(int layerId);
58 void addSurfaceToLayer(int surfaceId, int layerId);
62 QMap<t_ilm_uint, SurfaceInfo> *mp_surfaces;
63 /* one layer per pid is created
64 where the surfaces are added that are created by the process */
65 QList<int> *mp_processLayers;
68 QMap<int, unsigned int> *mp_layoutAreaToPidAssignment;
74 // for general notifications
75 void notificationFunc_non_static(ilmObjectType object,
78 static void notificationFunc_static(ilmObjectType object,
84 // for surface notifications
85 void surfaceCallbackFunction_non_static(t_ilm_surface surface,
86 struct ilmSurfaceProperties* surfaceProperties,
87 t_ilm_notification_mask mask);
88 static void surfaceCallbackFunction_static(t_ilm_surface surface,
89 struct ilmSurfaceProperties* surfaceProperties,
90 t_ilm_notification_mask mask);
96 // from windowmanager_adapter.h
97 public Q_SLOTS: // METHODS
98 int addLayout(int layoutId, const QString &layoutName, const QList<SimpleRect> &surfaceAreas);
99 QList<int> getAvailableLayouts(int numberOfAppSurfaces);
100 QList<SimplePoint> getAvailableSurfaces();
102 QString getLayoutName(int layoutId);
103 void setLayoutById(int layoutId);
104 void setLayoutByName(const QString &layoutName);
105 void setPidToLayoutArea(int pid, int layoutAreaId);
110 #endif // WINDOWMANAGER_HPP