diff options
author | emersion <contact@emersion.fr> | 2018-01-24 14:48:01 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-01-24 14:48:01 +0100 |
commit | 6281deb90fa6a97835d5045a8be610556ab588fe (patch) | |
tree | b29d32c44a9a035fbf70e4cdb3dc964a4d3f1507 /include | |
parent | 4d282c859099321b1e799a2ab344480f186359ef (diff) | |
parent | 7a2e9a17bae919088f4265961ad8d00fece7b870 (diff) |
Merge remote-tracking branch 'upstream/master' into output-damage
Diffstat (limited to 'include')
-rw-r--r-- | include/rootston/cursor.h | 2 | ||||
-rw-r--r-- | include/rootston/seat.h | 8 | ||||
-rw-r--r-- | include/rootston/view.h | 17 | ||||
-rw-r--r-- | include/wlr/render/matrix.h | 4 | ||||
-rw-r--r-- | include/wlr/types/wlr_output.h | 2 |
5 files changed, 33 insertions, 0 deletions
diff --git a/include/rootston/cursor.h b/include/rootston/cursor.h index 19ac4034..90d54c12 100644 --- a/include/rootston/cursor.h +++ b/include/rootston/cursor.h @@ -27,6 +27,8 @@ struct roots_cursor { float view_rotation; uint32_t resize_edges; + struct roots_seat_view *pointer_view; + struct wl_listener motion; struct wl_listener motion_absolute; struct wl_listener button; diff --git a/include/rootston/seat.h b/include/rootston/seat.h index c71f7de0..f1061226 100644 --- a/include/rootston/seat.h +++ b/include/rootston/seat.h @@ -31,6 +31,11 @@ struct roots_seat { struct roots_seat_view { struct roots_seat *seat; struct roots_view *view; + + bool has_button_grab; + double grab_sx; + double grab_sy; + struct wl_list link; // roots_seat::views struct wl_listener view_destroy; @@ -97,4 +102,7 @@ void roots_seat_begin_resize(struct roots_seat *seat, struct roots_view *view, void roots_seat_begin_rotate(struct roots_seat *seat, struct roots_view *view); +struct roots_seat_view *roots_seat_view_from_view( struct roots_seat *seat, + struct roots_view *view); + #endif diff --git a/include/rootston/view.h b/include/rootston/view.h index 99e47deb..35660d64 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -64,6 +64,10 @@ struct roots_view { double x, y; float rotation; + bool decorated; + int border_width; + int titlebar_height; + bool maximized; struct roots_output *fullscreen_output; struct { @@ -165,6 +169,19 @@ bool view_center(struct roots_view *view); void view_setup(struct roots_view *view); void view_teardown(struct roots_view *view); +void view_get_deco_box(const struct roots_view *view, struct wlr_box *box); + +enum roots_deco_part { + ROOTS_DECO_PART_NONE = 0, + ROOTS_DECO_PART_TOP_BORDER = (1 << 0), + ROOTS_DECO_PART_BOTTOM_BORDER = (1 << 1), + ROOTS_DECO_PART_LEFT_BORDER = (1 << 2), + ROOTS_DECO_PART_RIGHT_BORDER = (1 << 3), + ROOTS_DECO_PART_TITLEBAR = (1 << 4), +}; + +enum roots_deco_part view_get_deco_part(struct roots_view *view, double sx, double sy); + void view_child_init(struct roots_view_child *child, struct roots_view *view, struct wlr_surface *wlr_surface); void view_child_finish(struct roots_view_child *child); diff --git a/include/wlr/render/matrix.h b/include/wlr/render/matrix.h index 0b35aad3..a333bf0f 100644 --- a/include/wlr/render/matrix.h +++ b/include/wlr/render/matrix.h @@ -2,6 +2,7 @@ #define WLR_RENDER_MATRIX_H #include <stdint.h> +#include <wlr/types/wlr_box.h> void wlr_matrix_identity(float (*output)[16]); void wlr_matrix_translate(float (*output)[16], float x, float y, float z); @@ -14,5 +15,8 @@ void wlr_matrix_transform(float mat[static 16], enum wl_output_transform transform); void wlr_matrix_texture(float mat[static 16], int32_t width, int32_t height, enum wl_output_transform transform); +void wlr_matrix_project_box(float (*mat)[16], struct wlr_box *box, + enum wl_output_transform transform, float rotation, float + (*projection)[16]); #endif diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 91429123..823c3b5e 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -93,6 +93,8 @@ struct wlr_output { struct wlr_surface; void wlr_output_enable(struct wlr_output *output, bool enable); +void wlr_output_create_global(struct wlr_output *output); +void wlr_output_destroy_global(struct wlr_output *output); bool wlr_output_set_mode(struct wlr_output *output, struct wlr_output_mode *mode); bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width, |