mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-25 02:20:06 +01:00
ei: make more ei_queue* functions semi-public for consistency
And drop the ei_add_seat() indirection.
This commit is contained in:
parent
03d7f96ddd
commit
cc7a8cb95e
3 changed files with 15 additions and 23 deletions
|
|
@ -128,15 +128,15 @@ int
|
|||
ei_send_message(struct ei *ei, const struct brei_object *object,
|
||||
uint32_t opcode, const char *signature, size_t nargs, ...);
|
||||
|
||||
void
|
||||
ei_add_seat(struct ei_seat *seat);
|
||||
|
||||
void
|
||||
ei_connected(struct ei *ei);
|
||||
|
||||
void
|
||||
ei_queue_connect_event(struct ei *ei);
|
||||
|
||||
void
|
||||
ei_queue_disconnect_event(struct ei *ei);
|
||||
|
||||
void
|
||||
ei_queue_device_removed_event(struct ei_device *device);
|
||||
|
||||
|
|
@ -152,6 +152,9 @@ ei_queue_device_paused_event(struct ei_device *device);
|
|||
void
|
||||
ei_insert_device_removed_event(struct ei_device *device);
|
||||
|
||||
void
|
||||
ei_queue_seat_added_event(struct ei_seat *seat);
|
||||
|
||||
void
|
||||
ei_queue_seat_removed_event(struct ei_seat *seat);
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,8 @@ handle_msg_done(struct ei_seat *seat)
|
|||
|
||||
seat->state = EI_SEAT_STATE_DONE;
|
||||
log_debug(ei, "Added seat '%s' with caps %#x", seat->name, seat->capabilities);
|
||||
ei_add_seat(seat);
|
||||
|
||||
ei_queue_seat_added_event(seat);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
26
src/libei.c
26
src/libei.c
|
|
@ -287,8 +287,8 @@ ei_queue_connect_event(struct ei *ei)
|
|||
queue_event(ei, e);
|
||||
}
|
||||
|
||||
static void
|
||||
queue_disconnect_event(struct ei *ei)
|
||||
void
|
||||
ei_queue_disconnect_event(struct ei *ei)
|
||||
{
|
||||
struct ei_event *e = ei_event_new(ei);
|
||||
e->type = EI_EVENT_DISCONNECT;
|
||||
|
|
@ -296,8 +296,8 @@ queue_disconnect_event(struct ei *ei)
|
|||
queue_event(ei, e);
|
||||
}
|
||||
|
||||
static void
|
||||
queue_seat_added_event(struct ei_seat *seat)
|
||||
void
|
||||
ei_queue_seat_added_event(struct ei_seat *seat)
|
||||
{
|
||||
struct ei *ei= ei_seat_get_context(seat);
|
||||
|
||||
|
|
@ -308,8 +308,8 @@ queue_seat_added_event(struct ei_seat *seat)
|
|||
queue_event(ei, e);
|
||||
}
|
||||
|
||||
static void
|
||||
queue_seat_removed_event(struct ei_seat *seat)
|
||||
void
|
||||
ei_queue_seat_removed_event(struct ei_seat *seat)
|
||||
{
|
||||
struct ei *ei= ei_seat_get_context(seat);
|
||||
|
||||
|
|
@ -320,12 +320,6 @@ queue_seat_removed_event(struct ei_seat *seat)
|
|||
queue_event(ei, e);
|
||||
}
|
||||
|
||||
void
|
||||
ei_queue_seat_removed_event(struct ei_seat *seat)
|
||||
{
|
||||
queue_seat_removed_event(seat);
|
||||
}
|
||||
|
||||
static void
|
||||
queue_device_added_event(struct ei_device *device)
|
||||
{
|
||||
|
|
@ -588,7 +582,7 @@ ei_disconnect(struct ei *ei)
|
|||
if (state != EI_STATE_NEW) {
|
||||
ei_connection_request_disconnect(ei->connection);
|
||||
}
|
||||
queue_disconnect_event(ei);
|
||||
ei_queue_disconnect_event(ei);
|
||||
ei->state = EI_STATE_DISCONNECTED;
|
||||
if (ei->source)
|
||||
source_remove(ei->source);
|
||||
|
|
@ -815,12 +809,6 @@ ei_set_socket(struct ei *ei, int fd)
|
|||
return rc < 0 ? rc : 0;
|
||||
}
|
||||
|
||||
void
|
||||
ei_add_seat(struct ei_seat *seat)
|
||||
{
|
||||
queue_seat_added_event(seat);
|
||||
}
|
||||
|
||||
_public_ void
|
||||
ei_configure_name(struct ei *ei, const char *name)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue