aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-03-09 14:52:27 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-03-17 18:16:14 +0000
commitbd6c000d142fe6a8e893f1cdd2d5eb0b9d2ac7b8 (patch)
treeb29050c0fe2962076b92ffc124cfdc1c3ba8f8f2 /backend
parent96ccc50c5753346e852625fe37418a54386c7804 (diff)
types/wlr_pointer: uniformize events name
Diffstat (limited to 'backend')
-rw-r--r--backend/libinput/pointer.c48
-rw-r--r--backend/wayland/pointer.c52
-rw-r--r--backend/x11/input_device.c12
3 files changed, 56 insertions, 56 deletions
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index 8daf2005..124a4fda 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -29,8 +29,8 @@ void handle_pointer_motion(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_pointer *pevent =
libinput_event_get_pointer_event(event);
- struct wlr_event_pointer_motion wlr_event = { 0 };
- wlr_event.device = &pointer->base;
+ struct wlr_pointer_motion_event wlr_event = { 0 };
+ wlr_event.pointer = pointer;
wlr_event.time_msec =
usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
wlr_event.delta_x = libinput_event_pointer_get_dx(pevent);
@@ -45,8 +45,8 @@ void handle_pointer_motion_abs(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_pointer *pevent =
libinput_event_get_pointer_event(event);
- struct wlr_event_pointer_motion_absolute wlr_event = { 0 };
- wlr_event.device = &pointer->base;
+ struct wlr_pointer_motion_absolute_event wlr_event = { 0 };
+ wlr_event.pointer = pointer;
wlr_event.time_msec =
usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
wlr_event.x = libinput_event_pointer_get_absolute_x_transformed(pevent, 1);
@@ -59,8 +59,8 @@ void handle_pointer_button(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_pointer *pevent =
libinput_event_get_pointer_event(event);
- struct wlr_event_pointer_button wlr_event = { 0 };
- wlr_event.device = &pointer->base;
+ struct wlr_pointer_button_event wlr_event = { 0 };
+ wlr_event.pointer = pointer;
wlr_event.time_msec =
usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
wlr_event.button = libinput_event_pointer_get_button(pevent);
@@ -80,8 +80,8 @@ void handle_pointer_axis(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_pointer *pevent =
libinput_event_get_pointer_event(event);
- struct wlr_event_pointer_axis wlr_event = { 0 };
- wlr_event.device = &pointer->base;
+ struct wlr_pointer_axis_event wlr_event = { 0 };
+ wlr_event.pointer = pointer;
wlr_event.time_msec =
usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
switch (libinput_event_pointer_get_axis_source(pevent)) {
@@ -126,8 +126,8 @@ void handle_pointer_swipe_begin(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_gesture *gevent =
libinput_event_get_gesture_event(event);
- struct wlr_event_pointer_swipe_begin wlr_event = {
- .device = &pointer->base,
+ struct wlr_pointer_swipe_begin_event wlr_event = {
+ .pointer = pointer,
.time_msec =
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.fingers = libinput_event_gesture_get_finger_count(gevent),
@@ -139,8 +139,8 @@ void handle_pointer_swipe_update(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_gesture *gevent =
libinput_event_get_gesture_event(event);
- struct wlr_event_pointer_swipe_update wlr_event = {
- .device = &pointer->base,
+ struct wlr_pointer_swipe_update_event wlr_event = {
+ .pointer = pointer,
.time_msec =
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.fingers = libinput_event_gesture_get_finger_count(gevent),
@@ -154,8 +154,8 @@ void handle_pointer_swipe_end(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_gesture *gevent =
libinput_event_get_gesture_event(event);
- struct wlr_event_pointer_swipe_end wlr_event = {
- .device = &pointer->base,
+ struct wlr_pointer_swipe_end_event wlr_event = {
+ .pointer = pointer,
.time_msec =
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.cancelled = libinput_event_gesture_get_cancelled(gevent),
@@ -167,8 +167,8 @@ void handle_pointer_pinch_begin(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_gesture *gevent =
libinput_event_get_gesture_event(event);
- struct wlr_event_pointer_pinch_begin wlr_event = {
- .device = &pointer->base,
+ struct wlr_pointer_pinch_begin_event wlr_event = {
+ .pointer = pointer,
.time_msec =
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.fingers = libinput_event_gesture_get_finger_count(gevent),
@@ -180,8 +180,8 @@ void handle_pointer_pinch_update(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_gesture *gevent =
libinput_event_get_gesture_event(event);
- struct wlr_event_pointer_pinch_update wlr_event = {
- .device = &pointer->base,
+ struct wlr_pointer_pinch_update_event wlr_event = {
+ .pointer = pointer,
.time_msec =
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.fingers = libinput_event_gesture_get_finger_count(gevent),
@@ -197,8 +197,8 @@ void handle_pointer_pinch_end(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_gesture *gevent =
libinput_event_get_gesture_event(event);
- struct wlr_event_pointer_pinch_end wlr_event = {
- .device = &pointer->base,
+ struct wlr_pointer_pinch_end_event wlr_event = {
+ .pointer = pointer,
.time_msec =
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.cancelled = libinput_event_gesture_get_cancelled(gevent),
@@ -210,8 +210,8 @@ void handle_pointer_hold_begin(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_gesture *gevent =
libinput_event_get_gesture_event(event);
- struct wlr_event_pointer_hold_begin wlr_event = {
- .device = &pointer->base,
+ struct wlr_pointer_hold_begin_event wlr_event = {
+ .pointer = pointer,
.time_msec =
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.fingers = libinput_event_gesture_get_finger_count(gevent),
@@ -223,8 +223,8 @@ void handle_pointer_hold_end(struct libinput_event *event,
struct wlr_pointer *pointer) {
struct libinput_event_gesture *gevent =
libinput_event_get_gesture_event(event);
- struct wlr_event_pointer_hold_end wlr_event = {
- .device = &pointer->base,
+ struct wlr_pointer_hold_end_event wlr_event = {
+ .pointer = pointer,
.time_msec =
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.cancelled = libinput_event_gesture_get_cancelled(gevent),
diff --git a/backend/wayland/pointer.c b/backend/wayland/pointer.c
index 2dc5d752..b2ed2ae7 100644
--- a/backend/wayland/pointer.c
+++ b/backend/wayland/pointer.c
@@ -88,8 +88,8 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
}
struct wlr_output *wlr_output = &pointer->output->wlr_output;
- struct wlr_event_pointer_motion_absolute event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_motion_absolute_event event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = time,
.x = wl_fixed_to_double(sx) / wlr_output->width,
.y = wl_fixed_to_double(sy) / wlr_output->height,
@@ -105,8 +105,8 @@ static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer,
return;
}
- struct wlr_event_pointer_button event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_button_event event = {
+ .pointer = &pointer->wlr_pointer,
.button = button,
.state = state,
.time_msec = time,
@@ -122,8 +122,8 @@ static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer,
return;
}
- struct wlr_event_pointer_axis event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_axis_event event = {
+ .pointer = &pointer->wlr_pointer,
.delta = wl_fixed_to_double(value),
.delta_discrete = pointer->axis_discrete,
.orientation = axis,
@@ -165,8 +165,8 @@ static void pointer_handle_axis_stop(void *data, struct wl_pointer *wl_pointer,
return;
}
- struct wlr_event_pointer_axis event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_axis_event event = {
+ .pointer = &pointer->wlr_pointer,
.delta = 0,
.delta_discrete = 0,
.orientation = axis,
@@ -211,8 +211,8 @@ static void gesture_swipe_begin(void *data,
pointer->fingers = fingers;
- struct wlr_event_pointer_swipe_begin wlr_event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_swipe_begin_event wlr_event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = time,
.fingers = fingers,
};
@@ -228,8 +228,8 @@ static void gesture_swipe_update(void *data,
return;
}
- struct wlr_event_pointer_swipe_update wlr_event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_swipe_update_event wlr_event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = time,
.fingers = pointer->fingers,
.dx = wl_fixed_to_double(dx),
@@ -247,8 +247,8 @@ static void gesture_swipe_end(void *data,
return;
}
- struct wlr_event_pointer_swipe_end wlr_event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_swipe_end_event wlr_event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = time,
.cancelled = cancelled,
};
@@ -273,8 +273,8 @@ static void gesture_pinch_begin(void *data,
pointer->fingers = fingers;
- struct wlr_event_pointer_pinch_begin wlr_event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_pinch_begin_event wlr_event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = time,
.fingers = pointer->fingers,
};
@@ -292,8 +292,8 @@ static void gesture_pinch_update(void *data,
return;
}
- struct wlr_event_pointer_pinch_update wlr_event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_pinch_update_event wlr_event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = time,
.fingers = pointer->fingers,
.dx = wl_fixed_to_double(dx),
@@ -313,8 +313,8 @@ static void gesture_pinch_end(void *data,
return;
}
- struct wlr_event_pointer_pinch_end wlr_event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_pinch_end_event wlr_event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = time,
.cancelled = cancelled,
};
@@ -339,8 +339,8 @@ static void gesture_hold_begin(void *data,
pointer->fingers = fingers;
- struct wlr_event_pointer_hold_begin wlr_event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_hold_begin_event wlr_event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = time,
.fingers = fingers,
};
@@ -356,8 +356,8 @@ static void gesture_hold_end(void *data,
return;
}
- struct wlr_event_pointer_hold_end wlr_event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_hold_end_event wlr_event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = time,
.cancelled = cancelled,
};
@@ -381,8 +381,8 @@ static void relative_pointer_handle_relative_motion(void *data,
uint64_t time_usec = (uint64_t)utime_hi << 32 | utime_lo;
- struct wlr_event_pointer_motion wlr_event = {
- .device = &pointer->wlr_pointer.base,
+ struct wlr_pointer_motion_event wlr_event = {
+ .pointer = &pointer->wlr_pointer,
.time_msec = (uint32_t)(time_usec / 1000),
.delta_x = wl_fixed_to_double(dx),
.delta_y = wl_fixed_to_double(dy),
diff --git a/backend/x11/input_device.c b/backend/x11/input_device.c
index 77edf8ad..f9675fe0 100644
--- a/backend/x11/input_device.c
+++ b/backend/x11/input_device.c
@@ -31,8 +31,8 @@ static void send_key_event(struct wlr_x11_backend *x11, uint32_t key,
static void send_button_event(struct wlr_x11_output *output, uint32_t key,
enum wlr_button_state st, xcb_timestamp_t time) {
- struct wlr_event_pointer_button ev = {
- .device = &output->pointer.base,
+ struct wlr_pointer_button_event ev = {
+ .pointer = &output->pointer,
.time_msec = time,
.button = key,
.state = st,
@@ -43,8 +43,8 @@ static void send_button_event(struct wlr_x11_output *output, uint32_t key,
static void send_axis_event(struct wlr_x11_output *output, int32_t delta,
xcb_timestamp_t time) {
- struct wlr_event_pointer_axis ev = {
- .device = &output->pointer.base,
+ struct wlr_pointer_axis_event ev = {
+ .pointer = &output->pointer,
.time_msec = time,
.source = WLR_AXIS_SOURCE_WHEEL,
.orientation = WLR_AXIS_ORIENTATION_VERTICAL,
@@ -58,8 +58,8 @@ static void send_axis_event(struct wlr_x11_output *output, int32_t delta,
static void send_pointer_position_event(struct wlr_x11_output *output,
int16_t x, int16_t y, xcb_timestamp_t time) {
- struct wlr_event_pointer_motion_absolute ev = {
- .device = &output->pointer.base,
+ struct wlr_pointer_motion_absolute_event ev = {
+ .pointer = &output->pointer,
.time_msec = time,
.x = (double)x / output->wlr_output.width,
.y = (double)y / output->wlr_output.height,