Lines Matching refs:prop

24 #include "util-prop-parsers.h"
48 * @param prop The value of the udev property (without the MOUSE_DPI=)
52 parse_mouse_dpi_property(const char *prop)
57 if (!prop)
60 while (*prop != 0) {
61 if (*prop == ' ') {
62 prop++;
65 if (*prop == '*') {
66 prop++;
68 if (!isdigit(prop[0]))
78 sscanf(prop, "%d@%d%n", &dpi, &rate, &nread);
80 sscanf(prop, "%d%n", &dpi, &nread);
81 if (!nread || dpi <= 0 || rate <= 0 || prop[nread] == '@')
86 prop += nread;
98 * @param prop The value of the udev property (without the MOUSE_WHEEL_CLICK_COUNT=)
102 parse_mouse_wheel_click_count_property(const char *prop)
106 if (!prop)
109 if (!safe_atoi(prop, &count) || abs(count) > 360)
122 * @param prop The value of the udev property (without the MOUSE_WHEEL_CLICK_ANGLE=)
126 parse_mouse_wheel_click_angle_property(const char *prop)
130 if (!prop)
133 if (!safe_atoi(prop, &angle) || abs(angle) > 360)
145 * @param prop The value of the property
151 parse_dimension_property(const char *prop, size_t *w, size_t *h)
155 if (!prop)
158 if (sscanf(prop, "%dx%d", &x, &y) != 2)
172 * @param prop The string value of the property
177 parse_calibration_property(const char *prop, float calibration_out[6])
179 if (!prop)
185 char **strv = strv_from_string(prop, " ", &num_calibration);
207 parse_switch_reliability_property(const char *prop,
210 if (!prop) {
215 if (streq(prop, "reliable"))
217 else if (streq(prop, "unreliable"))
219 else if (streq(prop, "write_open"))
232 * @param prop The value of the property
237 parse_tpkbcombo_layout_poperty(const char *prop,
240 if (!prop)
243 if (streq(prop, "below")) {
256 * @param prop The value of the property
262 parse_range_property(const char *prop, int *hi, int *lo)
266 if (!prop)
269 if (streq(prop, "none")) {
275 if (sscanf(prop, "%d:%d", &first, &second) != 2)
288 parse_boolean_property(const char *prop, bool *b)
290 if (!prop)
293 if (streq(prop, "1"))
295 else if (streq(prop, "0"))
368 parse_evcode_property(const char *prop, struct input_event *events, size_t *nevents)
377 char **strv = strv_from_string(prop, ";", &ncodes);
427 * where each element must be a named input prop OR a hexcode in the form
438 parse_input_prop_property(const char *prop, struct input_prop *props_out, size_t *nprops)
444 char **strv = strv_from_string(prop, ";", &count);
451 unsigned int prop;
463 if (safe_atou_base(s, &prop, 16)) {
464 if (prop > INPUT_PROP_MAX)
470 prop = (unsigned int)val;
472 props[idx].prop = prop;
498 parse_evdev_abs_prop(const char *prop, struct input_absinfo *abs)
500 char *str = safe_strdup(prop);
509 if (!prop || strlen(prop) > 24)