mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-06 21:45:58 +01:00
types/wlr_tablet_pad: uniformize events name
This commit is contained in:
parent
13d7fa2f03
commit
d1f543a9d8
4 changed files with 11 additions and 11 deletions
|
@ -145,7 +145,7 @@ void handle_tablet_pad_button(struct libinput_event *event,
|
|||
struct wlr_tablet_pad *tablet_pad) {
|
||||
struct libinput_event_tablet_pad *pevent =
|
||||
libinput_event_get_tablet_pad_event(event);
|
||||
struct wlr_event_tablet_pad_button wlr_event = { 0 };
|
||||
struct wlr_tablet_pad_button_event wlr_event = { 0 };
|
||||
wlr_event.time_msec =
|
||||
usec_to_msec(libinput_event_tablet_pad_get_time_usec(pevent));
|
||||
wlr_event.button = libinput_event_tablet_pad_get_button_number(pevent);
|
||||
|
@ -167,7 +167,7 @@ void handle_tablet_pad_ring(struct libinput_event *event,
|
|||
struct wlr_tablet_pad *tablet_pad) {
|
||||
struct libinput_event_tablet_pad *pevent =
|
||||
libinput_event_get_tablet_pad_event(event);
|
||||
struct wlr_event_tablet_pad_ring wlr_event = { 0 };
|
||||
struct wlr_tablet_pad_ring_event wlr_event = { 0 };
|
||||
wlr_event.time_msec =
|
||||
usec_to_msec(libinput_event_tablet_pad_get_time_usec(pevent));
|
||||
wlr_event.ring = libinput_event_tablet_pad_get_ring_number(pevent);
|
||||
|
@ -188,7 +188,7 @@ void handle_tablet_pad_strip(struct libinput_event *event,
|
|||
struct wlr_tablet_pad *tablet_pad) {
|
||||
struct libinput_event_tablet_pad *pevent =
|
||||
libinput_event_get_tablet_pad_event(event);
|
||||
struct wlr_event_tablet_pad_strip wlr_event = { 0 };
|
||||
struct wlr_tablet_pad_strip_event wlr_event = { 0 };
|
||||
wlr_event.time_msec =
|
||||
usec_to_msec(libinput_event_tablet_pad_get_time_usec(pevent));
|
||||
wlr_event.strip = libinput_event_tablet_pad_get_strip_number(pevent);
|
||||
|
|
|
@ -99,7 +99,7 @@ static void handle_tablet_pad_ring_frame(void *data,
|
|||
uint32_t time) {
|
||||
struct tablet_pad_ring *ring = data;
|
||||
|
||||
struct wlr_event_tablet_pad_ring evt = {
|
||||
struct wlr_tablet_pad_ring_event evt = {
|
||||
.time_msec = time,
|
||||
.source = ring->source,
|
||||
.ring = ring->index,
|
||||
|
@ -152,7 +152,7 @@ static void handle_tablet_pad_strip_frame(void *data,
|
|||
uint32_t time) {
|
||||
struct tablet_pad_strip *strip = data;
|
||||
|
||||
struct wlr_event_tablet_pad_strip evt = {
|
||||
struct wlr_tablet_pad_strip_event evt = {
|
||||
.time_msec = time,
|
||||
.source = strip->source,
|
||||
.strip = strip->index,
|
||||
|
@ -337,7 +337,7 @@ static void handle_tablet_pad_button(void *data,
|
|||
struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2,
|
||||
uint32_t time, uint32_t button, uint32_t state) {
|
||||
struct wlr_wl_seat *seat = data;
|
||||
struct wlr_event_tablet_pad_button evt = {
|
||||
struct wlr_tablet_pad_button_event evt = {
|
||||
.time_msec = time,
|
||||
.button = button,
|
||||
.state = state,
|
||||
|
|
|
@ -185,7 +185,7 @@ static void tablet_tool_button_notify(struct wl_listener *listener, void *data)
|
|||
|
||||
static void tablet_pad_button_notify(struct wl_listener *listener, void *data) {
|
||||
struct tablet_pad_state *pstate = wl_container_of(listener, pstate, button);
|
||||
struct wlr_event_tablet_pad_button *event = data;
|
||||
struct wlr_tablet_pad_button_event *event = data;
|
||||
struct sample_state *sample = pstate->sample;
|
||||
float default_color[4] = { 0.5, 0.5, 0.5, 1.0 };
|
||||
if (event->state == WLR_BUTTON_RELEASED) {
|
||||
|
@ -203,7 +203,7 @@ static void tablet_pad_button_notify(struct wl_listener *listener, void *data) {
|
|||
|
||||
static void tablet_pad_ring_notify(struct wl_listener *listener, void *data) {
|
||||
struct tablet_pad_state *pstate = wl_container_of(listener, pstate, ring);
|
||||
struct wlr_event_tablet_pad_ring *event = data;
|
||||
struct wlr_tablet_pad_ring_event *event = data;
|
||||
struct sample_state *sample = pstate->sample;
|
||||
if (event->position != -1) {
|
||||
sample->ring = -(event->position * (M_PI / 180.0));
|
||||
|
|
|
@ -58,7 +58,7 @@ struct wlr_tablet_pad_group {
|
|||
unsigned int mode_count;
|
||||
};
|
||||
|
||||
struct wlr_event_tablet_pad_button {
|
||||
struct wlr_tablet_pad_button_event {
|
||||
uint32_t time_msec;
|
||||
uint32_t button;
|
||||
enum wlr_button_state state;
|
||||
|
@ -71,7 +71,7 @@ enum wlr_tablet_pad_ring_source {
|
|||
WLR_TABLET_PAD_RING_SOURCE_FINGER,
|
||||
};
|
||||
|
||||
struct wlr_event_tablet_pad_ring {
|
||||
struct wlr_tablet_pad_ring_event {
|
||||
uint32_t time_msec;
|
||||
enum wlr_tablet_pad_ring_source source;
|
||||
uint32_t ring;
|
||||
|
@ -84,7 +84,7 @@ enum wlr_tablet_pad_strip_source {
|
|||
WLR_TABLET_PAD_STRIP_SOURCE_FINGER,
|
||||
};
|
||||
|
||||
struct wlr_event_tablet_pad_strip {
|
||||
struct wlr_tablet_pad_strip_event {
|
||||
uint32_t time_msec;
|
||||
enum wlr_tablet_pad_strip_source source;
|
||||
uint32_t strip;
|
||||
|
|
Loading…
Reference in a new issue