Lines Matching refs:group
55 struct libinput_tablet_pad_mode_group *group, in pad_mode_toggle_button_new() argument
74 pad_led_group_get_mode(struct pad_led_group *group) in pad_led_group_get_mode() argument
81 list_for_each(led, &group->led_list, link) { in pad_led_group_get_mode()
113 pad_led_new(struct libinput *libinput, const char *prefix, int group, int mode) in pad_led_new() argument
130 group, in pad_led_new()
153 struct pad_led_group *group = (struct pad_led_group *)g; in pad_led_group_destroy() local
157 list_for_each_safe(button, &group->toggle_button_list, link) in pad_led_group_destroy()
160 list_for_each_safe(led, &group->led_list, link) in pad_led_group_destroy()
163 free(group); in pad_led_group_destroy()
171 struct pad_led_group *group; in pad_group_new_basic() local
173 group = zalloc(sizeof *group); in pad_group_new_basic()
174 group->base.device = &pad->device->base; in pad_group_new_basic()
175 group->base.refcount = 1; in pad_group_new_basic()
176 group->base.index = group_index; in pad_group_new_basic()
177 group->base.current_mode = 0; in pad_group_new_basic()
178 group->base.num_modes = nleds; in pad_group_new_basic()
179 group->base.destroy = pad_led_group_destroy; in pad_group_new_basic()
180 list_init(&group->toggle_button_list); in pad_group_new_basic()
181 list_init(&group->led_list); in pad_group_new_basic()
183 return group; in pad_group_new_basic()
200 struct pad_led_group *group; in pad_group_new() local
203 group = pad_group_new_basic(pad, group_index, nleds); in pad_group_new()
204 if (!group) in pad_group_new()
214 list_insert(&group->led_list, &led->link); in pad_group_new()
217 rc = pad_led_group_get_mode(group); in pad_group_new()
223 group->base.current_mode = rc; in pad_group_new()
225 return group; in pad_group_new()
232 pad_led_group_destroy(&group->base); in pad_group_new()
281 struct pad_led_group *group; in pad_init_led_groups() local
302 group = pad_group_new(pad, i, nmodes, syspath); in pad_init_led_groups()
303 if (!group) in pad_init_led_groups()
305 list_insert(&pad->modes.mode_group_list, &group->base.link); in pad_init_led_groups()
309 group = pad_group_new(pad, i, nmodes, syspath); in pad_init_led_groups()
310 if (!group) in pad_init_led_groups()
312 list_insert(&pad->modes.mode_group_list, &group->base.link); in pad_init_led_groups()
316 group = pad_group_new(pad, i, nmodes, syspath); in pad_init_led_groups()
317 if (!group) in pad_init_led_groups()
319 list_insert(&pad->modes.mode_group_list, &group->base.link); in pad_init_led_groups()
324 group = pad_group_new(pad, i, nmodes, syspath); in pad_init_led_groups()
325 if (!group) in pad_init_led_groups()
327 list_insert(&pad->modes.mode_group_list, &group->base.link); in pad_init_led_groups()
340 struct libinput_tablet_pad_mode_group *group; in pad_get_mode_group() local
342 list_for_each(group, &pad->modes.mode_group_list, link) { in pad_get_mode_group()
343 if (group->index == index) in pad_get_mode_group()
344 return group; in pad_get_mode_group()
380 struct libinput_tablet_pad_mode_group *group; in pad_init_mode_buttons() local
406 group = pad_get_mode_group(pad, group_idx); in pad_init_mode_buttons()
407 if (!group) { in pad_init_mode_buttons()
415 group->button_mask |= 1 << i; in pad_init_mode_buttons()
421 b = pad_mode_toggle_button_new(pad, group, i); in pad_init_mode_buttons()
424 g = (struct pad_led_group*)group; in pad_init_mode_buttons()
426 group->toggle_button_mask |= 1 << i; in pad_init_mode_buttons()
436 struct libinput_tablet_pad_mode_group *group; in pad_init_mode_rings() local
447 group = pad_get_mode_group(pad, i); in pad_init_mode_rings()
448 group->ring_mask |= 0x1; in pad_init_mode_rings()
451 group = pad_get_mode_group(pad, i); in pad_init_mode_rings()
452 group->ring_mask |= 0x2; in pad_init_mode_rings()
463 struct libinput_tablet_pad_mode_group *group; in pad_init_mode_strips() local
474 group = pad_get_mode_group(pad, i); in pad_init_mode_strips()
475 group->strip_mask |= 0x1; in pad_init_mode_strips()
478 group = pad_get_mode_group(pad, i); in pad_init_mode_strips()
479 group->strip_mask |= 0x2; in pad_init_mode_strips()
533 struct pad_led_group *group; in pad_init_fallback_group() local
535 group = pad_group_new_basic(pad, 0, 1); in pad_init_fallback_group()
536 if (!group) in pad_init_fallback_group()
542 group->base.button_mask = -1; in pad_init_fallback_group()
543 group->base.strip_mask = -1; in pad_init_fallback_group()
544 group->base.ring_mask = -1; in pad_init_fallback_group()
545 group->base.toggle_button_mask = 0; in pad_init_fallback_group()
547 list_insert(&pad->modes.mode_group_list, &group->base.link); in pad_init_fallback_group()
580 struct libinput_tablet_pad_mode_group *group; in pad_destroy_leds() local
582 list_for_each_safe(group, &pad->modes.mode_group_list, link) in pad_destroy_leds()
583 libinput_tablet_pad_mode_group_unref(group); in pad_destroy_leds()
591 struct pad_led_group *group = (struct pad_led_group*)g; in pad_button_update_mode() local
600 rc = pad_led_group_get_mode(group); in pad_button_update_mode()
602 group->base.current_mode = rc; in pad_button_update_mode()
609 struct libinput_tablet_pad_mode_group *group; in evdev_device_tablet_pad_get_num_mode_groups() local
615 list_for_each(group, &pad->modes.mode_group_list, link) in evdev_device_tablet_pad_get_num_mode_groups()