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.
16 #include <iostream> // for debug
17 using std::cerr;//debug
18 using std::cout;//debug
19 using std::endl;//debug
20 #include "windowmanager-client.hpp"
26 const std::vector<std::string> wm_events = {
27 // Private event for applications
28 "syncDraw", "flushDraw", "visible", "invisible", "active", "inactive"
31 WMClient::WMClient(const string &appid, unsigned layerID, unsigned surfaceID, const string &role)
37 roles.push_back(role);
38 surfaces.push_back(surfaceID);
39 for(auto x: wm_events){
43 afb_event ev = afb_daemon_make_event(x.c_str());
49 WMClient::WMClient(const string &appid, const string &role)
56 roles.push_back(role);
57 for(auto x: wm_events){
61 afb_event ev = afb_daemon_make_event(x.c_str());
67 WMClient::~WMClient(){
70 string WMClient::appID(){