2 * Copyright (C) 2017 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.
18 // Created by mfritzsc on 7/11/17.
21 #ifndef TMCAGLWM_APP_HPP
22 #define TMCAGLWM_APP_HPP
24 #include <json-c/json.h>
27 #include "afb_binding_api.hpp"
28 #include "controller_hooks.hpp"
32 #include "wayland.hpp"
46 struct binding_api api;
47 struct controller_hooks chooks;
49 // This is the one thing, we do not own.
50 struct wl::display *display;
52 std::unique_ptr<struct genivi::controller> controller;
53 std::vector<std::unique_ptr<struct wl::output>> outputs;
63 App(App const &) = delete;
64 App &operator=(App const &) = delete;
67 int dispatch_events();
70 void surface_created(uint32_t surface_id);
71 void surface_removed(uint32_t surface_id);
76 #endif // TMCAGLWM_APP_HPP