mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-06 13:29:45 -05:00
Merge pull request #206 from emersion/client-cursor
Client provided cursors
This commit is contained in:
commit
c39bfe7f84
8 changed files with 245 additions and 31 deletions
|
|
@ -79,6 +79,7 @@ struct roots_input {
|
|||
struct wlr_xcursor_theme *theme;
|
||||
struct wlr_xcursor *xcursor;
|
||||
struct wlr_seat *wl_seat;
|
||||
struct roots_view *client_cursor_view;
|
||||
|
||||
enum roots_cursor_mode mode;
|
||||
struct roots_view *active_view, *last_active_view;
|
||||
|
|
@ -107,6 +108,8 @@ struct roots_input {
|
|||
struct wl_listener cursor_tool_tip;
|
||||
|
||||
struct wl_listener pointer_grab_end;
|
||||
|
||||
struct wl_listener request_set_cursor;
|
||||
};
|
||||
|
||||
struct roots_input *input_create(struct roots_server *server,
|
||||
|
|
|
|||
|
|
@ -49,23 +49,32 @@ struct wlr_output {
|
|||
int32_t hotspot_x, hotspot_y;
|
||||
struct wlr_renderer *renderer;
|
||||
struct wlr_texture *texture;
|
||||
|
||||
// only when using a cursor surface
|
||||
struct wlr_surface *surface;
|
||||
struct wl_listener surface_commit;
|
||||
struct wl_listener surface_destroy;
|
||||
} cursor;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct wlr_surface;
|
||||
|
||||
void wlr_output_enable(struct wlr_output *output, bool enable);
|
||||
bool wlr_output_set_mode(struct wlr_output *output,
|
||||
struct wlr_output_mode *mode);
|
||||
struct wlr_output_mode *mode);
|
||||
void wlr_output_transform(struct wlr_output *output,
|
||||
enum wl_output_transform transform);
|
||||
enum wl_output_transform transform);
|
||||
bool wlr_output_set_cursor(struct wlr_output *output,
|
||||
const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height,
|
||||
int32_t hotspot_x, int32_t hotspot_y);
|
||||
const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height,
|
||||
int32_t hotspot_x, int32_t hotspot_y);
|
||||
void wlr_output_set_cursor_surface(struct wlr_output *output,
|
||||
struct wlr_surface *surface, int32_t hotspot_x, int32_t hotspot_y);
|
||||
bool wlr_output_move_cursor(struct wlr_output *output, int x, int y);
|
||||
void wlr_output_destroy(struct wlr_output *output);
|
||||
void wlr_output_effective_resolution(struct wlr_output *output,
|
||||
int *width, int *height);
|
||||
int *width, int *height);
|
||||
void wlr_output_make_current(struct wlr_output *output);
|
||||
void wlr_output_swap_buffers(struct wlr_output *output);
|
||||
void wlr_output_set_gamma(struct wlr_output *output,
|
||||
|
|
|
|||
|
|
@ -125,11 +125,20 @@ struct wlr_seat {
|
|||
|
||||
struct wl_signal keyboard_grab_begin;
|
||||
struct wl_signal keyboard_grab_end;
|
||||
|
||||
struct wl_signal request_set_cursor;
|
||||
} events;
|
||||
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct wlr_seat_pointer_request_set_cursor_event {
|
||||
struct wl_client *client;
|
||||
struct wlr_seat_handle *seat_handle;
|
||||
struct wlr_surface *surface;
|
||||
int32_t hotspot_x, hotspot_y;
|
||||
};
|
||||
|
||||
/**
|
||||
* Allocates a new wlr_seat and adds a wl_seat global to the display.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue