[gnome-settings-daemon] wacom: Export the number of buttons on stylus
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Export the number of buttons on stylus
- Date: Mon, 16 Jan 2012 17:30:33 +0000 (UTC)
commit b43d773dbc09578a4b1b478d207549846213720a
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jan 16 17:06:56 2012 +0000
wacom: Export the number of buttons on stylus
plugins/wacom/gsd-wacom-device.c | 10 ++++++++++
plugins/wacom/gsd-wacom-device.h | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 8396793..5ef89a5 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -55,6 +55,7 @@ struct GsdWacomStylusPrivate
const char *icon_name;
GSettings *settings;
gboolean has_eraser;
+ int num_buttons;
};
static void gsd_wacom_stylus_class_init (GsdWacomStylusClass *klass);
@@ -137,6 +138,7 @@ gsd_wacom_stylus_new (GsdWacomDevice *device,
stylus->priv->type = libwacom_stylus_get_type (wstylus);
stylus->priv->icon_name = get_icon_name_from_type (stylus->priv->type);
stylus->priv->has_eraser = libwacom_stylus_has_eraser (wstylus);
+ stylus->priv->num_buttons = libwacom_stylus_get_num_buttons (wstylus);
return stylus;
}
@@ -181,6 +183,14 @@ gsd_wacom_stylus_get_has_eraser (GsdWacomStylus *stylus)
return stylus->priv->has_eraser;
}
+int
+gsd_wacom_stylus_get_num_buttons (GsdWacomStylus *stylus)
+{
+ g_return_val_if_fail (GSD_IS_WACOM_STYLUS (stylus), -1);
+
+ return stylus->priv->num_buttons;
+}
+
GsdWacomStylusType
gsd_wacom_stylus_get_stylus_type (GsdWacomStylus *stylus)
{
diff --git a/plugins/wacom/gsd-wacom-device.h b/plugins/wacom/gsd-wacom-device.h
index 4c808b5..06acf08 100644
--- a/plugins/wacom/gsd-wacom-device.h
+++ b/plugins/wacom/gsd-wacom-device.h
@@ -82,6 +82,7 @@ const char * gsd_wacom_stylus_get_name (GsdWacomStylus *stylus);
const char * gsd_wacom_stylus_get_icon_name (GsdWacomStylus *stylus);
GsdWacomDevice * gsd_wacom_stylus_get_device (GsdWacomStylus *stylus);
gboolean gsd_wacom_stylus_get_has_eraser (GsdWacomStylus *stylus);
+int gsd_wacom_stylus_get_num_buttons(GsdWacomStylus *stylus);
GsdWacomStylusType gsd_wacom_stylus_get_stylus_type (GsdWacomStylus *stylus);
/* Device types to apply a setting to */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]