mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Make event names consistent
This commit is contained in:
parent
f4453d104d
commit
3d71969b2a
13 changed files with 62 additions and 64 deletions
|
|
@ -45,8 +45,8 @@ void handle_keyboard_key(struct libinput_event *event,
|
|||
}
|
||||
struct libinput_event_keyboard *kbevent =
|
||||
libinput_event_get_keyboard_event(event);
|
||||
struct wlr_keyboard_key *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_keyboard_key));
|
||||
struct wlr_event_keyboard_key *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_keyboard_key));
|
||||
wlr_event->time_sec = libinput_event_keyboard_get_time(kbevent);
|
||||
wlr_event->time_usec = libinput_event_keyboard_get_time_usec(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 =
|
||||
libinput_event_get_pointer_event(event);
|
||||
struct wlr_pointer_motion *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_pointer_motion));
|
||||
struct wlr_event_pointer_motion *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_pointer_motion));
|
||||
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
||||
wlr_event->time_usec = libinput_event_pointer_get_time_usec(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 =
|
||||
libinput_event_get_pointer_event(event);
|
||||
struct wlr_pointer_motion_absolute *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_pointer_motion_absolute));
|
||||
struct wlr_event_pointer_motion_absolute *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_pointer_motion_absolute));
|
||||
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
||||
wlr_event->time_usec = libinput_event_pointer_get_time_usec(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 =
|
||||
libinput_event_get_pointer_event(event);
|
||||
struct wlr_pointer_button *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_pointer_button));
|
||||
struct wlr_event_pointer_button *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_pointer_button));
|
||||
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
||||
wlr_event->time_usec = libinput_event_pointer_get_time_usec(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 =
|
||||
libinput_event_get_pointer_event(event);
|
||||
struct wlr_pointer_axis *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_pointer_axis));
|
||||
struct wlr_event_pointer_axis *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_pointer_axis));
|
||||
wlr_event->time_sec = libinput_event_pointer_get_time(pevent);
|
||||
wlr_event->time_usec = libinput_event_pointer_get_time_usec(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 =
|
||||
libinput_event_get_tablet_pad_event(event);
|
||||
struct wlr_tablet_pad_button *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_tablet_pad_button));
|
||||
struct wlr_event_tablet_pad_button *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_tablet_pad_button));
|
||||
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->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 =
|
||||
libinput_event_get_tablet_pad_event(event);
|
||||
struct wlr_tablet_pad_ring *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_tablet_pad_ring));
|
||||
struct wlr_event_tablet_pad_ring *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_tablet_pad_ring));
|
||||
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->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 =
|
||||
libinput_event_get_tablet_pad_event(event);
|
||||
struct wlr_tablet_pad_strip *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_tablet_pad_strip));
|
||||
struct wlr_event_tablet_pad_strip *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_tablet_pad_strip));
|
||||
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->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 =
|
||||
libinput_event_get_tablet_tool_event(event);
|
||||
struct wlr_tablet_tool_axis *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_tablet_tool_axis));
|
||||
struct wlr_event_tablet_tool_axis *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_tablet_tool_axis));
|
||||
wlr_event->time_sec = libinput_event_tablet_tool_get_time(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);
|
||||
|
|
@ -77,8 +77,8 @@ void handle_tablet_tool_proximity(struct libinput_event *event,
|
|||
}
|
||||
struct libinput_event_tablet_tool *tevent =
|
||||
libinput_event_get_tablet_tool_event(event);
|
||||
struct wlr_tablet_tool_proximity *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_tablet_tool_proximity));
|
||||
struct wlr_event_tablet_tool_proximity *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_tablet_tool_proximity));
|
||||
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
||||
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(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);
|
||||
struct libinput_event_tablet_tool *tevent =
|
||||
libinput_event_get_tablet_tool_event(event);
|
||||
struct wlr_tablet_tool_tip *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_tablet_tool_tip));
|
||||
struct wlr_event_tablet_tool_tip *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_tablet_tool_tip));
|
||||
wlr_event->time_sec = libinput_event_tablet_tool_get_time(tevent);
|
||||
wlr_event->time_usec = libinput_event_tablet_tool_get_time_usec(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?");
|
||||
return;
|
||||
}
|
||||
// Tip events contain axis information. We update this information
|
||||
// before we send the proximity event
|
||||
handle_tablet_tool_axis(event, device);
|
||||
struct libinput_event_tablet_tool *tevent =
|
||||
libinput_event_get_tablet_tool_event(event);
|
||||
struct wlr_tablet_tool_button *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_tablet_tool_button));
|
||||
struct wlr_event_tablet_tool_button *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_tablet_tool_button));
|
||||
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->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 =
|
||||
libinput_event_get_touch_event(event);
|
||||
struct wlr_touch_down *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_touch_down));
|
||||
struct wlr_event_touch_down *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_touch_down));
|
||||
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
||||
wlr_event->time_usec = libinput_event_touch_get_time_usec(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 =
|
||||
libinput_event_get_touch_event(event);
|
||||
struct wlr_touch_up *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_touch_up));
|
||||
struct wlr_event_touch_up *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_touch_up));
|
||||
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
||||
wlr_event->time_usec = libinput_event_touch_get_time_usec(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 =
|
||||
libinput_event_get_touch_event(event);
|
||||
struct wlr_touch_motion *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_touch_motion));
|
||||
struct wlr_event_touch_motion *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_touch_motion));
|
||||
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
||||
wlr_event->time_usec = libinput_event_touch_get_time_usec(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 =
|
||||
libinput_event_get_touch_event(event);
|
||||
struct wlr_touch_cancel *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_touch_cancel));
|
||||
struct wlr_event_touch_cancel *wlr_event =
|
||||
calloc(1, sizeof(struct wlr_event_touch_cancel));
|
||||
wlr_event->time_sec = libinput_event_touch_get_time(tevent);
|
||||
wlr_event->time_usec = libinput_event_touch_get_time_usec(tevent);
|
||||
wlr_event->slot = libinput_event_touch_get_slot(tevent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue