[gnome-settings-daemon] wacom: add fake Huion H610 Pro for tests



commit 2e6852743ed9942d288f21b9506e3051617adad8
Author: Benjamin Tissoires <benjamin tissoires redhat com>
Date:   Fri Mar 13 10:12:30 2015 -0400

    wacom: add fake Huion H610 Pro for tests
    
    Needs libwacom 0.13.0 (or the Huion entry manually pushed to the libwacom
    database). It will ignore the fake device if libwacom is not new enough.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746158

 plugins/wacom/gsd-wacom-device.c |   24 ++++++++++++++++++++++++
 plugins/wacom/gsd-wacom-device.h |    1 +
 plugins/wacom/list-wacom.c       |    3 +++
 3 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 6ac68ea..2e0ea7b 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -2230,3 +2230,27 @@ gsd_wacom_device_create_fake_intuos4 (void)
 
        return devices;
 }
+
+GList *
+gsd_wacom_device_create_fake_h610pro (void)
+{
+       GsdWacomDevice *device;
+       GList *devices;
+
+       device = gsd_wacom_device_create_fake (WACOM_TYPE_STYLUS,
+                                              "Huion H610 Pro",
+                                              "Huion H610 Pro stylus");
+       if (!device) {
+               g_warning ("Not appending Huion H610 Pro, libwacom is not new enough");
+               return NULL;
+       }
+
+       devices = g_list_prepend (NULL, device);
+
+       device = gsd_wacom_device_create_fake (WACOM_TYPE_PAD,
+                                              "Huion H610 Pro",
+                                              "Huion H610 Pro pad");
+       devices = g_list_prepend (devices, device);
+
+       return devices;
+}
diff --git a/plugins/wacom/gsd-wacom-device.h b/plugins/wacom/gsd-wacom-device.h
index dd3d439..dcb5144 100644
--- a/plugins/wacom/gsd-wacom-device.h
+++ b/plugins/wacom/gsd-wacom-device.h
@@ -193,6 +193,7 @@ GList * gsd_wacom_device_create_fake_cintiq   (void);
 GList * gsd_wacom_device_create_fake_bt       (void);
 GList * gsd_wacom_device_create_fake_x201     (void);
 GList * gsd_wacom_device_create_fake_intuos4  (void);
+GList * gsd_wacom_device_create_fake_h610pro  (void);
 
 G_END_DECLS
 
diff --git a/plugins/wacom/list-wacom.c b/plugins/wacom/list-wacom.c
index 95ccffe..4b15b9a 100644
--- a/plugins/wacom/list-wacom.c
+++ b/plugins/wacom/list-wacom.c
@@ -320,6 +320,9 @@ list_fake_devices (void)
 
        devices = gsd_wacom_device_create_fake_intuos4 ();
        list_devices (devices);
+
+       devices = gsd_wacom_device_create_fake_h610pro ();
+       list_devices (devices);
 }
 
 int main (int argc, char **argv)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]