diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/backend/drm/properties.h | 4 | ||||
-rw-r--r-- | include/types/wlr_data_device.h | 33 | ||||
-rw-r--r-- | include/types/wlr_seat.h | 23 | ||||
-rw-r--r-- | include/wlr/backend/session.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_cursor.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_data_device.h | 8 | ||||
-rw-r--r-- | include/wlr/types/wlr_idle.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_linux_dmabuf.h | 12 | ||||
-rw-r--r-- | include/wlr/types/wlr_seat.h | 3 | ||||
-rw-r--r-- | include/wlr/types/wlr_surface.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_wl_shell.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_xdg_shell.h | 4 | ||||
-rw-r--r-- | include/wlr/types/wlr_xdg_shell_v6.h | 4 | ||||
-rw-r--r-- | include/wlr/xwayland.h | 2 |
14 files changed, 85 insertions, 18 deletions
diff --git a/include/backend/drm/properties.h b/include/backend/drm/properties.h index 1b3b2241..5b17e77e 100644 --- a/include/backend/drm/properties.h +++ b/include/backend/drm/properties.h @@ -24,7 +24,7 @@ union wlr_drm_connector_props { union wlr_drm_crtc_props { struct { - // Neither of these are guranteed to exist + // Neither of these are guaranteed to exist uint32_t rotation; uint32_t scaling_mode; @@ -41,7 +41,7 @@ union wlr_drm_crtc_props { union wlr_drm_plane_props { struct { uint32_t type; - uint32_t rotation; // Not guranteed to exist + uint32_t rotation; // Not guaranteed to exist // atomic-modesetting only diff --git a/include/types/wlr_data_device.h b/include/types/wlr_data_device.h new file mode 100644 index 00000000..ee423f80 --- /dev/null +++ b/include/types/wlr_data_device.h @@ -0,0 +1,33 @@ +#ifndef TYPES_WLR_DATA_DEVICE_H +#define TYPES_WLR_DATA_DEVICE_H + +#include <wayland-server.h> + +#define DATA_DEVICE_ALL_ACTIONS (WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY | \ + WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE | \ + WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK) + +struct wlr_client_data_source { + struct wlr_data_source source; + struct wlr_data_source_impl impl; + struct wl_resource *resource; +}; + +struct wlr_data_offer *data_offer_create(struct wl_client *client, + struct wlr_data_source *source, uint32_t version); +void data_offer_update_action(struct wlr_data_offer *offer); + +struct wlr_client_data_source *client_data_source_create( + struct wl_client *client, uint32_t version, uint32_t id, + struct wl_list *resource_list); +struct wlr_client_data_source *client_data_source_from_resource( + struct wl_resource *resource); +struct wlr_data_offer *data_source_send_offer(struct wlr_data_source *source, + struct wlr_seat_client *target); +void data_source_notify_finish(struct wlr_data_source *source); + +bool seat_client_start_drag(struct wlr_seat_client *client, + struct wlr_data_source *source, struct wlr_surface *icon_surface, + struct wlr_surface *origin, uint32_t serial); + +#endif diff --git a/include/types/wlr_seat.h b/include/types/wlr_seat.h new file mode 100644 index 00000000..15f1dc38 --- /dev/null +++ b/include/types/wlr_seat.h @@ -0,0 +1,23 @@ +#ifndef TYPES_WLR_SEAT_H +#define TYPES_WLR_SEAT_H + +#include <wayland-server.h> +#include <wlr/types/wlr_seat.h> + +const struct wlr_pointer_grab_interface default_pointer_grab_impl; +const struct wlr_keyboard_grab_interface default_keyboard_grab_impl; +const struct wlr_touch_grab_interface default_touch_grab_impl; + +void seat_client_create_pointer(struct wlr_seat_client *seat_client, + uint32_t version, uint32_t id); +void seat_client_destroy_pointer(struct wl_resource *resource); + +void seat_client_create_keyboard(struct wlr_seat_client *seat_client, + uint32_t version, uint32_t id); +void seat_client_destroy_keyboard(struct wl_resource *resource); + +void seat_client_create_touch(struct wlr_seat_client *seat_client, + uint32_t version, uint32_t id); +void seat_client_destroy_touch(struct wl_resource *resource); + +#endif diff --git a/include/wlr/backend/session.h b/include/wlr/backend/session.h index 7ff9691f..4d04b363 100644 --- a/include/wlr/backend/session.h +++ b/include/wlr/backend/session.h @@ -43,7 +43,7 @@ struct wlr_session { * of the terminal (Xorg, another Wayland compositor, etc.). * * If logind support is not enabled, you must have CAP_SYS_ADMIN or be root. - * It is safe to drop priviledges after this is called. + * It is safe to drop privileges after this is called. * * Returns NULL on error. */ diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h index 1a9e0d38..998c6f0d 100644 --- a/include/wlr/types/wlr_cursor.h +++ b/include/wlr/types/wlr_cursor.h @@ -117,7 +117,7 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels, /** * Set the cursor surface. The surface can be committed to update the cursor - * image. The surface position is substracted from the hotspot. A NULL surface + * image. The surface position is subtracted from the hotspot. A NULL surface * commit hides the cursor. */ void wlr_cursor_set_surface(struct wlr_cursor *cur, struct wlr_surface *surface, diff --git a/include/wlr/types/wlr_data_device.h b/include/wlr/types/wlr_data_device.h index 6fb41c29..80d4bc8b 100644 --- a/include/wlr/types/wlr_data_device.h +++ b/include/wlr/types/wlr_data_device.h @@ -15,8 +15,16 @@ wlr_touch_grab_interface wlr_data_device_touch_drag_interface; struct wlr_data_device_manager { struct wl_global *global; + struct wl_list wl_resources; + struct wl_list data_sources; struct wl_listener display_destroy; + + struct { + struct wl_signal destroy; + } events; + + void *data; }; struct wlr_data_offer { diff --git a/include/wlr/types/wlr_idle.h b/include/wlr/types/wlr_idle.h index 1744f07c..45f350be 100644 --- a/include/wlr/types/wlr_idle.h +++ b/include/wlr/types/wlr_idle.h @@ -7,7 +7,7 @@ /** * Idle protocol is used to create timers which will notify the client when the * compositor does not receive any input for a given time(in milliseconds). Also - * the client will be notify when the timer receve an activity notify and already + * the client will be notified when the timer receives an activity notify and already * was in idle state. Besides this, the client is able to simulate user activity * which will reset the timers and at any time can destroy the timer. */ diff --git a/include/wlr/types/wlr_linux_dmabuf.h b/include/wlr/types/wlr_linux_dmabuf.h index 3fe8e1fc..531e68ab 100644 --- a/include/wlr/types/wlr_linux_dmabuf.h +++ b/include/wlr/types/wlr_linux_dmabuf.h @@ -25,8 +25,7 @@ struct wlr_dmabuf_buffer_attribs { uint64_t modifier[WLR_LINUX_DMABUF_MAX_PLANES]; int fd[WLR_LINUX_DMABUF_MAX_PLANES]; /* set via params_create */ - int32_t width; - int32_t height; + int32_t width, height; uint32_t format; uint32_t flags; }; @@ -61,8 +60,15 @@ struct wlr_dmabuf_buffer *wlr_dmabuf_buffer_from_params_resource( /* the protocol interface */ struct wlr_linux_dmabuf { struct wl_global *wl_global; - struct wl_listener display_destroy; struct wlr_renderer *renderer; + struct wl_list wl_resources; + + struct { + struct wl_signal destroy; + } events; + + struct wl_listener display_destroy; + struct wl_listener renderer_destroy; }; /** diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index ff907f97..e1fa27bb 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -42,7 +42,6 @@ struct wlr_touch_point { struct wl_listener surface_destroy; struct wl_listener focus_surface_destroy; - struct wl_listener resource_destroy; struct { struct wl_signal destroy; @@ -138,7 +137,6 @@ struct wlr_seat_pointer_state { uint32_t grab_time; struct wl_listener surface_destroy; - struct wl_listener resource_destroy; }; // TODO: May be useful to be able to simulate keyboard input events @@ -154,7 +152,6 @@ struct wlr_seat_keyboard_state { struct wl_listener keyboard_repeat_info; struct wl_listener surface_destroy; - struct wl_listener resource_destroy; struct wlr_seat_keyboard_grab *grab; struct wlr_seat_keyboard_grab *default_grab; diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index c6eb3c7d..d1127c86 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -171,7 +171,7 @@ struct wlr_surface *wlr_surface_from_resource(struct wl_resource *resource); /** * Call `iterator` on each surface in the surface tree, with the surface's - * positon relative to the root surface. The function is called from root to + * position relative to the root surface. The function is called from root to * leaves (in rendering order). */ void wlr_surface_for_each_surface(struct wlr_surface *surface, diff --git a/include/wlr/types/wlr_wl_shell.h b/include/wlr/types/wlr_wl_shell.h index 1b38b2e3..b60a0ddd 100644 --- a/include/wlr/types/wlr_wl_shell.h +++ b/include/wlr/types/wlr_wl_shell.h @@ -157,7 +157,7 @@ struct wlr_wl_surface *wlr_wl_shell_surface_from_wlr_surface( /** * Call `iterator` on each surface in the shell surface tree, with the surface's - * positon relative to the root xdg-surface. The function is called from root to + * position relative to the root xdg-surface. The function is called from root to * leaves (in rendering order). */ void wlr_wl_shell_surface_for_each_surface(struct wlr_wl_shell_surface *surface, diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index ead4613a..22008563 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -128,7 +128,7 @@ struct wlr_xdg_surface_configure { * * When a surface has a role and is ready to be displayed, the `map` event is * emitted. When a surface should no longer be displayed, the `unmap` event is - * emitted. The `unmap` event is guaranted to be emitted before the `destroy` + * emitted. The `unmap` event is guaranteed to be emitted before the `destroy` * event if the view is destroyed when mapped. */ struct wlr_xdg_surface { @@ -314,7 +314,7 @@ struct wlr_xdg_surface *wlr_xdg_surface_from_wlr_surface( /** * Call `iterator` on each surface in the xdg-surface tree, with the surface's - * positon relative to the root xdg-surface. The function is called from root to + * position relative to the root xdg-surface. The function is called from root to * leaves (in rendering order). */ void wlr_xdg_surface_for_each_surface(struct wlr_xdg_surface *surface, diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h index a315c4d9..3d35520b 100644 --- a/include/wlr/types/wlr_xdg_shell_v6.h +++ b/include/wlr/types/wlr_xdg_shell_v6.h @@ -97,7 +97,7 @@ struct wlr_xdg_toplevel_v6_state { * * When a surface has a role and is ready to be displayed, the `map` event is * emitted. When a surface should no longer be displayed, the `unmap` event is - * emitted. The `unmap` event is guaranted to be emitted before the `destroy` + * emitted. The `unmap` event is guaranteed to be emitted before the `destroy` * event if the view is destroyed when mapped. */ struct wlr_xdg_toplevel_v6 { @@ -306,7 +306,7 @@ struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6_from_wlr_surface( /** * Call `iterator` on each surface in the xdg-surface tree, with the surface's - * positon relative to the root xdg-surface. The function is called from root to + * position relative to the root xdg-surface. The function is called from root to * leaves (in rendering order). */ void wlr_xdg_surface_v6_for_each_surface(struct wlr_xdg_surface_v6 *surface, diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h index 11aedc37..b2c23667 100644 --- a/include/wlr/xwayland.h +++ b/include/wlr/xwayland.h @@ -81,7 +81,7 @@ struct wlr_xwayland_surface_size_hints { * * When a surface is ready to be displayed, the `map` event is emitted. When a * surface should no longer be displayed, the `unmap` event is emitted. The - * `unmap` event is guaranted to be emitted before the `destroy` event if the + * `unmap` event is guaranteed to be emitted before the `destroy` event if the * view is destroyed when mapped. */ struct wlr_xwayland_surface { |