Make event names consistent
This commit is contained in:
parent
f4453d104d
commit
3d71969b2a
|
@ -45,8 +45,8 @@ void handle_keyboard_key(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_keyboard *kbevent =
|
struct libinput_event_keyboard *kbevent =
|
||||||
libinput_event_get_keyboard_event(event);
|
libinput_event_get_keyboard_event(event);
|
||||||
struct wlr_keyboard_key *wlr_event =
|
struct wlr_event_keyboard_key *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_keyboard_key));
|
calloc(1, sizeof(struct wlr_event_keyboard_key));
|
||||||
wlr_event->time_sec = libinput_event_keyboard_get_time(kbevent);
|
wlr_event->time_sec = libinput_event_keyboard_get_time(kbevent);
|
||||||
wlr_event->time_usec = libinput_event_keyboard_get_time_usec(kbevent);
|
wlr_event->time_usec = libinput_event_keyboard_get_time_usec(kbevent);
|
||||||
wlr_event->keycode = libinput_event_keyboard_get_key(kbevent);
|
wlr_event->keycode = libinput_event_keyboard_get_key(kbevent);
|
||||||
|
|
|
@ -23,8 +23,8 @@ void handle_pointer_motion(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_pointer *pevent =
|
struct libinput_event_pointer *pevent =
|
||||||
libinput_event_get_pointer_event(event);
|
libinput_event_get_pointer_event(event);
|
||||||
struct wlr_pointer_motion *wlr_event =
|
struct wlr_event_pointer_motion *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_pointer_motion));
|
calloc(1, sizeof(struct wlr_event_pointer_motion));
|
||||||
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
||||||
wlr_event->time_usec = libinput_event_pointer_get_time_usec(pevent);
|
wlr_event->time_usec = libinput_event_pointer_get_time_usec(pevent);
|
||||||
wlr_event->delta_x = libinput_event_pointer_get_dx(pevent);
|
wlr_event->delta_x = libinput_event_pointer_get_dx(pevent);
|
||||||
|
@ -42,8 +42,8 @@ void handle_pointer_motion_abs(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_pointer *pevent =
|
struct libinput_event_pointer *pevent =
|
||||||
libinput_event_get_pointer_event(event);
|
libinput_event_get_pointer_event(event);
|
||||||
struct wlr_pointer_motion_absolute *wlr_event =
|
struct wlr_event_pointer_motion_absolute *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_pointer_motion_absolute));
|
calloc(1, sizeof(struct wlr_event_pointer_motion_absolute));
|
||||||
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
||||||
wlr_event->time_usec = libinput_event_pointer_get_time_usec(pevent);
|
wlr_event->time_usec = libinput_event_pointer_get_time_usec(pevent);
|
||||||
wlr_event->x_mm = libinput_event_pointer_get_absolute_x(pevent);
|
wlr_event->x_mm = libinput_event_pointer_get_absolute_x(pevent);
|
||||||
|
@ -62,8 +62,8 @@ void handle_pointer_button(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_pointer *pevent =
|
struct libinput_event_pointer *pevent =
|
||||||
libinput_event_get_pointer_event(event);
|
libinput_event_get_pointer_event(event);
|
||||||
struct wlr_pointer_button *wlr_event =
|
struct wlr_event_pointer_button *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_pointer_button));
|
calloc(1, sizeof(struct wlr_event_pointer_button));
|
||||||
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
||||||
wlr_event->time_usec = libinput_event_pointer_get_time_usec(pevent);
|
wlr_event->time_usec = libinput_event_pointer_get_time_usec(pevent);
|
||||||
wlr_event->button = libinput_event_pointer_get_button(pevent);
|
wlr_event->button = libinput_event_pointer_get_button(pevent);
|
||||||
|
@ -88,8 +88,8 @@ void handle_pointer_axis(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_pointer *pevent =
|
struct libinput_event_pointer *pevent =
|
||||||
libinput_event_get_pointer_event(event);
|
libinput_event_get_pointer_event(event);
|
||||||
struct wlr_pointer_axis *wlr_event =
|
struct wlr_event_pointer_axis *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_pointer_axis));
|
calloc(1, sizeof(struct wlr_event_pointer_axis));
|
||||||
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
||||||
wlr_event->time_usec = libinput_event_pointer_get_time_usec(pevent);
|
wlr_event->time_usec = libinput_event_pointer_get_time_usec(pevent);
|
||||||
switch (libinput_event_pointer_get_axis_source(pevent)) {
|
switch (libinput_event_pointer_get_axis_source(pevent)) {
|
||||||
|
|
|
@ -23,8 +23,8 @@ void handle_tablet_pad_button(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_tablet_pad *pevent =
|
struct libinput_event_tablet_pad *pevent =
|
||||||
libinput_event_get_tablet_pad_event(event);
|
libinput_event_get_tablet_pad_event(event);
|
||||||
struct wlr_tablet_pad_button *wlr_event =
|
struct wlr_event_tablet_pad_button *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_tablet_pad_button));
|
calloc(1, sizeof(struct wlr_event_tablet_pad_button));
|
||||||
wlr_event->time_sec = libinput_event_tablet_pad_get_time(pevent);
|
wlr_event->time_sec = libinput_event_tablet_pad_get_time(pevent);
|
||||||
wlr_event->time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
|
wlr_event->time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
|
||||||
wlr_event->button = libinput_event_tablet_pad_get_button_number(pevent);
|
wlr_event->button = libinput_event_tablet_pad_get_button_number(pevent);
|
||||||
|
@ -49,8 +49,8 @@ void handle_tablet_pad_ring(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_tablet_pad *pevent =
|
struct libinput_event_tablet_pad *pevent =
|
||||||
libinput_event_get_tablet_pad_event(event);
|
libinput_event_get_tablet_pad_event(event);
|
||||||
struct wlr_tablet_pad_ring *wlr_event =
|
struct wlr_event_tablet_pad_ring *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_tablet_pad_ring));
|
calloc(1, sizeof(struct wlr_event_tablet_pad_ring));
|
||||||
wlr_event->time_sec = libinput_event_tablet_pad_get_time(pevent);
|
wlr_event->time_sec = libinput_event_tablet_pad_get_time(pevent);
|
||||||
wlr_event->time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
|
wlr_event->time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
|
||||||
wlr_event->ring = libinput_event_tablet_pad_get_ring_number(pevent);
|
wlr_event->ring = libinput_event_tablet_pad_get_ring_number(pevent);
|
||||||
|
@ -76,8 +76,8 @@ void handle_tablet_pad_strip(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_tablet_pad *pevent =
|
struct libinput_event_tablet_pad *pevent =
|
||||||
libinput_event_get_tablet_pad_event(event);
|
libinput_event_get_tablet_pad_event(event);
|
||||||
struct wlr_tablet_pad_strip *wlr_event =
|
struct wlr_event_tablet_pad_strip *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_tablet_pad_strip));
|
calloc(1, sizeof(struct wlr_event_tablet_pad_strip));
|
||||||
wlr_event->time_sec = libinput_event_tablet_pad_get_time(pevent);
|
wlr_event->time_sec = libinput_event_tablet_pad_get_time(pevent);
|
||||||
wlr_event->time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
|
wlr_event->time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
|
||||||
wlr_event->strip = libinput_event_tablet_pad_get_strip_number(pevent);
|
wlr_event->strip = libinput_event_tablet_pad_get_strip_number(pevent);
|
||||||
|
|
|
@ -23,8 +23,8 @@ void handle_tablet_tool_axis(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_tablet_tool *tevent =
|
struct libinput_event_tablet_tool *tevent =
|
||||||
libinput_event_get_tablet_tool_event(event);
|
libinput_event_get_tablet_tool_event(event);
|
||||||
struct wlr_tablet_tool_axis *wlr_event =
|
struct wlr_event_tablet_tool_axis *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_tablet_tool_axis));
|
calloc(1, sizeof(struct wlr_event_tablet_tool_axis));
|
||||||
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
||||||
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
|
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
|
||||||
libinput_device_get_size(device, &wlr_event->width_mm, &wlr_event->height_mm);
|
libinput_device_get_size(device, &wlr_event->width_mm, &wlr_event->height_mm);
|
||||||
|
@ -77,8 +77,8 @@ void handle_tablet_tool_proximity(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_tablet_tool *tevent =
|
struct libinput_event_tablet_tool *tevent =
|
||||||
libinput_event_get_tablet_tool_event(event);
|
libinput_event_get_tablet_tool_event(event);
|
||||||
struct wlr_tablet_tool_proximity *wlr_event =
|
struct wlr_event_tablet_tool_proximity *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_tablet_tool_proximity));
|
calloc(1, sizeof(struct wlr_event_tablet_tool_proximity));
|
||||||
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
||||||
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
|
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
|
||||||
switch (libinput_event_tablet_tool_get_proximity_state(tevent)) {
|
switch (libinput_event_tablet_tool_get_proximity_state(tevent)) {
|
||||||
|
@ -104,8 +104,8 @@ void handle_tablet_tool_tip(struct libinput_event *event,
|
||||||
handle_tablet_tool_axis(event, device);
|
handle_tablet_tool_axis(event, device);
|
||||||
struct libinput_event_tablet_tool *tevent =
|
struct libinput_event_tablet_tool *tevent =
|
||||||
libinput_event_get_tablet_tool_event(event);
|
libinput_event_get_tablet_tool_event(event);
|
||||||
struct wlr_tablet_tool_tip *wlr_event =
|
struct wlr_event_tablet_tool_tip *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_tablet_tool_tip));
|
calloc(1, sizeof(struct wlr_event_tablet_tool_tip));
|
||||||
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
||||||
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
|
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
|
||||||
switch (libinput_event_tablet_tool_get_tip_state(tevent)) {
|
switch (libinput_event_tablet_tool_get_tip_state(tevent)) {
|
||||||
|
@ -127,13 +127,11 @@ void handle_tablet_tool_button(struct libinput_event *event,
|
||||||
wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
|
wlr_log(L_DEBUG, "Got a tablet tool event for a device with no tablet tools?");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Tip events contain axis information. We update this information
|
|
||||||
// before we send the proximity event
|
|
||||||
handle_tablet_tool_axis(event, device);
|
handle_tablet_tool_axis(event, device);
|
||||||
struct libinput_event_tablet_tool *tevent =
|
struct libinput_event_tablet_tool *tevent =
|
||||||
libinput_event_get_tablet_tool_event(event);
|
libinput_event_get_tablet_tool_event(event);
|
||||||
struct wlr_tablet_tool_button *wlr_event =
|
struct wlr_event_tablet_tool_button *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_tablet_tool_button));
|
calloc(1, sizeof(struct wlr_event_tablet_tool_button));
|
||||||
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
||||||
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
|
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
|
||||||
wlr_event->button = libinput_event_tablet_tool_get_button(tevent);
|
wlr_event->button = libinput_event_tablet_tool_get_button(tevent);
|
||||||
|
|
|
@ -23,8 +23,8 @@ void handle_touch_down(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_touch *tevent =
|
struct libinput_event_touch *tevent =
|
||||||
libinput_event_get_touch_event(event);
|
libinput_event_get_touch_event(event);
|
||||||
struct wlr_touch_down *wlr_event =
|
struct wlr_event_touch_down *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_touch_down));
|
calloc(1, sizeof(struct wlr_event_touch_down));
|
||||||
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
||||||
wlr_event->time_usec = libinput_event_touch_get_time_usec(tevent);
|
wlr_event->time_usec = libinput_event_touch_get_time_usec(tevent);
|
||||||
wlr_event->slot = libinput_event_touch_get_slot(tevent);
|
wlr_event->slot = libinput_event_touch_get_slot(tevent);
|
||||||
|
@ -44,8 +44,8 @@ void handle_touch_up(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_touch *tevent =
|
struct libinput_event_touch *tevent =
|
||||||
libinput_event_get_touch_event(event);
|
libinput_event_get_touch_event(event);
|
||||||
struct wlr_touch_up *wlr_event =
|
struct wlr_event_touch_up *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_touch_up));
|
calloc(1, sizeof(struct wlr_event_touch_up));
|
||||||
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
||||||
wlr_event->time_usec = libinput_event_touch_get_time_usec(tevent);
|
wlr_event->time_usec = libinput_event_touch_get_time_usec(tevent);
|
||||||
wlr_event->slot = libinput_event_touch_get_slot(tevent);
|
wlr_event->slot = libinput_event_touch_get_slot(tevent);
|
||||||
|
@ -62,8 +62,8 @@ void handle_touch_motion(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_touch *tevent =
|
struct libinput_event_touch *tevent =
|
||||||
libinput_event_get_touch_event(event);
|
libinput_event_get_touch_event(event);
|
||||||
struct wlr_touch_motion *wlr_event =
|
struct wlr_event_touch_motion *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_touch_motion));
|
calloc(1, sizeof(struct wlr_event_touch_motion));
|
||||||
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
||||||
wlr_event->time_usec = libinput_event_touch_get_time_usec(tevent);
|
wlr_event->time_usec = libinput_event_touch_get_time_usec(tevent);
|
||||||
wlr_event->slot = libinput_event_touch_get_slot(tevent);
|
wlr_event->slot = libinput_event_touch_get_slot(tevent);
|
||||||
|
@ -83,8 +83,8 @@ void handle_touch_cancel(struct libinput_event *event,
|
||||||
}
|
}
|
||||||
struct libinput_event_touch *tevent =
|
struct libinput_event_touch *tevent =
|
||||||
libinput_event_get_touch_event(event);
|
libinput_event_get_touch_event(event);
|
||||||
struct wlr_touch_cancel *wlr_event =
|
struct wlr_event_touch_cancel *wlr_event =
|
||||||
calloc(1, sizeof(struct wlr_touch_cancel));
|
calloc(1, sizeof(struct wlr_event_touch_cancel));
|
||||||
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
||||||
wlr_event->time_usec = libinput_event_touch_get_time_usec(tevent);
|
wlr_event->time_usec = libinput_event_touch_get_time_usec(tevent);
|
||||||
wlr_event->slot = libinput_event_touch_get_slot(tevent);
|
wlr_event->slot = libinput_event_touch_get_slot(tevent);
|
||||||
|
|
|
@ -24,7 +24,7 @@ static void keyboard_led_update(struct keyboard_state *kbstate) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void keyboard_key_notify(struct wl_listener *listener, void *data) {
|
static void keyboard_key_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_keyboard_key *event = data;
|
struct wlr_event_keyboard_key *event = data;
|
||||||
struct keyboard_state *kbstate = wl_container_of(listener, kbstate, key);
|
struct keyboard_state *kbstate = wl_container_of(listener, kbstate, key);
|
||||||
uint32_t keycode = event->keycode + 8;
|
uint32_t keycode = event->keycode + 8;
|
||||||
enum wlr_key_state key_state = event->state;
|
enum wlr_key_state key_state = event->state;
|
||||||
|
@ -91,7 +91,7 @@ static void keyboard_add(struct wlr_input_device *device, struct compositor_stat
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pointer_motion_notify(struct wl_listener *listener, void *data) {
|
static void pointer_motion_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_pointer_motion *event = data;
|
struct wlr_event_pointer_motion *event = data;
|
||||||
struct pointer_state *pstate = wl_container_of(listener, pstate, motion);
|
struct pointer_state *pstate = wl_container_of(listener, pstate, motion);
|
||||||
if (pstate->compositor->pointer_motion_cb) {
|
if (pstate->compositor->pointer_motion_cb) {
|
||||||
pstate->compositor->pointer_motion_cb(pstate,
|
pstate->compositor->pointer_motion_cb(pstate,
|
||||||
|
@ -100,7 +100,7 @@ static void pointer_motion_notify(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pointer_button_notify(struct wl_listener *listener, void *data) {
|
static void pointer_button_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_pointer_button *event = data;
|
struct wlr_event_pointer_button *event = data;
|
||||||
struct pointer_state *pstate = wl_container_of(listener, pstate, button);
|
struct pointer_state *pstate = wl_container_of(listener, pstate, button);
|
||||||
if (pstate->compositor->pointer_button_cb) {
|
if (pstate->compositor->pointer_button_cb) {
|
||||||
pstate->compositor->pointer_button_cb(pstate,
|
pstate->compositor->pointer_button_cb(pstate,
|
||||||
|
@ -109,7 +109,7 @@ static void pointer_button_notify(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pointer_axis_notify(struct wl_listener *listener, void *data) {
|
static void pointer_axis_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_pointer_axis *event = data;
|
struct wlr_event_pointer_axis *event = data;
|
||||||
struct pointer_state *pstate = wl_container_of(listener, pstate, axis);
|
struct pointer_state *pstate = wl_container_of(listener, pstate, axis);
|
||||||
if (pstate->compositor->pointer_axis_cb) {
|
if (pstate->compositor->pointer_axis_cb) {
|
||||||
pstate->compositor->pointer_axis_cb(pstate,
|
pstate->compositor->pointer_axis_cb(pstate,
|
||||||
|
@ -135,7 +135,7 @@ static void pointer_add(struct wlr_input_device *device, struct compositor_state
|
||||||
}
|
}
|
||||||
|
|
||||||
static void touch_down_notify(struct wl_listener *listener, void *data) {
|
static void touch_down_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_touch_down *event = data;
|
struct wlr_event_touch_down *event = data;
|
||||||
struct touch_state *tstate = wl_container_of(listener, tstate, down);
|
struct touch_state *tstate = wl_container_of(listener, tstate, down);
|
||||||
if (tstate->compositor->touch_down_cb) {
|
if (tstate->compositor->touch_down_cb) {
|
||||||
tstate->compositor->touch_down_cb(tstate, event->slot,
|
tstate->compositor->touch_down_cb(tstate, event->slot,
|
||||||
|
@ -144,7 +144,7 @@ static void touch_down_notify(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void touch_motion_notify(struct wl_listener *listener, void *data) {
|
static void touch_motion_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_touch_motion *event = data;
|
struct wlr_event_touch_motion *event = data;
|
||||||
struct touch_state *tstate = wl_container_of(listener, tstate, motion);
|
struct touch_state *tstate = wl_container_of(listener, tstate, motion);
|
||||||
if (tstate->compositor->touch_motion_cb) {
|
if (tstate->compositor->touch_motion_cb) {
|
||||||
tstate->compositor->touch_motion_cb(tstate, event->slot,
|
tstate->compositor->touch_motion_cb(tstate, event->slot,
|
||||||
|
@ -153,7 +153,7 @@ static void touch_motion_notify(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void touch_up_notify(struct wl_listener *listener, void *data) {
|
static void touch_up_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_touch_up *event = data;
|
struct wlr_event_touch_up *event = data;
|
||||||
struct touch_state *tstate = wl_container_of(listener, tstate, up);
|
struct touch_state *tstate = wl_container_of(listener, tstate, up);
|
||||||
if (tstate->compositor->touch_up_cb) {
|
if (tstate->compositor->touch_up_cb) {
|
||||||
tstate->compositor->touch_up_cb(tstate, event->slot);
|
tstate->compositor->touch_up_cb(tstate, event->slot);
|
||||||
|
@ -161,7 +161,7 @@ static void touch_up_notify(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void touch_cancel_notify(struct wl_listener *listener, void *data) {
|
static void touch_cancel_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_touch_cancel *event = data;
|
struct wlr_event_touch_cancel *event = data;
|
||||||
struct touch_state *tstate = wl_container_of(listener, tstate, cancel);
|
struct touch_state *tstate = wl_container_of(listener, tstate, cancel);
|
||||||
if (tstate->compositor->touch_cancel_cb) {
|
if (tstate->compositor->touch_cancel_cb) {
|
||||||
tstate->compositor->touch_cancel_cb(tstate, event->slot);
|
tstate->compositor->touch_cancel_cb(tstate, event->slot);
|
||||||
|
@ -188,7 +188,7 @@ static void touch_add(struct wlr_input_device *device, struct compositor_state *
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tablet_tool_axis_notify(struct wl_listener *listener, void *data) {
|
static void tablet_tool_axis_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_tablet_tool_axis *event = data;
|
struct wlr_event_tablet_tool_axis *event = data;
|
||||||
struct tablet_tool_state *tstate = wl_container_of(listener, tstate, axis);
|
struct tablet_tool_state *tstate = wl_container_of(listener, tstate, axis);
|
||||||
if (tstate->compositor->tool_axis_cb) {
|
if (tstate->compositor->tool_axis_cb) {
|
||||||
tstate->compositor->tool_axis_cb(tstate, event);
|
tstate->compositor->tool_axis_cb(tstate, event);
|
||||||
|
@ -196,7 +196,7 @@ static void tablet_tool_axis_notify(struct wl_listener *listener, void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tablet_tool_proximity_notify(struct wl_listener *listener, void *data) {
|
static void tablet_tool_proximity_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_tablet_tool_proximity *event = data;
|
struct wlr_event_tablet_tool_proximity *event = data;
|
||||||
struct tablet_tool_state *tstate = wl_container_of(listener, tstate, proximity);
|
struct tablet_tool_state *tstate = wl_container_of(listener, tstate, proximity);
|
||||||
if (tstate->compositor->tool_proximity_cb) {
|
if (tstate->compositor->tool_proximity_cb) {
|
||||||
tstate->compositor->tool_proximity_cb(tstate, event->state);
|
tstate->compositor->tool_proximity_cb(tstate, event->state);
|
||||||
|
@ -204,7 +204,7 @@ static void tablet_tool_proximity_notify(struct wl_listener *listener, void *dat
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tablet_tool_button_notify(struct wl_listener *listener, void *data) {
|
static void tablet_tool_button_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_tablet_tool_button *event = data;
|
struct wlr_event_tablet_tool_button *event = data;
|
||||||
struct tablet_tool_state *tstate = wl_container_of(listener, tstate, button);
|
struct tablet_tool_state *tstate = wl_container_of(listener, tstate, button);
|
||||||
if (tstate->compositor->tool_button_cb) {
|
if (tstate->compositor->tool_button_cb) {
|
||||||
tstate->compositor->tool_button_cb(tstate, event->button, event->state);
|
tstate->compositor->tool_button_cb(tstate, event->button, event->state);
|
||||||
|
@ -232,7 +232,7 @@ static void tablet_tool_add(struct wlr_input_device *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tablet_pad_button_notify(struct wl_listener *listener, void *data) {
|
static void tablet_pad_button_notify(struct wl_listener *listener, void *data) {
|
||||||
struct wlr_tablet_pad_button *event = data;
|
struct wlr_event_tablet_pad_button *event = data;
|
||||||
struct tablet_pad_state *pstate = wl_container_of(listener, pstate, button);
|
struct tablet_pad_state *pstate = wl_container_of(listener, pstate, button);
|
||||||
if (pstate->compositor->pad_button_cb) {
|
if (pstate->compositor->pad_button_cb) {
|
||||||
pstate->compositor->pad_button_cb(pstate, event->button, event->state);
|
pstate->compositor->pad_button_cb(pstate, event->button, event->state);
|
||||||
|
|
|
@ -94,7 +94,7 @@ struct compositor_state {
|
||||||
void (*touch_up_cb)(struct touch_state *s, int32_t slot);
|
void (*touch_up_cb)(struct touch_state *s, int32_t slot);
|
||||||
void (*touch_cancel_cb)(struct touch_state *s, int32_t slot);
|
void (*touch_cancel_cb)(struct touch_state *s, int32_t slot);
|
||||||
void (*tool_axis_cb)(struct tablet_tool_state *s,
|
void (*tool_axis_cb)(struct tablet_tool_state *s,
|
||||||
struct wlr_tablet_tool_axis *event);
|
struct wlr_event_tablet_tool_axis *event);
|
||||||
void (*tool_proximity_cb)(struct tablet_tool_state *s,
|
void (*tool_proximity_cb)(struct tablet_tool_state *s,
|
||||||
enum wlr_tablet_tool_proximity_state proximity);
|
enum wlr_tablet_tool_proximity_state proximity);
|
||||||
void (*tool_tip_cb)(struct tablet_tool_state *s,
|
void (*tool_tip_cb)(struct tablet_tool_state *s,
|
||||||
|
|
|
@ -86,7 +86,7 @@ static void handle_keyboard_key(struct keyboard_state *kbstate,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_tool_axis(struct tablet_tool_state *tstate,
|
static void handle_tool_axis(struct tablet_tool_state *tstate,
|
||||||
struct wlr_tablet_tool_axis *event) {
|
struct wlr_event_tablet_tool_axis *event) {
|
||||||
struct sample_state *sample = tstate->compositor->data;
|
struct sample_state *sample = tstate->compositor->data;
|
||||||
sample->width_mm = event->width_mm;
|
sample->width_mm = event->width_mm;
|
||||||
sample->height_mm = event->height_mm;
|
sample->height_mm = event->height_mm;
|
||||||
|
|
|
@ -29,7 +29,7 @@ enum wlr_key_state {
|
||||||
WLR_KEY_PRESSED,
|
WLR_KEY_PRESSED,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_keyboard_key {
|
struct wlr_event_keyboard_key {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
uint32_t keycode;
|
uint32_t keycode;
|
||||||
|
|
|
@ -19,20 +19,20 @@ struct wlr_pointer {
|
||||||
} events;
|
} events;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_pointer_motion {
|
struct wlr_event_pointer_motion {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
double delta_x, delta_y;
|
double delta_x, delta_y;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_pointer_motion_absolute {
|
struct wlr_event_pointer_motion_absolute {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
double x_mm, y_mm;
|
double x_mm, y_mm;
|
||||||
double width_mm, height_mm;
|
double width_mm, height_mm;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_pointer_button {
|
struct wlr_event_pointer_button {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
uint32_t button;
|
uint32_t button;
|
||||||
|
@ -51,7 +51,7 @@ enum wlr_axis_orientation {
|
||||||
WLR_AXIS_ORIENTATION_HORIZONTAL,
|
WLR_AXIS_ORIENTATION_HORIZONTAL,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_pointer_axis {
|
struct wlr_event_pointer_axis {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
enum wlr_axis_source source;
|
enum wlr_axis_source source;
|
||||||
|
|
|
@ -24,7 +24,7 @@ struct wlr_tablet_pad {
|
||||||
} events;
|
} events;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_tablet_pad_button {
|
struct wlr_event_tablet_pad_button {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
uint32_t button;
|
uint32_t button;
|
||||||
|
@ -36,7 +36,7 @@ enum wlr_tablet_pad_ring_source {
|
||||||
WLR_TABLET_PAD_RING_SOURCE_FINGER,
|
WLR_TABLET_PAD_RING_SOURCE_FINGER,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_tablet_pad_ring {
|
struct wlr_event_tablet_pad_ring {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
enum wlr_tablet_pad_ring_source source;
|
enum wlr_tablet_pad_ring_source source;
|
||||||
|
@ -49,7 +49,7 @@ enum wlr_tablet_pad_strip_source {
|
||||||
WLR_TABLET_PAD_STRIP_SOURCE_FINGER,
|
WLR_TABLET_PAD_STRIP_SOURCE_FINGER,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_tablet_pad_strip {
|
struct wlr_event_tablet_pad_strip {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
enum wlr_tablet_pad_strip_source source;
|
enum wlr_tablet_pad_strip_source source;
|
||||||
|
|
|
@ -31,7 +31,7 @@ enum wlr_tablet_tool_axes {
|
||||||
WLR_TABLET_TOOL_AXIS_WHEEL = 256,
|
WLR_TABLET_TOOL_AXIS_WHEEL = 256,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_tablet_tool_axis {
|
struct wlr_event_tablet_tool_axis {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
uint32_t updated_axes;
|
uint32_t updated_axes;
|
||||||
|
@ -50,7 +50,7 @@ enum wlr_tablet_tool_proximity_state {
|
||||||
WLR_TABLET_TOOL_PROXIMITY_IN,
|
WLR_TABLET_TOOL_PROXIMITY_IN,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_tablet_tool_proximity {
|
struct wlr_event_tablet_tool_proximity {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
double x, y;
|
double x, y;
|
||||||
|
@ -63,7 +63,7 @@ enum wlr_tablet_tool_tip_state {
|
||||||
WLR_TABLET_TOOL_TIP_DOWN,
|
WLR_TABLET_TOOL_TIP_DOWN,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_tablet_tool_tip {
|
struct wlr_event_tablet_tool_tip {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
double x, y;
|
double x, y;
|
||||||
|
@ -71,7 +71,7 @@ struct wlr_tablet_tool_tip {
|
||||||
enum wlr_tablet_tool_tip_state state;
|
enum wlr_tablet_tool_tip_state state;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_tablet_tool_button {
|
struct wlr_event_tablet_tool_button {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
uint32_t button;
|
uint32_t button;
|
||||||
|
|
|
@ -18,7 +18,7 @@ struct wlr_touch {
|
||||||
} events;
|
} events;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_touch_down {
|
struct wlr_event_touch_down {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
int32_t slot;
|
int32_t slot;
|
||||||
|
@ -26,13 +26,13 @@ struct wlr_touch_down {
|
||||||
double width_mm, height_mm;
|
double width_mm, height_mm;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_touch_up {
|
struct wlr_event_touch_up {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
int32_t slot;
|
int32_t slot;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_touch_motion {
|
struct wlr_event_touch_motion {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
int32_t slot;
|
int32_t slot;
|
||||||
|
@ -40,7 +40,7 @@ struct wlr_touch_motion {
|
||||||
double width_mm, height_mm;
|
double width_mm, height_mm;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wlr_touch_cancel {
|
struct wlr_event_touch_cancel {
|
||||||
uint32_t time_sec;
|
uint32_t time_sec;
|
||||||
uint64_t time_usec;
|
uint64_t time_usec;
|
||||||
int32_t slot;
|
int32_t slot;
|
||||||
|
|
Loading…
Reference in New Issue