• Home
  • Raw
  • Download

Lines Matching refs:sw

113 	enum libinput_switch sw = _i; /* ranged test */  in START_TEST()  local
118 litest_switch_action(dev, sw, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
121 if (libinput_device_switch_has_switch(dev->libinput_device, sw) > 0) { in START_TEST()
123 litest_is_switch_event(event, sw, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
129 litest_switch_action(dev, sw, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
132 if (libinput_device_switch_has_switch(dev->libinput_device, sw) > 0) { in START_TEST()
134 litest_is_switch_event(event, sw, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
148 enum libinput_switch sw = _i; /* ranged test */ in START_TEST() local
150 if (libinput_device_switch_has_switch(dev->libinput_device, sw) <= 0) in START_TEST()
156 litest_switch_action(dev, sw, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
160 litest_is_switch_event(event, sw, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
165 litest_switch_action(dev, sw, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
194 enum libinput_switch sw = _i; /* ranged test */ in START_TEST() local
196 if (libinput_device_switch_has_switch(dev->libinput_device, sw) <= 0) in START_TEST()
199 if (sw == LIBINPUT_SWITCH_LID && !lid_switch_is_reliable(dev)) in START_TEST()
203 litest_switch_action(dev, sw, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
214 litest_is_switch_event(event, sw, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
223 litest_switch_action(dev, sw, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
226 litest_is_switch_event(event, sw, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
239 enum libinput_switch sw = LIBINPUT_SWITCH_LID; in START_TEST() local
241 if (libinput_device_switch_has_switch(dev->libinput_device, sw) <= 0) in START_TEST()
244 if (sw == LIBINPUT_SWITCH_LID && lid_switch_is_reliable(dev)) in START_TEST()
248 litest_switch_action(dev, sw, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
263 litest_switch_action(dev, sw, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
279 struct litest_device *sw = litest_current_device(); in START_TEST() local
281 struct libinput *li = sw->libinput; in START_TEST()
284 if (libinput_device_switch_has_switch(sw->libinput_device, which) <= 0) in START_TEST()
292 litest_grab_device(sw); in START_TEST()
295 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
304 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
313 litest_ungrab_device(sw); in START_TEST()
319 struct litest_device *sw = litest_current_device(); in START_TEST() local
321 struct libinput *li = sw->libinput; in START_TEST()
324 if (libinput_device_switch_has_switch(sw->libinput_device, which) <= 0) in START_TEST()
336 litest_grab_device(sw); in START_TEST()
337 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
339 litest_ungrab_device(sw); in START_TEST()
351 struct litest_device *sw = litest_current_device(); in START_TEST() local
353 struct libinput *li = sw->libinput; in START_TEST()
356 if (libinput_device_switch_has_switch(sw->libinput_device, which) <= 0) in START_TEST()
364 litest_grab_device(sw); in START_TEST()
365 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
367 litest_ungrab_device(sw); in START_TEST()
390 struct litest_device *sw = litest_current_device(); in START_TEST() local
392 struct libinput *li = sw->libinput; in START_TEST()
396 if (libinput_device_switch_has_switch(sw->libinput_device, which) <= 0) in START_TEST()
411 litest_grab_device(sw); in START_TEST()
412 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
413 litest_ungrab_device(sw); in START_TEST()
431 struct litest_device *sw = litest_current_device(); in START_TEST() local
433 struct libinput *li = sw->libinput; in START_TEST()
436 if (libinput_device_switch_has_switch(sw->libinput_device, which) <= 0) in START_TEST()
452 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
466 struct litest_device *sw = litest_current_device(); in START_TEST() local
468 struct libinput *li = sw->libinput; in START_TEST()
471 if (libinput_device_switch_has_switch(sw->libinput_device, which) <= 0) in START_TEST()
482 litest_grab_device(sw); in START_TEST()
483 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
484 litest_ungrab_device(sw); in START_TEST()
493 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
507 struct litest_device *sw = litest_current_device(); in START_TEST() local
509 struct libinput *li = sw->libinput; in START_TEST()
512 if (libinput_device_switch_has_switch(sw->libinput_device, which) <= 0) in START_TEST()
529 litest_grab_device(sw); in START_TEST()
530 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
531 litest_ungrab_device(sw); in START_TEST()
540 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
555 struct litest_device *sw = litest_current_device(); in START_TEST() local
557 struct libinput *li = sw->libinput; in START_TEST()
560 if (!switch_has_lid(sw)) in START_TEST()
565 litest_grab_device(sw); in START_TEST()
567 litest_switch_action(sw, in START_TEST()
586 litest_switch_action(sw, in START_TEST()
591 litest_ungrab_device(sw); in START_TEST()
599 struct litest_device *sw = litest_current_device(); in START_TEST() local
601 struct libinput *li = sw->libinput; in START_TEST()
603 if (!switch_has_lid(sw)) in START_TEST()
611 litest_grab_device(sw); in START_TEST()
612 litest_switch_action(sw, in START_TEST()
615 litest_ungrab_device(sw); in START_TEST()
641 struct litest_device *sw; in START_TEST() local
648 sw = litest_add_device(li, LITEST_LID_SWITCH); in START_TEST()
651 sw = litest_add_device(li, LITEST_THINKPAD_EXTRABUTTONS); in START_TEST()
662 litest_grab_device(sw); in START_TEST()
663 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
665 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
667 litest_ungrab_device(sw); in START_TEST()
672 litest_delete_device(sw); in START_TEST()
682 struct litest_device *touchpad, *sw; in START_TEST() local
689 sw = litest_add_device(li, LITEST_LID_SWITCH); in START_TEST()
692 sw = litest_add_device(li, LITEST_THINKPAD_EXTRABUTTONS); in START_TEST()
703 litest_grab_device(sw); in START_TEST()
704 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); in START_TEST()
706 litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_OFF); in START_TEST()
708 litest_ungrab_device(sw); in START_TEST()
710 litest_delete_device(sw); in START_TEST()
721 struct litest_device *sw = litest_current_device(); in START_TEST() local
722 struct libinput *li = sw->libinput; in START_TEST()
729 if (!switch_has_lid(sw)) in START_TEST()
734 litest_grab_device(sw); in START_TEST()
735 litest_switch_action(sw, in START_TEST()
739 litest_ungrab_device(sw); in START_TEST()
743 fd = open(libevdev_uinput_get_devnode(sw->uinput), O_RDONLY|O_NONBLOCK); in START_TEST()
776 struct litest_device *sw = litest_current_device(); in START_TEST() local
779 struct libevdev *evdev = sw->evdev; in START_TEST()
784 litest_grab_device(sw); in START_TEST()
785 litest_switch_action(sw, in START_TEST()
788 litest_ungrab_device(sw); in START_TEST()
792 fd = open(libevdev_uinput_get_devnode(sw->uinput), O_RDONLY|O_NONBLOCK); in START_TEST()
797 keyboard = litest_add_device(sw->libinput, LITEST_KEYBOARD); in START_TEST()
802 libevdev_uinput_get_devnode(sw->uinput)); in START_TEST()
844 struct litest_device *sw = litest_current_device(); in START_TEST() local
845 struct libinput *li = sw->libinput; in START_TEST()
847 struct libevdev *evdev = sw->evdev; in START_TEST()
852 if (!switch_has_lid(sw)) in START_TEST()
862 litest_grab_device(sw); in START_TEST()
863 litest_switch_action(sw, in START_TEST()
867 litest_ungrab_device(sw); in START_TEST()
871 fd = open(libevdev_uinput_get_devnode(sw->uinput), O_RDONLY|O_NONBLOCK); in START_TEST()
905 struct litest_device *sw = litest_current_device(); in START_TEST() local
906 struct libinput *li = sw->libinput; in START_TEST()
910 litest_keyboard_key(sw, KEY_VOLUMEUP, true); in START_TEST()
911 litest_keyboard_key(sw, KEY_VOLUMEUP, false); in START_TEST()
921 struct litest_device *sw = litest_current_device(); in START_TEST() local
923 struct libinput *li = sw->libinput; in START_TEST()
925 if (!switch_has_tablet_mode(sw)) in START_TEST()
928 litest_grab_device(sw); in START_TEST()
929 litest_switch_action(sw, in START_TEST()
945 litest_switch_action(sw, in START_TEST()
954 litest_ungrab_device(sw); in START_TEST()
962 struct litest_device *sw = litest_current_device(); in START_TEST() local
964 struct libinput *li = sw->libinput; in START_TEST()
968 if (!switch_has_tablet_mode(sw)) in START_TEST()
977 litest_switch_action(sw, in START_TEST()
1010 litest_switch_action(sw, in START_TEST()
1031 struct litest_device *sw = litest_current_device(); in START_TEST() local
1033 struct libinput *li = sw->libinput; in START_TEST()
1036 if (!switch_has_tablet_mode(sw)) in START_TEST()
1043 litest_switch_action(sw, in START_TEST()
1049 litest_switch_action(sw, in START_TEST()
1067 litest_switch_action(sw, in START_TEST()
1088 struct litest_device *sw = litest_current_device(); in START_TEST() local
1090 struct libinput *li = sw->libinput; in START_TEST()
1092 if (!switch_has_tablet_mode(sw)) in START_TEST()
1102 litest_switch_action(sw, in START_TEST()
1111 litest_switch_action(sw, in START_TEST()
1126 struct litest_device *sw = litest_current_device(); in START_TEST() local
1128 struct libinput *li = sw->libinput; in START_TEST()
1130 if (!switch_has_tablet_mode(sw)) in START_TEST()
1133 litest_switch_action(sw, in START_TEST()
1146 litest_switch_action(sw, in START_TEST()
1161 struct litest_device *sw = litest_current_device(); in START_TEST() local
1163 struct libinput *li = sw->libinput; in START_TEST()
1167 if (!switch_has_tablet_mode(sw)) in START_TEST()
1177 libevdev_grab(sw->evdev, LIBEVDEV_GRAB); in START_TEST()
1178 litest_switch_action(sw, in START_TEST()
1181 libevdev_grab(sw->evdev, LIBEVDEV_UNGRAB); in START_TEST()
1212 litest_grab_device(sw); in START_TEST()
1213 litest_switch_action(sw, in START_TEST()
1216 litest_ungrab_device(sw); in START_TEST()
1229 struct litest_device *sw = litest_current_device(); in START_TEST() local
1231 struct libinput *li = sw->libinput; in START_TEST()
1233 if (!switch_has_tablet_mode(sw)) in START_TEST()
1237 litest_grab_device(sw); in START_TEST()
1238 litest_switch_action(sw, in START_TEST()
1242 litest_ungrab_device(sw); in START_TEST()
1246 litest_switch_action(sw, in START_TEST()
1258 litest_switch_action(sw, in START_TEST()
1273 struct litest_device *sw = litest_current_device(); in START_TEST() local
1275 struct libinput *li = sw->libinput; in START_TEST()
1277 if (!switch_has_tablet_mode(sw)) in START_TEST()
1289 litest_grab_device(sw); in START_TEST()
1290 litest_switch_action(sw, in START_TEST()
1301 litest_switch_action(sw, in START_TEST()
1311 litest_ungrab_device(sw); in START_TEST()
1319 struct litest_device *sw = litest_current_device(); in START_TEST() local
1321 struct libinput *li = sw->libinput; in START_TEST()
1323 if (!switch_has_tablet_mode(sw)) in START_TEST()
1326 litest_grab_device(sw); in START_TEST()
1327 litest_switch_action(sw, in START_TEST()
1342 litest_switch_action(sw, in START_TEST()
1352 litest_ungrab_device(sw); in START_TEST()
1360 struct litest_device *sw = litest_current_device(); in START_TEST() local
1361 struct libinput *li = sw->libinput; in START_TEST()
1363 if (!libevdev_has_event_code(sw->evdev, EV_SW, SW_DOCK)) in START_TEST()
1368 litest_grab_device(sw); in START_TEST()
1369 litest_event(sw, EV_SW, SW_DOCK, 1); in START_TEST()
1372 litest_event(sw, EV_SW, SW_DOCK, 0); in START_TEST()
1374 litest_ungrab_device(sw); in START_TEST()