Lines Matching refs:w
189 draw_evdev_rel(struct window *w, cairo_t *cr) in draw_evdev_rel() argument
195 center_x = w->width/2 - 400; in draw_evdev_rel()
196 center_y = w->height/2; in draw_evdev_rel()
201 if (w->evdev.rel_x) { in draw_evdev_rel()
202 int dir = w->evdev.rel_x > 0 ? 1 : -1; in draw_evdev_rel()
203 for (int i = 0; i < abs(w->evdev.rel_x); i++) { in draw_evdev_rel()
214 if (w->evdev.rel_y) { in draw_evdev_rel()
215 int dir = w->evdev.rel_y > 0 ? 1 : -1; in draw_evdev_rel()
216 for (int i = 0; i < abs(w->evdev.rel_y); i++) { in draw_evdev_rel()
231 draw_evdev_abs(struct window *w, cairo_t *cr) in draw_evdev_abs() argument
244 center_x = w->width/2 + 400; in draw_evdev_abs()
245 center_y = w->height/2; in draw_evdev_abs()
249 if (w->evdev.device == 0) in draw_evdev_abs()
254 if (w->evdev.device != w->evdev.last_device) { in draw_evdev_abs()
260 list_for_each(d, &w->evdev_devices, node) { in draw_evdev_abs()
261 if ((uintptr_t)d->libinput_device != w->evdev.device) in draw_evdev_abs()
266 w->evdev.last_device = w->evdev.device; in draw_evdev_abs()
278 x = 1.0 * (w->evdev.x - ax->minimum)/width * outline_width; in draw_evdev_abs()
279 y = 1.0 * (w->evdev.y - ay->minimum)/height * outline_height; in draw_evdev_abs()
285 for (size_t i = 0; i < ARRAY_LENGTH(w->evdev.slots); i++) { in draw_evdev_abs()
286 if (!w->evdev.slots[i].active) in draw_evdev_abs()
289 x = w->evdev.slots[i].x; in draw_evdev_abs()
290 y = w->evdev.slots[i].y; in draw_evdev_abs()
311 draw_gestures(struct window *w, cairo_t *cr) in draw_gestures() argument
318 cairo_translate(cr, w->swipe.x, w->swipe.y); in draw_gestures()
319 for (i = 0; i < w->swipe.nfingers; i++) { in draw_gestures()
334 offset = w->pinch.scale * 100; in draw_gestures()
335 cairo_translate(cr, w->pinch.x, w->pinch.y); in draw_gestures()
336 cairo_rotate(cr, w->pinch.angle * M_PI/180.0); in draw_gestures()
337 if (w->pinch.nfingers > 0) { in draw_gestures()
354 draw_scrollbars(struct window *w, cairo_t *cr) in draw_scrollbars() argument
360 cairo_rectangle(cr, w->scroll.vx - 10, w->scroll.vy - 20, 20, 40); in draw_scrollbars()
361 cairo_rectangle(cr, w->scroll.hx - 20, w->scroll.hy - 10, 40, 20); in draw_scrollbars()
366 cairo_rectangle(cr, w->scroll.vx_discrete - 5, w->scroll.vy_discrete - 10, 10, 20); in draw_scrollbars()
367 cairo_rectangle(cr, w->scroll.hx_discrete - 10, w->scroll.hy_discrete - 5, 20, 10); in draw_scrollbars()
374 draw_touchpoints(struct window *w, cairo_t *cr) in draw_touchpoints() argument
379 ARRAY_FOR_EACH(w->touches, t) { in draw_touchpoints()
394 draw_abs_pointer(struct window *w, cairo_t *cr) in draw_abs_pointer() argument
399 cairo_arc(cr, w->absx, w->absy, 10, 0, 2 * M_PI); in draw_abs_pointer()
419 draw_other_button (struct window *w, cairo_t *cr) in draw_other_button() argument
421 const char *name = w->buttons.other_name; in draw_other_button()
425 if (!w->buttons.other) in draw_other_button()
432 cairo_rectangle(cr, w->width/2 - 40, w->height - 150, 80, 30); in draw_other_button()
437 draw_text(cr, name, w->width/2, w->height - 150 + 15); in draw_other_button()
441 cairo_rectangle(cr, w->width/2 - 40, w->height - 150, 80, 30); in draw_other_button()
447 draw_buttons(struct window *w, cairo_t *cr) in draw_buttons() argument
451 if (w->buttons.l || w->buttons.m || w->buttons.r) { in draw_buttons()
453 if (w->buttons.l) in draw_buttons()
454 cairo_rectangle(cr, w->width/2 - 100, w->height - 200, 70, 30); in draw_buttons()
455 if (w->buttons.m) in draw_buttons()
456 cairo_rectangle(cr, w->width/2 - 20, w->height - 200, 40, 30); in draw_buttons()
457 if (w->buttons.r) in draw_buttons()
458 cairo_rectangle(cr, w->width/2 + 30, w->height - 200, 70, 30); in draw_buttons()
463 cairo_rectangle(cr, w->width/2 - 100, w->height - 200, 70, 30); in draw_buttons()
464 cairo_rectangle(cr, w->width/2 - 20, w->height - 200, 40, 30); in draw_buttons()
465 cairo_rectangle(cr, w->width/2 + 30, w->height - 200, 70, 30); in draw_buttons()
469 draw_other_button(w, cr); in draw_buttons()
473 draw_pad(struct window *w, cairo_t *cr) in draw_pad() argument
479 rx = w->width/2 - 200; in draw_pad()
480 ry = w->height/2 + 100; in draw_pad()
496 if (w->pad.ring.position != -1) { in draw_pad()
497 pos = (w->pad.ring.position + 270) * M_PI/180.0; in draw_pad()
503 snprintf(number, sizeof(number), "%d", w->pad.ring.number); in draw_pad()
511 rx = w->width/2 - 300; in draw_pad()
512 ry = w->height/2 + 50; in draw_pad()
519 if (w->pad.strip.position != -1) { in draw_pad()
520 pos = w->pad.strip.position * 80; in draw_pad()
525 snprintf(number, sizeof(number), "%d", w->pad.strip.number); in draw_pad()
534 draw_tablet(struct window *w, cairo_t *cr) in draw_tablet() argument
542 rx = w->width/2 + 100; in draw_tablet()
543 ry = w->height/2 + 50; in draw_tablet()
549 if (w->tool.distance > 0) { in draw_tablet()
550 double pos = w->tool.distance * 100; in draw_tablet()
554 if (w->tool.pressure > 0) { in draw_tablet()
555 double pos = w->tool.pressure * 100; in draw_tablet()
556 if (w->tool.is_down) in draw_tablet()
567 if (w->tool.x_in && w->tool.y_in) { in draw_tablet()
568 cairo_rectangle(cr, w->tool.x_in - 15, w->tool.y_in - 15, 30, 30); in draw_tablet()
572 if (w->tool.x_down && w->tool.y_down) { in draw_tablet()
573 cairo_rectangle(cr, w->tool.x_down - 10, w->tool.y_down - 10, 20, 20); in draw_tablet()
577 if (w->tool.x_up && w->tool.y_up) { in draw_tablet()
578 cairo_rectangle(cr, w->tool.x_up - 10, w->tool.y_up - 10, 20, 20); in draw_tablet()
582 if (w->tool.pressure) in draw_tablet()
585 cairo_translate(cr, w->tool.x, w->tool.y); in draw_tablet()
589 1.0 + w->tool.size_major * 2.5, in draw_tablet()
590 1.0 + w->tool.size_minor * 2.5); in draw_tablet()
591 cairo_scale(cr, 1.0 + w->tool.tilt_x/30.0, 1.0 + w->tool.tilt_y/30.0); in draw_tablet()
592 if (w->tool.rotation) in draw_tablet()
593 cairo_rotate(cr, w->tool.rotation * M_PI/180.0); in draw_tablet()
594 if (w->tool.pressure) in draw_tablet()
597 1 + 10 * max(w->tool.pressure, w->tool.distance), in draw_tablet()
603 if (w->tool.size_major) { in draw_tablet()
606 cairo_translate(cr, w->tool.x, w->tool.y); in draw_tablet()
607 if (w->tool.rotation) in draw_tablet()
608 cairo_rotate(cr, w->tool.rotation * M_PI/180.0); in draw_tablet()
611 cairo_rel_line_to(cr, 0, -w->tool.size_major * 2.5); in draw_tablet()
617 mask = ARRAY_LENGTH(w->tool.deltas); in draw_tablet()
618 first = max(w->tool.ndeltas + 1, mask) - mask; in draw_tablet()
619 last = w->tool.ndeltas; in draw_tablet()
624 x = w->tool.deltas[first % mask].x; in draw_tablet()
625 y = w->tool.deltas[first % mask].y; in draw_tablet()
629 x = w->tool.deltas[i % mask].x; in draw_tablet()
630 y = w->tool.deltas[i % mask].y; in draw_tablet()
639 draw_pointer(struct window *w, cairo_t *cr) in draw_pointer() argument
648 cairo_move_to(cr, w->x, w->y); in draw_pointer()
655 mask = ARRAY_LENGTH(w->deltas); in draw_pointer()
656 first = max(w->ndeltas + 1, mask) - mask; in draw_pointer()
657 last = w->ndeltas; in draw_pointer()
661 x = w->deltas[first % mask].x; in draw_pointer()
662 y = w->deltas[first % mask].y; in draw_pointer()
666 x = w->deltas[i % mask].x; in draw_pointer()
667 y = w->deltas[i % mask].y; in draw_pointer()
676 draw_background(struct window *w, cairo_t *cr) in draw_background() argument
684 x1 = w->width/2 - 200; in draw_background()
685 y1 = w->height/2 - 200; in draw_background()
686 x2 = w->width/2 + 200; in draw_background()
687 y2 = w->height/2 - 200; in draw_background()
701 x3 = w->width/2 - 200; in draw_background()
702 y3 = w->height/2 + 200; in draw_background()
703 x4 = w->width/2 + 200; in draw_background()
704 y4 = w->height/2 + 100; in draw_background()
716 x1 = w->width * i/4.0; in draw_background()
717 x2 = w->width * i/4.0; in draw_background()
719 y1 = w->height * 1.0/4.0; in draw_background()
720 y2 = w->height * 3.0/4.0; in draw_background()
734 struct window *w = data; in draw() local
737 cairo_rectangle(cr, 0, 0, w->width, w->height); in draw()
740 draw_background(w, cr); in draw()
741 draw_evdev_rel(w, cr); in draw()
742 draw_evdev_abs(w, cr); in draw()
744 draw_pad(w, cr); in draw()
745 draw_tablet(w, cr); in draw()
746 draw_gestures(w, cr); in draw()
747 draw_scrollbars(w, cr); in draw()
748 draw_touchpoints(w, cr); in draw()
749 draw_abs_pointer(w, cr); in draw()
750 draw_buttons(w, cr); in draw()
751 draw_pointer(w, cr); in draw()
759 struct window *w = data; in map_event_cb() local
764 gtk_window_get_size(GTK_WINDOW(widget), &w->width, &w->height); in map_event_cb()
766 w->x = w->width/2; in map_event_cb()
767 w->y = w->height/2; in map_event_cb()
769 w->scroll.vx = w->width/2; in map_event_cb()
770 w->scroll.vy = w->height/2; in map_event_cb()
771 w->scroll.hx = w->width/2; in map_event_cb()
772 w->scroll.hy = w->height/2; in map_event_cb()
773 w->scroll.vx_discrete = w->width/2; in map_event_cb()
774 w->scroll.vy_discrete = w->height/2; in map_event_cb()
775 w->scroll.hx_discrete = w->width/2; in map_event_cb()
776 w->scroll.hy_discrete = w->height/2; in map_event_cb()
778 w->swipe.x = w->width/2; in map_event_cb()
779 w->swipe.y = w->height/2; in map_event_cb()
781 w->pinch.scale = 1.0; in map_event_cb()
782 w->pinch.x = w->width/2; in map_event_cb()
783 w->pinch.y = w->height/2; in map_event_cb()
785 g_signal_connect(G_OBJECT(w->area), "draw", G_CALLBACK(draw), w); in map_event_cb()
790 gdk_window_set_cursor(gtk_widget_get_window(w->win), in map_event_cb()
807 window_init(struct window *w) in window_init() argument
809 list_init(&w->evdev_devices); in window_init()
811 w->win = gtk_window_new(GTK_WINDOW_TOPLEVEL); in window_init()
813 gtk_window_iconify(GTK_WINDOW(w->win)); in window_init()
814 gtk_widget_set_events(w->win, 0); in window_init()
815 gtk_window_set_title(GTK_WINDOW(w->win), "libinput debugging tool"); in window_init()
816 gtk_window_set_default_size(GTK_WINDOW(w->win), 1024, 768); in window_init()
817 gtk_window_maximize(GTK_WINDOW(w->win)); in window_init()
818 gtk_window_set_resizable(GTK_WINDOW(w->win), TRUE); in window_init()
819 gtk_widget_realize(w->win); in window_init()
820 g_signal_connect(G_OBJECT(w->win), "map-event", G_CALLBACK(map_event_cb), w); in window_init()
821 g_signal_connect(G_OBJECT(w->win), "delete-event", G_CALLBACK(gtk_main_quit), NULL); in window_init()
823 w->area = gtk_drawing_area_new(); in window_init()
824 gtk_widget_set_events(w->area, 0); in window_init()
825 gtk_container_add(GTK_CONTAINER(w->win), w->area); in window_init()
826 gtk_widget_show_all(w->win); in window_init()
828 w->pad.ring.position = -1; in window_init()
829 w->pad.strip.position = -1; in window_init()
833 window_cleanup(struct window *w) in window_cleanup() argument
836 ARRAY_FOR_EACH(w->devices, dev) { in window_cleanup()
843 change_ptraccel(struct window *w, double amount) in change_ptraccel() argument
847 ARRAY_FOR_EACH(w->devices, dev) { in change_ptraccel()
881 struct window *w = libinput_get_user_data(li); in handle_event_evdev() local
887 list_for_each(d, &w->evdev_devices, node) { in handle_event_evdev()
916 w->evdev.rel_x = e.value; in handle_event_evdev()
919 w->evdev.rel_y = e.value; in handle_event_evdev()
922 w->evdev.slot = min((unsigned int)e.value, in handle_event_evdev()
923 ARRAY_LENGTH(w->evdev.slots) - 1); in handle_event_evdev()
924 w->evdev.device = (uintptr_t)dev; in handle_event_evdev()
927 w->evdev.slots[w->evdev.slot].active = (e.value != -1); in handle_event_evdev()
928 w->evdev.device = (uintptr_t)dev; in handle_event_evdev()
931 w->evdev.x = e.value; in handle_event_evdev()
932 w->evdev.device = (uintptr_t)dev; in handle_event_evdev()
935 w->evdev.y = e.value; in handle_event_evdev()
936 w->evdev.device = (uintptr_t)dev; in handle_event_evdev()
939 w->evdev.slots[w->evdev.slot].x = e.value; in handle_event_evdev()
940 w->evdev.device = (uintptr_t)dev; in handle_event_evdev()
943 w->evdev.slots[w->evdev.slot].y = e.value; in handle_event_evdev()
944 w->evdev.device = (uintptr_t)dev; in handle_event_evdev()
949 gtk_widget_queue_draw(w->area); in handle_event_evdev()
955 register_evdev_device(struct window *w, struct libinput_device *dev) in register_evdev_device() argument
981 list_append(&w->evdev_devices, &d->node); in register_evdev_device()
1001 unregister_evdev_device(struct window *w, struct libinput_device *dev) in unregister_evdev_device() argument
1005 list_for_each(d, &w->evdev_devices, node) { in unregister_evdev_device()
1016 w->evdev.last_device = 0; in unregister_evdev_device()
1026 struct window *w; in handle_event_device_notify() local
1031 w = libinput_get_user_data(li); in handle_event_device_notify()
1035 register_evdev_device(w, dev); in handle_event_device_notify()
1037 &w->options); in handle_event_device_notify()
1040 unregister_evdev_device(w, dev); in handle_event_device_notify()
1049 for (i = 0; i < ARRAY_LENGTH(w->devices); i++) { in handle_event_device_notify()
1050 if (w->devices[i] == NULL) { in handle_event_device_notify()
1051 w->devices[i] = libinput_device_ref(dev); in handle_event_device_notify()
1056 for (i = 0; i < ARRAY_LENGTH(w->devices); i++) { in handle_event_device_notify()
1057 if (w->devices[i] == dev) { in handle_event_device_notify()
1058 libinput_device_unref(w->devices[i]); in handle_event_device_notify()
1059 w->devices[i] = NULL; in handle_event_device_notify()
1067 handle_event_motion(struct libinput_event *ev, struct window *w) in handle_event_motion() argument
1073 const int mask = ARRAY_LENGTH(w->deltas); in handle_event_motion()
1076 w->x += dx; in handle_event_motion()
1077 w->y += dy; in handle_event_motion()
1078 w->x = clip(w->x, 0.0, w->width); in handle_event_motion()
1079 w->y = clip(w->y, 0.0, w->height); in handle_event_motion()
1081 idx = w->ndeltas % mask; in handle_event_motion()
1082 point = w->deltas[idx]; in handle_event_motion()
1083 idx = (w->ndeltas + 1) % mask; in handle_event_motion()
1086 w->deltas[idx] = point; in handle_event_motion()
1087 w->ndeltas++; in handle_event_motion()
1091 handle_event_absmotion(struct libinput_event *ev, struct window *w) in handle_event_absmotion() argument
1094 double x = libinput_event_pointer_get_absolute_x_transformed(p, w->width), in handle_event_absmotion()
1095 y = libinput_event_pointer_get_absolute_y_transformed(p, w->height); in handle_event_absmotion()
1097 w->absx = x; in handle_event_absmotion()
1098 w->absy = y; in handle_event_absmotion()
1102 handle_event_touch(struct libinput_event *ev, struct window *w) in handle_event_touch() argument
1109 if (slot == -1 || slot >= (int) ARRAY_LENGTH(w->touches)) in handle_event_touch()
1112 touch = &w->touches[slot]; in handle_event_touch()
1125 x = libinput_event_touch_get_x_transformed(t, w->width), in handle_event_touch()
1126 y = libinput_event_touch_get_y_transformed(t, w->height); in handle_event_touch()
1134 handle_event_axis(struct libinput_event *ev, struct window *w) in handle_event_axis() argument
1148 w->scroll.vy += value; in handle_event_axis()
1149 w->scroll.vy = clip(w->scroll.vy, 0, w->height); in handle_event_axis()
1155 w->scroll.vy_discrete += data->scroll_accumulated.y; in handle_event_axis()
1156 w->scroll.vy_discrete = clip(w->scroll.vy_discrete, 0, w->height); in handle_event_axis()
1165 w->scroll.hx += value; in handle_event_axis()
1166 w->scroll.hx = clip(w->scroll.hx, 0, w->width); in handle_event_axis()
1172 w->scroll.hx_discrete += data->scroll_accumulated.x; in handle_event_axis()
1173 w->scroll.hx_discrete = clip(w->scroll.hx_discrete, 0, w->width); in handle_event_axis()
1180 handle_event_keyboard(struct libinput_event *ev, struct window *w) in handle_event_keyboard() argument
1193 change_ptraccel(w, 0.1); in handle_event_keyboard()
1196 change_ptraccel(w, -0.1); in handle_event_keyboard()
1206 handle_event_button(struct libinput_event *ev, struct window *w) in handle_event_button() argument
1216 w->buttons.l = is_press; in handle_event_button()
1219 w->buttons.r = is_press; in handle_event_button()
1222 w->buttons.m = is_press; in handle_event_button()
1225 w->buttons.other = is_press; in handle_event_button()
1226 w->buttons.other_name = libevdev_event_code_get_name(EV_KEY, in handle_event_button()
1233 handle_event_swipe(struct libinput_event *ev, struct window *w) in handle_event_swipe() argument
1243 w->swipe.nfingers = nfingers; in handle_event_swipe()
1244 w->swipe.x = w->width/2; in handle_event_swipe()
1245 w->swipe.y = w->height/2; in handle_event_swipe()
1250 w->swipe.x += dx; in handle_event_swipe()
1251 w->swipe.y += dy; in handle_event_swipe()
1254 w->swipe.nfingers = 0; in handle_event_swipe()
1255 w->swipe.x = w->width/2; in handle_event_swipe()
1256 w->swipe.y = w->height/2; in handle_event_swipe()
1264 handle_event_pinch(struct libinput_event *ev, struct window *w) in handle_event_pinch() argument
1274 w->pinch.nfingers = nfingers; in handle_event_pinch()
1275 w->pinch.x = w->width/2; in handle_event_pinch()
1276 w->pinch.y = w->height/2; in handle_event_pinch()
1281 w->pinch.x += dx; in handle_event_pinch()
1282 w->pinch.y += dy; in handle_event_pinch()
1283 w->pinch.scale = libinput_event_gesture_get_scale(g); in handle_event_pinch()
1284 w->pinch.angle += libinput_event_gesture_get_angle_delta(g); in handle_event_pinch()
1287 w->pinch.nfingers = 0; in handle_event_pinch()
1288 w->pinch.x = w->width/2; in handle_event_pinch()
1289 w->pinch.y = w->height/2; in handle_event_pinch()
1290 w->pinch.angle = 0.0; in handle_event_pinch()
1291 w->pinch.scale = 1.0; in handle_event_pinch()
1299 handle_event_tablet(struct libinput_event *ev, struct window *w) in handle_event_tablet() argument
1305 const int mask = ARRAY_LENGTH(w->tool.deltas); in handle_event_tablet()
1309 x = libinput_event_tablet_tool_get_x_transformed(t, w->width); in handle_event_tablet()
1310 y = libinput_event_tablet_tool_get_y_transformed(t, w->height); in handle_event_tablet()
1316 w->tool.x_in = 0; in handle_event_tablet()
1317 w->tool.y_in = 0; in handle_event_tablet()
1318 w->tool.x_down = 0; in handle_event_tablet()
1319 w->tool.y_down = 0; in handle_event_tablet()
1320 w->tool.x_up = 0; in handle_event_tablet()
1321 w->tool.y_up = 0; in handle_event_tablet()
1323 w->tool.x_in = x; in handle_event_tablet()
1324 w->tool.y_in = y; in handle_event_tablet()
1325 w->tool.ndeltas = 0; in handle_event_tablet()
1326 w->tool.deltas[0].x = w->width/2; in handle_event_tablet()
1327 w->tool.deltas[0].y = w->height/2; in handle_event_tablet()
1331 w->tool.pressure = libinput_event_tablet_tool_get_pressure(t); in handle_event_tablet()
1332 w->tool.distance = libinput_event_tablet_tool_get_distance(t); in handle_event_tablet()
1333 w->tool.tilt_x = libinput_event_tablet_tool_get_tilt_x(t); in handle_event_tablet()
1334 w->tool.tilt_y = libinput_event_tablet_tool_get_tilt_y(t); in handle_event_tablet()
1337 w->tool.x_down = x; in handle_event_tablet()
1338 w->tool.y_down = y; in handle_event_tablet()
1339 w->tool.is_down = true; in handle_event_tablet()
1341 w->tool.x_up = x; in handle_event_tablet()
1342 w->tool.y_up = y; in handle_event_tablet()
1343 w->tool.is_down = false; in handle_event_tablet()
1347 w->tool.x = x; in handle_event_tablet()
1348 w->tool.y = y; in handle_event_tablet()
1349 w->tool.pressure = libinput_event_tablet_tool_get_pressure(t); in handle_event_tablet()
1350 w->tool.distance = libinput_event_tablet_tool_get_distance(t); in handle_event_tablet()
1351 w->tool.tilt_x = libinput_event_tablet_tool_get_tilt_x(t); in handle_event_tablet()
1352 w->tool.tilt_y = libinput_event_tablet_tool_get_tilt_y(t); in handle_event_tablet()
1353 w->tool.rotation = libinput_event_tablet_tool_get_rotation(t); in handle_event_tablet()
1354 w->tool.size_major = libinput_event_tablet_tool_get_size_major(t); in handle_event_tablet()
1355 w->tool.size_minor = libinput_event_tablet_tool_get_size_minor(t); in handle_event_tablet()
1359 idx = w->tool.ndeltas % mask; in handle_event_tablet()
1360 point = w->tool.deltas[idx]; in handle_event_tablet()
1362 idx = (w->tool.ndeltas + 1) % mask; in handle_event_tablet()
1365 w->tool.deltas[idx] = point; in handle_event_tablet()
1366 w->tool.ndeltas++; in handle_event_tablet()
1372 w->buttons.other = is_press; in handle_event_tablet()
1373 w->buttons.other_name = libevdev_event_code_get_name(EV_KEY, in handle_event_tablet()
1382 handle_event_tablet_pad(struct libinput_event *ev, struct window *w) in handle_event_tablet_pad() argument
1398 w->buttons.other = is_press; in handle_event_tablet_pad()
1399 w->buttons.other_name = pad_buttons[min(button, 10)]; in handle_event_tablet_pad()
1404 w->pad.ring.number = number; in handle_event_tablet_pad()
1405 w->pad.ring.position = position; in handle_event_tablet_pad()
1410 w->pad.strip.number = number; in handle_event_tablet_pad()
1411 w->pad.strip.position = position; in handle_event_tablet_pad()
1422 struct window *w = libinput_get_user_data(li); in handle_event_libinput() local
1436 handle_event_motion(ev, w); in handle_event_libinput()
1439 handle_event_absmotion(ev, w); in handle_event_libinput()
1445 handle_event_touch(ev, w); in handle_event_libinput()
1450 handle_event_axis(ev, w); in handle_event_libinput()
1453 handle_event_button(ev, w); in handle_event_libinput()
1456 if (handle_event_keyboard(ev, w)) { in handle_event_libinput()
1465 handle_event_swipe(ev, w); in handle_event_libinput()
1470 handle_event_pinch(ev, w); in handle_event_libinput()
1476 handle_event_tablet(ev, w); in handle_event_libinput()
1481 handle_event_tablet_pad(ev, w); in handle_event_libinput()
1492 gtk_widget_queue_draw(w->area); in handle_event_libinput()
1522 struct window w = {0}; in main() local
1576 w.grab = true; in main()
1602 li = tools_open_backend(backend, seat_or_device, verbose, &w.grab); in main()
1606 libinput_set_user_data(li, &w); in main()
1608 window_init(&w); in main()
1609 w.options = options; in main()
1615 window_cleanup(&w); in main()