Code Review
/
staging
/
windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
wayland: add genivi::full_rect and operator== for genivi::rect
[staging/windowmanager.git]
/
src
/
wayland.hpp
diff --git
a/src/wayland.hpp
b/src/wayland.hpp
index
740a703
..
3560e2c
100644
(file)
--- a/
src/wayland.hpp
+++ b/
src/wayland.hpp
@@
-1,8
+1,8
@@
#ifndef WM_WAYLAND_HPP
#define WM_WAYLAND_HPP
#ifndef WM_WAYLAND_HPP
#define WM_WAYLAND_HPP
+#include "controller_hooks.hpp"
#include "ivi-controller-client-protocol.h"
#include "ivi-controller-client-protocol.h"
-
#include "util.hpp"
#include <functional>
#include "util.hpp"
#include <functional>
@@
-76,6
+76,11
@@
struct display {
void flush();
int get_fd() const;
int get_error();
void flush();
int get_fd() const;
int get_error();
+
+ // Lets just proxy this for the registry
+ inline void add_global_handler(char const *iface, registry::binder bind) {
+ this->r.add_global_handler(iface, bind);
+ }
};
// _ _
};
// _ _
@@
-120,10
+125,16
@@
struct size {
};
struct rect {
};
struct rect {
-
u
int32_t w, h;
+ int32_t w, h;
int32_t x, y;
};
int32_t x, y;
};
+static const constexpr rect full_rect = rect{-1, -1, 0, 0};
+
+inline bool operator == (struct rect a, struct rect b) {
+ return a.w == b.w && a.h == b.h && a.x == b.x && a.y == b.y;
+}
+
struct controller;
struct controller_child {
struct controller;
struct controller_child {
@@
-137,13
+148,13
@@
struct controller_child {
};
struct surface_properties {
};
struct surface_properties {
-
uint32_t id;
// let's just save an ID here too
-
struct rect dst_rect;
-
struct rect src_rect;
-
struct size size;
-
int32_t orientation;
-
int32_t visibility;
-
float opacity;
+
uint32_t id;
// let's just save an ID here too
+ struct rect dst_rect;
+ struct rect src_rect;
+ struct size size;
+ int32_t orientation;
+ int32_t visibility;
+ float opacity;
};
// __
};
// __
@@
-245,19
+256,21
@@
struct controller : public wayland_proxy<struct ivi_controller> {
proxy_to_id_map_type layer_proxy_to_id;
proxy_to_id_map_type screen_proxy_to_id;
proxy_to_id_map_type layer_proxy_to_id;
proxy_to_id_map_type screen_proxy_to_id;
+ props_map sprops;
+ props_map lprops;
+
surface_map_type surfaces;
layer_map_type layers;
screen_map_type screens;
surface_map_type surfaces;
layer_map_type layers;
screen_map_type screens;
- props_map sprops;
- props_map lprops;
-
typedef std::pair<char const *, std::function<void(struct controller *)>>
name_task_pair;
std::vector<name_task_pair> pending;
size output_size;
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 ivi_controller_surface *p, uint32_t id);
void remove_proxy_to_id_mapping(struct ivi_controller_surface *p);
void add_proxy_to_id_mapping(struct ivi_controller_layer *p, uint32_t id);
void add_proxy_to_id_mapping(struct ivi_controller_surface *p, uint32_t id);
void remove_proxy_to_id_mapping(struct ivi_controller_surface *p);
void add_proxy_to_id_mapping(struct ivi_controller_layer *p, uint32_t id);