5442d8e54e994c6f040ba5bf101c3ce97f7f2097
[apps/agl-service-homescreen.git] / sample / template / wmhandler.h
1 /*
2  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
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 WMHANDLER_H
18 #define WMHANDLER_H
19 #include <QObject>
20 #include <QUrl>
21 #include <QVariant>
22 #include <string>
23 #include <vector>
24 #include <functional>
25 #include <libwindowmanager.h>
26
27 class WmHandler : public QObject {
28 Q_OBJECT
29 public:
30     explicit WmHandler(QObject *parent = nullptr);
31     ~WmHandler();
32
33     WmHandler(const WmHandler &) = delete;
34     WmHandler &operator=(const WmHandler &) = delete;
35
36 public:
37     static WmHandler &instance();
38     void init(LibWindowmanager *p_wm, std::string applabel);
39
40 public slots:
41     void slotActivateSurface();
42
43 private:
44     LibWindowmanager* mp_wm;
45     std::string m_applabel;
46 };
47 #endif // WMHANDLER_H