diff options
Diffstat (limited to 'include/rootston')
-rw-r--r-- | include/rootston/cursor.h | 2 | ||||
-rw-r--r-- | include/rootston/seat.h | 8 | ||||
-rw-r--r-- | include/rootston/view.h | 17 |
3 files changed, 27 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 4dec582e..fa7d38df 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; @@ -99,6 +104,9 @@ 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); + void roots_drag_icon_update_position(struct roots_drag_icon *icon); void roots_drag_icon_damage_whole(struct roots_drag_icon *icon); 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); |