+/*
+ * Copyright (C) 2017 Mentor Graphics Development (Deutschland) GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef WM_WAYLAND_HPP
#define WM_WAYLAND_HPP
layer_map_type layers;
screen_map_type screens;
- typedef std::pair<char const *, std::function<void(struct controller *)>>
- name_task_pair;
- std::vector<name_task_pair> pending;
-
size output_size;
wm::controller_hooks *chooks;
void add_proxy_to_id_mapping(struct wl_output *p, uint32_t id);
void remove_proxy_to_id_mapping(struct wl_output *p);
- void add_task(char const *name,
- std::function<void(struct controller *)> &&f);
- void execute_pending();
+ bool surface_exists(uint32_t id) const {
+ return this->surfaces.find(id) != this->surfaces.end();
+ }
+
+ bool layer_exists(uint32_t id) const {
+ return this->layers.find(id) != this->layers.end();
+ }
controller(struct wl_registry *r, uint32_t name, uint32_t version);