• Home
  • Raw
  • Download

Lines Matching refs:tool

319 		   enum libinput_tablet_tool_type tool,  in tablet_update_tool()  argument
322 assert(tool != LIBINPUT_TOOL_NONE); in tablet_update_tool()
325 tablet->current_tool.type = tool; in tablet_update_tool()
354 struct libinput_tablet_tool *tool) in normalize_pressure() argument
374 if (tool->has_pressure_offset) in normalize_pressure()
375 offset = tool->pressure_offset; in normalize_pressure()
377 offset = tool->pressure_threshold.upper; in normalize_pressure()
494 struct libinput_tablet_tool *tool, in tablet_tool_process_delta() argument
530 tool, in tablet_tool_process_delta()
537 struct libinput_tablet_tool *tool) in tablet_update_pressure() argument
544 tablet->axes.pressure = normalize_pressure(absinfo, tool); in tablet_update_pressure()
699 struct libinput_tablet_tool *tool, in tablet_check_notify_axes() argument
713 tablet_update_pressure(tablet, device, tool); in tablet_check_notify_axes()
746 axes.delta = tablet_tool_process_delta(tablet, tool, device, &axes, time); in tablet_check_notify_axes()
910 struct libinput_tablet_tool *tool, in copy_axis_cap() argument
914 set_bit(tool->axis_caps, axis); in copy_axis_cap()
919 struct libinput_tablet_tool *tool, in copy_button_cap() argument
924 set_bit(tool->buttons, button); in copy_button_cap()
929 struct libinput_tablet_tool *tool) in tool_set_bits_from_libwacom() argument
944 s = libwacom_stylus_get_for_id(db, tool->tool_id); in tool_set_bits_from_libwacom()
953 copy_button_cap(tablet, tool, code); in tool_set_bits_from_libwacom()
956 copy_button_cap(tablet, tool, BTN_STYLUS2); in tool_set_bits_from_libwacom()
958 copy_button_cap(tablet, tool, BTN_STYLUS); in tool_set_bits_from_libwacom()
962 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL); in tool_set_bits_from_libwacom()
969 set_bit(tool->axis_caps, in tool_set_bits_from_libwacom()
973 tool, in tool_set_bits_from_libwacom()
976 tool, in tool_set_bits_from_libwacom()
981 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z); in tool_set_bits_from_libwacom()
983 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE); in tool_set_bits_from_libwacom()
985 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER); in tool_set_bits_from_libwacom()
987 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE); in tool_set_bits_from_libwacom()
996 struct libinput_tablet_tool *tool) in tool_set_bits() argument
998 enum libinput_tablet_tool_type type = tool->type; in tool_set_bits()
1000 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_X); in tool_set_bits()
1001 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_Y); in tool_set_bits()
1004 if (tool_set_bits_from_libwacom(tablet, tool) == 0) in tool_set_bits()
1017 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE); in tool_set_bits()
1018 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_DISTANCE); in tool_set_bits()
1019 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_X); in tool_set_bits()
1020 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_TILT_Y); in tool_set_bits()
1021 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_SLIDER); in tool_set_bits()
1032 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z); in tool_set_bits()
1036 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_ROTATION_Z); in tool_set_bits()
1037 copy_axis_cap(tablet, tool, LIBINPUT_TABLET_TOOL_AXIS_REL_WHEEL); in tool_set_bits()
1051 copy_button_cap(tablet, tool, BTN_STYLUS); in tool_set_bits()
1052 copy_button_cap(tablet, tool, BTN_STYLUS2); in tool_set_bits()
1056 copy_button_cap(tablet, tool, BTN_LEFT); in tool_set_bits()
1057 copy_button_cap(tablet, tool, BTN_MIDDLE); in tool_set_bits()
1058 copy_button_cap(tablet, tool, BTN_RIGHT); in tool_set_bits()
1059 copy_button_cap(tablet, tool, BTN_SIDE); in tool_set_bits()
1060 copy_button_cap(tablet, tool, BTN_EXTRA); in tool_set_bits()
1075 struct libinput_tablet_tool *tool) in tool_set_pressure_thresholds() argument
1084 tool->pressure_offset = 0; in tool_set_pressure_thresholds()
1085 tool->has_pressure_offset = false; in tool_set_pressure_thresholds()
1094 tool->pressure_offset = pressure->minimum; in tool_set_pressure_thresholds()
1110 tool->pressure_threshold.upper = hi; in tool_set_pressure_thresholds()
1111 tool->pressure_threshold.lower = lo; in tool_set_pressure_thresholds()
1123 struct libinput_tablet_tool *tool = NULL, *t; in tablet_get_tool() local
1131 tool = t; in tablet_get_tool()
1142 if (!tool) { in tablet_get_tool()
1152 tool = t; in tablet_get_tool()
1159 if (!tool && serial) in tablet_get_tool()
1165 if (!tool) { in tablet_get_tool()
1166 tool = zalloc(sizeof *tool); in tablet_get_tool()
1168 *tool = (struct libinput_tablet_tool) { in tablet_get_tool()
1175 tool_set_pressure_thresholds(tablet, tool); in tablet_get_tool()
1176 tool_set_bits(tablet, tool); in tablet_get_tool()
1178 list_insert(tool_list, &tool->link); in tablet_get_tool()
1181 return tool; in tablet_get_tool()
1188 struct libinput_tablet_tool *tool, in tablet_notify_button_mask() argument
1206 tool, in tablet_notify_button_mask()
1218 struct libinput_tablet_tool *tool, in tablet_notify_buttons() argument
1231 tool, in tablet_notify_buttons()
1238 struct libinput_tablet_tool *tool) in sanitize_pressure_distance() argument
1254 tool_in_contact = (pressure->value > tool->pressure_offset); in sanitize_pressure_distance()
1296 struct libinput_tablet_tool *tool) in sanitize_tablet_axes() argument
1298 sanitize_pressure_distance(tablet, tool); in sanitize_tablet_axes()
1305 struct libinput_tablet_tool *tool) in detect_pressure_offset() argument
1327 if (tool->has_pressure_offset) { in detect_pressure_offset()
1328 if (offset < tool->pressure_offset) in detect_pressure_offset()
1329 tool->pressure_offset = offset; in detect_pressure_offset()
1349 tablet_tool_type_to_string(tool->type), in detect_pressure_offset()
1350 tool->serial, in detect_pressure_offset()
1358 tablet_tool_type_to_string(tool->type), in detect_pressure_offset()
1359 tool->serial, in detect_pressure_offset()
1361 tool->pressure_offset = offset; in detect_pressure_offset()
1362 tool->has_pressure_offset = true; in detect_pressure_offset()
1363 tool->pressure_threshold.lower = pressure->minimum; in detect_pressure_offset()
1369 struct libinput_tablet_tool *tool) in detect_tool_contact() argument
1374 if (!bit_is_set(tool->axis_caps, LIBINPUT_TABLET_TOOL_AXIS_PRESSURE)) in detect_tool_contact()
1394 if (tool->has_pressure_offset) in detect_tool_contact()
1395 pressure -= (tool->pressure_offset - p->minimum); in detect_tool_contact()
1397 if (pressure <= tool->pressure_threshold.lower && in detect_tool_contact()
1400 } else if (pressure >= tool->pressure_threshold.upper && in detect_tool_contact()
1408 struct libinput_tablet_tool *tool) in tablet_mark_all_axes_changed() argument
1411 sizeof(tool->axis_caps), in tablet_mark_all_axes_changed()
1415 tool->axis_caps, in tablet_mark_all_axes_changed()
1422 struct libinput_tablet_tool *tool) in tablet_update_proximity_state() argument
1445 tablet_mark_all_axes_changed(tablet, tool); in tablet_update_proximity_state()
1541 struct libinput_tablet_tool *tool, in tablet_send_proximity_in() argument
1551 tool, in tablet_send_proximity_in()
1567 struct libinput_tablet_tool *tool, in tablet_send_proximity_out() argument
1577 tool, in tablet_send_proximity_out()
1594 struct libinput_tablet_tool *tool, in tablet_send_tip() argument
1602 tool, in tablet_send_tip()
1620 tool, in tablet_send_tip()
1640 struct libinput_tablet_tool *tool, in tablet_send_axes() argument
1658 tool, in tablet_send_axes()
1670 struct libinput_tablet_tool *tool, in tablet_send_buttons() argument
1678 tool, in tablet_send_buttons()
1687 tool, in tablet_send_buttons()
1695 struct libinput_tablet_tool *tool, in tablet_send_events() argument
1712 if (tablet_check_notify_axes(tablet, device, tool, &axes, time)) in tablet_send_events()
1719 tablet_send_proximity_in(tablet, tool, device, &axes, time); in tablet_send_events()
1720 if (!tablet_send_tip(tablet, tool, device, &axes, time)) in tablet_send_events()
1721 tablet_send_axes(tablet, tool, device, &axes, time); in tablet_send_events()
1726 tablet_send_buttons(tablet, tool, device, time); in tablet_send_events()
1728 if (tablet_send_proximity_out(tablet, tool, device, &axes, time)) { in tablet_send_events()
1878 struct libinput_tablet_tool *tool; in tablet_flush() local
1884 tool = tablet_get_current_tool(tablet); in tablet_flush()
1885 if (!tool) in tablet_flush()
1888 if (tool->type == LIBINPUT_TABLET_TOOL_TYPE_MOUSE || in tablet_flush()
1889 tool->type == LIBINPUT_TABLET_TOOL_TYPE_LENS) in tablet_flush()
1890 tablet_update_proximity_state(tablet, device, tool); in tablet_flush()
1908 tablet_mark_all_axes_changed(tablet, tool); in tablet_flush()
1909 detect_pressure_offset(tablet, device, tool); in tablet_flush()
1910 detect_tool_contact(tablet, device, tool); in tablet_flush()
1911 sanitize_tablet_axes(tablet, tool); in tablet_flush()
1914 tablet_send_events(tablet, tool, device, time); in tablet_flush()
2099 struct libinput_tablet_tool *tool, *tmp; in tablet_destroy() local
2105 list_for_each_safe(tool, tmp, &tablet->tool_list, link) { in tablet_destroy()
2106 libinput_tablet_tool_unref(tool); in tablet_destroy()
2177 enum libinput_tablet_tool_type tool; in tablet_check_initial_proximity() local
2179 for (tool = LIBINPUT_TABLET_TOOL_TYPE_PEN; in tablet_check_initial_proximity()
2180 tool <= LIBINPUT_TABLET_TOOL_TYPE_MAX; in tablet_check_initial_proximity()
2181 tool++) { in tablet_check_initial_proximity()
2182 code = tablet_tool_to_evcode(tool); in tablet_check_initial_proximity()
2189 tablet->tool_state = bit(tool); in tablet_check_initial_proximity()
2190 tablet->prev_tool_state = bit(tool); in tablet_check_initial_proximity()
2198 tablet_update_tool(tablet, device, tool, state); in tablet_check_initial_proximity()