Lines Matching defs:code
946 * at collecting lots of files than I am at writing code to collect
1670 code = *(e + 1);
1673 code == INPUT_PROP_SEMI_MT) {
1797 unsigned int code;
1799 code = ABS_X;
1800 if (!libevdev_has_event_code(d->evdev, EV_ABS, code))
1801 code = ABS_MT_POSITION_X;
1802 if (libevdev_has_event_code(d->evdev, EV_ABS, code)) {
1803 d->interface->min[ABS_X] = libevdev_get_abs_minimum(d->evdev, code);
1804 d->interface->max[ABS_X] = libevdev_get_abs_maximum(d->evdev, code);
1807 code = ABS_Y;
1808 if (!libevdev_has_event_code(d->evdev, EV_ABS, code))
1809 code = ABS_MT_POSITION_Y;
1810 if (libevdev_has_event_code(d->evdev, EV_ABS, code)) {
1811 d->interface->min[ABS_Y] = libevdev_get_abs_minimum(d->evdev, code);
1812 d->interface->max[ABS_Y] = libevdev_get_abs_maximum(d->evdev, code);
1954 unsigned int code, int value)
1958 if (!libevdev_has_event_code(d->evdev, type, code))
1961 if (d->skip_ev_syn && type == EV_SYN && code == SYN_REPORT)
1964 ret = libevdev_uinput_write_event(d->uinput, type, code, value);
2012 switch (ev->code) {
2031 if (!axis_replacement_value(d, axes, ev->code, &value))
2035 if (!axis_replacement_value(d, axes, ev->code, &value) &&
2038 ev->code,
2042 libevdev_event_code_get_name(EV_ABS, ev->code),
2043 ev->code);
2086 ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1;
2099 (ev->code == ABS_X || ev->code == ABS_Y))
2102 litest_event(d, ev->type, ev->code, value);
2122 ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1;
2135 (ev->code == ABS_X || ev->code == ABS_Y))
2138 litest_event(d, ev->type, ev->code, value);
2147 { .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN },
2148 { .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = -1 },
2149 { .type = EV_ABS, .code = ABS_MT_PRESSURE, .value = 0 },
2150 { .type = EV_ABS, .code = ABS_MT_TOUCH_MAJOR, .value = 0 },
2151 { .type = EV_ABS, .code = ABS_MT_TOUCH_MINOR, .value = 0 },
2152 { .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
2153 { .type = -1, .code = -1 }
2170 ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1;
2179 litest_event(d, ev->type, ev->code, value);
2412 switch (ev->code) {
2425 if (!axis_replacement_value(d, axes, ev->code, &value) &&
2427 int error = d->interface->get_axis_default(d, ev->code, &value);
2430 libevdev_event_code_get_name(EV_ABS, ev->code),
2431 ev->code);
2443 return value == -1 && (ev->code == ABS_PRESSURE || ev->code == ABS_DISTANCE);
2447 litest_tablet_set_tool_type(struct litest_device *d, unsigned int code)
2449 switch (code) {
2462 d->interface->tool_type = code;
2487 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2490 switch (evbit(ev->type, ev->code)) {
2497 litest_event(d, ev->type, ev->code, value);
2515 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2518 switch (evbit(ev->type, ev->code)) {
2525 litest_event(d, ev->type, ev->code, value);
2546 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2549 litest_event(d, ev->type, ev->code, value);
2656 { .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN },
2657 { .type = EV_ABS, .code = ABS_MT_DISTANCE, .value = 1 },
2658 { .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = -1 },
2659 { .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
2660 { .type = -1, .code = -1 }
2676 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2678 litest_event(d, ev->type, ev->code, value);
2748 { .type = EV_KEY, .code = button, .value = is_press ? 1 : 0 },
2749 { .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
2753 litest_event(d, ev->type, ev->code, ev->value);
2816 { .type = EV_KEY, .code = key, .value = is_press ? 1 : 0 },
2817 { .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
2821 litest_event(d, ev->type, ev->code, ev->value);
2829 unsigned int code;
2833 code = SW_LID;
2836 code = SW_TABLET_MODE;
2842 litest_event(dev, EV_SW, code, state);
2907 abs = libevdev_get_abs_info(dev->evdev, ev->code);
2910 if (ev->code == ABS_RX || ev->code == ABS_RY) {
2933 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2935 litest_event(d, ev->type, ev->code, value);
2946 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2948 litest_event(d, ev->type, ev->code, value);
2959 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2960 litest_event(d, ev->type, ev->code, ev->value);
2971 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2973 litest_event(d, ev->type, ev->code, value);
2984 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2986 litest_event(d, ev->type, ev->code, value);
2997 while (ev && (int16_t)ev->type != -1 && (int16_t)ev->code != -1) {
2998 litest_event(d, ev->type, ev->code, ev->value);
3400 int type, code;
3430 /* abs_info->value is used for the code and may be outside
3440 (code = *events++) != -1) {
3442 rc = libevdev_enable_property(dev, code);
3444 rc = libevdev_enable_event_code(dev, type, code,
3473 * If you have kernel 4.5 and libevdev 1.5.0 or later, this code
3534 int type, code;
3537 (code = va_arg(args, int)) != -1) {
3539 *event++ = code;
4452 unsigned int code)
4454 libevdev_disable_event_code(dev->evdev, type, code);
4460 unsigned int code)
4466 libevdev_enable_event_code(dev->evdev, type, code, NULL);
4476 e.code = ABS_X;
4481 e.code = ABS_Y;
4493 e.code = ABS_MT_POSITION_X;
4498 e.code = ABS_MT_POSITION_Y;