1
0
forked from drath/libratbag

Add ratbag_profile_init_buttons

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2015-08-26 13:49:50 +10:00
parent abe3244f6b
commit 40a08f2a55
2 changed files with 14 additions and 0 deletions

View File

@@ -238,6 +238,9 @@ ratbag_profile_get_drv_data(struct ratbag_profile *profile)
return profile->drv_data;
}
int
ratbag_profile_init_buttons(struct ratbag_profile *profile, unsigned int count);
/**
* Override the auto-picked hidraw device.
*/

View File

@@ -689,6 +689,17 @@ ratbag_create_button(struct ratbag_profile *profile, unsigned int index)
return button;
}
int
ratbag_profile_init_buttons(struct ratbag_profile *profile, unsigned int count)
{
unsigned int i;
for (i = 0; i < count; i++)
ratbag_create_button(profile, i);
return 0;
}
LIBRATBAG_EXPORT struct ratbag_button*
ratbag_profile_get_button_by_index(struct ratbag_profile *profile,
unsigned int index)