rename seat handle to seat client

This commit is contained in:
Tony Crisci 2017-10-30 08:37:54 -04:00
parent 57efc3417f
commit fddef4d58e
7 changed files with 245 additions and 235 deletions

View file

@ -28,7 +28,7 @@ struct wlr_data_offer {
struct wlr_data_source {
struct wl_resource *resource;
struct wlr_data_offer *offer;
struct wlr_seat_handle *seat;
struct wlr_seat_client *seat_client;
struct wl_array mime_types;
bool accepted;
@ -54,8 +54,8 @@ struct wlr_drag {
struct wlr_seat_pointer_grab pointer_grab;
struct wlr_seat_keyboard_grab keyboard_grab;
struct wlr_seat_handle *handle;
struct wlr_seat_handle *focus_handle;
struct wlr_seat_client *seat_client;
struct wlr_seat_client *focus_client;
struct wlr_surface *icon;
struct wlr_surface *focus;
@ -63,7 +63,7 @@ struct wlr_drag {
struct wl_listener icon_destroy;
struct wl_listener source_destroy;
struct wl_listener handle_unbound;
struct wl_listener seat_client_unbound;
};
/**
@ -73,15 +73,13 @@ struct wlr_data_device_manager *wlr_data_device_manager_create(
struct wl_display *display);
/**
* Creates a new wl_data_offer if there is a wl_data_source currently set as the
* seat selection and sends it to the client for this handle, followed by the
* wl_data_device.selection() event.
* If there is no current selection, the wl_data_device.selection() event will
* carry a NULL wl_data_offer.
* If the client does not have a wl_data_device for the seat nothing * will be
* done.
* Creates a new wl_data_offer if there is a wl_data_source currently set as
* the seat selection and sends it to the seat client, followed by the
* wl_data_device.selection() event. If there is no current selection, the
* wl_data_device.selection() event will carry a NULL wl_data_offer. If the
* client does not have a wl_data_device for the seat nothing * will be done.
*/
void wlr_seat_handle_send_selection(struct wlr_seat_handle *handle);
void wlr_seat_client_send_selection(struct wlr_seat_client *seat_client);
void wlr_seat_set_selection(struct wlr_seat *seat,
struct wlr_data_source *source, uint32_t serial);

View file

@ -11,8 +11,9 @@
* to issue input events to that client. The lifetime of these objects is
* managed by wlr_seat; some may be NULL.
*/
struct wlr_seat_handle {
struct wlr_seat_client {
struct wl_resource *wl_resource;
struct wl_client *client;
struct wlr_seat *wlr_seat;
struct wl_resource *pointer;
@ -40,7 +41,8 @@ struct wlr_pointer_grab_interface {
struct wlr_seat_keyboard_grab;
struct wlr_keyboard_grab_interface {
void (*enter)(struct wlr_seat_keyboard_grab *grab, struct wlr_surface *surface);
void (*enter)(struct wlr_seat_keyboard_grab *grab,
struct wlr_surface *surface);
void (*key)(struct wlr_seat_keyboard_grab *grab, uint32_t time,
uint32_t key, uint32_t state);
void (*modifiers)(struct wlr_seat_keyboard_grab *grab,
@ -71,7 +73,7 @@ struct wlr_seat_pointer_grab {
struct wlr_seat_pointer_state {
struct wlr_seat *wlr_seat;
struct wlr_seat_handle *focused_handle;
struct wlr_seat_client *focused_client;
struct wlr_surface *focused_surface;
struct wlr_seat_pointer_grab *grab;
@ -90,7 +92,7 @@ struct wlr_seat_keyboard_state {
struct wlr_seat *wlr_seat;
struct wlr_keyboard *keyboard;
struct wlr_seat_handle *focused_handle;
struct wlr_seat_client *focused_client;
struct wlr_surface *focused_surface;
struct wl_listener keyboard_destroy;
@ -106,7 +108,7 @@ struct wlr_seat_keyboard_state {
struct wlr_seat {
struct wl_global *wl_global;
struct wl_display *display;
struct wl_list handles;
struct wl_list clients;
char *name;
uint32_t capabilities;
@ -138,8 +140,7 @@ struct wlr_seat {
};
struct wlr_seat_pointer_request_set_cursor_event {
struct wl_client *client;
struct wlr_seat_handle *seat_handle;
struct wlr_seat_client *seat_client;
struct wlr_surface *surface;
int32_t hotspot_x, hotspot_y;
};
@ -153,11 +154,11 @@ struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name);
*/
void wlr_seat_destroy(struct wlr_seat *wlr_seat);
/**
* Gets a wlr_seat_handle for the specified client, or returns NULL if no
* handle is bound for that client.
* Gets a wlr_seat_client for the specified client, or returns NULL if no
* client is bound for that client.
*/
struct wlr_seat_handle *wlr_seat_handle_for_client(struct wlr_seat *wlr_seat,
struct wl_client *client);
struct wlr_seat_client *wlr_seat_client_for_wl_client(struct wlr_seat *wlr_seat,
struct wl_client *wl_client);
/**
* Updates the capabilities available on this seat.
* Will automatically send them to all clients.
@ -231,9 +232,9 @@ void wlr_seat_pointer_start_grab(struct wlr_seat *wlr_seat,
void wlr_seat_pointer_end_grab(struct wlr_seat *wlr_seat);
/**
* Notify the seat of a pointer enter event to the given surface and request it to be the
* focused surface for the pointer. Pass surface-local coordinates where the
* enter occurred.
* Notify the seat of a pointer enter event to the given surface and request it
* to be the focused surface for the pointer. Pass surface-local coordinates
* where the enter occurred.
*/
void wlr_seat_pointer_notify_enter(struct wlr_seat *wlr_seat,
struct wlr_surface *surface, double sx, double sy);