diff --git a/src/accel-attributes.c b/src/accel-attributes.c index 45fed2c..e510486 100644 --- a/src/accel-attributes.c +++ b/src/accel-attributes.c @@ -117,3 +117,16 @@ get_accel_scale (GUdevDevice *device, reset_accel_scale (scale_vec); return TRUE; } + +const char * +accel_location_to_string (AccelLocation location) +{ + switch (location) { + case ACCEL_LOCATION_DISPLAY: + return "display"; + case ACCEL_LOCATION_BASE: + return "base"; + default: + g_assert_not_reached (); + } +} diff --git a/src/accel-attributes.h b/src/accel-attributes.h index 4f7031e..1482a13 100644 --- a/src/accel-attributes.h +++ b/src/accel-attributes.h @@ -24,5 +24,6 @@ gboolean parse_accel_location (const char *location, AccelLocation *value); gboolean parse_accel_label (const char *location, AccelLocation *value); +const char *accel_location_to_string (AccelLocation location); gboolean get_accel_scale (GUdevDevice *device, AccelScale *scale_vec);