summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2012-01-30 17:28:39 -0800
committerBastien Nocera <hadess@hadess.net>2012-01-31 15:03:36 +0000
commitbef8095fd48427abab633ca9953126b178155a56 (patch)
treee4c7b9d9f743b64755d75c7bdd013d306213c069
parentbad13cebf5282ea3d762f55fce7e2edc00224978 (diff)
data: Introduce Puck type and IDs
Since I have them handy, it only makes sense to add them as well.
-rw-r--r--data/intuos-12x12.tablet2
-rw-r--r--data/intuos-12x18.tablet2
-rw-r--r--data/intuos-4x5.tablet2
-rw-r--r--data/intuos-6x8.tablet2
-rw-r--r--data/intuos-9x12.tablet2
-rw-r--r--data/intuos2-12x12.tablet2
-rw-r--r--data/intuos2-12x18.tablet2
-rw-r--r--data/intuos2-4x5.tablet2
-rw-r--r--data/intuos2-6x8.tablet2
-rw-r--r--data/intuos2-9x12.tablet2
-rw-r--r--data/intuos3-12x12.tablet2
-rw-r--r--data/intuos3-12x19.tablet2
-rw-r--r--data/intuos3-4x5.tablet2
-rw-r--r--data/intuos3-4x6.tablet2
-rw-r--r--data/intuos3-6x11.tablet2
-rw-r--r--data/intuos3-6x8.tablet2
-rw-r--r--data/intuos3-9x12.tablet2
-rw-r--r--data/intuos4-12x19.tablet2
-rw-r--r--data/intuos4-4x6.tablet2
-rw-r--r--data/intuos4-6x9-wl.tablet2
-rw-r--r--data/intuos4-6x9.tablet2
-rw-r--r--data/intuos4-8x13.tablet2
-rw-r--r--data/libwacom.stylus45
-rw-r--r--libwacom/libwacom-database.c4
-rw-r--r--libwacom/libwacom.c5
-rw-r--r--libwacom/libwacom.h9
-rw-r--r--libwacom/libwacomint.h1
27 files changed, 85 insertions, 23 deletions
diff --git a/data/intuos-12x12.tablet b/data/intuos-12x12.tablet
index 7da9d8d..de29bd0 100644
--- a/data/intuos-12x12.tablet
+++ b/data/intuos-12x12.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:0023
Class=Intuos
Width=12
Height=12
-Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;
+Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;0x096;0x094;
[Features]
Stylus=true
diff --git a/data/intuos-12x18.tablet b/data/intuos-12x18.tablet
index 27018dd..a46f0e2 100644
--- a/data/intuos-12x18.tablet
+++ b/data/intuos-12x18.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:0024
Class=Intuos
Width=18
Height=12
-Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;
+Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;0x096;0x094;
[Features]
Stylus=true
diff --git a/data/intuos-4x5.tablet b/data/intuos-4x5.tablet
index 8e1a05b..ddcff74 100644
--- a/data/intuos-4x5.tablet
+++ b/data/intuos-4x5.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:0020
Class=Intuos
Width=5
Height=4
-Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;
+Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;0x096;0x094;
[Features]
Stylus=true
diff --git a/data/intuos-6x8.tablet b/data/intuos-6x8.tablet
index d35dcfa..1a7d62b 100644
--- a/data/intuos-6x8.tablet
+++ b/data/intuos-6x8.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:0021
Class=Intuos
Width=8
Height=6
-Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;
+Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;0x096;0x094;
[Features]
Stylus=true
diff --git a/data/intuos-9x12.tablet b/data/intuos-9x12.tablet
index 6ccea2d..d5f2325 100644
--- a/data/intuos-9x12.tablet
+++ b/data/intuos-9x12.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:0022
Class=Intuos
Width=12
Height=9
-Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;
+Styli=0xd12;0xd1a;0x822;0x82a;0x812;0x832;0x096;0x094;
[Features]
Stylus=true
diff --git a/data/intuos2-12x12.tablet b/data/intuos2-12x12.tablet
index bb60ad0..c401c91 100644
--- a/data/intuos2-12x12.tablet
+++ b/data/intuos2-12x12.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:0044
Class=Intuos2
Width=12
Height=12
-Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;
+Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;0x096;0x094;0x007;
[Features]
Stylus=true
diff --git a/data/intuos2-12x18.tablet b/data/intuos2-12x18.tablet
index ab8dabd..11bc57a 100644
--- a/data/intuos2-12x18.tablet
+++ b/data/intuos2-12x18.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:0045
Class=Intuos2
Width=18
Height=12
-Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;
+Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;0x096;0x094;0x007;
[Features]
Stylus=true
diff --git a/data/intuos2-4x5.tablet b/data/intuos2-4x5.tablet
index 3837687..370e98a 100644
--- a/data/intuos2-4x5.tablet
+++ b/data/intuos2-4x5.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:0041
Class=Intuos2
Width=5
Height=4
-Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;
+Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;0x096;0x094;0x007;
[Features]
Stylus=true
diff --git a/data/intuos2-6x8.tablet b/data/intuos2-6x8.tablet
index d205a24..5c189a5 100644
--- a/data/intuos2-6x8.tablet
+++ b/data/intuos2-6x8.tablet
@@ -5,7 +5,7 @@ DeviceMatch=usb:056a:0042
Class=Intuos2
Width=8
Height=6
-Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;
+Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;0x096;0x094;0x007;
[Features]
Stylus=true
diff --git a/data/intuos2-9x12.tablet b/data/intuos2-9x12.tablet
index 1029e08..9f041bc 100644
--- a/data/intuos2-9x12.tablet
+++ b/data/intuos2-9x12.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:0043
Class=Intuos2
Width=12
Height=9
-Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;
+Styli=0x912;0x91a;0x822;0x82a;0x842;0x852;0x85a;0x812;0x832;0x096;0x094;0x007;
[Features]
Stylus=true
diff --git a/data/intuos3-12x12.tablet b/data/intuos3-12x12.tablet
index f226eca..6b883fe 100644
--- a/data/intuos3-12x12.tablet
+++ b/data/intuos3-12x12.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00b3
Class=Intuos3
Width=12
Height=12
-Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;0x017;0x097;
[Features]
Stylus=true
diff --git a/data/intuos3-12x19.tablet b/data/intuos3-12x19.tablet
index cce9ecc..6b49940 100644
--- a/data/intuos3-12x19.tablet
+++ b/data/intuos3-12x19.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00b4
Class=Intuos3
Width=19
Height=12
-Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;0x017;0x097;
[Features]
Stylus=true
diff --git a/data/intuos3-4x5.tablet b/data/intuos3-4x5.tablet
index 0dd250b..7eaf9f6 100644
--- a/data/intuos3-4x5.tablet
+++ b/data/intuos3-4x5.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00b0
Class=Intuos3
Width=5
Height=4
-Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;0x017;0x097;
[Features]
Stylus=true
diff --git a/data/intuos3-4x6.tablet b/data/intuos3-4x6.tablet
index 9312e55..03461ca 100644
--- a/data/intuos3-4x6.tablet
+++ b/data/intuos3-4x6.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00b7
Class=Intuos3
Width=6
Height=4
-Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;0x017;0x097;
[Features]
Stylus=true
diff --git a/data/intuos3-6x11.tablet b/data/intuos3-6x11.tablet
index b6f7a97..dd84e55 100644
--- a/data/intuos3-6x11.tablet
+++ b/data/intuos3-6x11.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00b5
Class=Intuos3
Width=11
Height=6
-Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;0x017;0x097;
[Features]
Stylus=true
diff --git a/data/intuos3-6x8.tablet b/data/intuos3-6x8.tablet
index b5716ed..757a779 100644
--- a/data/intuos3-6x8.tablet
+++ b/data/intuos3-6x8.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00b1
Class=Intuos3
Width=8
Height=6
-Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;0x017;0x097;
[Features]
Stylus=true
diff --git a/data/intuos3-9x12.tablet b/data/intuos3-9x12.tablet
index b3b803d..e6c0d1c 100644
--- a/data/intuos3-9x12.tablet
+++ b/data/intuos3-9x12.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00b2
Class=Intuos3
Width=12
Height=9
-Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;0x017;0x097;
[Features]
Stylus=true
diff --git a/data/intuos4-12x19.tablet b/data/intuos4-12x19.tablet
index 4dab324..46b8364 100644
--- a/data/intuos4-12x19.tablet
+++ b/data/intuos4-12x19.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00bb
Class=Intuos4
Width=19
Height=12
-Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;
+Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;0x806;0x006;
[Features]
Reversible=true
diff --git a/data/intuos4-4x6.tablet b/data/intuos4-4x6.tablet
index f6f99ed..876c8d8 100644
--- a/data/intuos4-4x6.tablet
+++ b/data/intuos4-4x6.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00b8
Class=Intuos4
Width=6
Height=4
-Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;
+Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;0x806;
[Features]
Reversible=true
diff --git a/data/intuos4-6x9-wl.tablet b/data/intuos4-6x9-wl.tablet
index 0761f6e..3e6e52c 100644
--- a/data/intuos4-6x9-wl.tablet
+++ b/data/intuos4-6x9-wl.tablet
@@ -5,7 +5,7 @@ DeviceMatch=usb:056a:00bc
Class=Intuos4
Width=8
Height=5
-Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;
+Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;0x806;
[Features]
Reversible=true
diff --git a/data/intuos4-6x9.tablet b/data/intuos4-6x9.tablet
index 4d83027..6061203 100644
--- a/data/intuos4-6x9.tablet
+++ b/data/intuos4-6x9.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00b9
Class=Intuos4
Width=9
Height=6
-Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;
+Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;0x806;
[Features]
Reversible=true
diff --git a/data/intuos4-8x13.tablet b/data/intuos4-8x13.tablet
index a0f1503..7de50f6 100644
--- a/data/intuos4-8x13.tablet
+++ b/data/intuos4-8x13.tablet
@@ -4,7 +4,7 @@ DeviceMatch=usb:056a:00ba
Class=Intuos4
Width=13
Height=8
-Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;
+Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;0x806;0x006;
[Features]
Reversible=true
diff --git a/data/libwacom.stylus b/data/libwacom.stylus
index 44485c8..c5c144d 100644
--- a/data/libwacom.stylus
+++ b/data/libwacom.stylus
@@ -195,3 +195,48 @@ Name=Intuos4 Airbrush Pen
Buttons=1
HasEraser=true
Type=Airbrush
+
+# Puck devices
+[0x096]
+# Intuos and Intuos2
+Name=Lens Cursor
+Type=Puck
+HasLens=True
+Buttons=5
+
+[0x097]
+Name=Intuos3 Lens Cursor
+Type=Puck
+HasLens=True
+Buttons=5
+
+[0x006]
+Name=Intuos4 Lens Cursor
+Type=Puck
+HasLens=True
+Buttons=5
+
+[0x094]
+# Intuos and Intuos2
+Name=4D Mouse
+Type=Puck
+HasLens=False
+Buttons=5
+
+[0x007]
+Name=Intuos2 2D Mouse
+Type=Puck
+HasLens=False
+Buttons=3
+
+[0x017]
+Name=Intuos3 Mouse
+Type=Puck
+HasLens=False
+Buttons=5
+
+[0x806]
+Name=Intuos4 Five Button Mouse
+Type=Puck
+HasLens=False
+Buttons=5
diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
index c7b4448..c6638d1 100644
--- a/libwacom/libwacom-database.c
+++ b/libwacom/libwacom-database.c
@@ -77,6 +77,8 @@ type_from_str (const char *type)
return WSTYLUS_MARKER;
if (strcmp (type, "Stroke") == 0)
return WSTYLUS_STROKE;
+ if (strcmp (type, "Puck") == 0)
+ return WSTYLUS_PUCK;
return WSTYLUS_UNKNOWN;
}
@@ -167,9 +169,11 @@ libwacom_parse_stylus_keyfile(WacomDeviceDatabase *db, const char *path)
stylus->num_buttons = -1;
g_clear_error (&error);
}
+ stylus->has_lens = g_key_file_get_boolean(keyfile, groups[i], "HasLens", NULL);
} else {
stylus->num_buttons = 0;
stylus->has_eraser = FALSE;
+ stylus->has_lens = FALSE;
}
type = g_key_file_get_string(keyfile, groups[i], "Type", NULL);
diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index f56a339..de8ce34 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -438,6 +438,11 @@ int libwacom_stylus_is_eraser (const WacomStylus *stylus)
return stylus->is_eraser;
}
+int libwacom_stylus_has_lens (const WacomStylus *stylus)
+{
+ return stylus->has_lens;
+}
+
WacomStylusType libwacom_stylus_get_type (const WacomStylus *stylus)
{
if (stylus->type == WSTYLUS_UNKNOWN) {
diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h
index bda4e59..4b927b9 100644
--- a/libwacom/libwacom.h
+++ b/libwacom/libwacom.h
@@ -126,7 +126,8 @@ typedef enum {
WSTYLUS_AIRBRUSH,
WSTYLUS_CLASSIC,
WSTYLUS_MARKER,
- WSTYLUS_STROKE
+ WSTYLUS_STROKE,
+ WSTYLUS_PUCK
} WacomStylusType;
/**
@@ -391,6 +392,12 @@ int libwacom_stylus_is_eraser (const WacomStylus *stylus);
/**
* @param stylus The stylus to query
+ * @return Whether the stylus has a lens
+ */
+int libwacom_stylus_has_lens (const WacomStylus *stylus);
+
+/**
+ * @param stylus The stylus to query
* @return The type of stylus
*/
WacomStylusType libwacom_stylus_get_type (const WacomStylus *stylus);
diff --git a/libwacom/libwacomint.h b/libwacom/libwacomint.h
index ce01f51..7907cf0 100644
--- a/libwacom/libwacomint.h
+++ b/libwacom/libwacomint.h
@@ -81,6 +81,7 @@ struct _WacomStylus {
int num_buttons;
gboolean has_eraser;
gboolean is_eraser;
+ gboolean has_lens;
WacomStylusType type;
};