[gnome-settings-daemon] wacom: Add type to string helper
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Add type to string helper
- Date: Tue, 22 Nov 2011 18:16:54 +0000 (UTC)
commit 2ae2c2002626f2886211ba874d9e42c22f1b6672
Author: Bastien Nocera <hadess hadess net>
Date: Mon Nov 21 17:30:54 2011 +0000
wacom: Add type to string helper
plugins/wacom/gsd-wacom-device.c | 19 +++++++++++++++++++
plugins/wacom/gsd-wacom-device.h | 1 +
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 6ab9187..14243fc 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -456,3 +456,22 @@ gsd_wacom_device_get_device_type (GsdWacomDevice *device)
return device->priv->type;
}
+
+const char *
+gsd_wacom_device_type_to_string (GsdWacomDeviceType type)
+{
+ switch (type) {
+ case WACOM_TYPE_INVALID:
+ return "Invalid";
+ case WACOM_TYPE_STYLUS:
+ return "Stylus";
+ case WACOM_TYPE_ERASER:
+ return "Eraser";
+ case WACOM_TYPE_CURSOR:
+ return "Wacom";
+ case WACOM_TYPE_PAD:
+ return "Pad";
+ default:
+ return "Unknown type";
+ }
+}
diff --git a/plugins/wacom/gsd-wacom-device.h b/plugins/wacom/gsd-wacom-device.h
index 278c2bf..d21067f 100644
--- a/plugins/wacom/gsd-wacom-device.h
+++ b/plugins/wacom/gsd-wacom-device.h
@@ -91,6 +91,7 @@ GSettings * gsd_wacom_device_get_settings (GsdWacomDevice *device);
GSettings * gsd_wacom_device_get_tool_settings (GsdWacomDevice *device);
GsdWacomDeviceType gsd_wacom_device_get_device_type (GsdWacomDevice *device);
+const char * gsd_wacom_device_type_to_string (GsdWacomDeviceType type);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]