diff options
Diffstat (limited to 'include/rootston')
-rw-r--r-- | include/rootston/desktop.h | 2 | ||||
-rw-r--r-- | include/rootston/input.h | 7 | ||||
-rw-r--r-- | include/rootston/view.h | 15 |
3 files changed, 21 insertions, 3 deletions
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index aa74ad3e..1225bdcd 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -8,6 +8,7 @@ #include <wlr/types/wlr_wl_shell.h> #include <wlr/types/wlr_xdg_shell_v6.h> #include <wlr/types/wlr_gamma_control.h> +#include <wlr/types/wlr_screenshooter.h> #include <wlr/util/list.h> #include "rootston/view.h" #include "rootston/config.h" @@ -35,6 +36,7 @@ struct roots_desktop { struct wlr_wl_shell *wl_shell; struct wlr_xdg_shell_v6 *xdg_shell_v6; struct wlr_gamma_control_manager *gamma_control_manager; + struct wlr_screenshooter *screenshooter; struct wl_listener output_add; struct wl_listener output_remove; diff --git a/include/rootston/input.h b/include/rootston/input.h index ae3e3b80..9caf66c0 100644 --- a/include/rootston/input.h +++ b/include/rootston/input.h @@ -81,7 +81,7 @@ struct roots_input { struct wlr_seat *wl_seat; enum roots_cursor_mode mode; - struct roots_view *active_view; + struct roots_view *active_view, *last_active_view; int offs_x, offs_y; int view_x, view_y, view_width, view_height; float view_rotation; @@ -105,6 +105,8 @@ struct roots_input { struct wl_listener cursor_axis; struct wl_listener cursor_tool_axis; struct wl_listener cursor_tool_tip; + + struct wl_listener pointer_grab_end; }; struct roots_input *input_create(struct roots_server *server, @@ -130,4 +132,7 @@ void view_begin_move(struct roots_input *input, struct wlr_cursor *cursor, void view_begin_resize(struct roots_input *input, struct wlr_cursor *cursor, struct roots_view *view, uint32_t edges); +void set_view_focus(struct roots_input *input, struct roots_desktop *desktop, + struct roots_view *view); + #endif diff --git a/include/rootston/view.h b/include/rootston/view.h index 2a90670e..af087182 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -1,5 +1,6 @@ #ifndef _ROOTSTON_VIEW_H #define _ROOTSTON_VIEW_H + #include <stdbool.h> #include <wlr/types/wlr_box.h> #include <wlr/types/wlr_surface.h> @@ -14,17 +15,25 @@ struct roots_wl_shell_surface { struct wl_listener request_resize; struct wl_listener request_set_fullscreen; struct wl_listener request_set_maximized; + + struct wl_listener surface_commit; + + bool initialized; }; struct roots_xdg_surface_v6 { struct roots_view *view; + // TODO: Maybe destroy listener should go in roots_view + struct wl_listener commit; struct wl_listener destroy; struct wl_listener ping_timeout; struct wl_listener request_minimize; struct wl_listener request_move; struct wl_listener request_resize; struct wl_listener request_show_window_menu; + + bool initialized; }; struct roots_xwayland_surface { @@ -66,14 +75,16 @@ struct roots_view { // 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 (*close)(struct roots_view *view); }; 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); +void view_close(struct roots_view *view); +bool view_center(struct roots_view *view); +bool view_initialize(struct roots_view *view); #endif |