Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
struct connection c {};
d.r.add_global_handler(
struct connection c {};
d.r.add_global_handler(
- "wl_output", [&c](wl_registry *r, uint32_t name, uint32_t v) {
- c.outputs.emplace_back(std::make_unique<wl::output>(r, name, v));
- });
+ "wl_output", [&c](wl_registry *r, uint32_t name, uint32_t v) {
+ c.outputs.emplace_back(std::make_unique<wl::output>(r, name, v));
+ });
d.r.add_global_handler(
"ivi_controller", [&c](wl_registry *r, uint32_t name, uint32_t v) {
c.c = std::make_unique<genivi::controller>(r, name, v);
d.r.add_global_handler(
"ivi_controller", [&c](wl_registry *r, uint32_t name, uint32_t v) {
c.c = std::make_unique<genivi::controller>(r, name, v);
- // XXX: This protocol needs the output, so lets just add our mapping here...
- c.c->add_proxy_to_id_mapping(c.outputs.back()->proxy.get(),
- wl_proxy_get_id(
- reinterpret_cast<struct wl_proxy *>(
- c.outputs.back()->proxy.get())));
+ // XXX: This protocol needs the output, so lets just add our mapping
+ // here...
+ c.c->add_proxy_to_id_mapping(
+ c.outputs.back()->proxy.get(),
+ wl_proxy_get_id(reinterpret_cast<struct wl_proxy *>(
+ c.outputs.back()->proxy.get())));
});
// First level objects
});
// First level objects
fatal("Could not init layout: %s", e);
}
fatal("Could not init layout: %s", e);
}
p.add_fd(STDIN_FILENO, [&c](int fd) {
p.add_fd(STDIN_FILENO, [&c](int fd) {
- int buf;
- ssize_t ret;
- ret = read(fd, &buf, sizeof(buf));
- c.c->debug_dump_current_status();
- return ret == 0 ? -1 : 0;
+ int buf;
+ ssize_t ret;
+ ret = read(fd, &buf, sizeof(buf));
+ c.c->debug_dump_current_status();
+ return ret == 0 ? -1 : 0;
- p.add_fd(d.get_fd(), [&d](int fd) {
- return d.dispatch();
- });
+ p.add_fd(d.get_fd(), [&d](int fd) { return d.dispatch(); });
sigset_t sset{};
sigemptyset(&sset);
sigset_t sset{};
sigemptyset(&sset);
p.add_fd(sfd.fd, [](int fd) {
struct signalfd_siginfo si;
while (read(fd, &si, sizeof(si)) == sizeof(si)) {
p.add_fd(sfd.fd, [](int fd) {
struct signalfd_siginfo si;
while (read(fd, &si, sizeof(si)) == sizeof(si)) {
- lognotice("Received signal %u", si.ssi_signo);
+ lognotice("Received signal %u", si.ssi_signo);
#include <vector>
#ifdef __GNUC__
#include <vector>
#ifdef __GNUC__
-#define ATTR_FORMAT(stringindex, firsttocheck) __attribute__((format(printf, stringindex, firsttocheck)))
+#define ATTR_FORMAT(stringindex, firsttocheck) \
+ __attribute__((format(printf, stringindex, firsttocheck)))
#else
#define ATTR_FORMAT(stringindex, firsttocheck)
#endif
#else
#define ATTR_FORMAT(stringindex, firsttocheck)
#endif
-void lognotice(char const *fmt, ...) ATTR_FORMAT(1,2);
-void logerror(char const *fmt, ...) ATTR_FORMAT(1,2);
-void fatal(char const *fmt, ...) ATTR_FORMAT(1,2);
+void lognotice(char const *fmt, ...) ATTR_FORMAT(1, 2);
+void logerror(char const *fmt, ...) ATTR_FORMAT(1, 2);
+void fatal(char const *fmt, ...) ATTR_FORMAT(1, 2);
-void logdebug(char const *fmt, ...) ATTR_FORMAT(1,2);
+void logdebug(char const *fmt, ...) ATTR_FORMAT(1, 2);
-static inline void logdebug(char const * fmt, ...) ATTR_FORMAT(1,2);
-static inline void logdebug(char const * fmt, ...) {}
+static inline void logdebug(char const *fmt, ...) ATTR_FORMAT(1, 2);
+static inline void logdebug(char const *fmt, ...) {}
void controller::layer_screen(struct layer *l, struct wl_output *screen) {
logdebug("genivi::layer %s @ %p s %p", __func__, this->proxy.get(), screen);
void controller::layer_screen(struct layer *l, struct wl_output *screen) {
logdebug("genivi::layer %s @ %p s %p", __func__, this->proxy.get(), screen);
}
void controller::layer_destroyed(struct layer *l) {
}
void controller::layer_destroyed(struct layer *l) {
for (auto const &i : this->surfaces) {
auto const &r = i.second->dst_rect;
auto const &s = i.second->size;
for (auto const &i : this->surfaces) {
auto const &r = i.second->dst_rect;
auto const &s = i.second->size;
- printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h,
- r.x, r.y);
+ printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h, r.x,
+ r.y);
for (auto const &i : this->layers) {
auto const &r = i.second->dst_rect;
auto const &s = i.second->size;
for (auto const &i : this->layers) {
auto const &r = i.second->dst_rect;
auto const &s = i.second->size;
- printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h,
- r.x, r.y);
+ printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h, r.x,
+ r.y);
#include "util.hpp"
#include <functional>
#include "util.hpp"
#include <functional>
-#include <unordered_map>
+#include <unordered_map>
void done();
void scale(int32_t factor);
};
void done();
void scale(int32_t factor);
};
// _ __ __ _ _ __ ___ ___ ___ _ __ __ _ ___ ___
// | '_ \ / _` | '_ ` _ \ / _ \/ __| '_ \ / _` |/ __/ _ \
// _ __ __ _ _ __ ___ ___ ___ _ __ __ _ ___ ___
// | '_ \ / _` | '_ ` _ \ / _ \/ __| '_ \ / _` |/ __/ _ \
void surface_orientation(struct surface *s, int32_t orientation);
void surface_pixelformat(struct surface *s, int32_t pixelformat);
void surface_layer(struct surface *s, struct ivi_controller_layer *layer);
void surface_orientation(struct surface *s, int32_t orientation);
void surface_pixelformat(struct surface *s, int32_t pixelformat);
void surface_layer(struct surface *s, struct ivi_controller_layer *layer);
- void surface_stats(struct surface *s, uint32_t redraw_count, uint32_t frame_count,
- uint32_t update_count, uint32_t pid,
+ void surface_stats(struct surface *s, uint32_t redraw_count,
+ uint32_t frame_count, uint32_t update_count, uint32_t pid,
const char *process_name);
void surface_destroyed(struct surface *s);
void surface_content(struct surface *s, int32_t content_state);
const char *process_name);
void surface_destroyed(struct surface *s);
void surface_content(struct surface *s, int32_t content_state);
// layer
void layer_visibility(struct layer *l, int32_t visibility);
void layer_opacity(struct layer *l, float opacity);
// layer
void layer_visibility(struct layer *l, int32_t visibility);
void layer_opacity(struct layer *l, float opacity);
- void layer_source_rectangle(struct layer *l, int32_t x, int32_t y, int32_t width,
- int32_t height);
+ void layer_source_rectangle(struct layer *l, int32_t x, int32_t y,
+ int32_t width, int32_t height);
void layer_destination_rectangle(struct layer *l, int32_t x, int32_t y,
int32_t width, int32_t height);
void layer_configuration(struct layer *l, int32_t width, int32_t height);
void layer_destination_rectangle(struct layer *l, int32_t x, int32_t y,
int32_t width, int32_t height);
void layer_configuration(struct layer *l, int32_t width, int32_t height);
void layer_screen(struct layer *l, struct wl_output *screen);
void layer_destroyed(struct layer *l);
};
void layer_screen(struct layer *l, struct wl_output *screen);
void layer_destroyed(struct layer *l);
};
#endif // !WM_WAYLAND_HPP
#endif // !WM_WAYLAND_HPP