aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/rootston/input.h11
-rw-r--r--include/rootston/view.h4
-rw-r--r--include/wlr/xwayland.h3
3 files changed, 17 insertions, 1 deletions
diff --git a/include/rootston/input.h b/include/rootston/input.h
index aeab9c0d..1fae07d7 100644
--- a/include/rootston/input.h
+++ b/include/rootston/input.h
@@ -53,6 +53,13 @@ enum roots_cursor_mode {
ROOTS_CURSOR_ROTATE = 3,
};
+enum roots_cursor_resize_edge {
+ ROOTS_CURSOR_RESIZE_EDGE_TOP = 1,
+ ROOTS_CURSOR_RESIZE_EDGE_BOTTOM = 2,
+ ROOTS_CURSOR_RESIZE_EDGE_LEFT = 4,
+ ROOTS_CURSOR_RESIZE_EDGE_RIGHT = 8,
+};
+
struct roots_input_event {
uint32_t serial;
struct wlr_cursor *cursor;
@@ -71,6 +78,8 @@ struct roots_input {
enum roots_cursor_mode mode;
struct roots_view *active_view;
int offs_x, offs_y;
+ int view_x, view_y, view_width, view_height;
+ uint32_t resize_edges;
// Ring buffer of input events that could trigger move/resize/rotate
int input_events_idx;
@@ -110,5 +119,7 @@ const struct roots_input_event *get_input_event(struct roots_input *input,
uint32_t serial);
void view_begin_move(struct roots_input *input, struct wlr_cursor *cursor,
struct roots_view *view);
+void view_begin_resize(struct roots_input *input, struct wlr_cursor *cursor,
+ struct roots_view *view, uint32_t edges);
#endif
diff --git a/include/rootston/view.h b/include/rootston/view.h
index 2bd71104..39ff80db 100644
--- a/include/rootston/view.h
+++ b/include/rootston/view.h
@@ -61,11 +61,15 @@ struct roots_view {
// configure event from the xdg_shell
// If not then this should follow the typical type/impl pattern we use
// elsewhere
+ void (*get_size)(struct roots_view *view, struct wlr_box *box);
void (*get_input_bounds)(struct roots_view *view, struct wlr_box *box);
void (*activate)(struct roots_view *view, bool active);
+ void (*resize)(struct roots_view *view, uint32_t width, uint32_t height);
};
+void view_get_size(struct roots_view *view, struct wlr_box *box);
void view_get_input_bounds(struct roots_view *view, struct wlr_box *box);
void view_activate(struct roots_view *view, bool active);
+void view_resize(struct roots_view *view, uint32_t width, uint32_t height);
#endif
diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h
index 43133567..3525ff3b 100644
--- a/include/wlr/xwayland.h
+++ b/include/wlr/xwayland.h
@@ -81,7 +81,8 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
void wlr_xwayland_surface_activate(struct wlr_xwayland *wlr_xwayland,
struct wlr_xwayland_surface *surface);
void wlr_xwayland_surface_configure(struct wlr_xwayland *wlr_xwayland,
- struct wlr_xwayland_surface *surface);
+ struct wlr_xwayland_surface *surface, int16_t x, int16_t y,
+ uint16_t width, uint16_t height);
void wlr_xwayland_surface_close(struct wlr_xwayland *wlr_xwayland,
struct wlr_xwayland_surface *surface);