forked from drath/libratbag
Add an API to check if an action type can be configured for a device
This is just a placeholder for now, not yet implemented. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -598,6 +598,27 @@ enum ratbag_button_action_type {
|
||||
enum ratbag_button_action_type
|
||||
ratbag_button_get_action_type(struct ratbag_button *button);
|
||||
|
||||
/**
|
||||
* @ingroup device
|
||||
*
|
||||
* Check if a button supports a specific action type. Not all devices allow
|
||||
* all buttons to be assigned any action. Ability to change a button to a
|
||||
* given action type does not guarantee that any specific action can be
|
||||
* configured.
|
||||
*
|
||||
* @note It is a client bug to pass in @ref
|
||||
* RATBAG_BUTTON_ACTION_TYPE_UNKNOWN or @ref
|
||||
* RATBAG_BUTTON_ACTION_TYPE_UNKNOWN.
|
||||
*
|
||||
* @param button A previously initialized button
|
||||
* @param action_type An action type
|
||||
*
|
||||
* @return non-zero if the action type is supported, zero otherwise.
|
||||
*/
|
||||
int
|
||||
ratbag_button_has_action_type(struct ratbag_button *button,
|
||||
enum ratbag_button_action_type action_type);
|
||||
|
||||
enum ratbag_button_action_special {
|
||||
/**
|
||||
* This button is not set up for a special action
|
||||
|
||||
Reference in New Issue
Block a user