diff options
Diffstat (limited to 'include/rootston')
-rw-r--r-- | include/rootston/config.h | 7 | ||||
-rw-r--r-- | include/rootston/cursor.h | 4 | ||||
-rw-r--r-- | include/rootston/desktop.h | 24 | ||||
-rw-r--r-- | include/rootston/input.h | 14 | ||||
-rw-r--r-- | include/rootston/keyboard.h | 5 | ||||
-rw-r--r-- | include/rootston/output.h | 10 | ||||
-rw-r--r-- | include/rootston/seat.h | 8 | ||||
-rw-r--r-- | include/rootston/server.h | 5 | ||||
-rw-r--r-- | include/rootston/view.h | 4 | ||||
-rw-r--r-- | include/rootston/xcursor.h | 4 |
10 files changed, 46 insertions, 39 deletions
diff --git a/include/rootston/config.h b/include/rootston/config.h index 05f23b75..9926d9c2 100644 --- a/include/rootston/config.h +++ b/include/rootston/config.h @@ -1,7 +1,8 @@ -#ifndef _ROOTSTON_CONFIG_H -#define _ROOTSTON_CONFIG_H -#include <wlr/types/wlr_output_layout.h> +#ifndef ROOTSTON_CONFIG_H +#define ROOTSTON_CONFIG_H + #include <wlr/types/wlr_input_device.h> +#include <wlr/types/wlr_output_layout.h> #define ROOTS_CONFIG_DEFAULT_SEAT_NAME "seat0" diff --git a/include/rootston/cursor.h b/include/rootston/cursor.h index 90d54c12..a1a466c2 100644 --- a/include/rootston/cursor.h +++ b/include/rootston/cursor.h @@ -1,5 +1,5 @@ -#ifndef _ROOTSTON_CURSOR_H -#define _ROOTSTON_CURSOR_H +#ifndef ROOTSTON_CURSOR_H +#define ROOTSTON_CURSOR_H #include "rootston/seat.h" diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index 1232121a..6572b242 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -1,22 +1,23 @@ -#ifndef _ROOTSTON_DESKTOP_H -#define _ROOTSTON_DESKTOP_H +#ifndef ROOTSTON_DESKTOP_H +#define ROOTSTON_DESKTOP_H + #include <time.h> #include <wayland-server.h> #include <wlr/config.h> -#include <wlr/types/wlr_output.h> -#include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_compositor.h> -#include <wlr/types/wlr_wl_shell.h> -#include <wlr/types/wlr_xdg_shell_v6.h> -#include <wlr/types/wlr_xcursor_manager.h> #include <wlr/types/wlr_gamma_control.h> +#include <wlr/types/wlr_idle.h> +#include <wlr/types/wlr_list.h> +#include <wlr/types/wlr_output_layout.h> +#include <wlr/types/wlr_output.h> #include <wlr/types/wlr_primary_selection.h> #include <wlr/types/wlr_screenshooter.h> -#include <wlr/types/wlr_list.h> -#include <wlr/types/wlr_idle.h> -#include "rootston/view.h" +#include <wlr/types/wlr_wl_shell.h> +#include <wlr/types/wlr_xcursor_manager.h> +#include <wlr/types/wlr_xdg_shell_v6.h> #include "rootston/config.h" #include "rootston/output.h" +#include "rootston/view.h" struct roots_desktop { struct wl_list views; // roots_view::link @@ -39,8 +40,7 @@ struct roots_desktop { struct wlr_primary_selection_device_manager *primary_selection_device_manager; struct wlr_idle *idle; - struct wl_listener output_add; - struct wl_listener output_remove; + struct wl_listener new_output; struct wl_listener layout_change; struct wl_listener xdg_shell_v6_surface; struct wl_listener wl_shell_surface; diff --git a/include/rootston/input.h b/include/rootston/input.h index 726dda24..4395a0f7 100644 --- a/include/rootston/input.h +++ b/include/rootston/input.h @@ -1,20 +1,20 @@ -#ifndef _ROOTSTON_INPUT_H -#define _ROOTSTON_INPUT_H +#ifndef ROOTSTON_INPUT_H +#define ROOTSTON_INPUT_H + #include <wayland-server.h> -#include <wlr/types/wlr_input_device.h> #include <wlr/types/wlr_cursor.h> +#include <wlr/types/wlr_input_device.h> #include <wlr/types/wlr_seat.h> -#include "rootston/cursor.h" #include "rootston/config.h" -#include "rootston/view.h" +#include "rootston/cursor.h" #include "rootston/server.h" +#include "rootston/view.h" struct roots_input { struct roots_config *config; struct roots_server *server; - struct wl_listener input_add; - struct wl_listener input_remove; + struct wl_listener new_input; struct wl_list seats; }; diff --git a/include/rootston/keyboard.h b/include/rootston/keyboard.h index 39650d7c..0140389a 100644 --- a/include/rootston/keyboard.h +++ b/include/rootston/keyboard.h @@ -1,5 +1,5 @@ -#ifndef _ROOTSTON_KEYBOARD_H -#define _ROOTSTON_KEYBOARD_H +#ifndef ROOTSTON_KEYBOARD_H +#define ROOTSTON_KEYBOARD_H #include <xkbcommon/xkbcommon.h> #include "rootston/input.h" @@ -13,6 +13,7 @@ struct roots_keyboard { struct roots_keyboard_config *config; struct wl_list link; + struct wl_listener device_destroy; struct wl_listener keyboard_key; struct wl_listener keyboard_modifiers; diff --git a/include/rootston/output.h b/include/rootston/output.h index 7f42904f..9682e4f5 100644 --- a/include/rootston/output.h +++ b/include/rootston/output.h @@ -1,8 +1,8 @@ -#ifndef _ROOTSTON_OUTPUT_H -#define _ROOTSTON_OUTPUT_H +#ifndef ROOTSTON_OUTPUT_H +#define ROOTSTON_OUTPUT_H -#include <time.h> #include <pixman.h> +#include <time.h> #include <wayland-server.h> #include <wlr/types/wlr_output_damage.h> @@ -18,11 +18,11 @@ struct roots_output { struct timespec last_frame; struct wlr_output_damage *damage; + struct wl_listener destroy; struct wl_listener frame; }; -void output_add_notify(struct wl_listener *listener, void *data); -void output_remove_notify(struct wl_listener *listener, void *data); +void handle_new_output(struct wl_listener *listener, void *data); struct roots_view; struct roots_drag_icon; diff --git a/include/rootston/seat.h b/include/rootston/seat.h index 0047522c..cc0293b5 100644 --- a/include/rootston/seat.h +++ b/include/rootston/seat.h @@ -1,5 +1,6 @@ -#ifndef _ROOTSTON_SEAT_H -#define _ROOTSTON_SEAT_H +#ifndef ROOTSTON_SEAT_H +#define ROOTSTON_SEAT_H + #include <wayland-server.h> #include "rootston/input.h" #include "rootston/keyboard.h" @@ -56,18 +57,21 @@ struct roots_drag_icon { struct roots_pointer { struct roots_seat *seat; struct wlr_input_device *device; + struct wl_listener device_destroy; struct wl_list link; }; struct roots_touch { struct roots_seat *seat; struct wlr_input_device *device; + struct wl_listener device_destroy; struct wl_list link; }; struct roots_tablet_tool { struct roots_seat *seat; struct wlr_input_device *device; + struct wl_listener device_destroy; struct wl_listener axis; struct wl_listener proximity; struct wl_listener tip; diff --git a/include/rootston/server.h b/include/rootston/server.h index 0c26ea92..5f35dd90 100644 --- a/include/rootston/server.h +++ b/include/rootston/server.h @@ -1,11 +1,12 @@ #ifndef _ROOTSTON_SERVER_H #define _ROOTSTON_SERVER_H + #include <wayland-server.h> -#include <wlr/config.h> #include <wlr/backend.h> #include <wlr/backend/session.h> -#include <wlr/types/wlr_data_device.h> +#include <wlr/config.h> #include <wlr/render.h> +#include <wlr/types/wlr_data_device.h> #ifdef WLR_HAS_XWAYLAND #include <wlr/xwayland.h> #endif diff --git a/include/rootston/view.h b/include/rootston/view.h index f6968c7a..b61ac330 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -1,5 +1,5 @@ -#ifndef _ROOTSTON_VIEW_H -#define _ROOTSTON_VIEW_H +#ifndef ROOTSTON_VIEW_H +#define ROOTSTON_VIEW_H #include <stdbool.h> #include <wlr/config.h> diff --git a/include/rootston/xcursor.h b/include/rootston/xcursor.h index a7d2b960..f78489a4 100644 --- a/include/rootston/xcursor.h +++ b/include/rootston/xcursor.h @@ -1,5 +1,5 @@ -#ifndef _ROOTSTON_XCURSOR_H -#define _ROOTSTON_XCURSOR_H +#ifndef ROOTSTON_XCURSOR_H +#define ROOTSTON_XCURSOR_H #include <stdint.h> |