2 * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
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 QLIBWINDOWMANAGER_H
18 #define QLIBWINDOWMANAGER_H
19 #include <libwindowmanager.h>
27 class QLibWindowmanager : public QObject{
30 explicit QLibWindowmanager(QObject *parent = nullptr);
33 QLibWindowmanager(const QLibWindowmanager &) = delete;
34 QLibWindowmanager &operator=(const QLibWindowmanager &) = delete;
37 using handler_fun = std::function<void(const char *)>;
50 static QLibWindowmanager &instance();
52 int init(int port, char const *token);
55 int requestSurface(const char *label);
56 int activateSurface(const char *label);
57 int deactivateSurface(const char *label);
58 int endDraw(const char *label);
59 void set_event_handler(enum QEventType et, handler_fun f);
62 void slotActivateSurface();
67 std::vector<int> surfaceIDs;
69 #endif // LIBWINDOWMANAGER_H