+/*
+ * 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.
+ */
+
+#include "app.hpp"
#include "json_helper.hpp"
#include "util.hpp"
#include "wayland.hpp"
-#include "app.hpp"
#include <algorithm>
#include <json.h>
return this->app.init();
}
-int display_event_callback(sd_event_source *evs, int fd, uint32_t events,
- void *data) {
+int display_event_callback(sd_event_source *evs, int /*fd*/, uint32_t events,
+ void * /*data*/) {
if ((events & EPOLLHUP) != 0) {
logerror("The compositor hung up, dying now.");
delete g_afb_instance;
goto error;
}
- if (events & EPOLLIN) {
- if (g_afb_instance->app.dispatch_events() == -1) {
- goto error;
- }
+ if ((events & EPOLLIN) != 0u) {
+ if (g_afb_instance->app.dispatch_events() == -1) {
+ goto error;
+ }
}
return 0;
return -1;
}
-} // namespace
+} // namespace
-#include "afb_binding.inl"
+#include "afb_binding_glue.inl"
extern "C" const struct afb_binding_v2 afbBindingV2 = {
- "winman", NULL, NULL, winman_verbs, NULL, binding_init, NULL, 1};
+ "winman", nullptr, nullptr, winman_verbs, nullptr, binding_init, nullptr, 1};