pax_global_header00006660000000000000000000000064136364740170014525gustar00rootroot0000000000000052 comment=08cb07e95350f77f9d9f4ce7cdf9cd4325f2ccb9 libwacom-libwacom-1.3/000077500000000000000000000000001363647401700147605ustar00rootroot00000000000000libwacom-libwacom-1.3/.github/000077500000000000000000000000001363647401700163205ustar00rootroot00000000000000libwacom-libwacom-1.3/.github/ISSUE_TEMPLATE/000077500000000000000000000000001363647401700205035ustar00rootroot00000000000000libwacom-libwacom-1.3/.github/ISSUE_TEMPLATE/Bug_report.md000066400000000000000000000006101363647401700231320ustar00rootroot00000000000000--- name: Bug report about: A report of an error in libwacom --- libwacom-libwacom-1.3/.github/ISSUE_TEMPLATE/New_device_support.md000066400000000000000000000020111363647401700246630ustar00rootroot00000000000000--- name: New device support request about: Request to add a new device to libwacom's database --- **Device name** > ... **Device model identifier** > ... **udevadm info output** libwacom-libwacom-1.3/.gitignore000066400000000000000000000010701363647401700167460ustar00rootroot00000000000000INSTALL Makefile Makefile.in aclocal.m4 autom4te.cache config.guess config.h config.h.in config.log config.status config.sub configure install-sh missing depcomp doc/html doc/latex ltmain.sh libtool stamp-h1 *.pc *.o *.lo *.la *.swp *.trs *.log .deps .libs test-driver test/test-load test/test-tablet-svg-validity test/test-dbverify test/test-deprecated test/test-tablet-validity test/test-stylus-validity test/test-soname tools/show-svg-image tools/generate-udev-rules tools/libwacom-list-local-devices tools/list-devices tools/list-compatible-styli doc/doxygen.conf libwacom-libwacom-1.3/.travis.yml000066400000000000000000000115241363647401700170740ustar00rootroot00000000000000sudo: required dist: xenial language: c compiler: - gcc - clang addons: apt: packages: - libgudev-1.0-dev - libxml++2.6-dev stages: - test - name: coverity if: type = cron env: global: - CFLAGS="-Werror -Wall -Wextra -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers" script: - mkdir _build - pushd _build > /dev/null - ../autogen.sh --disable-silent-rules - make - make check || (cat **/test-suite.log && false) - make distcheck - popd > /dev/null jobs: include: - stage: test install: - sudo apt-get install -y ninja-build python3-pip python3-setuptools valgrind - sudo pip3 install meson script: - meson builddir - ninja -C builddir test || (cat builddir/meson-logs/testlog.txt && false) - ninja -C builddir dist - meson configure builddir -Db_sanitize=address,undefined - ninja -C builddir test || (cat builddir/meson-logs/testlog.txt && false) - meson configure builddir -Db_sanitize=none - pushd builddir > /dev/null - meson test --setup=valgrind --suite=valgrind || (cat meson-logs/testlog-valgrind.txt && false) - popd > /dev/null # build from a tarball with meson - stage: test install: - sudo apt-get install -y ninja-build python3-pip python3-setuptools valgrind tree - sudo pip3 install meson script: - export INSTALLDIR="$PWD/_inst" - mkdir -p "$INSTALLDIR" - mkdir _build - pushd _build > /dev/null - ../autogen.sh --disable-silent-rules - make && make dist - popd > /dev/null - mkdir -p _tarball_dir - tar xf _build/libwacom-*.tar.bz2 -C _tarball_dir - pushd _tarball_dir/libwacom-*/ > /dev/null - meson builddir --prefix="$INSTALLDIR" && ninja -C builddir test && ninja -C builddir install - popd > /dev/null - tree "$INSTALLDIR" # build from a tarball with autotools - stage: test install: - sudo apt-get install -y tree script: - export INSTALLDIR="$PWD/_inst" - mkdir -p "$INSTALLDIR" - mkdir _build - pushd _build > /dev/null - ../autogen.sh --disable-silent-rules - make && make dist - popd > /dev/null - mkdir -p _tarball_dir - tar xf _build/libwacom-*.tar.bz2 -C _tarball_dir - pushd _tarball_dir/libwacom-*/ > /dev/null - ./autogen.sh --disable-silent-rules --prefix="$INSTALLDIR" - make && make install - popd > /dev/null - tree "$INSTALLDIR" # build from a tarball with configure only - stage: test install: - sudo apt-get install -y tree script: - export INSTALLDIR="$PWD/_inst" - mkdir -p "$INSTALLDIR" - mkdir _build - pushd _build > /dev/null - ../autogen.sh --disable-silent-rules - make && make dist - popd > /dev/null - mkdir -p _tarball_dir - tar xf _build/libwacom-*.tar.bz2 -C _tarball_dir - pushd _tarball_dir/libwacom-*/ > /dev/null - ./configure --prefix="$INSTALLDIR" - make && make install - popd > /dev/null - tree "$INSTALLDIR" - stage: coverity compiler: 'gcc' env: - BUILDTYPE="coverity" - COVERITY_SCAN_PROJECT_NAME="linuxwacom/libwacom" - COVERITY_SCAN_NOTIFICATION_EMAIL="killertofu@gmail.com" - COVERITY_SCAN_BUILD_COMMAND_PREPEND="" - COVERITY_SCAN_BUILD_COMMAND="make" - COVERITY_SCAN_BRANCH_PATTERN=".*" - COVERITY_URL="https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" - secure: 'd0i9vJa6/lNDlCYMbKjNI77j1xnhw0ktBDAz0C10QbzIx17EsaYXOuAgO2ffWdIdGU7cP7yCH3gZGTRLnaPZfj7z1n7W81A8Hlosfc7AGcSW+EAo8T+CSxdFw1BfEPPWctsBP2y02INrOCno9k00pnW1shHlT7QzPxnHIsuPmHv21AbyUGbGk3nmvnfGg60dIYOLPdkZFNCGTNf6XtE0KVB0TLwS03/K8R1GnMtm5Qs0FXIDYMfASn1kKTPQOERYUIDABMCeYBfgHtiRvAzZkcxRnjVdoZvByDCfTeOtA3gS0bQ+nMt2UEHz2zzUS2egRGfAOafEqhvMrxEAdU9+HXNZIoPJfkLZWkUoe+3U/+Zj3NoIK/mpmtRFtHLyISp7kL/kQ9g8+cJPL5EI2RvIRM5cdf5Z47kI0Y0tQjceONz/7cHHCozZsrCLTjB4rlgWOxhbu+UL9C8vKYO1AX6rl1R/4J/WKc/ODztmNQem3u/GQEfHXyKVO+zrehAjtKb08wjQEGyMJYB7hxS3tDCb9/cCHkdi81Sx2WtF8mXp4TjCJafx7vyBo4VVlDuExvjodrZh/50KrzzZ+wGDE0tN42tJsuMGvJVTteNNk1pQ7r6XSlTOjbGsAQE+ri6Q8XBx63ES5Y1oN0bkA38KqhCfOrZIKXtx7QMLpPv2QKCaccg=' before_install: - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- before_script: - curl -fs "$COVERITY_URL" > coverity.sh && sed -i 's/"$status_code" != "201"/"$status_code" -lt 200 -o "$status_code" -ge 300/' coverity.sh && chmod +x coverity.sh script: - ./autogen.sh --disable-silent-rules - bash ./coverity.sh # vim: set expandtab tabstop=8 shiftwidth=2: libwacom-libwacom-1.3/COPYING000066400000000000000000000020711363647401700160130ustar00rootroot00000000000000Copyright © 2011 Red Hat, Inc. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Red Hat not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Red Hat makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. libwacom-libwacom-1.3/Makefile.am000066400000000000000000000002751363647401700170200ustar00rootroot00000000000000SUBDIRS = libwacom data doc test tools pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libwacom.pc EXTRA_DIST = libwacom.pc.in NEWS README.md meson.build meson_options.txt autogen.sh libwacom-libwacom-1.3/NEWS000066400000000000000000000156211363647401700154640ustar00rootroot00000000000000libwacom 1.3: - New devices: - Wacom One Pen Display 13 - Lenovo Thinkpad L13 Yoga, X1 Yoga 4th, X1 Extreme 2nd, X13 Yoga, Yoga 370 - Dell XPS 9575, 7390 - Toshiba z20t-c - HP Envy x360 - Samsung Notebook 9 Pro - Android mode for 3rd gen Intuos devices is now handled libwacom 1.2: - New devices: - Wacom Moile Studio Pro (2nd gen) - Dell Latitude 7400 2-in-1, XPS 13 2-in-1 - Elan 2628 - Lenovo X1 Yoga 4th, X1 Yoga 3d, Yoga 720, Yoga C930, Yoga C940, X390 Yoga, IdeaPad FLEX-14API - ASUS ZenBook Pro Duo libwacom 1.1: - New devices: Wacom HID 5115 - Button codes defined for the 3rd gen Intuos S libwacom 1.0: - udev rules are now installed by default libwacom 0.99.901: - New devices - Lenovo YOGA 720, YOGA 520, IdeaPad FLEX 5, MIIX 520 - Dell XPS 15 9570, Latitude 5175 - HP Spectre x360, Envy x360 Convertible - Wacom Intuos Pro 2 S, Cintiq 22, DTK-1660E - Huion 610 Pro v2 - Samsung 930QAA - New API: libwacom_get_model_name() - meson build system support - fixed symbol versioning - EKR button ordering fixed - Stylus grouping added libwacom 0.33: - New devices: - Wacom Bamboo Fun 4x5, Bamboo Fun 6x8, Bamboo1 5x8, Cintiq 16 - HP EliteBook x360, x2, HP Envy x360 - Acer Switch SA5 - Huion H420 - Lenovo Thinkpad L380 Yoga, L390 Yoga, Ideapad Flex, Yoga 730 - Dell Latitude 7390 libwacom 0.32: - New devices: - Lenovo Yoga 730, X380, 300e - Dell XPS 15 9575 - HP Spectre x360 - Toshiba Portege X20W-D - DTU-1141B libwacom 0.31: - New devices: - Graphire4 6x8 - ISDv4 50fd, 4807 libwacom 0.30: - New devices: - Lenovo X1 Yoga 3rd - HP Spectre x360, HP Elite x1012 G2, HP Envy x360 - Turcom TS-6610 libwacom 0.29: - New devices: - ISDv4 50b4 libwacom 0.28: - New devices: - Cintiq Pro 24, Cintiq Pro 32 - ISDV4 5099, 50b6, 509d, 5090, 50f1, 50f8, 5110, 508b - Bamboo Pad - DTK-2451, 2452 - One by Wacom (2nd gen) libwacom 0.27: - New devices: - Dell Canvas 27 - Pro Pen 3D stylus - XP-Pen Star 03 - ISDv4 4831 (Dell XPS 13 9365) - New API: libwacom_get_button_evdev_code() and the matching EvdevCodes entry in the .tablet files libwacom 0.26: - New devices: - DTH-1152 - Wireless Intuos Pro 2nd Generation - ISDV4 4809, 481a 4822, 4824, 484c, 5010 libwacom 0.25: - New devices: - ISDV4 104, 10E, 117, 124, 4814, 5013, 5014, 503E, 503F, 5048, 5044 - USB Graphire - Cintiq Pro 13, 16 libwacom 0.24 - New devices: - Second generation Intuos Pro M - Second generation Intuos Pro L libwacom 0.23: - New devices: - ISDV4 5040, MobileStudio Pro - The 22HD(T) is now marked as having strip modes libwacom 0.22: - New API: libwacom_get_paired_device() - The EKR has the modes enabled now - Fixes to the show-svg-image tool libwacom 0.21: - New devices: - MTE-450 "Bamboo", Lenovo ThinkPad Tablet 10 - Layout fixes for the Express Key Remote, Intuos series libwacom 0.20: - New devices: "One by wacom" - Layout fixes, especially for the Express Key Remote libwacom 0.19: - New devices: - DTK-1651, ISDv4 0x504a - Quirk added to prevent udev tagging HUION Consumer Control devices as tablets libwacom 0.18: - Renamed ".tablet" files for Bamboo devices - Modified user-visible names of Bamboo devices - "Wacom Bamboo 16FG 4x5" -> "Wacom Bamboo Capture" - "Wacom Bamboo 2FG 4x5" -> "Wacom Bamboo (2FG)" - "Wacom Bamboo 2FG 6x8" -> "Wacom Bamboo Fun medium (2FG)" - "Wacom Bamboo 2FG" -> "Wacom Bamboo Touch (2FG)" - "Wacom Bamboo Craft" -> "Wacom Bamboo Fun small (2FG)" - "Wacom Bamboo Pen" -> "Wacom Bamboo Pen small" - New devices: - Missing gen-1 Bamboo (0xd5) - Missing gen-2.5 Bamboos (0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb) - Missing gen-3 Bamboos (0xdc, 0xdd, 0dxf) libwacom 0.17: - New devices: - Cintiq Companion 2 (DTH-1310) - ExpressKey Remote - New WacomClass: WCLASS_REMOTE libwacom 0.16: - Data files for Intuos and Intuos 2 series added - New stylus ID 0x8e2 libwacom 0.15: - New devices: - ISDv4 0x4800 (Dell Venue 10 5050 Android tablet) - Bustype i2c is now supported libwacom 0.14: - New devices: - Cintiq 13HD touch - Fixes to the udev rule set to tag uinput devices correctly too - Integrated tabled are not marked as ID_INPUT_TOUCHPAD anymore now libwacom 0.13: - New devices: - DTU-1141 - Huion H610 Pro - Several memory leak fixes - Added libwacom_match_get_name() to allow data-file matching on the name as well as the pid/vid libwacom 0.12: - Added libwacom_stylus_has_wheel() for relative wheel detection - Added libwacom_stylus_get_axes() for a list of supported axes - New devices: - Cintiq 27QHD, Cintiq 27QHD Touch - DTU-1031X - Intuos Pen Medium - Reworked udev rules - be more restrictive when to set ID_INPUT_TOUCHPAD - unset ID_INPUT_JOYSTICK on tablet devices - tag the Pad device as ID_INPUT_TABLET_PAD libwacom 0.11: - Better detection of wireless tablets on kernels 3.18 - New devices: - Cintiq Companion libwacom 0.10: - Fixed bus detection of Bluetooth tablets on kernels 3.14 and later (bbe317540) - New devices: - ISDV4 0x12C, 116, 4004, 5000, 5002 libwacom 0.9.0: - Add support for TouchSwitch keyword - New devices: - Intuos series - Pen&Touch (2nd gen) - DTU-1031 - Cintiq Companion Hybrid libwacom 0.8.0: - New devices: - Cintiq 13HD, 22HD touch - DTH-2242, DTU-1931, - ISDv4 EC, ED, 10F - Intuos Pro libwacom 0.7.1: - New devices: - ISDv4 10d - Better checks to prevent bad databases libwacom 0.7: - New devices: - Cintiq 22HD, 24HD touch, - ISDv4 E5, 100, 101 - Support for SVG layouts of the tablets - New APIs for: - list status LEDs - list integration flags (differ between builtin and screen-tablets) libwacom 0.6: - More metadata for: - NTrig tablet PC - ISDv4 0x93, 0x90, 0xED, 0xEF - Bamboo Pen, Fun, Craft, Touch - Support for debugging with uinput devices libwacom 0.5: - Add support for multiple match statements - Add support for bluetotooth devices - Add libwacom-list-local-devices helper tool - Add list-devices helper tool - Rename udev generation tool to generate-udev-rules - More metadata description updates libwacom 0.4: - More metadata for: - Intuos4 WL - Bamboo One - Intuos5 series - Don't fail to create a WacomDevice for Touch devices - Add API to access all items in the database - Add helper tool to generate udev rules from the database libwacom 0.3: - Loads of new and updated tablet definition files - Add and correct information about styli - Update wacom.example with loads of documentation about adding new tablet definitions - Handle Puck device type - Support enumerating touchstrips, touchrings and buttons - Get device name from the kernel for generic tablets - Add support for the WACf004 serial tablet - Build fixes (exported symbols, soname) libwacom 0.2: - Don't add devices that lack DeviceMatch - Get whether a device is builtin from udev - Fix definitions for Reversible property - Add definition for Cintiq 21UX2 - Add test for serial devices - Fix Intuos4 styli's number of buttons libwacom 0.1: - First release libwacom-libwacom-1.3/README.md000066400000000000000000000045601363647401700162440ustar00rootroot00000000000000# Overview libwacom is a library to identify Wacom tablets and their model-specific features. It provides easy access to information such as "is this a built-in on-screen tablet", "what is the size of this model", etc. This functionality is currently used by e.g. GNOME to map built-in tablets to the correct screen. # Debugging libwacom with uinput devices libwacom by default will not recognise uinput devices. To debug and test, a physical device must be connected. Custom udev rules are provided to help debug uinput device. Run `generate-udev-rules --with-uinput-rules` to generate these rules and apply them locally. Devices will then be tagged as required and can be debugged. ## Some limitations: * For these rules to work, the device must be listed in the database * libwacom will check UINPUT_* properties on the uinput device, if they do not get applied, the device will not be visible **DO NOT USE THESE UINPUT RULES unless you are debugging with uinput devices.** Remove the rules once debugging is done. # Adding tablet descriptions to libwacom A common indicator that a device is not supported by libwacom is that it works normally in a GNOME session, but the device is not correctly mapped to the screen. Use the libwacom-list-local-devices tool to list all local devices recognized by libwacom. If your device is not listed, but it is available as an event device in the kernel (see /proc/bus/input/devices) and in the X session (see xinput list), the device is missing from libwacom's database. ## To add support for a new tablet to libwacom: 1. Create a new tablet definition file. See data/wacom.example in the source for a guideline on how to add a new tablet. For an installed version of libwacom, see the existing data files (e.g. /usr/share/libwacom/cintiq-13hd.tablet) 2. A new tablet description is enabled by adding and installing a new file with a .tablet suffix. Once installed the tablet is part of libwacom's database, no rebuild is neccessary 3. The tablet is then available through libwacom-list-local-devices **The new device should also be added to the udev rule to ensure all required properties are set** * ***When building from source*** generate an update ruleset with tools/generate-udev-rules after adding the tablet descripton to * ***When updating an installed version of libwacom***, add it manually to the existing ruleset (/lib/udev/rules.d/65-libwacom.rules)libwacom-libwacom-1.3/autogen.sh000077500000000000000000000003261363647401700167620ustar00rootroot00000000000000#! /bin/sh srcdir=`dirname $0` test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? if test -z "$NOCONFIGURE"; then exec $srcdir/configure "$@" fi libwacom-libwacom-1.3/configure.ac000066400000000000000000000036761363647401700172620ustar00rootroot00000000000000# Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([libwacom], [1.3]) # change meson.build as well AC_CONFIG_HEADERS([config.h]) # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip check-news]) AM_MAINTAINER_MODE([enable]) # Enable silent build when available (Automake 1.11) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) # Do not modify this, use symbol versioning instead. LIBWACOM_LT_VERSION=8:1:6 AC_SUBST(LIBWACOM_LT_VERSION) # Initialize libtool AC_PROG_LIBTOOL # Checks for programs. AC_PROG_CC AC_PROG_CC_C99 AC_PROG_INSTALL PKG_PROG_PKG_CONFIG AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], [yes], [no]) AM_CONDITIONAL(HAVE_DOXYGEN, test "x$HAVE_DOXYGEN" = xyes) AC_CHECK_LIB([dl], [dlsym]) AC_SUBST(DL_LIBS) PKG_CHECK_MODULES(GLIB, glib-2.0 gudev-1.0) PKG_CHECK_MODULES(LIBXML, libxml-2.0 glib-2.0, HAVE_LIBXML="yes", HAVE_LIBXML="no") AM_CONDITIONAL(HAVE_LIBXML, test x$HAVE_LIBXML = xyes) PKG_CHECK_MODULES(GTK2, librsvg-2.0 glib-2.0 gtk+-2.0, HAVE_GTK2="yes", HAVE_GTK2="no") AM_CONDITIONAL(HAVE_GTK2, test x$HAVE_GTK2 = xyes) PKG_CHECK_MODULES(GLIB_236, [glib-2.0 >= 2.36], HAVE_GLIB236="yes", HAVE_GLIB236="no") if test "x$HAVE_GLIB236" != "xyes"; then AC_DEFINE(NEED_G_TYPE_INIT, 1, [Need g_type_init() call]) fi udev_dir_default="$libdir/udev" AC_ARG_WITH(udev-dir, AS_HELP_STRING([--with-udev-dir=DIR], [udev base directory [[default=$udev_dir_default]]]), [], [with_udev_dir="yes"]) AS_CASE($with_udev_dir, [no|""], [AC_MSG_ERROR([You must define a udev base directory])], [yes], [udevdir="$udev_dir_default"], [udevdir="$with_udev_dir"]) UDEV_DIR=${udevdir} AC_SUBST(UDEV_DIR) AC_CONFIG_FILES([Makefile data/Makefile data/layouts/Makefile doc/Makefile test/Makefile tools/Makefile libwacom/Makefile libwacom.pc]) AC_OUTPUT libwacom-libwacom-1.3/data/000077500000000000000000000000001363647401700156715ustar00rootroot00000000000000libwacom-libwacom-1.3/data/Makefile.am000066400000000000000000000012451363647401700177270ustar00rootroot00000000000000libwacomtabletdir = $(datadir)/libwacom tablet_files = $(shell cd $(top_srcdir)/data; printf '%s\n' *.tablet) dist_libwacomtablet_DATA = $(tablet_files) libwacomstylusdir = $(datadir)/libwacom stylus_files = $(shell cd $(top_srcdir)/data; printf '%s\n' *.stylus) dist_libwacomstylus_DATA = $(stylus_files) EXTRA_DIST = \ wacom.example \ check-files-in-git.sh \ check-svg-exists.sh \ check-data-in-meson.build.sh SUBDIRS = layouts noinst_SCRIPTS = check-files-in-git.sh check-svg-exists.sh EXTRA_DIST += $(noinst_SCRIPTS) AM_TESTS_ENVIRONMENT=top_srcdir="$(abs_top_srcdir)"; export top_srcdir; TESTS = $(noinst_SCRIPTS) libwacom-libwacom-1.3/data/bamboo-0fg-m-p-alt.tablet000066400000000000000000000020531363647401700222440ustar00rootroot00000000000000# Wacom # Bamboo Fun # CTE-650 # # Button Map: # (A=1, B=2, C=3, ...) # # AAAA BBBB # CCCC DDDD # *-----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # | | # *-----------------------* # # Default button assignments: # A: Back # B: Forward # C: Left # D: Right # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # A # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # first generation Bamboo # # Pen active area: 8.52 x 5.33in [Device] Name=Wacom Bamboo Fun medium ModelName=CTE-650 DeviceMatch=usb:056a:0018 Class=Bamboo Width=9 Height=5 IntegratedIn= Layout=bamboo-0fg-s-p-alt.svg [Features] Stylus=true Reversible=false Touch=false Buttons=4 Ring=true [Buttons] Top=A;B;C;D EvdevCodes=0x116;0x115;0x110;0x111 libwacom-libwacom-1.3/data/bamboo-0fg-s-p-alt.tablet000066400000000000000000000021271363647401700222540ustar00rootroot00000000000000# Wacom # Bamboo Fun # CTE-450 # # Button Map: # (A=1, B=2, C=3, ...) # # AAAA BBBB # CCCC DDDD # *-----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # | | # *-----------------------* # # Default button assignments: # A: Back # B: Forward # C: Left # D: Right # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # A # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # first generation Bamboo # # stylus with two buttons and eraser (LP160E) # Pen active area: 5.8 x 3.62in [Device] Name=Wacom Bamboo Fun small ModelName=CTE-450 DeviceMatch=usb:056a:0017 Class=Bamboo Width=6 Height=4 IntegratedIn= Layout=bamboo-0fg-s-p-alt.svg [Features] Stylus=true Reversible=false Touch=false Buttons=4 Ring=true [Buttons] Top=A;B;C;D EvdevCodes=0x116;0x115;0x110;0x111 libwacom-libwacom-1.3/data/bamboo-0fg-s-p.tablet000066400000000000000000000021031363647401700214700ustar00rootroot00000000000000# Wacom # Bamboo # MTE-450 # # Button Map: # (A=1, B=2, C=3, ...) # # AAAA BBBB # CCCC DDDD # *-----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # | | # *-----------------------* # # Default button assignments: # A: Back # B: Forward # C: Left # D: Right # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # A # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # first generation Bamboo # # stylus with two buttons and no eraser # Pen active area: 5.8 x 3.62in [Device] Name=Wacom Bamboo Pen ModelName=MTE-450 DeviceMatch=usb:056a:0065 Class=Bamboo Width=6 Height=4 IntegratedIn= Layout=bamboo-0fg-s-p.svg [Features] Stylus=true Reversible=false Touch=false Buttons=4 Ring=true [Buttons] Top=A;B;C;D EvdevCodes=0x116;0x115;0x110;0x111 libwacom-libwacom-1.3/data/bamboo-16fg-m-pt.tablet000066400000000000000000000007221363647401700217420ustar00rootroot00000000000000# Wacom # Bamboo Create # CTH-670 # # third generation BambooPT # # stylus with two buttons and eraser (LP170ES); 16FG touch # Pen active area: 8.52 x 5.39 in # Touch active area: 7.48 x 5.12 in [Device] Name=Wacom Bamboo Create ModelName=CTH-670 DeviceMatch=usb:056a:00df Class=Bamboo Width=6 Height=4 Layout=bamboo-16fg-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x110;0x115;0x116;0x111 libwacom-libwacom-1.3/data/bamboo-16fg-s-p.tablet000066400000000000000000000006171363647401700215670ustar00rootroot00000000000000# Wacom # Bamboo Connect # CTL-470 # # third generation BambooPT # # stylus with one button and no eraser (LP170G) # Pen active area: 5.8 x 3.62in [Device] Name=Wacom Bamboo Connect ModelName=CTL-470 DeviceMatch=usb:056a:00dd Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 EvdevCodes=0x110;0x115;0x116;0x111 libwacom-libwacom-1.3/data/bamboo-16fg-s-pt.tablet000066400000000000000000000007161363647401700217530ustar00rootroot00000000000000# Wacom # Bamboo Capture # CTH-470 # # third generation BambooPT # # stylus with one button no eraser (LP170G); 16FG touch # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo Capture ModelName=CTH-470 DeviceMatch=usb:056a:00de Class=Bamboo Width=6 Height=4 Layout=bamboo-16fg-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x110;0x115;0x116;0x111 libwacom-libwacom-1.3/data/bamboo-16fg-s-t.tablet000066400000000000000000000006141363647401700215700ustar00rootroot00000000000000# Wacom # Bamboo Touch # CTT-470 # # third generation BambooPT # # no stylus; 16FG touch # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo 16FG 4x5 ModelName=CTT-470 DeviceMatch=usb:056a:00dc Class=Bamboo Width=6 Height=4 Layout=bamboo-16fg-s-t.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x110;0x115;0x116;0x111 libwacom-libwacom-1.3/data/bamboo-2fg-fun-m-pt.tablet000066400000000000000000000014211363647401700224400ustar00rootroot00000000000000# Wacom # Bamboo Fun medium / Bamboo Comic # CTH-661 # # first generation BambooPT # # stylus with two buttons and eraser (LP161E); 2FG touch # Pen active area: 8.52 x 5.39 in # Touch active area: 7.48 x 5.12 in # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | TABLET | # C | | # D | | # | | # *-----------------------* [Device] Name=Wacom Bamboo Fun medium (2FG) ModelName=CTH-661 DeviceMatch=usb:056a:00d3 Class=Bamboo Width=9 Height=5 Layout=bamboo-2fg-fun-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-2fg-fun-s-pt.tablet000066400000000000000000000014141363647401700224500ustar00rootroot00000000000000# Wacom # Bamboo Fun small / Bamboo Craft # CTH-461 # # first generation BambooPT # # stylus with two buttons and eraser (LP161E); 2FG touch # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | TABLET | # C | | # D | | # | | # *-----------------------* [Device] Name=Wacom Bamboo Fun small (2FG) ModelName=CTH-461 DeviceMatch=usb:056a:00d2 Class=Bamboo Width=6 Height=4 Layout=bamboo-2fg-fun-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-2fg-m-p.tablet000066400000000000000000000005641363647401700214750ustar00rootroot00000000000000# Wacom # Bamboo Pen medium # CTL-660 # # first generation BambooPT # # stylus with two buttons and no eraser (LP160) # Pen active area: 8.52 x 5.39 in [Device] Name=Wacom Bamboo Pen medium ModelName=CTL-660 DeviceMatch=usb:056a:00d5 Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/bamboo-2fg-s-p.tablet000066400000000000000000000005521363647401700215000ustar00rootroot00000000000000# Wacom # Bamboo Pen # CTL-460 # # first generation BambooPT # # stylus with two buttons and no eraser (LP160) # Pen active area: 5.8 x 3.62in [Device] Name=Wacom Bamboo Pen small ModelName=CTL-460 DeviceMatch=usb:056a:00d4 Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/bamboo-2fg-s-pt.tablet000066400000000000000000000013451363647401700216650ustar00rootroot00000000000000# Wacom # Bamboo # CTH-460 # # first generation BambooPT # # stylus with two buttons and eraser (LP160E); 2FG touch # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | TABLET | # C | | # D | | # | | # *-----------------------* [Device] Name=Wacom Bamboo (2FG) ModelName=CTH-460 DeviceMatch=usb:056a:00d1 Class=Bamboo Width=6 Height=4 Layout=bamboo-2fg-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-2fg-s-t.tablet000066400000000000000000000012571363647401700215070ustar00rootroot00000000000000# Wacom # Bamboo Touch # CTT-460 # # first generation BambooPT # # no stylus; 2FG touch # Touch active area: 4.92 x 3.35in # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | TABLET | # C | | # D | | # | | # *-----------------------* [Device] Name=Wacom Bamboo Touch (2FG) ModelName=CTT-460 DeviceMatch=usb:056a:00d0 Class=Bamboo Width=5 Height=3 Layout=bamboo-2fg-s-t.svg IntegratedIn= [Features] Stylus=false Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-4fg-fun-m.tablet000066400000000000000000000010061363647401700220200ustar00rootroot00000000000000# Wacom # Bamboo Fun medium / Bamboo Comic # CTH-661(A) # # second generation BambooPT # # stylus with two buttons and eraser (LP161E); 2FG touch (4FG gesture) # Pen active area: 8.52 x 5.39 in # Touch active area: 7.48 x 5.12 in [Device] Name=Wacom Bamboo Fun medium (2+FG) ModelName=CTH-661(A) DeviceMatch=usb:056a:00d8 Class=Bamboo Width=9 Height=5 Layout=bamboo-4fg-fun-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-4fg-fun-s.tablet000066400000000000000000000010011363647401700220210ustar00rootroot00000000000000# Wacom # Bamboo Fun small / Bamboo Craft # CTH-461(A) # # second generation BambooPT # # stylus with two buttons and eraser (LP161E); 2FG touch (4FG gesture) # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo Fun small (2+FG) ModelName=CTH-461(A) DeviceMatch=usb:056a:00d7 Class=Bamboo Width=6 Height=4 Layout=bamboo-4fg-fun-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-4fg-s-pt.tablet000066400000000000000000000007621363647401700216710ustar00rootroot00000000000000# Wacom # Bamboo Pen & Touch # CTH-460(A) # # second generation BambooPT # # stylus with two buttons and eraser (LP160E); 2FG touch (4FG gesture) # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo Pen & Touch (2+FG) ModelName=CTH-460(A) DeviceMatch=usb:056a:00d6 Class=Bamboo Width=6 Height=4 Layout=bamboo-4fg-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-4fg-s-t.tablet000066400000000000000000000006361363647401700215110ustar00rootroot00000000000000# Wacom # Bamboo Touch # CTT-460(A) # # second generation BambooPT # # no stylus; 2FG touch (4FG gesture) # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo (2+FG) ModelName=CTT-460(A) DeviceMatch=usb:056a:00d9 Class=Bamboo Width=5 Height=3 Layout=bamboo-4fg-s-t.svg IntegratedIn= [Features] Stylus=false Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-4fg-se-m-pt.tablet000066400000000000000000000010371363647401700222640ustar00rootroot00000000000000# Wacom # Bamboo Special Edition Pen & Touch medium # CTH-661SE # # second generation BambooPT # # stylus with two buttons and eraser (LP161ESE); 2FG touch (4FG gesture) # Pen active area: 8.52 x 5.39 in # Touch active area: 7.48 x 5.12 in [Device] Name=Wacom Bamboo Special Edition Pen & Touch medium ModelName=CTH-661SE DeviceMatch=usb:056a:00db Class=Bamboo Width=9 Height=5 Layout=bamboo-4fg-se-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-4fg-se-s-pt.tablet000066400000000000000000000010321363647401700222650ustar00rootroot00000000000000# Wacom # Bamboo Special Edition Pen & Touch small # CTH-461SE # # second generation BambooPT # # stylus with two buttons and eraser (LP161ESE); 2FG touch (4FG gesture) # Pen active area: 5.8 x 3.62in # Touch active area: 4.92 x 3.35in [Device] Name=Wacom Bamboo Special Edition Pen & Touch small ModelName=CTH-461SE DeviceMatch=usb:056a:00da Class=Bamboo Width=6 Height=4 Layout=bamboo-4fg-se-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=true Touch=true Buttons=4 [Buttons] Left=A;B;C;D EvdevCodes=0x111;0x116;0x115;0x110 libwacom-libwacom-1.3/data/bamboo-one-m-p.tablet000066400000000000000000000004121363647401700215700ustar00rootroot00000000000000# Wacom # Bamboo One # CTE-660 # # Pen active area: 5.31x8.5 in [Device] Name=Wacom Bamboo1 5x8 Pen ModelName=CTE-660 DeviceMatch=usb:056a:006b Class=Bamboo Width=8 Height=5 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/bamboo-one.tablet000066400000000000000000000003461363647401700211070ustar00rootroot00000000000000# Wacom # Bamboo One # CTF-430 [Device] Name=Bamboo One ModelName=CTF-430 DeviceMatch=usb:056a:0069 Class=Bamboo Width=5 Height=4 IntegratedIn= [Features] Reversible=true Stylus=true Touch=false Ring=false NumStrips=0 Buttons=0 libwacom-libwacom-1.3/data/bamboo-pad-wireless.tablet000066400000000000000000000005101363647401700227160ustar00rootroot00000000000000# Wacom # Bamboo Pad Wireless # CTH-300 # # Button events sent from touch interface [Device] Name=Wacom Bamboo Pad Wireless ModelName=CTH-300 DeviceMatch=usb:056a:0319 Class=Bamboo Width=4 Height=3 Layout=bamboo-pad.svg [Features] Stylus=true Reversible=false Touch=true Buttons=2 [Buttons] Bottom=A;B EvdevCodes=0x110;0x111 libwacom-libwacom-1.3/data/bamboo-pad.tablet000066400000000000000000000004661363647401700210750ustar00rootroot00000000000000# Wacom # Bamboo Pad # CTH-301 # # Button events sent from touch interface [Device] Name=Wacom Bamboo Pad ModelName=CTH-301 DeviceMatch=usb:056a:0318 Class=Bamboo Width=4 Height=3 Layout=bamboo-pad.svg [Features] Stylus=true Reversible=false Touch=true Buttons=2 [Buttons] Bottom=A;B EvdevCodes=0x110;0x111 libwacom-libwacom-1.3/data/check-data-in-meson.build.sh000077500000000000000000000005401363647401700230340ustar00rootroot00000000000000#!/usr/bin/env bash set -e pushd "$1" > /dev/null diff -u1 <(grep -o 'data/.*\.tablet' meson.build) <(printf '%s\n' data/*.tablet | sort -V) diff -u1 <(grep -o 'data/.*\.stylus' meson.build) <(printf '%s\n' data/*.stylus | sort -V) diff -u1 <(grep -o 'data/layouts/.*\.svg' meson.build) <(printf '%s\n' data/layouts/*.svg | sort -V) popd > /dev/null libwacom-libwacom-1.3/data/check-files-in-git.sh000077500000000000000000000011431363647401700215710ustar00rootroot00000000000000#!/usr/bin/env bash # # Usage: check-files-in-git.sh /path/to/libwacom/ if [ -z "$top_srcdir" ]; then top_srcdir="$1" fi if [ -z "$top_srcdir" ]; then echo "Usage: `basename $0` /path/to/libwacom" exit 1 fi export GIT_DIR="$top_srcdir/.git"; if ! git ls-files >& /dev/null; then echo "Not a git tree. Skipping" exit 77 fi pushd "$top_srcdir" > /dev/null for file in data/*.tablet data/*.stylus data/layouts/*.svg; do git ls-files --error-unmatch "$file" &> /dev/null || ( echo "ERROR: File $file is not in git" && test); rc="$(($rc + $?))"; done popd > /dev/null exit $rc libwacom-libwacom-1.3/data/check-svg-exists.sh000077500000000000000000000013171363647401700214210ustar00rootroot00000000000000#!/usr/bin/env bash # # Usage: check-svg-exists.sh /path/to/libwacom/ if [ -z "$top_srcdir" ]; then top_srcdir="$1" fi if [ -z "$top_srcdir" ]; then echo "Usage: `basename $0` /path/to/libwacom" exit 1 fi pushd "$top_srcdir" > /dev/null for file in data/*.tablet; do svg=`grep 'Layout=' "$file" | sed -e "s/Layout=//"`; test -z "$svg" || test -e "data/layouts/$svg" || (echo "ERROR: File '$file' references nonexistent '$svg'" && test); rc="$(($rc + $?))"; done for file in data/layouts/*.svg; do grep -q "`basename $file`" $top_srcdir/data/*.tablet || (echo "ERROR: Layout $file is not referenced" && test); rc="$(($rc + $?))"; done exit $rc libwacom-libwacom-1.3/data/cintiq-12wx.tablet000066400000000000000000000020601363647401700211520ustar00rootroot00000000000000# Wacom # Cintiq 12WX # DTZ-1200W # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # II | | JJ # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | DISPLAY | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Cintiq 12WX ModelName=DTZ-1200W Class=Cintiq DeviceMatch=usb:056a:00c6 Width=10 Height=7 Layout=cintiq-12wx.svg Styli=@intuos3; IntegratedIn=Display [Features] Stylus=true NumStrips=2 Buttons=10 [Buttons] Left=A;B;C;D;I Right=E;F;G;H;J libwacom-libwacom-1.3/data/cintiq-13hd.tablet000066400000000000000000000015661363647401700211220ustar00rootroot00000000000000# Wacom # Cintiq 13HD # DTK-1300 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # | | # G | | # H A F | DISPLAY | # I | | # | | # D | | # E | | # | | # *-----------------------* # # Note: Buttons F, G, H, I are on a circle [Device] Name=Wacom Cintiq 13HD ModelName=DTK-1300 Class=Cintiq DeviceMatch=usb:056a:0304 Width=12 Height=7 Layout=cintiq-13hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=9 [Buttons] Left=B;C;G;H;A;F;I;D;E libwacom-libwacom-1.3/data/cintiq-13hdt.tablet000066400000000000000000000017251363647401700213030ustar00rootroot00000000000000# Wacom # Cintiq 13HD touch # DTH-1300 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # | | # G | | # H A F | DISPLAY | # I | | # | | # D | | # E | | # | | # *-----------------------* # # Note: Buttons F, G, H, I are on a circle # touch data comes through the usb:056a:0335 interface [Device] Name=Wacom Cintiq 13HD touch ModelName=DTH-1300 Class=Cintiq DeviceMatch=usb:056a:0333 PairedID=usb:056a:0335 Width=12 Height=7 Layout=cintiq-13hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=9 [Buttons] Left=B;C;G;H;A;F;I;D;E libwacom-libwacom-1.3/data/cintiq-16.tablet000066400000000000000000000004461363647401700206050ustar00rootroot00000000000000# Wacom # Cintiq 16 # DTK-1660 [Device] Name=Wacom Cintiq 16 ModelName=DTK-1660 Class=Cintiq DeviceMatch=usb:056a:0390 Width=14 Height=8 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-1.3/data/cintiq-20wsx.tablet000066400000000000000000000023111363647401700213330ustar00rootroot00000000000000# Wacom # Cintiq 20WSX # DTZ-2000W # # Button Map: # (A=1, B=2, C=3, ...) # (NOTE: This map has *not* been verified.) # # *-----------------------* # | | # | | # KL | | MN # | | # II | | JJ # CA | | EG # CA | DISPLAY | EG # CB | | FG # CB | | FG # DD | | HH # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # (NOTE: This map has *not* been verified.) # # @-----------------------@ # | | # a | | b # A | DISPLAY | B # | | # @-----------------------@ # [Device] Name=Wacom Cintiq 20WSX ModelName=DTZ-2000W DeviceMatch=usb:056a:00c5 Class=Cintiq Width=17 Height=11 Layout=cintiq-20wsx.svg Styli=@intuos3; IntegratedIn=Display [Features] Reversible=false Stylus=true NumStrips=2 Buttons=14 [Buttons] Left=A;B;C;D;I;K;L Right=E;F;G;H;J;M;N libwacom-libwacom-1.3/data/cintiq-21ux.tablet000066400000000000000000000016641363647401700211610ustar00rootroot00000000000000# Wacom # Cintiq 21UX # DTZ-2100 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # CA | | EG # CA | | EG # CB | DISPLAY | FG # CB | | FG # DD | | HH # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Cintiq 21UX ModelName=DTZ-2100 DeviceMatch=usb:056a:003f Class=Cintiq Width=17 Height=13 Layout=cintiq-21ux.svg Styli=@intuos3; IntegratedIn=Display [Features] Reversible=false Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-1.3/data/cintiq-21ux2.tablet000066400000000000000000000027131363647401700212370ustar00rootroot00000000000000# Wacom # Cintiq 21UX [2nd generation] # DTK-2100 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | K # C | | L # D | | M # E | | N # A | DISPLAY | J # F | | O # G | | P # H | | Q # I | | R # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # @-----------------------@ # | | # a | | b # A | DISPLAY | B # | | # @-----------------------@ # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 10 | | 00 # 11 | | 01 # 12 | DISPLAY | 02 # 13 | | 03 # | | # *-----------------------* # [Device] Name=Wacom Cintiq 21UX2 ModelName=DTK-2100 DeviceMatch=usb:056a:00cc Class=Cintiq Width=17 Height=13 Layout=cintiq-21ux2.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Ring=false NumStrips=2 Buttons=18 StatusLEDs=Touchstrip2;Touchstrip [Buttons] Left=B;C;D;E;A;F;G;H;I Right=K;L;M;N;J;O;P;Q;R Touchstrip=A Touchstrip2=J StripsNumModes=4 libwacom-libwacom-1.3/data/cintiq-22.tablet000066400000000000000000000004471363647401700206030ustar00rootroot00000000000000# Wacom # Cintiq 22 # DTK-2260 [Device] Name=Wacom Cintiq 22 ModelName=DTK-2260 Class=Cintiq DeviceMatch=usb:056a:0391 Width=19 Height=10 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-1.3/data/cintiq-22hd.tablet000066400000000000000000000022521363647401700211130ustar00rootroot00000000000000 # Wacom # Cintiq 22HD # DTK-2200 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | K # C | | L # D | | M # E | | N # A | DISPLAY | J # F | | O # G | | P # H | | Q # I | | R # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # @-----------------------@ # | | # a | | b # A | DISPLAY | B # | | # @-----------------------@ # [Device] Name=Wacom Cintiq 22HD ModelName=DTK-2200 DeviceMatch=usb:056a:00fa Class=Cintiq Width=19 Height=11 Layout=cintiq-22hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false NumStrips=2 Buttons=18 [Buttons] Left=B;C;D;E;A;F;G;H;I Right=K;L;M;N;J;O;P;Q;R Touchstrip=A Touchstrip2=J # Note: no physical LEDs to show mode StripsNumModes=4 libwacom-libwacom-1.3/data/cintiq-22hdt.tablet000066400000000000000000000024101363647401700212730ustar00rootroot00000000000000# Wacom # Cintiq 22HD touch # DTH-2200 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | K # C | | L # D | | M # E | | N # A | DISPLAY | J # F | | O # G | | P # H | | Q # I | | R # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # @-----------------------@ # | | # a | | b # A | DISPLAY | B # | | # @-----------------------@ # # Note: touch data comes through the usb:056a:005e interface [Device] Name=Wacom Cintiq 22HD touch ModelName=DTH-2200 DeviceMatch=usb:056a:005b PairedID=usb:056a:005e Class=Cintiq Width=19 Height=11 Layout=cintiq-22hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false NumStrips=2 Buttons=18 [Buttons] Left=B;C;D;E;A;F;G;H;I Right=K;L;M;N;J;O;P;Q;R Touchstrip=A Touchstrip2=J # Note: no physical LEDs to show mode StripsNumModes=4 libwacom-libwacom-1.3/data/cintiq-24hd-touch.tablet000066400000000000000000000026311363647401700222360ustar00rootroot00000000000000# Wacom # Cintiq 24HD touch # DTH-2400 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | I # B | | J # C | DISPLAY | K # DEFF | | NNML # DEGG | | OOML # DEHH | | PPML # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | DISPLAY | B # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # 10 | | 00 # 11 | | 01 # 12 | DISPLAY | 02 # 1* | | 0* # | | # *-----------------------* # # Note: touch data comes through the usb:056a:00f6 interface [Device] Name=Wacom Cintiq 24HD touch ModelName=DTH-2400 DeviceMatch=usb:056a:00f8 PairedID=usb:056a:00f6 Class=Cintiq Width=21 Height=13 Layout=cintiq-24hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Buttons=16 Ring=true Ring2=true StatusLEDs=Ring2;Ring [Buttons] Left=A;B;C;D;E;F;G;H Right=I;J;K;L;M;N;O;P Ring=A;B;C Ring2=I;J;K libwacom-libwacom-1.3/data/cintiq-24hd.tablet000066400000000000000000000024721363647401700211210ustar00rootroot00000000000000# Wacom # Cintiq 24HD # DTK-2400 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | I # B | | J # C | DISPLAY | K # DEFF | | NNML # DEGG | | OOML # DEHH | | PPML # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | DISPLAY | B # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # 10 | | 00 # 11 | | 01 # 12 | DISPLAY | 02 # 1* | | 0* # | | # *-----------------------* # [Device] Name=Wacom Cintiq 24HD ModelName=DTK-2400 DeviceMatch=usb:056a:00f4 Class=Cintiq Width=21 Height=13 Layout=cintiq-24hd.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Buttons=16 Ring=true Ring2=true StatusLEDs=Ring2;Ring [Buttons] Left=A;B;C;D;E;F;G;H Right=I;J;K;L;M;N;O;P Ring=A;B;C Ring2=I;J;K libwacom-libwacom-1.3/data/cintiq-27hd.tablet000066400000000000000000000004161363647401700211200ustar00rootroot00000000000000# Wacom # Cintiq 27QHD # DTK-2700 # [Device] Name=Wacom Cintiq 27QHD ModelName=DTK-2700 DeviceMatch=usb:056a:032a Class=Cintiq Width=24 Height=12 Styli=@intuos5; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Buttons=0 Ring=false Ring2=false libwacom-libwacom-1.3/data/cintiq-27hdt.tablet000066400000000000000000000005551363647401700213100ustar00rootroot00000000000000# Wacom # Cintiq 27QHD touch # DTH-2700 # # Note: touch data comes through the usb:056a:032c interface [Device] Name=Wacom Cintiq 27QHD touch ModelName=DTH-2700 DeviceMatch=usb:056a:032b PairedID=usb:056a:032c Class=Cintiq Width=24 Height=12 Styli=@intuos5; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Buttons=0 Ring=false Ring2=false libwacom-libwacom-1.3/data/cintiq-companion-2.tablet000066400000000000000000000020471363647401700225000ustar00rootroot00000000000000# Wacom # Cintiq Companion # DTH-W1310 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # | | # I | | # J A H | DISPLAY | # K | | # | | # E | | # F | | # G | | # | | # *-----------------------* # # Note: Buttons H, I, J, K are on a circle # # Note: touch data comes through the usb:056a:0326 interface # [Device] Name=Wacom Cintiq Companion 2 ModelName=DTH-W1310 Class=Cintiq DeviceMatch=usb:056a:0325 PairedID=usb:056a:0326 Width=12 Height=7 Layout=cintiq-companion-2.svg Styli=@intuos5;@intuos4; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=false Buttons=11 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K libwacom-libwacom-1.3/data/cintiq-companion-hybrid.tablet000066400000000000000000000017631363647401700236240ustar00rootroot00000000000000# Wacom # Cintiq Companion Hybrid # DTH-A1300 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # | | # G | | # H A F | DISPLAY | # I | | # | | # D | | # E | | # | | # *-----------------------* # # Note: Buttons F, G, H, I are on a circle # # Note: touch data comes through the usb:056a:0309 interface # [Device] Name=Wacom Cintiq Companion Hybrid ModelName=DTH-A1300 Class=Cintiq DeviceMatch=usb:056a:0307 PairedID=usb:056a:0309 Width=12 Height=7 Layout=cintiq-companion-hybrid.svg Styli=@intuos5;@intuos4; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=9 [Buttons] Left=B;C;G;H;A;F;I;D;E libwacom-libwacom-1.3/data/cintiq-companion.tablet000066400000000000000000000017241363647401700223420ustar00rootroot00000000000000# Wacom # Cintiq Companion # DTH-W1300 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # | | # G | | # H A F | DISPLAY | # I | | # | | # D | | # E | | # | | # *-----------------------* # # Note: Buttons F, G, H, I are on a circle # # Note: touch data comes through the usb:056a:030c interface # [Device] Name=Wacom Cintiq Companion ModelName=DTH-W1300 Class=Cintiq DeviceMatch=usb:056a:030a PairedID=usb:056a:030c Width=12 Height=7 Layout=cintiq-companion.svg Styli=@intuos5;@intuos4; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=false Buttons=9 [Buttons] Left=B;C;G;H;A;F;I;D;E libwacom-libwacom-1.3/data/cintiq-pro-13.tablet000066400000000000000000000021211363647401700213700ustar00rootroot00000000000000# Wacom # Cintiq Pro 13 # DTH-1320 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Mode change (Display/Opaque) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 13 ModelName=DTH-1320 Class=Cintiq DeviceMatch=usb:056a:034F PairedID=usb:056a:0353 Width=12 Height=7 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-1.3/data/cintiq-pro-16.tablet000066400000000000000000000021211363647401700213730ustar00rootroot00000000000000# Wacom # Cintiq Pro 16 # DTH-1620 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Mode change (Display/Opaque) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 16 ModelName=DTH-1620 Class=Cintiq DeviceMatch=usb:056a:0350 PairedID=usb:056a:0354 Width=14 Height=8 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-1.3/data/cintiq-pro-24-p.tablet000066400000000000000000000021221363647401700216300ustar00rootroot00000000000000# Wacom # Cintiq Pro 24 P # DTK-2420 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Change display source (DisplayPort, USB-C, etc.) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 24 ModelName=DTK-2420 Class=Cintiq DeviceMatch=usb:056a:037c Width=20 Height=12 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-1.3/data/cintiq-pro-24-pt.tablet000066400000000000000000000021511363647401700220160ustar00rootroot00000000000000# Wacom # Cintiq Pro 24 PT # DTH-2420 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Change display source (DisplayPort, USB-C, etc.) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 24 ModelName=DTH-2420 Class=Cintiq DeviceMatch=usb:056a:0351 PairedID=usb:056a:0355 Width=20 Height=12 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-1.3/data/cintiq-pro-32.tablet000066400000000000000000000021461363647401700214000ustar00rootroot00000000000000# Wacom # Cintiq Pro 32 # DTH-3220 # # K K K K K # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # # Note: The device has 5 keys as shown above. Their # intended uses are, from left to right,: # 1. Change display source (DisplayPort, USB-C, etc.) # 2. Wacom Desktop Center # 3. On screen keyboard # 4. Wacom display settings # 5. Touch on/off # [Device] Name=Wacom Cintiq Pro 32 ModelName=DTH-3220 Class=Cintiq DeviceMatch=usb:056a:0352 PairedID=usb:056a:0356 Width=27 Height=15 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-1.3/data/dell-canvas-27.tablet000066400000000000000000000014021363647401700215020ustar00rootroot00000000000000# Dell # Canvas 27 # # # # *-----------------------* # | | # | | # | | # | | # | | # | DISPLAY | # | | # | | # | | # | | # | | # *-----------------------* # [Device] Name=Dell Canvas 27 ModelName= Class=Cintiq DeviceMatch=usb:056a:4200 PairedID=usb:2575:0204 Width=23 Height=13 # No pad buttons, so no layout Styli=0xffffd; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Buttons=0 libwacom-libwacom-1.3/data/dtf-720.tablet000066400000000000000000000003761363647401700201570ustar00rootroot00000000000000# Wacom # DTF-720 Interactive Pen Display # # FIXME: This file has not been verified yet [Device] Name=Wacom DTF-720 ModelName=DTF-720 DeviceMatch=usb:056a:00c0 Width=13 Height=11 Class=PenDisplay IntegratedIn=Display [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/dth-1152.tablet000066400000000000000000000005531363647401700202360ustar00rootroot00000000000000# Wacom # DTH-1152 Interactive Pen Display # # Note: Stylus does not have an eraser [Device] Name=Wacom DTH1152 ModelName=DTH-1152 DeviceMatch=usb:056a:035a PairedID=usb:056a:0368 Class=PenDisplay Width=9 Height=5 #No ExpressKeys, so no layout IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Ring2=false NumStrips=0 Buttons=0 libwacom-libwacom-1.3/data/dth-2242.tablet000066400000000000000000000014071363647401700202360ustar00rootroot00000000000000# Wacom # DTH-2242 Interactive Pen and Touch Display # # Button Map: # (A=1, B=2, C=3, ...) # # A B C D E F # *-----------------* # | | # | DISPLAY | # | | # *-----------------* # # Note: touch data comes through the usb:056a:005d interface [Device] Name=Wacom DTH2242 ModelName=DTH-2242 DeviceMatch=usb:056a:0059 PairedID=usb:056a:005d Class=PenDisplay Width=19 Height=11 Layout=dth-2242.svg Styli=@dth2242; IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=true Ring=false Ring2=false NumStrips=0 # Actually 7 buttons but one is reserved for onscreen menus Buttons=6 [Buttons] Top=A;B;C;D;E;F libwacom-libwacom-1.3/data/dth-2452.tablet000066400000000000000000000011771363647401700202450ustar00rootroot00000000000000# Wacom # DTH-2452 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------* # | | A # | | B # | DISPLAY | # | | C # | | D # *-----------------* # [Device] Name=Wacom DTH2452 ModelName=DTH-2452 DeviceMatch=usb:056a:037d PairedID=usb:056a:037e Class=PenDisplay Width=20 Height=12 Layout=dth-2452.svg IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=true Ring=false Ring2=false NumStrips=0 # Actually 5 buttons but one is reserved for onscreen menus Buttons=4 [Buttons] Right=A;B;C;D libwacom-libwacom-1.3/data/dti-520.tablet000066400000000000000000000014071363647401700201540ustar00rootroot00000000000000# Wacom # DTI-520 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # F G H I J # *-----------------* # | | # | DISPLAY | # | | # *-----------------* # D # B A C B # E [Device] Name=Wacom DTI520UB/L ModelName=DTI-520 DeviceMatch=usb:056a:003a Class=PenDisplay Width=14 Height=12 Layout=dti-520.svg # FIXME does the stylus have an eraser? # Styli=0xfffff; IntegratedIn=Display [Features] # This tablet does not appear to support erasers on styli Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 # Actually 11 buttons but the two Ctrl ones send the same scancode Buttons=10 [Buttons] Top=F;G;H;I;J Bottom=B;A;D;E;C;B libwacom-libwacom-1.3/data/dtk-1651.tablet000066400000000000000000000010521363647401700202400ustar00rootroot00000000000000# Wacom # DTK-1651 Interactive Pen Display # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------* # | | D # | | C # | DISPLAY | # | | B # | | A # *-----------------* # [Device] Name=Wacom DTK1651 ModelName=DTK-1651 DeviceMatch=usb:056a:0343 Class=PenDisplay Width=14 Height=8 Layout=dtk-1651.svg IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=4 [Buttons] Right=A;B;C;D libwacom-libwacom-1.3/data/dtk-1660e.tablet000066400000000000000000000004341363647401700204100ustar00rootroot00000000000000# Wacom # DTK-1660E [Device] Name=Wacom DTK-1660E ModelName=DTK-1660E Class=Cintiq DeviceMatch=usb:056a:0396 Width=14 Height=8 # No pad buttons, so no layout Styli=@intuos5;@mobilestudio; IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-1.3/data/dtk-2241.tablet000066400000000000000000000012521363647401700202360ustar00rootroot00000000000000# Wacom # DTK-2241 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # A B C D E F # *-----------------* # | | # | DISPLAY | # | | # *-----------------* # [Device] Name=Wacom DTK2241 ModelName=DTK-2241 DeviceMatch=usb:056a:0057 Class=PenDisplay Width=19 Height=11 Layout=dth-2242.svg Styli=@dth2242; IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 # Actually 7 buttons but one is reserved for onscreen menus Buttons=6 [Buttons] Top=A;B;C;D;E;F libwacom-libwacom-1.3/data/dtk-2451.tablet000066400000000000000000000011511363647401700202370ustar00rootroot00000000000000# Wacom # DTK-2451 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------* # | | A # | | B # | DISPLAY | # | | C # | | D # *-----------------* # [Device] Name=Wacom DTK2451 ModelName=DTK-2451 DeviceMatch=usb:056a:0382 Class=PenDisplay Width=20 Height=12 Layout=dtk-2451.svg IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 # Actually 5 buttons but one is reserved for onscreen menus Buttons=4 [Buttons] Right=A;B;C;D libwacom-libwacom-1.3/data/dtu-1031.tablet000066400000000000000000000011711363647401700202440ustar00rootroot00000000000000# Wacom # DTU-1031 Interactive Pen Display # # Button Map: # (A=1, B=2, C=3, ...) # # A *-----------------* # B | | # C | | # D | DISPLAY | # | | # | | # *-----------------* # [Device] Name=Wacom DTU1031 ModelName=DTU-1031 DeviceMatch=usb:056a:00fb Class=PenDisplay Width=9 Height=5 Layout=dtu-1031.svg IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=4 [Buttons] Left=A;B;C;D libwacom-libwacom-1.3/data/dtu-1031x.tablet000066400000000000000000000005521363647401700204360ustar00rootroot00000000000000# Wacom # DTU-1031X Interactive Pen Display # [Device] Name=Wacom DTU1031X ModelName=DTU-1031X DeviceMatch=usb:056a:032f Class=PenDisplay Width=9 Height=5 IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=0 libwacom-libwacom-1.3/data/dtu-1141.tablet000066400000000000000000000012131363647401700202430ustar00rootroot00000000000000# Wacom # DTU-1141 Interactive Pen Display # Button Map: # (A=1, B=2, C=3, ...) # # A B C D # *-----------------* # | | # | | # | DISPLAY | # | | # | | # *-----------------* # [Device] Name=Wacom DTU1141 ModelName=DTU-1141 DeviceMatch=usb:056a:0336 Class=PenDisplay Width=9 Height=5 Layout=dtu-1141.svg IntegratedIn=Display [Features] # This tablet supports two stylus models: # a pen without eraser and a pen with eraser Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/dtu-1141b.tablet000066400000000000000000000010701363647401700204060ustar00rootroot00000000000000# Wacom # DTU-1141B Interactive Pen Display # Button Map: # (A=1, B=2, C=3, ...) # # A B C D # *-----------------* # | | # | | # | DISPLAY | # | | # | | # *-----------------* # [Device] Name=Wacom DTU1141B ModelName=DTU-1141B DeviceMatch=usb:056a:0359 Class=PenDisplay Width=9 Height=5 Layout=dtu-1141b.svg IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Ring2=false NumStrips=0 Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/dtu-1631.tablet000066400000000000000000000004001363647401700202440ustar00rootroot00000000000000# Wacom # DTU-1631 Interactive Pen Display # # FIXME: This file has not been verified yet [Device] Name=Wacom DTU-1631 ModelName=DTU-1631 DeviceMatch=usb:056a:00f0 Width=14 Height=8 Class=PenDisplay IntegratedIn=Display [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/dtu-1931.tablet000066400000000000000000000003401363647401700202520ustar00rootroot00000000000000# Wacom # DTU-1931 Interactive Pen Display # [Device] Name=Wacom DTU-1931 ModelName=DTU-1931 DeviceMatch=usb:056a:00c7 Width=15 Height=12 Class=PenDisplay IntegratedIn=Display [Features] Stylus=true Buttons=0 BuiltIn=true libwacom-libwacom-1.3/data/dtu-2231.tablet000066400000000000000000000003241363647401700202460ustar00rootroot00000000000000# Wacom # DTU-2231 Interactive Pen Display # [Device] Name=Wacom DTU-2231 ModelName=DTU-2231 DeviceMatch=usb:056a:00ce Class=PenDisplay Width=19 Height=11 IntegratedIn=Display [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/ek-remote.tablet000066400000000000000000000012211363647401700207520ustar00rootroot00000000000000# Wacom # ExpressKey Remote # ACK-411050 # # C D # B A E # F # G H I # J K L # M N O # P # Q R [Device] Name=Wacom ExpressKey Remote ModelName=ACK-411050 DeviceMatch=usb:056a:0331 Layout=ek-remote.svg Class=Remote [Features] Stylus=false Ring=true NumStrips=0 Buttons=18 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107;0x108;0x109;0x130;0x131;0x132;0x133;0x134;0x135;0x126;0x127 #Note that though this device has 3 ring modes #this mode selection does not function the same #as previous devices. The EKR's mode is read-only. RingNumModes=3 Ring=A libwacom-libwacom-1.3/data/elan-2072.tablet000066400000000000000000000004121363647401700203720ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP Spectre x360 Convertible 13-40xx [Device] Name=ELAN 2072 ModelName= DeviceMatch=usb:04f3:2072 Width=12 Height=7 Class=PenDisplay IntegratedIn=Display;System Styli=0xffffd; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/elan-22e2.tablet000066400000000000000000000004171363647401700204570ustar00rootroot00000000000000# Used in the HP Spectre X360 [Device] Name=ELAN 22E2 ModelName= DeviceMatch=i2c:04f3:22e2 Class=ISDV4 IntegratedIn=Display;System Styli=0xffffe;0xfffff; [Features] Stylus=true Reversible=false Touch=false TouchSwitch=false Ring=false Ring2=false NumStrips=0 Buttons=0 libwacom-libwacom-1.3/data/elan-24db.tablet000066400000000000000000000003671363647401700205440ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP Spectre x360 Convertible 13-ac0XX [Device] Name=ELAN 24DB ModelName= DeviceMatch=i2c:04f3:24db Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/elan-2537.tablet000066400000000000000000000003651363647401700204070ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP ENVY x360 Convertible 15m-bq1xx [Device] Name=ELAN 2537 ModelName= DeviceMatch=i2c:04f3:2537 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/elan-2627.tablet000066400000000000000000000003651363647401700204070ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP envy x360 Convertible 13-ag0xxx [Device] Name=ELAN 2627 ModelName= DeviceMatch=i2c:04f3:2627 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/elan-2628.tablet000066400000000000000000000003641363647401700204070ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP envy x360 Convertible 13-ag0xxx [Device] Name=ELAN 2628 ModelName= DeviceMatch=i2c:04f3:2628 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/elan-262b.tablet000066400000000000000000000003651363647401700204620ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP envy x360 Convertible 13-ag0xxx [Device] Name=ELAN 262b ModelName= DeviceMatch=i2c:04f3:262b Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/elan-264c.tablet000066400000000000000000000005571363647401700204700ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the HP Envy x360 Convertible 15-cp0XXX [Device] Name=ELAN touchscreen/pen sensor ModelName=ELAN-264C DeviceMatch=i2c:04f3:264c Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System # This device supports both pens with eraser and without eraser Styli=0xffffd;0xffffe;0xfffff; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/elan-29a1.tablet000066400000000000000000000004751363647401700204650ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the ASUS ZenBook Pro Duo UX581GV # this is the secondary / bottom touchscreen # 345mm x 99mm # 13.59in x 3.9in [Device] Name=ELAN 29A1 ModelName= DeviceMatch=i2c:04F3:29A1 Class=ISDV4 Width=14 Height=4 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/elan-29b6.tablet000066400000000000000000000004671363647401700204740ustar00rootroot00000000000000# ELAN touchscreen/pen sensor present in the ASUS ZenBook Pro Duo UX581GV # this is the main / top touchscreen # 345mm x 194mm # 13.59in x 7.64in [Device] Name=ELAN 29B6 ModelName= DeviceMatch=i2c:04F3:29B6 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/elan-5515.tablet000066400000000000000000000003071363647401700204020ustar00rootroot00000000000000# ELAN touchscreen/pen present in the Acer Switch SA5-271P [Device] Name=ELAN 5515 ModelName= DeviceMatch=i2c:04F3:2339 Class=ISDV4 IntegratedIn=Display [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/generic.tablet000066400000000000000000000002041363647401700204760ustar00rootroot00000000000000[Device] Name=Generic ModelName=generic DeviceMatch=generic [Features] Reversible=true Stylus=true Ring=true NumStrips=2 Buttons=4 libwacom-libwacom-1.3/data/graphire-usb.tablet000066400000000000000000000007641363647401700214650ustar00rootroot00000000000000# Wacom # Graphire # ET-0405 # # Button Map: # (A=1, B=2, C=3, ...) # # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire ModelName=ET-0405 DeviceMatch=usb:056a:0010 Class=Graphire Width=5 Height=4 [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/graphire-wireless-8x6.tablet000066400000000000000000000010511363647401700231420ustar00rootroot00000000000000# Wacom # Graphire Wireless # CTE-630BT # # Button Map: # (A=1, B=2, C=3, ...) # # A B # *-------------------* # | | # | | # | TABLET | # | | # | | # | | # *-------------------* [Device] Name=Wacom Graphire Wireless ModelName=CTE-630BT DeviceMatch=bluetooth:056a:81 Class=Graphire Width=8 Height=6 Layout=graphire-wireless-8x6.svg IntegratedIn= [Features] Reversible=false Stylus=true Ring=false Buttons=2 [Buttons] Top=A;B libwacom-libwacom-1.3/data/graphire2-4x5.tablet000066400000000000000000000010001363647401700213560ustar00rootroot00000000000000# Wacom # Graphire2 4x5 # ET-0405A # # Button Map: # (A=1, B=2, C=3, ...) # # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire2 4x5 ModelName=ET-0405A DeviceMatch=usb:056a:0011 Class=Graphire Width=5 Height=4 [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/graphire2-5x7.tablet000066400000000000000000000010001363647401700213610ustar00rootroot00000000000000# Wacom # Graphire2 5x7 # ET-0507A # # Button Map: # (A=1, B=2, C=3, ...) # # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire2 5x7 ModelName=ET-0507A DeviceMatch=usb:056a:0012 Class=Graphire Width=7 Height=5 [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/graphire3-4x5.tablet000066400000000000000000000002731363647401700213720ustar00rootroot00000000000000 [Device] # Model CTE-430 (Sapphire) (CTE-430/B) Name=Wacom Graphire3 4x5 ModelName=CTE-430 DeviceMatch=usb:056a:0013 Class=Graphire Width=5 Height=4 [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/graphire3-6x8.tablet000066400000000000000000000002731363647401700213770ustar00rootroot00000000000000 [Device] # Model CTE-630 (Sapphire) (CTE-630/B) Name=Wacom Graphire3 6x8 ModelName=CTE-630 DeviceMatch=usb:056a:0014 Class=Graphire Width=8 Height=6 [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/graphire4-4x5.tablet000066400000000000000000000011001363647401700213610ustar00rootroot00000000000000# Wacom # Graphire4 4x5 # CTE-440 # # Button Map: # (A=1, B=2, C=3, ...) # # AA BB # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire4 4x5 ModelName=CTE-440 DeviceMatch=usb:056a:0015 Class=Graphire Width=5 Height=4 Layout=graphire4-4x5.svg [Features] Stylus=true Buttons=2 [Buttons] Top=A;B libwacom-libwacom-1.3/data/graphire4-6x8.tablet000066400000000000000000000011271363647401700213770ustar00rootroot00000000000000# Wacom # Graphire4 6x8 # CTE-640 # # Button Map: # (A=1, B=2, C=3, ...) # # AA BB # *----------------------* # | | # | | # | | # | TABLET | # | | # | | # | | # *----------------------* # [Device] Name=Wacom Graphire4 6x8 ModelName=CTE-640 DeviceMatch=usb:056a:0016 Class=Graphire Width=8 Height=6 Layout=graphire4-6x8.svg [Features] Stylus=true Buttons=2 [Buttons] Top=A;B EvdevCodes=0x116;0x115 libwacom-libwacom-1.3/data/huion-h420.tablet000066400000000000000000000011201363647401700206550ustar00rootroot00000000000000# HUION # H420 # # Button Map: # (A=1, B=2, C=3) # # *-----------------------* # A | | # | | # B | TABLET | # | | # C | | # *-----------------------* [Device] Name=Huion H420 ModelName= DeviceMatch=usb:256c:006e:HUION H420 Pen;usb:256c:006e:HUION H420 Pad; Class=Bamboo Width=4 Height=2 IntegratedIn= Layout=huion-h420.svg Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=3 [Buttons] Left=A;B;C EvdevCodes=0x100;0x101;0x102; libwacom-libwacom-1.3/data/huion-h610-pro.tablet000066400000000000000000000010111363647401700214530ustar00rootroot00000000000000# HUION # H610 Pro # [Device] Name=Huion H610 Pro ModelName= DeviceMatch=usb:256c:006e:HUION PenTablet Pen;usb:256c:006e:HUION PenTablet Pad;usb:256c:006e:Turcom TS-6610 Pen;usb:256c:006e:Turcom TS-6610 Pad;usb:256c:006e:HUION Huion Tablet Pen;usb:256c:006e:HUION Huion Tablet Pad Class=Bamboo Width=10 Height=6 IntegratedIn= Layout=huion-h610-pro.svg Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=8 [Buttons] Left=A;B;C;D;E;F;G;H EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107 libwacom-libwacom-1.3/data/intuos-12x12.tablet000066400000000000000000000003211363647401700211560ustar00rootroot00000000000000# Wacom # Intuos 12x12 # GD-1212 [Device] Name=Wacom Intuos 12x12 ModelName=GD-1212 DeviceMatch=usb:056a:0023 Class=Intuos Width=12 Height=12 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos-12x18.tablet000066400000000000000000000003211363647401700211640ustar00rootroot00000000000000# Wacom # Intuos 12x18 # GD-1218 [Device] Name=Wacom Intuos 12x18 ModelName=GD-1218 DeviceMatch=usb:056a:0024 Class=Intuos Width=18 Height=12 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos-4x5.tablet000066400000000000000000000003131363647401700210220ustar00rootroot00000000000000# Wacom # Intuos 4x5 # GD-0405 [Device] Name=Wacom Intuos 4x5 ModelName=GD-0405 DeviceMatch=usb:056a:0020 Class=Intuos Width=5 Height=4 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos-6x8.tablet000066400000000000000000000003131363647401700210270ustar00rootroot00000000000000# Wacom # Intuos 6x8 # GD-0608 [Device] Name=Wacom Intuos 6x8 ModelName=GD-0608 DeviceMatch=usb:056a:0021 Class=Intuos Width=8 Height=6 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos-9x12.tablet000066400000000000000000000003161363647401700211100ustar00rootroot00000000000000# Wacom # Intuos 9x12 # GD-0912 [Device] Name=Wacom Intuos 9x12 ModelName=GD-0912 DeviceMatch=usb:056a:0022 Class=Intuos Width=12 Height=9 Styli=@intuos-airbrush;@intuos; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos-m-p.tablet000066400000000000000000000012671363647401700211040ustar00rootroot00000000000000# Wacom # Intuos Pen Medium # CTL-680 # # Successor of Bamboo3 series # # stylus with two buttons and eraser # Pen active area: 8.5 x 5.3in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen Medium ModelName=CTL-680 DeviceMatch=usb:056a:0323 Class=Bamboo Width=9 Height=5 Layout=intuos-m-p.svg IntegratedIn= [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-m-p2.tablet000066400000000000000000000013651363647401700211650ustar00rootroot00000000000000# Wacom # Intuos Pen Medium # CTL-690 # # Successor of Bamboo3 series while stylus # is in Intuos stylus format # # stylus with two buttons and no eraser # Pen active area: 8.5 x 5.3in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen Medium ModelName=CTL-690 DeviceMatch=usb:056a:033d Class=Bamboo Width=9 Height=5 Layout=intuos-m-p2.svg IntegratedIn= Styli=@intuospt; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-m-p3-android.tablet000066400000000000000000000017561363647401700226100ustar00rootroot00000000000000# Wacom # Intuos Pen Medium # CTL-6100 # (Android Mode) # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # This definition is for the special "Android Mode" which changes the # tablet's vendor ID and active area. For more information, see: # https://github.com/linuxwacom/xf86-input-wacom/wiki/Known-Issues#android-misdetect [Device] Name=Wacom Intuos M (Android Mode) ModelName=CTL-6100 DeviceMatch=usb:2d1f:0375 Class=Bamboo Width=3 Height=5 Layout=intuos-m-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-m-p3-wl-android.tablet000066400000000000000000000017771363647401700232330ustar00rootroot00000000000000# Wacom # Intuos Pen Medium Wireless # CTL-6100WL # (Android Mode) # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # This definition is for the special "Android Mode" which changes the # tablet's vendor ID and active area. For more information, see: # https://github.com/linuxwacom/xf86-input-wacom/wiki/Known-Issues#android-misdetect [Device] Name=Wacom Intuos BT M (Android Mode) ModelName=CTL-6100WL DeviceMatch=usb:2d1f:0378 Class=Bamboo Width=3 Height=5 Layout=intuos-m-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-m-p3-wl.tablet000066400000000000000000000014241363647401700216020ustar00rootroot00000000000000# Wacom # Intuos Pen Medium Wireless # CTL-6100WL # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Wacom Intuos BT M ModelName=CTL-6100WL DeviceMatch=usb:056a:0378;bluetooth:056a:0379 Class=Bamboo Width=9 Height=5 Layout=intuos-m-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-m-p3.tablet000066400000000000000000000013601363647401700211610ustar00rootroot00000000000000# Wacom # Intuos Pen Medium # CTL-6100 # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Wacom Intuos M ModelName=CTL-6100 DeviceMatch=usb:056a:0375 Class=Bamboo Width=9 Height=5 Layout=intuos-m-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-m-pt.tablet000066400000000000000000000021721363647401700212640ustar00rootroot00000000000000# Wacom # Intuos Pen & Touch Medium # CTH-680 # # Successor of Bamboo3 series # # stylus with two buttons and eraser; 16FG touch # Pen active area: 8.5 x 5.3in # Touch active area: 8.5 x 5.3in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* # # Touch Switch Map: # (on the edge of top right corner; switch to right: touch off; switch to left: touch on) # # S # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen & Touch Medium ModelName=CTH-680 DeviceMatch=usb:056a:0303 Class=Bamboo Width=9 Height=5 Layout=intuos-m-pt.svg IntegratedIn= [Features] Stylus=true Reversible=false Touch=true Buttons=4 TouchSwitch=true [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-m-pt2.tablet000066400000000000000000000022701363647401700213450ustar00rootroot00000000000000# Wacom # Intuos Pen & Touch Medium # CTH-690 # # Successor of Bamboo3 series while stylus # is in Intuos stylus format # # stylus with two buttons and no eraser; 16FG touch # Pen active area: 8.5 x 5.3in # Touch active area: 8.5 x 5.3in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* # # Touch Switch Map: # (on the edge of top right corner; switch to right: touch off; switch to left: touch on) # # S # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen & Touch Medium ModelName=CTH-690 DeviceMatch=usb:056a:033e Class=Bamboo Width=9 Height=5 Layout=intuos-m-pt2.svg IntegratedIn= Styli=@intuospt; [Features] Stylus=true Reversible=false Touch=true Buttons=4 TouchSwitch=true [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-pro-2-l.tablet000066400000000000000000000025671363647401700216070ustar00rootroot00000000000000# Wacom # Intuos Pro 2 L # PTH-860 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # I | TABLET | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 01 02 | | # | TABLET | # 00 03 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro L ModelName=PTH-860 DeviceMatch=usb:056a:0358;bluetooth:056a:0361; Class=Intuos5 Width=12 Height=8 Layout=intuos-pro-2-l.svg IntegratedIn= Styli=@intuos5;@mobilestudio; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=I RingNumModes=4 libwacom-libwacom-1.3/data/intuos-pro-2-m.tablet000066400000000000000000000025661363647401700216070ustar00rootroot00000000000000# Wacom # Intuos Pro 2 M # PTH-660 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # I | TABLET | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 01 02 | | # | TABLET | # 00 03 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro M ModelName=PTH-660 DeviceMatch=usb:056a:0357;bluetooth:056a:0360; Class=Intuos5 Width=9 Height=6 Layout=intuos-pro-2-m.svg IntegratedIn= Styli=@intuos5;@mobilestudio; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=I RingNumModes=4 libwacom-libwacom-1.3/data/intuos-pro-2-s.tablet000066400000000000000000000020271363647401700216050ustar00rootroot00000000000000# Wacom # Intuos Pro 2 S # PTH-460 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # G | TABLET | # D | | # E | | # F | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # No changeable LEDs or modes [Device] Name=Wacom Intuos Pro S ModelName=PTH-460 DeviceMatch=usb:056a:0392;bluetooth:056a:0393; Class=Intuos5 Width=6 Height=4 Layout=intuos-pro-2-s.svg IntegratedIn= Styli=@intuos5;@mobilestudio; [Features] Stylus=true Reversible=true Touch=true Buttons=7 Ring=true [Buttons] Left=A;B;C;D;E;F;G # This device has a ring, but the button inside the ring is not a modesiwtch libwacom-libwacom-1.3/data/intuos-pro-l.tablet000066400000000000000000000025651363647401700214460ustar00rootroot00000000000000# Wacom # Intuos Pro L # PTH-851 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro L ModelName=PTH-851 DeviceMatch=usb:056a:0317 Class=Intuos5 Width=13 Height=8 Layout=intuos-pro-l.svg IntegratedIn= Styli=@intuos4-lens;@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos-pro-m.tablet000066400000000000000000000025461363647401700214460ustar00rootroot00000000000000# Wacom # Intuos Pro M # PTH-651 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro M ModelName=PTH-651 DeviceMatch=usb:056a:0315 Class=Intuos5 Width=9 Height=6 Layout=intuos-pro-m.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos-pro-s.tablet000066400000000000000000000024441363647401700214510ustar00rootroot00000000000000# Wacom # Intuos Pro S # PTH-451 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # A | TABLET | # E | | # F | | # G | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos Pro S ModelName=PTH-451 DeviceMatch=usb:056a:0314 Class=Intuos5 Width=6 Height=4 Layout=intuos-pro-s.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=7 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos-s-p.tablet000066400000000000000000000011671363647401700211110ustar00rootroot00000000000000# Wacom # Intuos Pen Small # CTL-480 # # Successor of Bamboo3 series # # stylus with two buttons and eraser # Pen active area: 6.0 x 3.7in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Intuos Pen Small ModelName=CTL-480 DeviceMatch=usb:056a:030e Class=Bamboo Width=6 Height=4 Layout=intuos-s-p.svg IntegratedIn= [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-s-p2.tablet000066400000000000000000000012651363647401700211720ustar00rootroot00000000000000# Wacom # Intuos Pen Small # CTL-490 # # Successor of Bamboo3 series while stylus # is in Intuos stylus format # # stylus with two buttons and no eraser # Pen active area: 6.0 x 3.7in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Intuos Pen Small ModelName=CTL-490 DeviceMatch=usb:056a:033b Class=Bamboo Width=6 Height=4 Layout=intuos-s-p2.svg IntegratedIn= Styli=@intuospt; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-s-p3-android.tablet000066400000000000000000000020211363647401700226000ustar00rootroot00000000000000# Wacom # Intuos Pen Small # CTL-4100 # (Android Mode) # # This is the third generation "Intuos", a successor to # the CTL-490. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # This definition is for the special "Android Mode" which changes the # tablet's vendor ID and active area. For more information, see: # https://github.com/linuxwacom/xf86-input-wacom/wiki/Known-Issues#android-misdetect [Device] Name=Wacom Intuos S (Android Mode) ModelName=CTL-4100 DeviceMatch=usb:2d1f:0374 Class=Bamboo Width=2 Height=4 Layout=intuos-s-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D EvdevCodes=0x100;0x101;0x102;0x103 libwacom-libwacom-1.3/data/intuos-s-p3-wl-android.tablet000066400000000000000000000017761363647401700232400ustar00rootroot00000000000000# Wacom # Intuos Pen Small Wireless # CTL-4100WL # (Android Mode) # # This is the third generation "Intuos", a successor to # the CTL-690. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* # # This definition is for the special "Android Mode" which changes the # tablet's vendor ID and active area. For more information, see: # https://github.com/linuxwacom/xf86-input-wacom/wiki/Known-Issues#android-misdetect [Device] Name=Wacom Intuos BT S (Android Mode) ModelName=CTL-4100WL DeviceMatch=usb:2d1f:0376 Class=Bamboo Width=2 Height=4 Layout=intuos-s-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-s-p3-wl.tablet000066400000000000000000000014231363647401700216070ustar00rootroot00000000000000# Wacom # Intuos Pen Small Wireless # CTL-4100WL # # This is the third generation "Intuos", a successor to # the CTL-490. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Wacom Intuos BT S ModelName=CTL-4100WL DeviceMatch=usb:056a:0376;bluetooth:056a:0377 Class=Bamboo Width=6 Height=4 Layout=intuos-s-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-s-p3.tablet000066400000000000000000000014221363647401700211660ustar00rootroot00000000000000# Wacom # Intuos Pen Small # CTL-4100 # # This is the third generation "Intuos", a successor to # the CTL-490. It has a Stylus with two buttons and no # eraser. The device has no touch. # # Buttons are no loger RIGHT, LEFT, FORWARD, and BACKWARD. # The buttons are now reported as numbered buttons as with # the Intuos Pro series. # # A B C D # *-----------------------* # | | # | TABLET | # | | # *-----------------------* [Device] Name=Wacom Intuos S ModelName=CTL-4100 DeviceMatch=usb:056a:0374 Class=Bamboo Width=6 Height=4 Layout=intuos-s-p3.svg IntegratedIn= Styli=@intuospt3; [Features] Stylus=true Reversible=false Buttons=4 [Buttons] Top=A;B;C;D EvdevCodes=0x100;0x101;0x102;0x103 libwacom-libwacom-1.3/data/intuos-s-pt.tablet000066400000000000000000000021701363647401700212700ustar00rootroot00000000000000# Wacom # Intuos Pen & Touch Small # CTH-480 # # Successor of Bamboo3 series # # stylus with two buttons and eraser; 16FG touch # Pen active area: 6.0 x 3.7in # Touch active area: 6.0 x 3.7in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* # # Touch Switch Map: # (on the edge of top right corner; switch to right: touch off; switch to left: touch on) # # S # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen & Touch Small ModelName=CTH-480 DeviceMatch=usb:056a:0302 Class=Bamboo Width=6 Height=4 Layout=intuos-s-pt.svg IntegratedIn= [Features] Stylus=true Reversible=false Touch=true Buttons=4 TouchSwitch=true [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos-s-pt2.tablet000066400000000000000000000022241363647401700213520ustar00rootroot00000000000000# Wacom # Intuos Pen & Touch Small # CTH-490 # # Successor of Bamboo3 series while stylus # is in Intuos stylus format # # stylus with two buttons and eraser; 16FG touch # Pen active area: 6.0 x 3.7in # Touch active area: 6.0 x 3.7in # # Button Map: # (A=RIGHT, B=LEFT, C=FORWARD, D=BACKWARD) # # A C # B D # *-----------------------* # | | # | TABLET | # | | # | | # *-----------------------* # # Touch Switch Map: # (on the edge of top right corner; switch to right: touch off; switch to left: touch on) # # S # *-----------------------* # | | # | | # | TABLET | # | | # | | # *-----------------------* [Device] Name=Intuos Pen & Touch Small ModelName=CTH-490 DeviceMatch=usb:056a:033c Class=Bamboo Width=6 Height=4 Layout=intuos-s-pt2.svg IntegratedIn= Styli=@intuospt; [Features] Stylus=true Reversible=false Touch=true Buttons=4 TouchSwitch=true [Buttons] Top=A;B;C;D libwacom-libwacom-1.3/data/intuos2-12x12.tablet000066400000000000000000000003271363647401700212460ustar00rootroot00000000000000[Device] Name=Wacom Intuos2 12x12 ModelName= DeviceMatch=usb:056a:0044 Class=Intuos2 Width=12 Height=12 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos2-12x18.tablet000066400000000000000000000004011363647401700212450ustar00rootroot00000000000000# Wacom # Intuos2 12x18 # XD-1218 [Device] Name=Wacom Intuos2 12x18 ModelName=XD-1218 DeviceMatch=usb:056a:0045 Class=Intuos2 Width=18 Height=12 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos2-4x5.tablet000066400000000000000000000003731363647401700211120ustar00rootroot00000000000000# Wacom # Intuos2 4x5 # XD-0405 [Device] Name=Wacom Intuos2 4x5 ModelName=XD-0405 DeviceMatch=usb:056a:0041 Class=Intuos2 Width=5 Height=4 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos2-6x8.tablet000066400000000000000000000004441363647401700211160ustar00rootroot00000000000000# Wacom # Intuos2 6x8 # XD-0608 [Device] Name=Wacom Intuos2 6x8 ModelName=XD-0608 # FIXME add missing usb:0056a:0047 match DeviceMatch=usb:056a:0042 Class=Intuos2 Width=8 Height=6 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos2-9x12.tablet000066400000000000000000000003761363647401700212000ustar00rootroot00000000000000# Wacom # Intuos2 9x12 # XD-0912 [Device] Name=Wacom Intuos2 9x12 ModelName=XD-0912 DeviceMatch=usb:056a:0043 Class=Intuos2 Width=12 Height=9 # ID 0x842 was re-used, listed here explicitly Styli=0x842;@intuos;@intuos2; [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/intuos3-12x12.tablet000066400000000000000000000020071363647401700212440ustar00rootroot00000000000000# Wacom # Intuos3 12x12 # PTZ-1230 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 12x12 ModelName=PTZ-1230 DeviceMatch=usb:056a:00b3 Class=Intuos3 Width=12 Height=12 Layout=intuos3-12x12.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-1.3/data/intuos3-12x19.tablet000066400000000000000000000020111363647401700212460ustar00rootroot00000000000000# Wacom # Intuos3 12x19 # PTZ-1231W # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 12x19 ModelName=PTZ-1231W DeviceMatch=usb:056a:00b4 Class=Intuos3 Width=19 Height=12 Layout=intuos3-12x19.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-1.3/data/intuos3-4x5.tablet000066400000000000000000000017341363647401700211150ustar00rootroot00000000000000# Wacom # Intuos3 4x5 # PTZ-430 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | # CA | | # CB | | # CB | | # DD | TABLET | # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | # A | DISPLAY | # | | # *-----------------------* # [Device] Name=Wacom Intuos3 4x5 ModelName=PTZ-430 DeviceMatch=usb:056a:00b0 Class=Intuos3 Width=5 Height=4 Layout=intuos3-4x5.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=1 Buttons=4 [Buttons] Left=A;B;C;D libwacom-libwacom-1.3/data/intuos3-4x6.tablet000066400000000000000000000017351363647401700211170ustar00rootroot00000000000000# Wacom # Intuos3 4x6 # PTZ-431W # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | # CA | | # CB | | # CB | | # DD | TABLET | # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | # A | DISPLAY | # | | # *-----------------------* # [Device] Name=Wacom Intuos3 4x6 ModelName=PTZ-431W DeviceMatch=usb:056a:00b7 Class=Intuos3 Width=6 Height=4 Layout=intuos3-4x6.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=1 Buttons=4 [Buttons] Left=A;B;C;D libwacom-libwacom-1.3/data/intuos3-6x11.tablet000066400000000000000000000020021363647401700211610ustar00rootroot00000000000000# Wacom # Intuos3 6x11 # PTZ-631W # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 6x11 ModelName=PTZ-631W DeviceMatch=usb:056a:00b5 Class=Intuos3 Width=11 Height=6 Layout=intuos3-6x11.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-1.3/data/intuos3-6x8.tablet000066400000000000000000000017741363647401700211260ustar00rootroot00000000000000# Wacom # Intuos3 6x8 # PTZ-630 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 6x8 ModelName=PTZ-630 DeviceMatch=usb:056a:00b1 Class=Intuos3 Width=8 Height=6 Layout=intuos3-6x8.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-1.3/data/intuos3-9x12.tablet000066400000000000000000000020001363647401700211630ustar00rootroot00000000000000# Wacom # Intuos3 9x12 # PTZ-930 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # CA | | EG # CA | | EG # CB | | FG # CB | | FG # DD | TABLET | HH # | | # | | # | | # | | # | | # *-----------------------* # # Touch Strip Map: # (a=1st strip min, A=1st strip max, b=2nd strip min, B=2nd strip max, ...) # # *-----------------------* # | | # a | | b # A | DISPLAY | B # | | # *-----------------------* # [Device] Name=Wacom Intuos3 9x12 ModelName=PTZ-930 DeviceMatch=usb:056a:00b2 Class=Intuos3 Width=12 Height=9 Layout=intuos3-9x12.svg Styli=@intuos3-pucks;@intuos3; [Features] Stylus=true NumStrips=2 Buttons=8 [Buttons] Left=A;B;C;D Right=E;F;G;H libwacom-libwacom-1.3/data/intuos4-12x19.tablet000066400000000000000000000021641363647401700212600ustar00rootroot00000000000000# Wacom # Intuos4 Extra Large # PTK-1240 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 12x19 ModelName=PTK-1240 DeviceMatch=usb:056a:00bb Class=Intuos4 Width=19 Height=12 Layout=intuos4-12x19.svg IntegratedIn= Styli=@intuos4-lens;@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=9 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I OLEDs=B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos4-4x6.tablet000066400000000000000000000021511363647401700211110ustar00rootroot00000000000000# Wacom # Intuos4 Small # PTK-440 # # Button Map: # (A=1, B=2, C=3, ...) # (NOTE: This map has *not* been verified.) # # *-----------------------* # | | # | | # B | | # C | | # D | | # A | TABLET | # E | | # F | | # G | | # | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 4x6 ModelName=PTK-440 DeviceMatch=usb:056a:00b8 Class=Intuos4 Width=6 Height=4 Layout=intuos4-4x6.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=7 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos4-6x9-wl.tablet000066400000000000000000000021651363647401700215430ustar00rootroot00000000000000# Wacom # Intuos4 Wireless # PTK-540WL # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 WL ModelName=PTK-540WL DeviceMatch=usb:056a:00bc;bluetooth:056a:00bd Class=Intuos4 Width=8 Height=5 IntegratedIn= Layout=intuos4-6x9-wl.svg Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=9 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I OLEDs=B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos4-6x9.tablet000066400000000000000000000021311363647401700211140ustar00rootroot00000000000000# Wacom # Intuos4 Medium # PTK-640 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 6x9 ModelName=PTK-640 DeviceMatch=usb:056a:00b9 Class=Intuos4 Width=9 Height=6 Layout=intuos4-6x9.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=9 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I OLEDs=B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos4-8x13.tablet000066400000000000000000000021331363647401700211730ustar00rootroot00000000000000# Wacom # Intuos4 Large # PTK-840 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y) # # *-----------------------* # | | # 00 | | # 01 | | # 02 | TABLET | # 03 | | # | | # *-----------------------* # [Device] Name=Wacom Intuos4 8x13 ModelName=PTK-840 DeviceMatch=usb:056a:00ba Class=Intuos4 Width=13 Height=8 Layout=intuos4-8x13.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Reversible=true Stylus=true Ring=true Buttons=9 StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I OLEDs=B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos5-m.tablet000066400000000000000000000025361363647401700207340ustar00rootroot00000000000000# Wacom # Intuos5 M # PTK-650 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 M ModelName=PTK-650 DeviceMatch=usb:056a:002a Class=Intuos5 Width=9 Height=6 Layout=intuos5-m.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=false Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos5-s.tablet000066400000000000000000000024341363647401700207370ustar00rootroot00000000000000# Wacom # Intuos5 S # PTK-450 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # A | TABLET | # E | | # F | | # G | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 S ModelName=PTK-450 DeviceMatch=usb:056a:0029 Class=Intuos5 Width=6 Height=4 Layout=intuos5-s.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=false Buttons=7 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos5-touch-l.tablet000066400000000000000000000025701363647401700220510ustar00rootroot00000000000000# Wacom # Intuos5 touch L # PTH-850 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 touch L ModelName=PTH-850 DeviceMatch=usb:056a:0028 Class=Intuos5 Width=13 Height=8 Layout=intuos5-l.svg IntegratedIn= Styli=@intuos4-lens;@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos5-touch-m.tablet000066400000000000000000000025511363647401700220510ustar00rootroot00000000000000# Wacom # Intuos5 touch M # PTH-650 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # E | | # A | TABLET | # F | | # G | | # H | | # I | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 touch M ModelName=PTH-650 DeviceMatch=usb:056a:0027 Class=Intuos5 Width=9 Height=6 Layout=intuos5-m.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=9 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G;H;I Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/intuos5-touch-s.tablet000066400000000000000000000024471363647401700220630ustar00rootroot00000000000000# Wacom # Intuos5 touch S # PTH-450 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # B | | # C | | # D | | # A | TABLET | # E | | # F | | # G | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # LED Map: # (XY=Bank X, LED Y; *=Invisible) # # *-----------------------* # | | # | | # 00 01 | | # | TABLET | # 03 02 | | # | | # | | # *-----------------------* # [Device] Name=Wacom Intuos5 touch S ModelName=PTH-450 DeviceMatch=usb:056a:0026 Class=Intuos5 Width=6 Height=4 Layout=intuos5-s.svg IntegratedIn= Styli=@intuos4-puck;@intuos5;@intuos4; [Features] Stylus=true Reversible=true Touch=true Buttons=7 Ring=true StatusLEDs=Ring [Buttons] Left=A;B;C;D;E;F;G Ring=A RingNumModes=4 libwacom-libwacom-1.3/data/isdv4-100.tablet000066400000000000000000000003431363647401700204150ustar00rootroot00000000000000# this is for Wacom MT touchscreen 0x0100 (10 fingers) [Device] Name=Wacom ISDv4 100 ModelName= DeviceMatch=usb:056a:0100 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=false Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-101.tablet000066400000000000000000000003621363647401700204170ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Fujitsu T902 [Device] Name=Wacom ISDv4 101 ModelName= DeviceMatch=usb:056a:0101 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-104.tablet000066400000000000000000000003461363647401700204240ustar00rootroot00000000000000# this is for the Wacom pen as found in the Cube i7 Stylus [Device] Name=Wacom ISDv4 104 ModelName= DeviceMatch=i2c:056a:0104 Class=ISDV4 Width=9 Height=5 IntegratedIn=Display;System [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/isdv4-10d.tablet000066400000000000000000000003731363647401700205040ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Fujitsu Lifebook T902 [Device] Name=Wacom ISDv4 10D ModelName= DeviceMatch=usb:056a:010d Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-10e.tablet000066400000000000000000000003731363647401700205050ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Fujitsu Lifebook T732 [Device] Name=Wacom ISDv4 10E ModelName= DeviceMatch=usb:056a:010e Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-10f.tablet000066400000000000000000000003651363647401700205070ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Panasonic CF-C2 [Device] Name=Wacom ISDv4 10F ModelName= DeviceMatch=usb:056a:010f Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-114.tablet000066400000000000000000000003271363647401700204240ustar00rootroot00000000000000# EMR sensor used by the Lenovo Thinkpad 10 [Device] Name=Wacom ISDv4 114 ModelName= DeviceMatch=i2c:056a:0114 Class=ISDV4 IntegratedIn=Display;System Width=9 Height=5 [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/isdv4-116.tablet000066400000000000000000000002511363647401700204220ustar00rootroot00000000000000[Device] Name=Wacom ISDv4 116 ModelName= DeviceMatch=usb:056a:0116 Class=ISDV4 Width=8 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-117.tablet000066400000000000000000000003771363647401700204340ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Panasonic Toughbook CF-C2 [Device] Name=Wacom ISDv4 117 ModelName= DeviceMatch=usb:056a:0117 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-124.tablet000066400000000000000000000004201363647401700204170ustar00rootroot00000000000000# this is for the Wacom pen as found in the Fujitsu ARROWS Tab QH55/M # the touchscreen is 056a:5008 [Device] Name=Wacom ISDv4 124 DeviceMatch=i2c:056a:0124 ModelName= Class=ISDV4 Width=9 Height=5 IntegratedIn=Display;System [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/isdv4-12c.tablet000066400000000000000000000002371363647401700205040ustar00rootroot00000000000000[Device] Name=Wacom ISDv4 12C ModelName= DeviceMatch=usb:056a:012c Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-149.tablet000066400000000000000000000004101363647401700204250ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Toshiba z20t-b, z20t-c and others. [Device] Name=Wacom ISDv4 149 ModelName= DeviceMatch=usb:056a:0149 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-2d1f-001e.tablet000066400000000000000000000003721363647401700213160ustar00rootroot00000000000000# EMR (?) sensor used by the Samsung 940X5N (Samsung Notebook 9 Pro) # Wacom-alternate VID [Device] Name=Wacom ISDv4 1E ModelName= DeviceMatch=i2c:2d1f:001e Class=ISDV4 Width=13 Height=7 IntegratedIn=Display;System [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-2d1f-002e.tablet000066400000000000000000000004151363647401700213150ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Samsung 930QAA (Samsung Notebook 9 Pen) # Wacom-alternate VID [Device] Name=Wacom ISDv4 2E ModelName= DeviceMatch=i2c:2d1f:002e Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4004.tablet000066400000000000000000000003561363647401700205100ustar00rootroot00000000000000# Note: At least one device with this sensor has no pen interface [Device] Name=Wacom ISDv4 4004 ModelName= DeviceMatch=usb:056a:4004 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4800.tablet000066400000000000000000000003351363647401700205110ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Venue 10 5050 [Device] Name=Wacom ISDv4 4800 ModelName= DeviceMatch=i2c:056a:4800 Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4806.tablet000066400000000000000000000003561363647401700205220ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 5175 [Device] Name=Wacom ISDv4 4806 ModelName= DeviceMatch=i2c:056a:4806 Class=ISDV4 Width=9 Height=5 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4807.tablet000066400000000000000000000003611363647401700205170ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 11 5175 [Device] Name=Wacom ISDv4 4807 ModelName= DeviceMatch=i2c:056a:4807 Class=ISDV4 Width=9 Height=5 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4809.tablet000066400000000000000000000003611363647401700205210ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Venue 8 Pro 5855 [Device] Name=Wacom ISDv4 4809 ModelName= DeviceMatch=i2c:056a:4809 Class=ISDV4 Width=4 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4814.tablet000066400000000000000000000003601363647401700205140ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP Elite x2 1012 G1 [Device] Name=Wacom ISDv4 4814 ModelName= DeviceMatch=i2c:056a:4814 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-481a.tablet000066400000000000000000000003661363647401700205770ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP EliteBook x360 1030 G2 [Device] Name=Wacom ISDv4 481a ModelName= DeviceMatch=i2c:056a:481a Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4822.tablet000066400000000000000000000003551363647401700205170ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 12 9250 [Device] Name=Wacom ISDv4 4822 ModelName= DeviceMatch=i2c:056a:4822 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4824.tablet000066400000000000000000000003611363647401700205160ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Venue 8 Pro 5855 [Device] Name=Wacom ISDv4 4824 ModelName= DeviceMatch=i2c:056a:4824 Class=ISDV4 Width=4 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4831.tablet000066400000000000000000000003551363647401700205170ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 13 9365 [Device] Name=Wacom ISDv4 4831 ModelName= DeviceMatch=i2c:056a:4831 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4841.tablet000066400000000000000000000003661363647401700205220ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 7390 2-in-1 [Device] Name=Wacom ISDv4 4841 ModelName= DeviceMatch=i2c:056a:4841 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-484c.tablet000066400000000000000000000003571363647401700206040ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 5285 [Device] Name=Wacom ISDv4 484c ModelName= DeviceMatch=i2c:056a:484c Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-485e.tablet000066400000000000000000000003601363647401700206010ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP Elite x2 1012 G2 [Device] Name=Wacom ISDv4 485e ModelName= DeviceMatch=i2c:056a:485e Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4865.tablet000066400000000000000000000003661363647401700205300ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP EliteBook x360 1020 G2 [Device] Name=Wacom ISDv4 4865 ModelName= DeviceMatch=i2c:056a:4865 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-486a.tablet000066400000000000000000000003551363647401700206020ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 15 9575 [Device] Name=Wacom ISDv4 486a ModelName= DeviceMatch=i2c:056a:486a Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4870.tablet000066400000000000000000000003601363647401700205160ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the HP Elite x2 1013 G3 [Device] Name=Wacom ISDv4 4870 ModelName= DeviceMatch=i2c:056a:4870 Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-4875.tablet000066400000000000000000000003551363647401700205270ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 15 9575 [Device] Name=Wacom ISDv4 4875 ModelName= DeviceMatch=i2c:056a:4875 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-488f.tablet000066400000000000000000000003671363647401700206140ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Dell XPS 15 9570 [Device] Name=Wacom ISDv4 488f ModelName= DeviceMatch=i2c:056a:488f Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-48c9.tablet000066400000000000000000000003661363647401700206110ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell Latitude 7400 2-in-1 [Device] Name=Wacom ISDv4 48c9 ModelName= DeviceMatch=i2c:056a:48c9 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-48ec.tablet000066400000000000000000000003771363647401700206670ustar00rootroot00000000000000# this is for the alternate Wacom pen + touchscreen as found in the Dell XPS 13 7390 [Device] Name=Wacom HID 48EC ModelName= DeviceMatch=i2c:056a:48ec Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-48ed.tablet000066400000000000000000000003671363647401700206670ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Dell XPS 13 7390 [Device] Name=Wacom ISDv4 48ed ModelName= DeviceMatch=i2c:056a:48ed Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-48ee.tablet000066400000000000000000000003721363647401700206640ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Dell XPS 13 2 in 1 7390 (UHD) [Device] Name=Wacom ISDv4 48ee ModelName= DeviceMatch=i2c:056a:48ee Class=ISDV4 Width=11 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-490b000066400000000000000000000003711363647401700173220ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Dell XPS 15 (9590) [Device] Name=Wacom ISDv4 490b ModelName= DeviceMatch=i2c:056a:490b Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5000.tablet000066400000000000000000000002531363647401700205010ustar00rootroot00000000000000[Device] Name=Wacom ISDv4 5000 ModelName= DeviceMatch=usb:056a:5000 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5002.tablet000066400000000000000000000003631363647401700205050ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Fujitsu T904 [Device] Name=Wacom ISDv4 5002 ModelName= DeviceMatch=usb:056a:5002 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5010.tablet000066400000000000000000000003611363647401700205020ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Lenovo ThinkPad T550 [Device] Name=Wacom ISDv4 5010 ModelName= DeviceMatch=usb:056a:5010 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5013.tablet000066400000000000000000000003721363647401700205070ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by the Toshiba dynabook KIRA L93/39M [Device] Name=Wacom ISDv4 5013 ModelName= DeviceMatch=i2c:056a:5013 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5014.tablet000066400000000000000000000004071363647401700205070ustar00rootroot00000000000000# Active electrostatic (AES) sensor used by some versions of the # Lenovo ThinkPad Helix 2 [Device] Name=Wacom ISDv4 5014 ModelName= DeviceMatch=i2c:056a:5014 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-502a.tablet000066400000000000000000000003441363647401700205650ustar00rootroot00000000000000# Toshiba Portege X20W-D Convertible and Toshiba TruPen [Device] Name=Wacom ISDv4 50a2 ModelName= DeviceMatch=usb:056a:50a2 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-503e.tablet000066400000000000000000000004241363647401700205710ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in some versions of the Lenovo # Thinkpad X1 Yoga. [Device] Name=Wacom ISDv4 503E ModelName= DeviceMatch=usb:056a:503e Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-503f.tablet000066400000000000000000000004241363647401700205720ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in some versions of the Lenovo # Thinkpad X1 Yoga. [Device] Name=Wacom ISDv4 503F ModelName= DeviceMatch=usb:056a:503f Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5040.tablet000066400000000000000000000005111363647401700205020ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in the Lenovo Thinkpad X1 Yoga # 14" WQHD display, measuring 310x174mm # pen with 2 buttons, no eraser [Device] Name=Wacom ISDv4 5040 ModelName= DeviceMatch=usb:056a:5040 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5044.tablet000066400000000000000000000005101363647401700205050ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in the Lenovo ThinkpPad Yoga 260 # 20FD002HUS (12.5" FHD; 276x155mm). # Pen with 2 buttons, no eraser. [Device] Name=Wacom ISDv4 5044 ModelName= DeviceMatch=usb:056a:5044 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5048.tablet000066400000000000000000000004251363647401700205160ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen # as found in some versions of the Lenovo # ThinkpPad Yoga 260 [Device] Name=Wacom ISDv4 5048 ModelName= DeviceMatch=usb:056a:5048 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-504a.tablet000066400000000000000000000003661363647401700205730ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 460 [Device] Name=Wacom ISDv4 504a ModelName= DeviceMatch=usb:056a:504a Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5090.tablet000066400000000000000000000004071363647401700205130ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo Yoga 260 [Device] Name=Wacom ISDv4 5090 ModelName= DeviceMatch=usb:056a:5090 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5099.tablet000066400000000000000000000004071363647401700205240ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo Miix 720 [Device] Name=Wacom ISDv4 5099 ModelName= DeviceMatch=i2c:056a:5099 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-509d.tablet000066400000000000000000000004201363647401700205720ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad Yoga 370 [Device] Name=Wacom ISDv4 509D ModelName= DeviceMatch=usb:056a:509d Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-509f.tablet000066400000000000000000000006361363647401700206050ustar00rootroot00000000000000# Lenovo ThinkPad Yoga 370 # Sensor Type: AES # Features: Touch (Integrated) # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.Mc7vuWOv8R # https://github.com/linuxwacom/wacom-hid-descriptors/issues/87#issue-584787327 [Device] Name=ISDv4 509F ModelName= DeviceMatch=usb:056A:509F Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-50b4.tablet000066400000000000000000000004101363647401700205620ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (2nd-gen) [Device] Name=Wacom ISDv4 50b4 ModelName= DeviceMatch=usb:056a:50b4 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-50b6.tablet000066400000000000000000000004101363647401700205640ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (2nd-gen) [Device] Name=Wacom ISDv4 50b6 ModelName= DeviceMatch=usb:056a:50b6 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-50b8.tablet000066400000000000000000000004101363647401700205660ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (2nd-gen) [Device] Name=Wacom ISDv4 50b8 ModelName= DeviceMatch=usb:056a:50b8 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-50db.tablet000066400000000000000000000003741363647401700206530ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA 520-14IKB [Device] Name=Wacom ISDv4 50db ModelName= DeviceMatch=i2c:056a:50db Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-50e9.tablet000066400000000000000000000004011363647401700205720ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ideapad FLEX 5-1570 [Device] Name=Wacom ISDv4 50e9 ModelName= DeviceMatch=i2c:056a:50e9 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-50ef.tablet000066400000000000000000000003741363647401700206600ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA 720-13IKB [Device] Name=Wacom ISDv4 50ef ModelName= DeviceMatch=i2c:056a:50ef Class=ISDV4 Width=12 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-50f1.tablet000066400000000000000000000003721363647401700205720ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 720 13" [Device] Name=Wacom ISDv4 50f1 ModelName= DeviceMatch=i2c:056a:50f1 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-50f8.tablet000066400000000000000000000003721363647401700206010ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 720 15" [Device] Name=Wacom ISDv4 50f8 ModelName= DeviceMatch=i2c:056a:50f8 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-50fd.tablet000066400000000000000000000003751363647401700206600ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 720 15IKB" [Device] Name=Wacom ISDv4 50fd ModelName= DeviceMatch=i2c:056a:50fd Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5110.tablet000066400000000000000000000004201363647401700204770ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad Yoga 970 [Device] Name=Wacom ISDv4 5110 ModelName= DeviceMatch=i2c:056a:5110 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5115.tablet000066400000000000000000000004011363647401700205030ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in Lenovo Thinkpad X1 Tablet Gen 2 [Device] Name=Wacom HID 5115 DeviceMatch=i2c:056a:5115 Class=ISDV4 Width=10 Height=7 IntegratedIn=Display;System Styli=0x21; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5122.tablet000066400000000000000000000003671363647401700205140ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo 300e 81FY [Device] Name=Wacom ISDv4 5122 ModelName= DeviceMatch=i2c:056a:5122 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5128.tablet000066400000000000000000000003741363647401700205200ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA 720-12IKB [Device] Name=Wacom ISDv4 5128 ModelName= DeviceMatch=i2c:056a:5128 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-513b.tablet000066400000000000000000000003741363647401700205730ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo MIIX 520-12IKB [Device] Name=Wacom ISDv4 513B ModelName= DeviceMatch=i2c:056a:513b Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5146.tablet000066400000000000000000000004101363647401700205070ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (3rd-gen) [Device] Name=Wacom ISDv4 5146 ModelName= DeviceMatch=usb:056a:5146 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5147.tablet000066400000000000000000000004101363647401700205100ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Yoga (3rd-gen) [Device] Name=Wacom ISDv4 5147 ModelName= DeviceMatch=usb:056a:5147 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5150.tablet000066400000000000000000000004211363647401700205040ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad X380 Yoga [Device] Name=Wacom ISDv4 5150 ModelName= DeviceMatch=usb:056a:5150 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5157.tablet000066400000000000000000000004231363647401700205150ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad L380 Yoga [Device] Name=Wacom ISDv4 5157 ModelName= DeviceMatch=usb:056a:5157; Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5158.tablet000066400000000000000000000004221363647401700205150ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad L390 Yoga [Device] Name=Wacom ISDv4 5158 ModelName= DeviceMatch=usb:056a:5158 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-515a.tablet000066400000000000000000000004231363647401700205670ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in some versions of the Lenovo ThinkPad L380 Yoga [Device] Name=Wacom ISDv4 515a ModelName= DeviceMatch=usb:056a:515a; Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System; [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5169.tablet000066400000000000000000000003741363647401700205250ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA 730-15IWL [Device] Name=Wacom ISDv4 5169 ModelName= DeviceMatch=i2c:056a:5169 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-516b.tablet000066400000000000000000000003741363647401700205760ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga 730-15IKB [Device] Name=Wacom ISDv4 516B ModelName= DeviceMatch=i2c:056a:516b Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-517d.tablet000066400000000000000000000004031363647401700205720ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ideapad FLEX 6-14ARR [Device] Name=Wacom ISDv4 517D ModelName= DeviceMatch=i2c:056a:517d Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5196.tablet000066400000000000000000000003751363647401700205260ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo YOGA C930-13IKB [Device] Name=Wacom ISDv4 5196 ModelName= DeviceMatch=i2c:056a:5196 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51a0.tablet000066400000000000000000000004051363647401700205620ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X1 Extreme 2nd [Device] Name=Wacom ISDv4 51a0 ModelName= DeviceMatch=usb:056a:51a0 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51af.tablet000066400000000000000000000004001363647401700206430ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad X390 Yoga [Device] Name=Wacom ISDv4 51af ModelName= DeviceMatch=usb:056a:51af Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51b0.tablet000066400000000000000000000006161363647401700205670ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.wym3nbQqZN # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B0 ModelName= DeviceMatch=usb:056A:51B0 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51b1.tablet000066400000000000000000000006161363647401700205700ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.F0GO4PAS9O # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B1 ModelName= DeviceMatch=usb:056A:51B1 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51b2.tablet000066400000000000000000000006161363647401700205710ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.wFZ9uMfoYf # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B2 ModelName= DeviceMatch=usb:056A:51B2 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51b3.tablet000066400000000000000000000006161363647401700205720ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.JMUwt4E2Wq # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B3 ModelName= DeviceMatch=usb:056A:51B3 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51b6.tablet000066400000000000000000000006231363647401700205730ustar00rootroot00000000000000# Lenovo ThinkPad X1 Carbon 7th # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30937 x 17402 (2540 x 2540 lpi) # # Autogenerated from sysinfo.soRAtaSZMv # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B6 ModelName= DeviceMatch=usb:056A:51B6 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51b7.tablet000066400000000000000000000006211363647401700205720ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga 4th # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30935 x 17401 (2540 x 2540 lpi) # # Autogenerated from sysinfo.6qw5zSXxSq # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B7 ModelName= DeviceMatch=usb:056A:51B7 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51b8.tablet000066400000000000000000000003751363647401700206010ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo X1 Yoga 4th-gen [Device] Name=Wacom ISDv4 51B8 ModelName= DeviceMatch=usb:056a:51b8 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51b9.tablet000066400000000000000000000006051363647401700205760ustar00rootroot00000000000000# Lenovo ThinkPad # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30927 x 17397 (2540 x 2540 lpi) # # Autogenerated from sysinfo.pijIZAvdWl # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51B9 ModelName= DeviceMatch=usb:056A:51B9 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51ba.tablet000066400000000000000000000004561363647401700206520ustar00rootroot00000000000000# Lenovo # Known PID, but unknown details (assume similar to other private # reports received at the same time: e.g. isdv4-51BB.tablet) [Device] Name=ISDv4 51BA ModelName= DeviceMatch=usb:056A:51BA Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51bb.tablet000066400000000000000000000006211363647401700206450ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga 4th # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30931 x 17399 (2540 x 2540 lpi) # # Autogenerated from sysinfo.LoFm5ZeX4S # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51BB ModelName= DeviceMatch=usb:056A:51BB Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51bc.tablet000066400000000000000000000006211363647401700206460ustar00rootroot00000000000000# Lenovo ThinkPad X1 Yoga 4th # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 30937 x 17402 (2540 x 2540 lpi) # # Autogenerated from sysinfo.4mulKviG5U # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 51BC ModelName= DeviceMatch=usb:056A:51BC Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51bd.tablet000066400000000000000000000004561363647401700206550ustar00rootroot00000000000000# Lenovo # Known PID, but unknown details (assume similar to other private # reports received at the same time: e.g. isdv4-51BB.tablet) [Device] Name=ISDv4 51BD ModelName= DeviceMatch=usb:056A:51BD Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51be.tablet000066400000000000000000000003751363647401700206560ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo X1 Yoga 4th-gen [Device] Name=Wacom ISDv4 51BE ModelName= DeviceMatch=usb:056a:51be Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51bf.tablet000066400000000000000000000003751363647401700206570ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo X1 Yoga 4th-gen [Device] Name=Wacom ISDv4 51BF ModelName= DeviceMatch=usb:056a:51bf Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51c4.tablet000066400000000000000000000004001363647401700205630ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo IdeaPad FLEX-14API [Device] Name=Wacom ISDv4 51C4 ModelName= DeviceMatch=i2c:056a:51c4 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51e2.tablet000066400000000000000000000004751363647401700205770ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo Yoga C940-14IIL # https://github.com/linuxwacom/wacom-hid-descriptors/issues/71 [Device] Name=Wacom ISDv4 51E2 ModelName= DeviceMatch=i2c:056a:51e2 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51f5.tablet000066400000000000000000000004701363647401700205760ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the ThinkPad L13 Yoga # https://github.com/linuxwacom/wacom-hid-descriptors/issues/83 [Device] Name=Wacom ISDv4 F1F5 ModelName= DeviceMatch=usb:056a:51f5 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-51f6.tablet000066400000000000000000000004701363647401700205770ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the ThinkPad L13 Yoga # https://github.com/linuxwacom/wacom-hid-descriptors/issues/78 [Device] Name=Wacom ISDv4 F1F6 ModelName= DeviceMatch=usb:056a:51f6 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-521f.tablet000066400000000000000000000006161363647401700205750ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.9s9w22c3OD # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 521F ModelName= DeviceMatch=usb:056A:521F Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5221.tablet000066400000000000000000000006161363647401700205110ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.z6KU8DWk8L # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 5221 ModelName= DeviceMatch=usb:056A:5221 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-5222.tablet000066400000000000000000000006161363647401700205120ustar00rootroot00000000000000# Lenovo ThinkPad X13 Yoga # Sensor Type: AES # Features: Touch (Integrated), Tilt # HW Resolution: 29376 x 16524 (2540 x 2540 lpi) # # Autogenerated from sysinfo.yxQueczf1R # https://github.com/linuxwacom/wacom-hid-descriptors/ # [Device] Name=ISDv4 5222 ModelName= DeviceMatch=usb:056A:5222 Class=ISDV4 Width=12 Height=7 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-90.tablet000066400000000000000000000004741363647401700203520ustar00rootroot00000000000000# USB tablet PC models: ASUS R1E and ASUS R1F # # stylus with one button and eraser # # Screen size 11.7 x 7.9; 13.3" diagonal [Device] Name=Wacom ISDv4 90 ModelName= DeviceMatch=usb:056a:0090;serial:056a:0090 Class=ISDV4 Width=12 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/isdv4-93.tablet000066400000000000000000000005421363647401700203510ustar00rootroot00000000000000# USB tablet PC models: HP Pavilion TX2000 and HP Pavilion TX2500 # # stylus with two buttons and eraser; 1FGT touchscreen # # Screen size 10.2 x 6.4; 12.1" diagonal [Device] Name=Wacom ISDv4 93 ModelName= DeviceMatch=usb:056a:0093;serial:056a:0093 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-e2.tablet000066400000000000000000000003451363647401700204250ustar00rootroot00000000000000# this is for the Wacom pen found in the HP Pavillion dv6 [Device] Name=Wacom ISDv4 E2 ModelName= DeviceMatch=usb:056a:00e2 Class=ISDV4 Width=14 Height=8 IntegratedIn=Display;System [Features] Stylus=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/isdv4-e3.tablet000066400000000000000000000003751363647401700204310ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the HP Touchsmart tm2 laptop. [Device] Name=Wacom ISDv4 E3 ModelName= DeviceMatch=usb:056a:00e3;serial:056a:00e3 Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-e5.tablet000066400000000000000000000003361363647401700204300ustar00rootroot00000000000000# this is for Wacom MT touchscreen E5 (10 fingers) [Device] Name=Wacom ISDv4 E5 ModelName= DeviceMatch=usb:056a:00e5 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=false Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-e6.tablet000066400000000000000000000003721363647401700204310ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Lenovo ThinkPad x220t [Device] Name=Wacom ISDv4 E6 ModelName= DeviceMatch=usb:056a:00e6 Class=ISDV4 Width=11 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-ec.tablet000066400000000000000000000003621363647401700205050ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Samsung Ativ Smart PC Pro 700t. [Device] Name=Wacom ISDv4 EC ModelName= DeviceMatch=usb:056a:00ec Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-ed.tablet000066400000000000000000000003521363647401700205050ustar00rootroot00000000000000# this is for the Wacom pen + touchscreen as found in the Panasonic CF-H2 laptop. [Device] Name=Wacom ISDv4 ED ModelName= DeviceMatch=usb:056a:00ed Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/isdv4-ef.tablet000066400000000000000000000003311363647401700205040ustar00rootroot00000000000000# this is for the Wacom pen as found in a limited special Tablet PC edition [Device] Name=Wacom ISDv4 EF ModelName= DeviceMatch=usb:056a:00ef Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Buttons=0 libwacom-libwacom-1.3/data/layouts/000077500000000000000000000000001363647401700173715ustar00rootroot00000000000000libwacom-libwacom-1.3/data/layouts/Makefile.am000066400000000000000000000002641363647401700214270ustar00rootroot00000000000000libwacomlayoutsdir = $(datadir)/libwacom/layouts layouts = $(shell cd $(top_srcdir)/data/layouts; printf '%s\n' *.svg) dist_libwacomlayouts_DATA = $(layouts) EXTRA_DIST = README libwacom-libwacom-1.3/data/layouts/README000066400000000000000000000141661363647401700202610ustar00rootroot00000000000000SVG images have a dual purpose, providing an accurate representation of the tablets and also providing the size and location of the various controls on the device that can be queried by various applications that may need it. To allow applications to identify each control in the SVG and also apply a CSS if desired, the following naming convention applies: * Buttons Each button ID in the SVG is built of the string "Button" with ID of the button between 'A' and 'Z': id="ButtonA" id="ButtonB" ... id="ButtonZ" The SVG class must contain the button ID of the button between 'A' and 'Z' and the more generic class "Button" class="A Button" class="B Button" ... class="Z Button" If the button is a mode-switch button as well, the class list should also contain "ModeSwitch": class="I ModeSwitch Button" This would allow to modify the appearance of all the buttons at once via a CSS, yet allowing to customize the appearance of single buttons by using the button ID. * Touch Rings/Strips Touch rings use the following convention: - First touch ring: id="Ring" class="Ring TouchRing" - Second touch ring: id="Ring2" class="Ring2 TouchRing" - First touch strip: id="Strip" class="Strip TouchStrip" - Second touch strip: id="Strip2" class="Strip2 TouchStrip" Note: Additional "fake" buttons (ie actual controls not found on the real device) can be added to touch controls to help showing the type of action expected on the control, like for example circular motion on a touch ring or vertical motion on a touch strip. These controls can be named: - First touch ring, rotating clockwise: id="RingCW" class="RingCW Button" - First touch ring, rotating counter clockwise: id="RingCCW" class="RingCCW Button" - Second touch ring, rotating clockwise: id="Ring2CW" class="Ring2CW Button" - Second touch ring, rotating counter clockwise: id="Ring2CCW" class="Ring2CCW Button" - First touch strip, moving up: id="StripUp" class="StripUp Button" - First touch strip, moving down: id="StripDown" class="StripDown Button" - Second touch strip, moving up: id="Strip2Up" class="Strip2Up Button" - Second touch strip, moving down: id="Strip2Down" class="Strip2Down Button" The use of those "fake" buttons is left at the discretion of the designer and is not mandatory nor enforced. * Labels The role of the labels in the SVG is to give applications an indication on where to place the caption for each button. The actual content of the text in the SVG image may not be relevant, what matters is the actual location. Applications should hide the labels (using CSS) or replace the text with an appropriate caption. - Button labels Each button's label ID in the SVG is made of the string "Label" with ID of the button to which it applies, between 'A' and 'Z'. Class includes both the button ID and the string "Label". id="LabelA" class="A Label" For the special case of mode-switch buttons, the class also list "ModeSwitch": id="LabelI" class="I ModeSwitch Label" - Touchring button labels Touch-rings and touch-strips generate Up and Down events, therefore 2 different labels are needed for each touch-ring/touch-strip control. id="LabelRingCCW" class="RingCCW Ring Label" and id="LabelRingCW" class="RingCW Ring Label" The second touch-ring button is identified by "Ring2" in place of "Ring": id="LabelRing2CCW" class="Ring2CCW Ring2 Label" and id="LabelRingCW" class="Ring2CW Ring2 Label" Touchstrips button follow the same naming scheme, using "Strip" and "Strip2" to name the first and second touch-strip. id="LabelStripUp" class="StripUp Strip Label" and id="LabelStripDown" class="StripDown Strip Label" Second touch-strip: id="LabelStrip2Up" class="Strip2Up Strip2 Label" and id="LabelRingCW" class="Strip2Down Strip2 Label" - Caption leader lines To match the buttons with their corresponding labels, the SVG must also provide a leader line for each label in the form of a line that links each button and its label. Each leader line follows the same naming convention as the labels, using the special name "Leader" in place of "Label", ie: id="LeaderA" class="A Leader" Touch-rings and touch-strips have 2 different labels and therefore 2 leader lines. id="LeaderRingCCW" class="RingCCW Ring Leader" and id="LeaderRingCW" class="RingCW Ring Leader" The second touch-ring button is identified by "Ring2" in place of "Ring": id="LeaderRing2CCW" class="Ring2CCW Ring2 Leader" and id="LeaderRingCW" class="Ring2CW Ring2 Leader" Touchstrips button follow the same naming scheme, using "Strip" and "Strip2" to name the first and second touch-strip. id="LeaderStripUp" class="StripUp Strip Leader" and id="LeaderStripDown" class="StripDown Strip Leader" Second touch-strip: id="LeaderStrip2Up" class="Strip2Up Strip2 Leader" and id="LeaderStrip2Down" class="Strip2Down Strip2 Leader" * Tips For Creating New Layouts Layouts use very simple SVG rules. WISIWYG editors such as Inkscape are very convenient to design new layouts but usually produce a much more complex SVG markup so files that are produced with those editors should be cleaned. To help with this task, there is a script called clean_svg.py in the tools folder. Besides cleaning the markup and removing editor specific tags, clean_svg.py also automates the naming of the elements. * Automatic Naming with Inkscape and clean_svg.py On Inkscape, be sure to group the button, leader and label elements and assign the group's ID to the desired logical name. E.g.: Assigning "A" to the group's ID and running the clean_svg.py script with that SVG, will assign "ButtonA"/"B Button" to the ID and class of the first rect/circle element found in the group; it also analogously assigns the ID and class of the first path and text elements found in that group. clean_svg.py needs two arguments, the SVG file path and the name of the tablet, e.g.: ./clean_svg.py /path/to/svg_file.svg "My Brand New Tablet Name" libwacom-libwacom-1.3/data/layouts/bamboo-0fg-s-p-alt.svg000066400000000000000000000065231363647401700233040ustar00rootroot00000000000000 Wacom Bamboo CTE-450 A B C FN1 D FN2 CCW CW libwacom-libwacom-1.3/data/layouts/bamboo-0fg-s-p.svg000066400000000000000000000063731363647401700225310ustar00rootroot00000000000000 Wacom Bamboo MTE-450 A B C D CCW CW libwacom-libwacom-1.3/data/layouts/bamboo-16fg-m-pt.svg000066400000000000000000000046501363647401700227720ustar00rootroot00000000000000 Wacom Bamboo Create (CTH-670) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-16fg-s-pt.svg000066400000000000000000000046511363647401700230010ustar00rootroot00000000000000 Wacom Bamboo Capture (CTH-470) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-16fg-s-t.svg000066400000000000000000000046461363647401700226250ustar00rootroot00000000000000 Wacom Bamboo Touch (CTT-470) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-2fg-fun-m-pt.svg000066400000000000000000000045541363647401700234760ustar00rootroot00000000000000 Wacom Bamboo Fun medium (CTH-661) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-2fg-fun-s-pt.svg000066400000000000000000000045571363647401700235070ustar00rootroot00000000000000 Wacom Bamboo Fun small (2FG) (CTH-461) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-2fg-s-pt.svg000066400000000000000000000046461363647401700227200ustar00rootroot00000000000000 Wacom Bamboo (2FG) (CTH-460) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-2fg-s-t.svg000066400000000000000000000046501363647401700225330ustar00rootroot00000000000000 Wacom Bamboo Touch (2FG) (CTT-460) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-4fg-fun-m-pt.svg000066400000000000000000000045541363647401700235000ustar00rootroot00000000000000 Wacom Bamboo 2FG 6x8 (CTH-661(A)) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-4fg-fun-s-pt.svg000066400000000000000000000045501363647401700235020ustar00rootroot00000000000000 Wacom Bamboo Craft (CTH-461(A)) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-4fg-s-pt.svg000066400000000000000000000046531363647401700227200ustar00rootroot00000000000000 Wacom Bamboo 2FG 4x5 (CTH-460(A)) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-4fg-s-t.svg000066400000000000000000000046431363647401700225370ustar00rootroot00000000000000 Wacom Bamboo 2FG (CTT-460(A)) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-4fg-se-m-pt.svg000066400000000000000000000046111363647401700233110ustar00rootroot00000000000000 Wacom Bamboo Special Edition Pen & Touch medium (CTH-661SE) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-4fg-se-s-pt.svg000066400000000000000000000046061363647401700233230ustar00rootroot00000000000000 Wacom Bamboo Special Edition Pen & Touch small (CTH-461SE) A B C D libwacom-libwacom-1.3/data/layouts/bamboo-pad.svg000066400000000000000000000024721363647401700221200ustar00rootroot00000000000000 Wacom Bamboo Pad A B libwacom-libwacom-1.3/data/layouts/cintiq-12wx.svg000066400000000000000000000150541363647401700222050ustar00rootroot00000000000000 Wacom Cintiq 12WX A B C D E F G H I J Up Down Up Down libwacom-libwacom-1.3/data/layouts/cintiq-13hd.svg000066400000000000000000000104271363647401700221420ustar00rootroot00000000000000 Wacom Cintiq 13HD B C H G F I D A E libwacom-libwacom-1.3/data/layouts/cintiq-20wsx.svg000066400000000000000000000203671363647401700223720ustar00rootroot00000000000000 Wacom Cintiq 20WSX A B C D E F G H I J K L M N Up Down Up Down libwacom-libwacom-1.3/data/layouts/cintiq-21ux.svg000066400000000000000000000117351363647401700222050ustar00rootroot00000000000000 Wacom Cintiq 21UX A B C D E F G H Up Down Up Down libwacom-libwacom-1.3/data/layouts/cintiq-21ux2.svg000066400000000000000000000212551363647401700222650ustar00rootroot00000000000000 Wacom Cintiq 21UX2 B C D E A F G H I K L M N J O P Q R Up Down Up Down libwacom-libwacom-1.3/data/layouts/cintiq-22hd.svg000066400000000000000000000214151363647401700221410ustar00rootroot00000000000000 Wacom Cintiq 22HD B C D E A F G H I K L M N J O P Q R Up Down Up Down libwacom-libwacom-1.3/data/layouts/cintiq-24hd.svg000066400000000000000000000237371363647401700221540ustar00rootroot00000000000000 Wacom Cintq 24HD A B C D E F G H CCW CW I J K L M N O P CCW CW libwacom-libwacom-1.3/data/layouts/cintiq-companion-2.svg000066400000000000000000000117521363647401700235270ustar00rootroot00000000000000 Wacom Cintiq Companion 2 B C D J I H K A E F G libwacom-libwacom-1.3/data/layouts/cintiq-companion-hybrid.svg000066400000000000000000000104171363647401700246440ustar00rootroot00000000000000 Wacom Cintiq Companion Hybrid B C H G F I D A E libwacom-libwacom-1.3/data/layouts/cintiq-companion.svg000066400000000000000000000103721363647401700233650ustar00rootroot00000000000000 Wacom Cintiq Companion B C H G F I D A E libwacom-libwacom-1.3/data/layouts/dth-2242.svg000066400000000000000000000054111363647401700212610ustar00rootroot00000000000000 Wacom DTH-2242 A B C D E F libwacom-libwacom-1.3/data/layouts/dth-2452.svg000066400000000000000000000054341363647401700212710ustar00rootroot00000000000000 Wacom DTH-2452 A B C D libwacom-libwacom-1.3/data/layouts/dti-520.svg000066400000000000000000000100761363647401700212020ustar00rootroot00000000000000 Wacom DTI520UB/L A B C D E F G H I J libwacom-libwacom-1.3/data/layouts/dtk-1651.svg000066400000000000000000000054341363647401700212740ustar00rootroot00000000000000 Wacom DTK-1651 A B C D libwacom-libwacom-1.3/data/layouts/dtk-2451.svg000066400000000000000000000054341363647401700212730ustar00rootroot00000000000000 Wacom DTK-2451 A B C D libwacom-libwacom-1.3/data/layouts/dtu-1031.svg000066400000000000000000000033011363647401700212650ustar00rootroot00000000000000 Wacom DTU1031 A B C D libwacom-libwacom-1.3/data/layouts/dtu-1141.svg000066400000000000000000000034501363647401700212740ustar00rootroot00000000000000 Wacom DTU-1141 A B C D libwacom-libwacom-1.3/data/layouts/dtu-1141b.svg000066400000000000000000000034521363647401700214400ustar00rootroot00000000000000 Wacom DTU-1141B A B C D libwacom-libwacom-1.3/data/layouts/ek-remote.svg000066400000000000000000000316471363647401700220150ustar00rootroot00000000000000 image/svg+xml Wacom ExpressKey Remote Wacom ExpressKey Remote B A D E F C G I J L M O H K N CCW CW R Q P libwacom-libwacom-1.3/data/layouts/graphire-wireless-8x6.svg000066400000000000000000000024671363647401700242020ustar00rootroot00000000000000 Wacom Graphire Wireless A B libwacom-libwacom-1.3/data/layouts/graphire4-4x5.svg000066400000000000000000000026211363647401700224160ustar00rootroot00000000000000 Wacom Graphire4 4x5 A B libwacom-libwacom-1.3/data/layouts/graphire4-6x8.svg000066400000000000000000000026211363647401700224230ustar00rootroot00000000000000 Wacom Graphire4 4x5 A B libwacom-libwacom-1.3/data/layouts/huion-h420.svg000066400000000000000000000026531363647401700217150ustar00rootroot00000000000000 Huion H410 A B C libwacom-libwacom-1.3/data/layouts/huion-h610-pro.svg000066400000000000000000000071521363647401700225130ustar00rootroot00000000000000 Huion H610 Pro A B C D E F G H libwacom-libwacom-1.3/data/layouts/intuos-m-p.svg000066400000000000000000000032141363647401700221220ustar00rootroot00000000000000 Wacom Intuos Pen Medium (CTL-680) A B C D libwacom-libwacom-1.3/data/layouts/intuos-m-p2.svg000066400000000000000000000030741363647401700222100ustar00rootroot00000000000000 Wacom Intuos Pen Medium (CTL-690) A B C D libwacom-libwacom-1.3/data/layouts/intuos-m-p3.svg000066400000000000000000000030201363647401700222000ustar00rootroot00000000000000 Wacom Intuos Pen Medium (CTL-6100) A B C D libwacom-libwacom-1.3/data/layouts/intuos-m-pt.svg000066400000000000000000000032141363647401700223060ustar00rootroot00000000000000 Wacom Intuos PT Medium (CTH-680) A B C D libwacom-libwacom-1.3/data/layouts/intuos-m-pt2.svg000066400000000000000000000030731363647401700223730ustar00rootroot00000000000000 Wacom Intuos PT Medium (CTH-690) A B C D libwacom-libwacom-1.3/data/layouts/intuos-pro-2-l.svg000066400000000000000000000176411363647401700226320ustar00rootroot00000000000000 image/svg+xml Wacom Intuos Pro 2 L Wacom Intuos Pro 2 L A B C D E F G H CCW CW I libwacom-libwacom-1.3/data/layouts/intuos-pro-2-m.svg000066400000000000000000000176411363647401700226330ustar00rootroot00000000000000 image/svg+xml Wacom Intuos Pro 2 M Wacom Intuos Pro 2 M A B C D E F G H CCW CW I libwacom-libwacom-1.3/data/layouts/intuos-pro-2-s.svg000066400000000000000000000146531363647401700226410ustar00rootroot00000000000000 image/svg+xml Wacom Intuos Pro S Wacom Intuos Pro S A B C D E F CCW CW G libwacom-libwacom-1.3/data/layouts/intuos-pro-l.svg000066400000000000000000000117301363647401700224640ustar00rootroot00000000000000 Wacom Intuos Pro L B C D E F G H I CCW CW A libwacom-libwacom-1.3/data/layouts/intuos-pro-m.svg000066400000000000000000000117171363647401700224720ustar00rootroot00000000000000 Wacom Intuos Pro M B C D E F G H I CCW CW A libwacom-libwacom-1.3/data/layouts/intuos-pro-s.svg000066400000000000000000000101121363647401700224640ustar00rootroot00000000000000 Wacom Intuos5 Pro S B C D E F G CCW CW A libwacom-libwacom-1.3/data/layouts/intuos-s-p.svg000066400000000000000000000032151363647401700221310ustar00rootroot00000000000000 Wacom Intuos Pen Small (CTL-480) A B C D libwacom-libwacom-1.3/data/layouts/intuos-s-p2.svg000066400000000000000000000030721363647401700222140ustar00rootroot00000000000000 Wacom Intuos Pen Small (CTL-490) A B C D libwacom-libwacom-1.3/data/layouts/intuos-s-p3.svg000066400000000000000000000030201363647401700222060ustar00rootroot00000000000000 Wacom Intuos Pen Medium (CTL-6100) A B C D libwacom-libwacom-1.3/data/layouts/intuos-s-pt.svg000066400000000000000000000032151363647401700223150ustar00rootroot00000000000000 Wacom Intuos PT Small (CTH-480) A B C D libwacom-libwacom-1.3/data/layouts/intuos-s-pt2.svg000066400000000000000000000030711363647401700223770ustar00rootroot00000000000000 Wacom Intuos PT Small (CTH-490) A B C D libwacom-libwacom-1.3/data/layouts/intuos3-12x12.svg000066400000000000000000000121161363647401700222720ustar00rootroot00000000000000 Wacom Intuos3 12x12 A B C D E F G H Up Down Up Down libwacom-libwacom-1.3/data/layouts/intuos3-12x19.svg000066400000000000000000000121161363647401700223010ustar00rootroot00000000000000 Wacom Intuos3 12x19 A B C D E F G H Up Down Up Down libwacom-libwacom-1.3/data/layouts/intuos3-4x5.svg000066400000000000000000000054251363647401700221420ustar00rootroot00000000000000 Wacom Intuos3 4x5 A B C D Up Down libwacom-libwacom-1.3/data/layouts/intuos3-4x6.svg000066400000000000000000000054371363647401700221460ustar00rootroot00000000000000 Wacom Intuos3 4x6 A B C D Up Down libwacom-libwacom-1.3/data/layouts/intuos3-6x11.svg000066400000000000000000000121071363647401700222140ustar00rootroot00000000000000 Wacom Intuos3 6x11 A B C D E F G H Up Down Up Down libwacom-libwacom-1.3/data/layouts/intuos3-6x8.svg000066400000000000000000000121061363647401700221410ustar00rootroot00000000000000 Wacom Intuos3 6x8 A B C D E F G H Up Down Up Down libwacom-libwacom-1.3/data/layouts/intuos3-9x12.svg000066400000000000000000000121071363647401700222200ustar00rootroot00000000000000 Wacom Intuos3 9x12 A B C D E F G H Up Down Up Down libwacom-libwacom-1.3/data/layouts/intuos4-12x19.svg000066400000000000000000000111261363647401700223020ustar00rootroot00000000000000 Wacom Intuos4 XL B C D E F G H I CCW CW A libwacom-libwacom-1.3/data/layouts/intuos4-4x6.svg000066400000000000000000000075241363647401700221460ustar00rootroot00000000000000 Wacom Intuos4 S B C D E F G CCW CW A libwacom-libwacom-1.3/data/layouts/intuos4-6x9-wl.svg000066400000000000000000000112741363647401700225700ustar00rootroot00000000000000 Wacom Intuos4 WL B C D E F G H I CCW CW A libwacom-libwacom-1.3/data/layouts/intuos4-6x9.svg000066400000000000000000000113121363647401700221410ustar00rootroot00000000000000 Wacom Intuos4 M B C D E F G H I CCW CW A libwacom-libwacom-1.3/data/layouts/intuos4-8x13.svg000066400000000000000000000111141363647401700222160ustar00rootroot00000000000000 Wacom Intuos4 L B C D E F G H I CCW CW A libwacom-libwacom-1.3/data/layouts/intuos5-l.svg000066400000000000000000000117221363647401700217540ustar00rootroot00000000000000 Wacom Intuos5 L B C D E F G H I CCW CW A libwacom-libwacom-1.3/data/layouts/intuos5-m.svg000066400000000000000000000117171363647401700217610ustar00rootroot00000000000000 Wacom Intuos5 M Touch B C D E F G H I CCW CW A libwacom-libwacom-1.3/data/layouts/intuos5-s.svg000066400000000000000000000101031363647401700217530ustar00rootroot00000000000000 Wacom Intuos5 S B C D E F G CCW CW A libwacom-libwacom-1.3/data/layouts/mobilestudio-pro-13.svg000066400000000000000000000132771363647401700236420ustar00rootroot00000000000000 Wacom MobileStudio Pro 13 CW CCW A B C D E F G H I J K libwacom-libwacom-1.3/data/layouts/mobilestudio-pro-16.svg000066400000000000000000000151601363647401700236360ustar00rootroot00000000000000 Wacom MobileStudio Pro 16 CW CCW A B C D E F G H I J K L M libwacom-libwacom-1.3/data/layouts/xp-pen-star03.svg000066400000000000000000000064771363647401700224510ustar00rootroot00000000000000 XP-Pen Star 03 A B C D E F G H libwacom-libwacom-1.3/data/libwacom.stylus000066400000000000000000000174601363647401700207630ustar00rootroot00000000000000# Some generic fallback styli [0xfffff] Name=General Pen Buttons=2 HasEraser=true Axes=Tilt;Pressure;Distance; Type=General [0xffffe] Name=General Pen Eraser IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0xffffd] Name=General Pen with no Eraser HasEraser=false Buttons=2 Axes=Pressure; Type=General # Inking pen have no eraser [0x812] # Intuos and Intuos2 Name=Inking Pen Group=intuos Buttons=0 HasEraser=false Axes=Tilt;Pressure;Distance; Type=Inking [0x801] # Intuos3 and Cintiq 21UX Name=Inking Pen Group=intuos3 Buttons=0 HasEraser=false Axes=Tilt;Pressure;Distance; Type=Inking [0x20802] # Intuos4, 5 and Cintiq 21UX2, 22HD, 24HD Name=Inking Pen Buttons=0 HasEraser=false Axes=Tilt;Pressure;Distance; Type=Inking [0x120802] # Intuos4, 5 and Cintiq 21UX2, 22HD, 24HD Name=Inking Pen Group=intuos5 Buttons=0 HasEraser=false Axes=Tilt;Pressure;Distance; Type=Inking # Regular pen has eraser [0x822] # Intuos and Intuos2 Name=Classic Pen Group=intuos HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x8e2] # Intuos P/PT 2 Name=Intuos Pen Group=intuospt HasEraser=false Buttons=2 Axes=Pressure;Distance; Type=General [0x862] # Intuos P/PT 2 Name=Intuos Pen Group=intuospt3 HasEraser=false Buttons=2 Axes=Pressure;Distance; Type=General # Superseded by 0x842 for the MobileStudio Pro # [0x842] # Intuos2 # Name=Designer Pen # HasEraser=false [0x842] # MobileStudio Pro Name=Pro Pen Group=mobilestudio HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x80842] # MobileStudio Pro Name=Pro Pen 3D Group=mobilestudio HasEraser=false Buttons=3 Axes=Tilt;Pressure;Distance; Type=3D [0x852] # Intuos2 Name=Grip Pen Group=intuos2 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x823] # Intuos3 and Cintiq 21UX Name=Grip Pen Group=intuos3 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x813] # Intuos3 and Cintiq 21UX Name=Classic Pen Group=intuos3 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x885] # Intuos3 and Cintiq 21UX Name=6D Art Pen Group=intuos3 HasEraser=false Buttons=0 Axes=Tilt;Pressure;Distance;RotationZ; Type=Marker [0x802] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Grip Pen Group=intuos4 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x804] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Art Pen Group=intuos4 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance;RotationZ; Type=Marker [0x100804] # Intuos4, 5 and Cintiq 21UX2, 22HD, 24HD Name=Art Pen Group=intuos5 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance;RotationZ; Type=Marker [0x100802] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Grip Pen Group=intuos5 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x100842] # MobileStudio Pro, Cintiq Pro, Intuos Pro Name=Pro Pen Slim Group=mobilestudio HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x40802] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Classic Pen HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x140802] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Classic Pen Group=intuos5 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x160802] # Cintiq 13HD Pro Pen Name=Pro Pen Group=intuos5 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x180802] # DTH2242 Pen Name=Pen Group=dth2242 HasEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General # Stroke pen has no eraser [0x832] #Intuos and Intuos2 Name=Stroke Pen Group=intuos HasEraser=false Buttons=0 Axes=Tilt;Pressure;Distance; Type=Stroke # Erasers [0x82a] # Intuos and Intuos2 Name=Classic Pen Eraser Group=intuos IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x84a] # MobileStudio Pro Name=Pro Pen Eraser Group=mobilestudio IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x85a] # Intuos2 Name=Grip Pen Eraser Group=intuos2 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x91a] # Intuos2 Name=Airbrush Pen Eraser Group=intuos2 IsEraser=true Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush [0xd1a] # Intuos Name=Airbrush Pen Eraser Group=intuos-airbrush IsEraser=true Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush [0x82b] # Intuos3 and Cintiq 21UX Name=Grip Pen Eraser Group=intuos3 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x81b] # Intuos3 and Cintiq 21UX Name=Classic Pen Eraser Group=intuos3 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x91b] # Intuos3 and Cintiq 21UX Name=Airbrush Pen Eraser Group=intuos3 IsEraser=true Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush [0x80c] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Art Pen Eraser Group=intuos4 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Marker [0x80a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Grip Pen Eraser Group=intuos4 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x4080a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Classic Pen Eraser IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x14080a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Classic Pen Eraser Group=intuos5 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x10080c] # Intuos4, 5 and 13HD, 24HD Art Pen Name=Art Pen Eraser Group=intuos5 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Marker [0x10080a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Grip Pen Eraser Group=intuos5 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x10084a] # MobileStudio Pro, Cintiq Pro, Intuos Pro Name=Pro Pen Slim Group=mobilestudio IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x16080a] # Cintiq 13HD Name=Pro Pen Eraser Group=intuos5 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=Classic [0x18080a] # DTH2242 Eraser Name=Pen Eraser Group=dth2242 IsEraser=true Buttons=2 Axes=Tilt;Pressure;Distance; Type=General [0x10090a] # Intuos4, 5 and Cintiq 13HD, 22HD, 24HD Airbrush Eraser Name=Airbrush Pen Eraser Group=intuos5 IsEraser=true Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush [0x90a] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Airbrush Pen Eraser Group=intuos4 IsEraser=true Buttons=1 Axes=Tilt;Pressure;Distance; Type=Airbrush # Airbrush pen has eraser [0xd12] # Intuos Name=Airbrush Pen Group=intuos-airbrush HasEraser=true Buttons=1 Axes=Tilt;Pressure;Distance;Slider; Type=Airbrush [0x912] # Intuos2 Name=Airbrush Pen Group=intuos2 HasEraser=true Buttons=1 Axes=Tilt;Pressure;Distance;Slider; Type=Airbrush [0x913] # Intuos3 and Cintiq 21UX Name=Airbrush Pen Group=intuos3 Buttons=1 HasEraser=true Axes=Tilt;Pressure;Distance; Type=Airbrush [0x902] # Intuos4, 5 and Cintiq 21UX2, 24HD Name=Airbrush Pen Group=intuos4 Buttons=1 HasEraser=true Axes=Tilt;Pressure;Distance;Slider; Type=Airbrush [0x100902] # Intuos4, 5 and Cintiq 13HD, 21UX2, 22HD, 24HD Name=Airbrush Pen Group=intuos5 Buttons=1 HasEraser=true Axes=Tilt;Pressure;Distance;Slider; Type=Airbrush # Puck devices [0x096] # Intuos and Intuos2 Name=Lens Cursor Group=intuos Axes=Distance; Type=Puck HasLens=true HasWheel=false Buttons=5 [0x097] # Intuos3 Name=Lens Cursor Group=intuos3-pucks Axes=Distance; Type=Puck HasLens=true HasWheel=false Buttons=5 [0x006] # Intuos4 and Intuos5 Name=Lens Cursor Group=intuos4-lens Axes=Distance; Type=Puck HasLens=true HasWheel=false Buttons=5 [0x094] # Intuos and Intuos2 Name=4D Mouse Group=intuos Axes=Tilt;Distance; Type=Puck HasLens=false HasWheel=false Buttons=5 [0x007] # Intuos3 Name=2D Mouse Group=intuos2 Axes=Tilt;Distance; Type=Puck HasLens=false HasWheel=true Buttons=3 [0x017] # Intuos3 Name=Mouse Group=intuos3-pucks Axes=Tilt;Distance; Type=Puck HasLens=false HasWheel=true Buttons=5 [0x806] # Intuos4 and Intuos5 Name=Five Button Mouse Group=intuos4-puck Axes=Tilt;Distance; Type=Puck HasLens=false HasWheel=true Buttons=5 [0x21] Name=Thinkpad Pro Pen Buttons=2 HasEraser=false Axes=Pressure;Distance; Type=General libwacom-libwacom-1.3/data/mobilestudio-pro-13-2.tablet000066400000000000000000000025471363647401700227530ustar00rootroot00000000000000# Wacom # MobileStudio Pro 13 # DTH-W1321 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # | | # I | | # J G H | DISPLAY | # K | | # | | # D | | # E | | # F | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons H, I, J, K are on a circle # [Device] Name=Wacom MobileStudio Pro 13 ModelName=DTH-W1321 Class=Cintiq DeviceMatch=usb:056a:0398 PairedID=usb:056a:039a Width=12 Height=7 Layout=mobilestudio-pro-13.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=11 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=H;I;J;K libwacom-libwacom-1.3/data/mobilestudio-pro-13.tablet000066400000000000000000000025471363647401700226140ustar00rootroot00000000000000# Wacom # MobileStudio Pro 13 # DTH-W1320 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # | | # I | | # J G H | DISPLAY | # K | | # | | # D | | # E | | # F | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons H, I, J, K are on a circle # [Device] Name=Wacom MobileStudio Pro 13 ModelName=DTH-W1320 Class=Cintiq DeviceMatch=usb:056a:034d PairedID=usb:056a:034a Width=12 Height=7 Layout=mobilestudio-pro-13.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=11 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=H;I;J;K libwacom-libwacom-1.3/data/mobilestudio-pro-16-2.tablet000066400000000000000000000026651363647401700227570ustar00rootroot00000000000000# Wacom # MobileStudio Pro 16 # DTH-W1621 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # | | # K | | # L I J | DISPLAY | # M | | # | | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons J, K, L, M are on a circle # [Device] Name=Wacom MobileStudio Pro 16 ModelName=DTH-W1621 Class=Cintiq DeviceMatch=usb:056a:0399 PairedID=usb:056a:039b Width=14 Height=8 Layout=mobilestudio-pro-16.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=13 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K;L;M # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=J;K;L;M libwacom-libwacom-1.3/data/mobilestudio-pro-16-3.tablet000066400000000000000000000026651363647401700227600ustar00rootroot00000000000000# Wacom # MobileStudio Pro 16 # DTH-W1620 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # | | # K | | # L I J | DISPLAY | # M | | # | | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons J, K, L, M are on a circle # [Device] Name=Wacom MobileStudio Pro 16 ModelName=DTH-W1620 Class=Cintiq DeviceMatch=usb:056a:03aa PairedID=usb:056a:03ac Width=14 Height=8 Layout=mobilestudio-pro-16.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=13 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K;L;M # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=J;K;L;M libwacom-libwacom-1.3/data/mobilestudio-pro-16.tablet000066400000000000000000000026651363647401700226200ustar00rootroot00000000000000# Wacom # MobileStudio Pro 16 # DTH-W1620 # # Button Map: # (A=1, B=2, C=3, ...) # # *-----------------------* # | | # A | | # B | | # C | | # D | | # | | # K | | # L I J | DISPLAY | # M | | # | | # E | | # F | | # G | | # H | | # | | # *-----------------------* # # Touch Ring Map: # (A=1st ring, B=2nd ring, ...) # # *-----------------------* # | | # A | TABLET | # | | # *-----------------------* # # Note: Buttons J, K, L, M are on a circle # [Device] Name=Wacom MobileStudio Pro 16 ModelName=DTH-W1620 Class=Cintiq DeviceMatch=usb:056a:034e PairedID=usb:056a:034b Width=14 Height=8 Layout=mobilestudio-pro-16.svg Styli=@intuos5;@mobilestudio; IntegratedIn=Display;System [Features] Stylus=true Touch=true Ring=true Buttons=13 [Buttons] Left=A;B;C;D;E;F;G;H;I;J;K;L;M # This tablet has mode buttons but no LEDs to signal the current mode to the # user and thus requires the caller to display an on-screen notification. Ring=J;K;L;M libwacom-libwacom-1.3/data/n-trig-pen.tablet000066400000000000000000000006231363647401700210470ustar00rootroot00000000000000# USB tablet PC models: HP TouchSmart TX2z, Dell Latitude XT, and Dell Latitude XT2 # # stylus with two buttons and no eraser; 4FGT touchscreen # # HP Screen size 10.2 x 6.4; 12.1" diagonal # Dell Screen size 10.3 x 6.4; 12.1" diagonal [Device] Name=N-Trig Pen ModelName= DeviceMatch=usb:1b96:0001 Class=ISDV4 Width=10 Height=6 IntegratedIn=Display;System [Features] Stylus=true Touch=true Buttons=0 libwacom-libwacom-1.3/data/one-by-wacom-m-p.tablet000066400000000000000000000005541363647401700220560ustar00rootroot00000000000000# Wacom # One by Wacom (medium) # CTL-671 # # third generation BambooPT # # stylus with two buttons and no eraser # Pen active area: 8.5 x 5.34in [Device] Name=One by Wacom (medium) ModelName=CTL-671 DeviceMatch=usb:056a:0301 Class=Bamboo Width=9 Height=5 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/one-by-wacom-m-p2.tablet000066400000000000000000000006161363647401700221370ustar00rootroot00000000000000# Wacom # One by Wacom (medium) # CTL-672 # # third generation BambooPT; Second-generation "One by Wacom" # # stylus with two buttons and no eraser # Pen active area: 8.5 x 5.31in [Device] Name=One by Wacom (medium) ModelName=CTL-672 DeviceMatch=usb:056a:037b Class=Bamboo Width=9 Height=5 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/one-by-wacom-s-p.tablet000066400000000000000000000005521363647401700220620ustar00rootroot00000000000000# Wacom # One by Wacom (small) # CTL-471 # # third generation BambooPT # # stylus with two buttons and no eraser # Pen active area: 5.8 x 3.63in [Device] Name=One by Wacom (small) ModelName=CTL-471 DeviceMatch=usb:056a:0300 Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/one-by-wacom-s-p2.tablet000066400000000000000000000006151363647401700221440ustar00rootroot00000000000000# Wacom # One by Wacom (small) # CTL-472 # # third generation BambooPT; Second-generation "One by Wacom" # # stylus with two buttons and no eraser # Pen active area: 5.98 x 3.74in [Device] Name=One by Wacom (small) ModelName=CTL-472 DeviceMatch=usb:056a:037a Class=Bamboo Width=6 Height=4 # No pad buttons, so no layout IntegratedIn= [Features] Stylus=true Reversible=true Touch=false Buttons=0 libwacom-libwacom-1.3/data/serial-wacf004.tablet000066400000000000000000000002471363647401700215120ustar00rootroot00000000000000[Device] Name=Wacom Serial Tablet WACf004 ModelName= DeviceMatch=serial:0000:0000 Class=ISDV4 IntegratedIn=Display;System [Features] Stylus=true Ring=false Buttons=0 libwacom-libwacom-1.3/data/wacom-one.tablet000066400000000000000000000004401363647401700207510ustar00rootroot00000000000000# Wacom # Wacom One Pen Display 13 # DTC133 [Device] Name=Wacom One Pen Display 13 ModelName=DTC133 Class=PenDisplay DeviceMatch=usb:056a:03a6 Width=11 Height=6 # No pad buttons, so no layout IntegratedIn=Display [Features] Stylus=true Reversible=false Touch=false Ring=false Buttons=0 libwacom-libwacom-1.3/data/wacom.example000066400000000000000000000125101363647401700203530ustar00rootroot00000000000000# Example model file description for a tablet # # Make sure to give it a recognisable name, with the ".tablet" suffix [Device] # The name is the vendor and product name announced by the kernel Name=Wacom Intuos4 6x9 # DeviceMatch includes the bus (usb, bluetooth, serial), the vendor ID and # product ID. This is the connector used, not whatever name the kernel # might give it, so some "Wacom Serial" builtin devices will be USB # as that's how they're connected. # # For example: # $ lsusb | grep Wacom # Bus 002 Device 003: ID 056a:00bc Wacom Co., Ltd Intuos4 6x9 # will give you the device match below. # # You can find a full list of known Device IDs at: # https://github.com/linuxwacom/input-wacom/wiki/Device-IDs # # Do not add 0x in front of the hex numbers, make sure to pad each ID # so it has exactly 4 digits. DeviceMatch=usb:056a:00bc # Paired PID includes the match line of any device that share the same # physical device but has different product or vendor ids (e.g. the touch # device on the 24HDT). The format of the match line is identical to # DeviceMatch but only one value is permitted. # Note: the PIDs listed may not be libwacom devices themselves. PairedIDs=usb:056a:0335 # Class of the tablet. Valid classes include Intuos3, Intuos4, Graphire, Bamboo, Cintiq # If unsure, or not applicable (the tablet isn't stand-alone for # example), just leave it out. Class=Intuos4 # (Optional) Width in inches, as advertised by the manufacturer Width=9 # (Optional) Height in inches, as advertised by the manufacturer Height=6 # Integration flags, is the tablet is part of the system, such as a # TabletPC or integrated in the screen, ie a screen tablet (most serial # tablets, Cintiqs) # Note, if unspecified, the integration flags will be taken from the kernel. # Using an empty value or "None" forces the intergration flags to remain unset # even if the relevant kernel flags would state otherwise. IntegratedIn=Display;System # Styli # # This is a list of stylus IDs supported by the tablet. This is the # hardest thing to gather, but note that this is only needed for the # professional range of tablets, as the consumer range of devices all # have a single stylus (stylus + 2 buttons + eraser), just like our # generic stylus. # # Consumer range: # - Graphire # - Bamboo # # Professional range: # - Cintiq # - Intuos # # In general, differently sized models of the same range support the same # styli, so you can copy/paste the list from another definition. # # After that, you can try piecing the stylus list from the names of the # styli in libwacom.stylus, using the Wacom webshop as a reference # (how many supported styli, what do they look like, etc.) # # Finally, if you cannot find any information about the styli supported # by your device, you will need to gather the "Wacom Serial IDs", # and getting each stylus closer to the tablet. Styli=0x802;0x804;0x40802;0x80c;0x80a;0x4080a;0x90a;0x20802;0x902; # Optional features that this tablet supports # Some features are dependent on the actual tool used, e.g. not all styli # have an eraser and some styli have additional custom axes (e.g. the # airbrush pen). These features describe those available on the tablet. # # Features not set in a file default to false/0 [Features] # This tablet supports styli (and erasers, if present on the actual stylus) Stylus=true # Whether the tablet can be used left-handed # This is only for stand-alone tablets. The tablet # is deemed reversible if the tablet can be turned 180 degrees # so buttons are placed on the other side. The Intuos4 tablet # is a great example of that. Reversible=true # This tablet supports touch. Touch=false # This tablet provides a hardware touch switch. TouchSwitch=false # This tablet has a touch ring (Intuos4 and Cintiq 24HD) # A touch ring is a circular button that responds to touch # (rather than clicks): # http://intuos.wacom.com/americas/touch-ring.php Ring=true # This tablet has a second touch ring (Cintiq 24HD) Ring2=false # This tablet's number of strips, default is zero NumStrips=1 # Number of buttons on the tablet Buttons=9 # Metadata about the buttons on the tablet # Buttons are "numbered" using upper-case letters [Buttons] # Location of the buttons Left=A;B Right=C;D Top= Bottom= # The evdev codes for the buttons in order A, B, C, ... # The code must be defined for all buttons or this line is ignored EvdevCodes=0x110;0x112;0x111;0x113 ##################### # ADVANCED FEATURES # ##################### # Those are only needed for a few professional tablets # for which the values have already been filled in. # Which buttons have OLEDs associated to them # Only the Intuos4 devices have that right now # http://101.wacom.com/i4settings/images/expresskeys-feature.jpg OLEDs=B;C;D;E;F;G;H;I # The location of the various rings, if associated with a button # or buttons. # For example, a single button in the middle of the touchring, like # on the Intuos4 tablets. You will need to mention the number of modes # that the button allows if there isn't one button per mode. Ring=A RingNumModes=4 # Or the 2nd touchring associated with 3 buttons like the Cintiq24HD Ring2=I;J;K # Implied, as we have 3 buttons for that ring Ring2NumModes=3 # If the touchstrips have mode toggling through a button # like on the Cintiq 21UX2 Touchstrip=A Touchstrip2=J # We assume the same number of modes for each of the touchstrips # if there is more than one StripsNumModes=4 libwacom-libwacom-1.3/data/xp-pen-star03.tablet000066400000000000000000000006101363647401700214040ustar00rootroot00000000000000# XP-Pen # Star 03 # [Device] Name=XP-Pen Star 03 ModelName= DeviceMatch=usb:5543:0081:UC-Logic TABLET 1060N Pen;usb:5543:0081:UC-Logic TABLET 1060N Pad Class=Bamboo Width=10 Height=6 IntegratedIn= Layout=xp-pen-star03.svg Styli=0xffffd; [Features] Stylus=true Reversible=true Touch=false Buttons=8 [Buttons] Left=A;B;C;D;E;F;G;H EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107 libwacom-libwacom-1.3/doc/000077500000000000000000000000001363647401700155255ustar00rootroot00000000000000libwacom-libwacom-1.3/doc/Makefile.am000066400000000000000000000005651363647401700175670ustar00rootroot00000000000000EXTRA_DIST = doxygen.conf.in if HAVE_DOXYGEN EXTRA_DIST += html all-local: doxygen doxygen.conf: doxygen.conf.in $(AM_V_GEN) sed -e "s|\@TOPSRCDIR\@|$(top_srcdir)|" $< > $@ doxygen: $(top_srcdir)/libwacom/libwacom.h doxygen.conf $(AM_V_GEN) doxygen $(builddir)/doxygen.conf html: doxygen clean-local: rm -rf html CLEANFILES = doxygen.conf .PHONY: doxygen endif libwacom-libwacom-1.3/doc/doxygen.conf.in000066400000000000000000000006601363647401700204600ustar00rootroot00000000000000PROJECT_NAME = libwacom PROJECT_BRIEF = "Wacom model identification library" JAVADOC_AUTOBRIEF = YES TAB_SIZE = 8 OPTIMIZE_OUTPUT_FOR_C = YES EXTRACT_ALL = YES QUIET = YES HTML_TIMESTAMP = YES MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ GENERATE_LATEX = NO INPUT = @TOPSRCDIR@/libwacom/libwacom.h libwacom-libwacom-1.3/include/000077500000000000000000000000001363647401700164035ustar00rootroot00000000000000libwacom-libwacom-1.3/include/linux/000077500000000000000000000000001363647401700175425ustar00rootroot00000000000000libwacom-libwacom-1.3/include/linux/input-event-codes.h000066400000000000000000000570301363647401700232710ustar00rootroot00000000000000/* * Input event codes * * *** IMPORTANT *** * This file is not only included from C-code but also from devicetree source * files. As such this file MUST only contain comments and defines. * * Copyright (c) 1999-2002 Vojtech Pavlik * Copyright (c) 2015 Hans de Goede * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. */ #ifndef _UAPI_INPUT_EVENT_CODES_H #define _UAPI_INPUT_EVENT_CODES_H /* * Device properties and quirks */ #define INPUT_PROP_POINTER 0x00 /* needs a pointer */ #define INPUT_PROP_DIRECT 0x01 /* direct input devices */ #define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */ #define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */ #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ #define INPUT_PROP_MAX 0x1f #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) /* * Event types */ #define EV_SYN 0x00 #define EV_KEY 0x01 #define EV_REL 0x02 #define EV_ABS 0x03 #define EV_MSC 0x04 #define EV_SW 0x05 #define EV_LED 0x11 #define EV_SND 0x12 #define EV_REP 0x14 #define EV_FF 0x15 #define EV_PWR 0x16 #define EV_FF_STATUS 0x17 #define EV_MAX 0x1f #define EV_CNT (EV_MAX+1) /* * Synchronization events. */ #define SYN_REPORT 0 #define SYN_CONFIG 1 #define SYN_MT_REPORT 2 #define SYN_DROPPED 3 #define SYN_MAX 0xf #define SYN_CNT (SYN_MAX+1) /* * Keys and buttons * * Most of the keys/buttons are modeled after USB HUT 1.12 * (see http://www.usb.org/developers/hidpage). * Abbreviations in the comments: * AC - Application Control * AL - Application Launch Button * SC - System Control */ #define KEY_RESERVED 0 #define KEY_ESC 1 #define KEY_1 2 #define KEY_2 3 #define KEY_3 4 #define KEY_4 5 #define KEY_5 6 #define KEY_6 7 #define KEY_7 8 #define KEY_8 9 #define KEY_9 10 #define KEY_0 11 #define KEY_MINUS 12 #define KEY_EQUAL 13 #define KEY_BACKSPACE 14 #define KEY_TAB 15 #define KEY_Q 16 #define KEY_W 17 #define KEY_E 18 #define KEY_R 19 #define KEY_T 20 #define KEY_Y 21 #define KEY_U 22 #define KEY_I 23 #define KEY_O 24 #define KEY_P 25 #define KEY_LEFTBRACE 26 #define KEY_RIGHTBRACE 27 #define KEY_ENTER 28 #define KEY_LEFTCTRL 29 #define KEY_A 30 #define KEY_S 31 #define KEY_D 32 #define KEY_F 33 #define KEY_G 34 #define KEY_H 35 #define KEY_J 36 #define KEY_K 37 #define KEY_L 38 #define KEY_SEMICOLON 39 #define KEY_APOSTROPHE 40 #define KEY_GRAVE 41 #define KEY_LEFTSHIFT 42 #define KEY_BACKSLASH 43 #define KEY_Z 44 #define KEY_X 45 #define KEY_C 46 #define KEY_V 47 #define KEY_B 48 #define KEY_N 49 #define KEY_M 50 #define KEY_COMMA 51 #define KEY_DOT 52 #define KEY_SLASH 53 #define KEY_RIGHTSHIFT 54 #define KEY_KPASTERISK 55 #define KEY_LEFTALT 56 #define KEY_SPACE 57 #define KEY_CAPSLOCK 58 #define KEY_F1 59 #define KEY_F2 60 #define KEY_F3 61 #define KEY_F4 62 #define KEY_F5 63 #define KEY_F6 64 #define KEY_F7 65 #define KEY_F8 66 #define KEY_F9 67 #define KEY_F10 68 #define KEY_NUMLOCK 69 #define KEY_SCROLLLOCK 70 #define KEY_KP7 71 #define KEY_KP8 72 #define KEY_KP9 73 #define KEY_KPMINUS 74 #define KEY_KP4 75 #define KEY_KP5 76 #define KEY_KP6 77 #define KEY_KPPLUS 78 #define KEY_KP1 79 #define KEY_KP2 80 #define KEY_KP3 81 #define KEY_KP0 82 #define KEY_KPDOT 83 #define KEY_ZENKAKUHANKAKU 85 #define KEY_102ND 86 #define KEY_F11 87 #define KEY_F12 88 #define KEY_RO 89 #define KEY_KATAKANA 90 #define KEY_HIRAGANA 91 #define KEY_HENKAN 92 #define KEY_KATAKANAHIRAGANA 93 #define KEY_MUHENKAN 94 #define KEY_KPJPCOMMA 95 #define KEY_KPENTER 96 #define KEY_RIGHTCTRL 97 #define KEY_KPSLASH 98 #define KEY_SYSRQ 99 #define KEY_RIGHTALT 100 #define KEY_LINEFEED 101 #define KEY_HOME 102 #define KEY_UP 103 #define KEY_PAGEUP 104 #define KEY_LEFT 105 #define KEY_RIGHT 106 #define KEY_END 107 #define KEY_DOWN 108 #define KEY_PAGEDOWN 109 #define KEY_INSERT 110 #define KEY_DELETE 111 #define KEY_MACRO 112 #define KEY_MUTE 113 #define KEY_VOLUMEDOWN 114 #define KEY_VOLUMEUP 115 #define KEY_POWER 116 /* SC System Power Down */ #define KEY_KPEQUAL 117 #define KEY_KPPLUSMINUS 118 #define KEY_PAUSE 119 #define KEY_SCALE 120 /* AL Compiz Scale (Expose) */ #define KEY_KPCOMMA 121 #define KEY_HANGEUL 122 #define KEY_HANGUEL KEY_HANGEUL #define KEY_HANJA 123 #define KEY_YEN 124 #define KEY_LEFTMETA 125 #define KEY_RIGHTMETA 126 #define KEY_COMPOSE 127 #define KEY_STOP 128 /* AC Stop */ #define KEY_AGAIN 129 #define KEY_PROPS 130 /* AC Properties */ #define KEY_UNDO 131 /* AC Undo */ #define KEY_FRONT 132 #define KEY_COPY 133 /* AC Copy */ #define KEY_OPEN 134 /* AC Open */ #define KEY_PASTE 135 /* AC Paste */ #define KEY_FIND 136 /* AC Search */ #define KEY_CUT 137 /* AC Cut */ #define KEY_HELP 138 /* AL Integrated Help Center */ #define KEY_MENU 139 /* Menu (show menu) */ #define KEY_CALC 140 /* AL Calculator */ #define KEY_SETUP 141 #define KEY_SLEEP 142 /* SC System Sleep */ #define KEY_WAKEUP 143 /* System Wake Up */ #define KEY_FILE 144 /* AL Local Machine Browser */ #define KEY_SENDFILE 145 #define KEY_DELETEFILE 146 #define KEY_XFER 147 #define KEY_PROG1 148 #define KEY_PROG2 149 #define KEY_WWW 150 /* AL Internet Browser */ #define KEY_MSDOS 151 #define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */ #define KEY_SCREENLOCK KEY_COFFEE #define KEY_ROTATE_DISPLAY 153 /* Display orientation for e.g. tablets */ #define KEY_DIRECTION KEY_ROTATE_DISPLAY #define KEY_CYCLEWINDOWS 154 #define KEY_MAIL 155 #define KEY_BOOKMARKS 156 /* AC Bookmarks */ #define KEY_COMPUTER 157 #define KEY_BACK 158 /* AC Back */ #define KEY_FORWARD 159 /* AC Forward */ #define KEY_CLOSECD 160 #define KEY_EJECTCD 161 #define KEY_EJECTCLOSECD 162 #define KEY_NEXTSONG 163 #define KEY_PLAYPAUSE 164 #define KEY_PREVIOUSSONG 165 #define KEY_STOPCD 166 #define KEY_RECORD 167 #define KEY_REWIND 168 #define KEY_PHONE 169 /* Media Select Telephone */ #define KEY_ISO 170 #define KEY_CONFIG 171 /* AL Consumer Control Configuration */ #define KEY_HOMEPAGE 172 /* AC Home */ #define KEY_REFRESH 173 /* AC Refresh */ #define KEY_EXIT 174 /* AC Exit */ #define KEY_MOVE 175 #define KEY_EDIT 176 #define KEY_SCROLLUP 177 #define KEY_SCROLLDOWN 178 #define KEY_KPLEFTPAREN 179 #define KEY_KPRIGHTPAREN 180 #define KEY_NEW 181 /* AC New */ #define KEY_REDO 182 /* AC Redo/Repeat */ #define KEY_F13 183 #define KEY_F14 184 #define KEY_F15 185 #define KEY_F16 186 #define KEY_F17 187 #define KEY_F18 188 #define KEY_F19 189 #define KEY_F20 190 #define KEY_F21 191 #define KEY_F22 192 #define KEY_F23 193 #define KEY_F24 194 #define KEY_PLAYCD 200 #define KEY_PAUSECD 201 #define KEY_PROG3 202 #define KEY_PROG4 203 #define KEY_DASHBOARD 204 /* AL Dashboard */ #define KEY_SUSPEND 205 #define KEY_CLOSE 206 /* AC Close */ #define KEY_PLAY 207 #define KEY_FASTFORWARD 208 #define KEY_BASSBOOST 209 #define KEY_PRINT 210 /* AC Print */ #define KEY_HP 211 #define KEY_CAMERA 212 #define KEY_SOUND 213 #define KEY_QUESTION 214 #define KEY_EMAIL 215 #define KEY_CHAT 216 #define KEY_SEARCH 217 #define KEY_CONNECT 218 #define KEY_FINANCE 219 /* AL Checkbook/Finance */ #define KEY_SPORT 220 #define KEY_SHOP 221 #define KEY_ALTERASE 222 #define KEY_CANCEL 223 /* AC Cancel */ #define KEY_BRIGHTNESSDOWN 224 #define KEY_BRIGHTNESSUP 225 #define KEY_MEDIA 226 #define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video outputs (Monitor/LCD/TV-out/etc) */ #define KEY_KBDILLUMTOGGLE 228 #define KEY_KBDILLUMDOWN 229 #define KEY_KBDILLUMUP 230 #define KEY_SEND 231 /* AC Send */ #define KEY_REPLY 232 /* AC Reply */ #define KEY_FORWARDMAIL 233 /* AC Forward Msg */ #define KEY_SAVE 234 /* AC Save */ #define KEY_DOCUMENTS 235 #define KEY_BATTERY 236 #define KEY_BLUETOOTH 237 #define KEY_WLAN 238 #define KEY_UWB 239 #define KEY_UNKNOWN 240 #define KEY_VIDEO_NEXT 241 /* drive next video source */ #define KEY_VIDEO_PREV 242 /* drive previous video source */ #define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */ #define KEY_BRIGHTNESS_AUTO 244 /* Set Auto Brightness: manual brightness control is off, rely on ambient */ #define KEY_BRIGHTNESS_ZERO KEY_BRIGHTNESS_AUTO #define KEY_DISPLAY_OFF 245 /* display device to off state */ #define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ #define KEY_WIMAX KEY_WWAN #define KEY_RFKILL 247 /* Key that controls all radios */ #define KEY_MICMUTE 248 /* Mute / unmute the microphone */ /* Code 255 is reserved for special needs of AT keyboard driver */ #define BTN_MISC 0x100 #define BTN_0 0x100 #define BTN_1 0x101 #define BTN_2 0x102 #define BTN_3 0x103 #define BTN_4 0x104 #define BTN_5 0x105 #define BTN_6 0x106 #define BTN_7 0x107 #define BTN_8 0x108 #define BTN_9 0x109 #define BTN_MOUSE 0x110 #define BTN_LEFT 0x110 #define BTN_RIGHT 0x111 #define BTN_MIDDLE 0x112 #define BTN_SIDE 0x113 #define BTN_EXTRA 0x114 #define BTN_FORWARD 0x115 #define BTN_BACK 0x116 #define BTN_TASK 0x117 #define BTN_JOYSTICK 0x120 #define BTN_TRIGGER 0x120 #define BTN_THUMB 0x121 #define BTN_THUMB2 0x122 #define BTN_TOP 0x123 #define BTN_TOP2 0x124 #define BTN_PINKIE 0x125 #define BTN_BASE 0x126 #define BTN_BASE2 0x127 #define BTN_BASE3 0x128 #define BTN_BASE4 0x129 #define BTN_BASE5 0x12a #define BTN_BASE6 0x12b #define BTN_DEAD 0x12f #define BTN_GAMEPAD 0x130 #define BTN_SOUTH 0x130 #define BTN_A BTN_SOUTH #define BTN_EAST 0x131 #define BTN_B BTN_EAST #define BTN_C 0x132 #define BTN_NORTH 0x133 #define BTN_X BTN_NORTH #define BTN_WEST 0x134 #define BTN_Y BTN_WEST #define BTN_Z 0x135 #define BTN_TL 0x136 #define BTN_TR 0x137 #define BTN_TL2 0x138 #define BTN_TR2 0x139 #define BTN_SELECT 0x13a #define BTN_START 0x13b #define BTN_MODE 0x13c #define BTN_THUMBL 0x13d #define BTN_THUMBR 0x13e #define BTN_DIGI 0x140 #define BTN_TOOL_PEN 0x140 #define BTN_TOOL_RUBBER 0x141 #define BTN_TOOL_BRUSH 0x142 #define BTN_TOOL_PENCIL 0x143 #define BTN_TOOL_AIRBRUSH 0x144 #define BTN_TOOL_FINGER 0x145 #define BTN_TOOL_MOUSE 0x146 #define BTN_TOOL_LENS 0x147 #define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */ #define BTN_TOUCH 0x14a #define BTN_STYLUS 0x14b #define BTN_STYLUS2 0x14c #define BTN_TOOL_DOUBLETAP 0x14d #define BTN_TOOL_TRIPLETAP 0x14e #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ #define BTN_WHEEL 0x150 #define BTN_GEAR_DOWN 0x150 #define BTN_GEAR_UP 0x151 #define KEY_OK 0x160 #define KEY_SELECT 0x161 #define KEY_GOTO 0x162 #define KEY_CLEAR 0x163 #define KEY_POWER2 0x164 #define KEY_OPTION 0x165 #define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */ #define KEY_TIME 0x167 #define KEY_VENDOR 0x168 #define KEY_ARCHIVE 0x169 #define KEY_PROGRAM 0x16a /* Media Select Program Guide */ #define KEY_CHANNEL 0x16b #define KEY_FAVORITES 0x16c #define KEY_EPG 0x16d #define KEY_PVR 0x16e /* Media Select Home */ #define KEY_MHP 0x16f #define KEY_LANGUAGE 0x170 #define KEY_TITLE 0x171 #define KEY_SUBTITLE 0x172 #define KEY_ANGLE 0x173 #define KEY_ZOOM 0x174 #define KEY_MODE 0x175 #define KEY_KEYBOARD 0x176 #define KEY_SCREEN 0x177 #define KEY_PC 0x178 /* Media Select Computer */ #define KEY_TV 0x179 /* Media Select TV */ #define KEY_TV2 0x17a /* Media Select Cable */ #define KEY_VCR 0x17b /* Media Select VCR */ #define KEY_VCR2 0x17c /* VCR Plus */ #define KEY_SAT 0x17d /* Media Select Satellite */ #define KEY_SAT2 0x17e #define KEY_CD 0x17f /* Media Select CD */ #define KEY_TAPE 0x180 /* Media Select Tape */ #define KEY_RADIO 0x181 #define KEY_TUNER 0x182 /* Media Select Tuner */ #define KEY_PLAYER 0x183 #define KEY_TEXT 0x184 #define KEY_DVD 0x185 /* Media Select DVD */ #define KEY_AUX 0x186 #define KEY_MP3 0x187 #define KEY_AUDIO 0x188 /* AL Audio Browser */ #define KEY_VIDEO 0x189 /* AL Movie Browser */ #define KEY_DIRECTORY 0x18a #define KEY_LIST 0x18b #define KEY_MEMO 0x18c /* Media Select Messages */ #define KEY_CALENDAR 0x18d #define KEY_RED 0x18e #define KEY_GREEN 0x18f #define KEY_YELLOW 0x190 #define KEY_BLUE 0x191 #define KEY_CHANNELUP 0x192 /* Channel Increment */ #define KEY_CHANNELDOWN 0x193 /* Channel Decrement */ #define KEY_FIRST 0x194 #define KEY_LAST 0x195 /* Recall Last */ #define KEY_AB 0x196 #define KEY_NEXT 0x197 #define KEY_RESTART 0x198 #define KEY_SLOW 0x199 #define KEY_SHUFFLE 0x19a #define KEY_BREAK 0x19b #define KEY_PREVIOUS 0x19c #define KEY_DIGITS 0x19d #define KEY_TEEN 0x19e #define KEY_TWEN 0x19f #define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */ #define KEY_GAMES 0x1a1 /* Media Select Games */ #define KEY_ZOOMIN 0x1a2 /* AC Zoom In */ #define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */ #define KEY_ZOOMRESET 0x1a4 /* AC Zoom */ #define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */ #define KEY_EDITOR 0x1a6 /* AL Text Editor */ #define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */ #define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */ #define KEY_PRESENTATION 0x1a9 /* AL Presentation App */ #define KEY_DATABASE 0x1aa /* AL Database App */ #define KEY_NEWS 0x1ab /* AL Newsreader */ #define KEY_VOICEMAIL 0x1ac /* AL Voicemail */ #define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */ #define KEY_MESSENGER 0x1ae /* AL Instant Messaging */ #define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */ #define KEY_BRIGHTNESS_TOGGLE KEY_DISPLAYTOGGLE #define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */ #define KEY_LOGOFF 0x1b1 /* AL Logoff */ #define KEY_DOLLAR 0x1b2 #define KEY_EURO 0x1b3 #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ #define KEY_FRAMEFORWARD 0x1b5 #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ #define KEY_IMAGES 0x1ba /* AL Image Browser */ #define KEY_DEL_EOL 0x1c0 #define KEY_DEL_EOS 0x1c1 #define KEY_INS_LINE 0x1c2 #define KEY_DEL_LINE 0x1c3 #define KEY_FN 0x1d0 #define KEY_FN_ESC 0x1d1 #define KEY_FN_F1 0x1d2 #define KEY_FN_F2 0x1d3 #define KEY_FN_F3 0x1d4 #define KEY_FN_F4 0x1d5 #define KEY_FN_F5 0x1d6 #define KEY_FN_F6 0x1d7 #define KEY_FN_F7 0x1d8 #define KEY_FN_F8 0x1d9 #define KEY_FN_F9 0x1da #define KEY_FN_F10 0x1db #define KEY_FN_F11 0x1dc #define KEY_FN_F12 0x1dd #define KEY_FN_1 0x1de #define KEY_FN_2 0x1df #define KEY_FN_D 0x1e0 #define KEY_FN_E 0x1e1 #define KEY_FN_F 0x1e2 #define KEY_FN_S 0x1e3 #define KEY_FN_B 0x1e4 #define KEY_BRL_DOT1 0x1f1 #define KEY_BRL_DOT2 0x1f2 #define KEY_BRL_DOT3 0x1f3 #define KEY_BRL_DOT4 0x1f4 #define KEY_BRL_DOT5 0x1f5 #define KEY_BRL_DOT6 0x1f6 #define KEY_BRL_DOT7 0x1f7 #define KEY_BRL_DOT8 0x1f8 #define KEY_BRL_DOT9 0x1f9 #define KEY_BRL_DOT10 0x1fa #define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */ #define KEY_NUMERIC_1 0x201 /* and other keypads */ #define KEY_NUMERIC_2 0x202 #define KEY_NUMERIC_3 0x203 #define KEY_NUMERIC_4 0x204 #define KEY_NUMERIC_5 0x205 #define KEY_NUMERIC_6 0x206 #define KEY_NUMERIC_7 0x207 #define KEY_NUMERIC_8 0x208 #define KEY_NUMERIC_9 0x209 #define KEY_NUMERIC_STAR 0x20a #define KEY_NUMERIC_POUND 0x20b #define KEY_NUMERIC_A 0x20c /* Phone key A - HUT Telephony 0xb9 */ #define KEY_NUMERIC_B 0x20d #define KEY_NUMERIC_C 0x20e #define KEY_NUMERIC_D 0x20f #define KEY_CAMERA_FOCUS 0x210 #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ #define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ #define KEY_TOUCHPAD_ON 0x213 #define KEY_TOUCHPAD_OFF 0x214 #define KEY_CAMERA_ZOOMIN 0x215 #define KEY_CAMERA_ZOOMOUT 0x216 #define KEY_CAMERA_UP 0x217 #define KEY_CAMERA_DOWN 0x218 #define KEY_CAMERA_LEFT 0x219 #define KEY_CAMERA_RIGHT 0x21a #define KEY_ATTENDANT_ON 0x21b #define KEY_ATTENDANT_OFF 0x21c #define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */ #define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */ #define BTN_DPAD_UP 0x220 #define BTN_DPAD_DOWN 0x221 #define BTN_DPAD_LEFT 0x222 #define BTN_DPAD_RIGHT 0x223 #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ #define KEY_BUTTONCONFIG 0x240 /* AL Button Configuration */ #define KEY_TASKMANAGER 0x241 /* AL Task/Project Manager */ #define KEY_JOURNAL 0x242 /* AL Log/Journal/Timecard */ #define KEY_CONTROLPANEL 0x243 /* AL Control Panel */ #define KEY_APPSELECT 0x244 /* AL Select Task/Application */ #define KEY_SCREENSAVER 0x245 /* AL Screen Saver */ #define KEY_VOICECOMMAND 0x246 /* Listening Voice Command */ #define KEY_BRIGHTNESS_MIN 0x250 /* Set Brightness to Minimum */ #define KEY_BRIGHTNESS_MAX 0x251 /* Set Brightness to Maximum */ #define KEY_KBDINPUTASSIST_PREV 0x260 #define KEY_KBDINPUTASSIST_NEXT 0x261 #define KEY_KBDINPUTASSIST_PREVGROUP 0x262 #define KEY_KBDINPUTASSIST_NEXTGROUP 0x263 #define KEY_KBDINPUTASSIST_ACCEPT 0x264 #define KEY_KBDINPUTASSIST_CANCEL 0x265 /* Diagonal movement keys */ #define KEY_RIGHT_UP 0x266 #define KEY_RIGHT_DOWN 0x267 #define KEY_LEFT_UP 0x268 #define KEY_LEFT_DOWN 0x269 #define KEY_ROOT_MENU 0x26a /* Show Device's Root Menu */ /* Show Top Menu of the Media (e.g. DVD) */ #define KEY_MEDIA_TOP_MENU 0x26b #define KEY_NUMERIC_11 0x26c #define KEY_NUMERIC_12 0x26d /* * Toggle Audio Description: refers to an audio service that helps blind and * visually impaired consumers understand the action in a program. Note: in * some countries this is referred to as "Video Description". */ #define KEY_AUDIO_DESC 0x26e #define KEY_3D_MODE 0x26f #define KEY_NEXT_FAVORITE 0x270 #define KEY_STOP_RECORD 0x271 #define KEY_PAUSE_RECORD 0x272 #define KEY_VOD 0x273 /* Video on Demand */ #define KEY_UNMUTE 0x274 #define KEY_FASTREVERSE 0x275 #define KEY_SLOWREVERSE 0x276 /* * Control a data application associated with the currently viewed channel, * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.) */ #define KEY_DATA 0x277 #define KEY_ONSCREEN_KEYBOARD 0x278 #define BTN_TRIGGER_HAPPY 0x2c0 #define BTN_TRIGGER_HAPPY1 0x2c0 #define BTN_TRIGGER_HAPPY2 0x2c1 #define BTN_TRIGGER_HAPPY3 0x2c2 #define BTN_TRIGGER_HAPPY4 0x2c3 #define BTN_TRIGGER_HAPPY5 0x2c4 #define BTN_TRIGGER_HAPPY6 0x2c5 #define BTN_TRIGGER_HAPPY7 0x2c6 #define BTN_TRIGGER_HAPPY8 0x2c7 #define BTN_TRIGGER_HAPPY9 0x2c8 #define BTN_TRIGGER_HAPPY10 0x2c9 #define BTN_TRIGGER_HAPPY11 0x2ca #define BTN_TRIGGER_HAPPY12 0x2cb #define BTN_TRIGGER_HAPPY13 0x2cc #define BTN_TRIGGER_HAPPY14 0x2cd #define BTN_TRIGGER_HAPPY15 0x2ce #define BTN_TRIGGER_HAPPY16 0x2cf #define BTN_TRIGGER_HAPPY17 0x2d0 #define BTN_TRIGGER_HAPPY18 0x2d1 #define BTN_TRIGGER_HAPPY19 0x2d2 #define BTN_TRIGGER_HAPPY20 0x2d3 #define BTN_TRIGGER_HAPPY21 0x2d4 #define BTN_TRIGGER_HAPPY22 0x2d5 #define BTN_TRIGGER_HAPPY23 0x2d6 #define BTN_TRIGGER_HAPPY24 0x2d7 #define BTN_TRIGGER_HAPPY25 0x2d8 #define BTN_TRIGGER_HAPPY26 0x2d9 #define BTN_TRIGGER_HAPPY27 0x2da #define BTN_TRIGGER_HAPPY28 0x2db #define BTN_TRIGGER_HAPPY29 0x2dc #define BTN_TRIGGER_HAPPY30 0x2dd #define BTN_TRIGGER_HAPPY31 0x2de #define BTN_TRIGGER_HAPPY32 0x2df #define BTN_TRIGGER_HAPPY33 0x2e0 #define BTN_TRIGGER_HAPPY34 0x2e1 #define BTN_TRIGGER_HAPPY35 0x2e2 #define BTN_TRIGGER_HAPPY36 0x2e3 #define BTN_TRIGGER_HAPPY37 0x2e4 #define BTN_TRIGGER_HAPPY38 0x2e5 #define BTN_TRIGGER_HAPPY39 0x2e6 #define BTN_TRIGGER_HAPPY40 0x2e7 /* We avoid low common keys in module aliases so they don't get huge. */ #define KEY_MIN_INTERESTING KEY_MUTE #define KEY_MAX 0x2ff #define KEY_CNT (KEY_MAX+1) /* * Relative axes */ #define REL_X 0x00 #define REL_Y 0x01 #define REL_Z 0x02 #define REL_RX 0x03 #define REL_RY 0x04 #define REL_RZ 0x05 #define REL_HWHEEL 0x06 #define REL_DIAL 0x07 #define REL_WHEEL 0x08 #define REL_MISC 0x09 #define REL_MAX 0x0f #define REL_CNT (REL_MAX+1) /* * Absolute axes */ #define ABS_X 0x00 #define ABS_Y 0x01 #define ABS_Z 0x02 #define ABS_RX 0x03 #define ABS_RY 0x04 #define ABS_RZ 0x05 #define ABS_THROTTLE 0x06 #define ABS_RUDDER 0x07 #define ABS_WHEEL 0x08 #define ABS_GAS 0x09 #define ABS_BRAKE 0x0a #define ABS_HAT0X 0x10 #define ABS_HAT0Y 0x11 #define ABS_HAT1X 0x12 #define ABS_HAT1Y 0x13 #define ABS_HAT2X 0x14 #define ABS_HAT2Y 0x15 #define ABS_HAT3X 0x16 #define ABS_HAT3Y 0x17 #define ABS_PRESSURE 0x18 #define ABS_DISTANCE 0x19 #define ABS_TILT_X 0x1a #define ABS_TILT_Y 0x1b #define ABS_TOOL_WIDTH 0x1c #define ABS_VOLUME 0x20 #define ABS_MISC 0x28 #define ABS_MT_SLOT 0x2f /* MT slot being modified */ #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ #define ABS_MT_POSITION_X 0x35 /* Center X touch position */ #define ABS_MT_POSITION_Y 0x36 /* Center Y touch position */ #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ #define ABS_MT_DISTANCE 0x3b /* Contact hover distance */ #define ABS_MT_TOOL_X 0x3c /* Center X tool position */ #define ABS_MT_TOOL_Y 0x3d /* Center Y tool position */ #define ABS_MAX 0x3f #define ABS_CNT (ABS_MAX+1) /* * Switch events */ #define SW_LID 0x00 /* set = lid shut */ #define SW_TABLET_MODE 0x01 /* set = tablet mode */ #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" set = radio enabled */ #define SW_RADIO SW_RFKILL_ALL /* deprecated */ #define SW_MICROPHONE_INSERT 0x04 /* set = inserted */ #define SW_DOCK 0x05 /* set = plugged into dock */ #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ #define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */ #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ #define SW_LINEIN_INSERT 0x0d /* set = inserted */ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_PEN_INSERTED 0x0f /* set = pen inserted */ #define SW_MAX 0x0f #define SW_CNT (SW_MAX+1) /* * Misc events */ #define MSC_SERIAL 0x00 #define MSC_PULSELED 0x01 #define MSC_GESTURE 0x02 #define MSC_RAW 0x03 #define MSC_SCAN 0x04 #define MSC_TIMESTAMP 0x05 #define MSC_MAX 0x07 #define MSC_CNT (MSC_MAX+1) /* * LEDs */ #define LED_NUML 0x00 #define LED_CAPSL 0x01 #define LED_SCROLLL 0x02 #define LED_COMPOSE 0x03 #define LED_KANA 0x04 #define LED_SLEEP 0x05 #define LED_SUSPEND 0x06 #define LED_MUTE 0x07 #define LED_MISC 0x08 #define LED_MAIL 0x09 #define LED_CHARGING 0x0a #define LED_MAX 0x0f #define LED_CNT (LED_MAX+1) /* * Autorepeat values */ #define REP_DELAY 0x00 #define REP_PERIOD 0x01 #define REP_MAX 0x01 #define REP_CNT (REP_MAX+1) /* * Sounds */ #define SND_CLICK 0x00 #define SND_BELL 0x01 #define SND_TONE 0x02 #define SND_MAX 0x07 #define SND_CNT (SND_MAX+1) #endif libwacom-libwacom-1.3/libwacom.pc.in000066400000000000000000000003761363647401700175140ustar00rootroot00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libwacom Description: Wacom model feature query library Version: @VERSION@ Requires.private: glib-2.0 Cflags: -I${includedir}/libwacom-1.0 Libs: -L${libdir} -lwacom libwacom-libwacom-1.3/libwacom/000077500000000000000000000000001363647401700165555ustar00rootroot00000000000000libwacom-libwacom-1.3/libwacom/Makefile.am000066400000000000000000000015561363647401700206200ustar00rootroot00000000000000lib_LTLIBRARIES=libwacom.la AM_CPPFLAGS = \ -DDATADIR="\"$(datadir)/libwacom\"" \ -DG_LOG_DOMAIN="\"$(PACKAGE)\"" \ -I$(top_srcdir)/include \ -fvisibility=hidden libwacom_la_SOURCES = \ $(top_srcdir)/include/linux/input-event-codes.h \ libwacom.h \ libwacomint.h \ libwacom.c \ libwacom-error.c \ libwacom-database.c \ libwacom-deprecated.c libwacom_la_LIBADD = $(GLIB_LIBS) libwacom_la_CFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) libwacom_la_LDFLAGS = \ -version-info $(LIBWACOM_LT_VERSION) \ -Wl,--version-script="$(srcdir)/libwacom.sym" \ $(NULL) libwacomincludedir = $(includedir)/libwacom-1.0/libwacom/ libwacominclude_HEADERS = libwacom.h EXTRA_DIST = libwacom.sym libwacom-libwacom-1.3/libwacom/libwacom-database.c000066400000000000000000000620661363647401700222720ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "libwacomint.h" #include #include #include #include #include #include #include #include #define TABLET_SUFFIX ".tablet" #define STYLUS_SUFFIX ".stylus" #define FEATURES_GROUP "Features" #define DEVICE_GROUP "Device" #define BUTTONS_GROUP "Buttons" static WacomClass libwacom_class_string_to_enum(const char *class) { if (class == NULL || *class == '\0') return WCLASS_UNKNOWN; if (streq(class, "Intuos3")) return WCLASS_INTUOS3; if (streq(class, "Intuos4")) return WCLASS_INTUOS4; if (streq(class, "Intuos5")) return WCLASS_INTUOS5; if (streq(class, "Cintiq")) return WCLASS_CINTIQ; if (streq(class, "Bamboo")) return WCLASS_BAMBOO; if (streq(class, "Graphire")) return WCLASS_GRAPHIRE; if (streq(class, "Intuos")) return WCLASS_INTUOS; if (streq(class, "Intuos2")) return WCLASS_INTUOS2; if (streq(class, "ISDV4")) return WCLASS_ISDV4; if (streq(class, "PenDisplay")) return WCLASS_PEN_DISPLAYS; if (streq(class, "Remote")) return WCLASS_REMOTE; return WCLASS_UNKNOWN; } static WacomStylusType type_from_str (const char *type) { if (type == NULL) return WSTYLUS_UNKNOWN; if (streq(type, "General")) return WSTYLUS_GENERAL; if (streq(type, "Inking")) return WSTYLUS_INKING; if (streq(type, "Airbrush")) return WSTYLUS_AIRBRUSH; if (streq(type, "Classic")) return WSTYLUS_CLASSIC; if (streq(type, "Marker")) return WSTYLUS_MARKER; if (streq(type, "Stroke")) return WSTYLUS_STROKE; if (streq(type, "Puck")) return WSTYLUS_PUCK; if (streq(type, "3D")) return WSTYLUS_3D; return WSTYLUS_UNKNOWN; } WacomBusType bus_from_str (const char *str) { if (streq(str, "usb")) return WBUSTYPE_USB; if (streq(str, "serial")) return WBUSTYPE_SERIAL; if (streq(str, "bluetooth")) return WBUSTYPE_BLUETOOTH; if (streq(str, "i2c")) return WBUSTYPE_I2C; return WBUSTYPE_UNKNOWN; } const char * bus_to_str (WacomBusType bus) { switch (bus) { case WBUSTYPE_UNKNOWN: g_assert_not_reached(); break; case WBUSTYPE_USB: return "usb"; case WBUSTYPE_SERIAL: return "serial"; case WBUSTYPE_BLUETOOTH: return "bluetooth"; case WBUSTYPE_I2C: return "i2c"; } g_assert_not_reached (); } char * make_match_string (const char *name, WacomBusType bus, int vendor_id, int product_id) { return g_strdup_printf("%s:%04x:%04x%s%s", bus_to_str (bus), vendor_id, product_id, name ? ":" : "", name ? name : ""); } static gboolean match_from_string(const char *str, WacomBusType *bus, int *vendor_id, int *product_id, char **name) { int rc = 1, len = 0; char busstr[64]; rc = sscanf(str, "%63[^:]:%x:%x:%n", busstr, vendor_id, product_id, &len); if (len > 0) { /* Grumble grumble scanf handling of %n */ *name = g_strdup(str+len); } else if (rc == 3) { *name = NULL; } else { return FALSE; } *bus = bus_from_str (busstr); return TRUE; } static gboolean libwacom_matchstr_to_match(WacomDevice *device, const char *matchstr) { char *name = NULL; int vendor_id, product_id; WacomBusType bus; WacomMatch *match; if (matchstr == NULL) return FALSE; if (streq(matchstr, GENERIC_DEVICE_MATCH)) { name = NULL; bus = WBUSTYPE_UNKNOWN; vendor_id = 0; product_id = 0; } else if (!match_from_string(matchstr, &bus, &vendor_id, &product_id, &name)) { DBG("failed to match '%s' for product/vendor IDs. Skipping.\n", matchstr); return FALSE; } match = libwacom_match_new(name, bus, vendor_id, product_id); libwacom_add_match(device, match); libwacom_match_unref(match); free(name); return TRUE; } static gboolean libwacom_matchstr_to_paired(WacomDevice *device, const char *matchstr) { char *name = NULL; int vendor_id, product_id; WacomBusType bus; g_return_val_if_fail(device->paired == NULL, FALSE); if (!match_from_string(matchstr, &bus, &vendor_id, &product_id, &name)) { DBG("failed to match '%s' for product/vendor IDs. Ignoring.\n", matchstr); return FALSE; } device->paired = libwacom_match_new(name, bus, vendor_id, product_id); free(name); return TRUE; } static void libwacom_parse_stylus_keyfile(WacomDeviceDatabase *db, const char *path) { GKeyFile *keyfile; GError *error = NULL; char **groups; gboolean rc; guint i; keyfile = g_key_file_new(); rc = g_key_file_load_from_file(keyfile, path, G_KEY_FILE_NONE, &error); g_assert (rc); groups = g_key_file_get_groups (keyfile, NULL); for (i = 0; groups[i]; i++) { WacomStylus *stylus; GError *error = NULL; char *type; int id; char **string_list; id = strtol (groups[i], NULL, 16); if (id == 0) { g_warning ("Failed to parse stylus ID '%s'", groups[i]); continue; } stylus = g_new0 (WacomStylus, 1); stylus->refcnt = 1; stylus->id = id; stylus->name = g_key_file_get_string(keyfile, groups[i], "Name", NULL); stylus->group = g_key_file_get_string(keyfile, groups[i], "Group", NULL); stylus->is_eraser = g_key_file_get_boolean(keyfile, groups[i], "IsEraser", &error); if (error && error->code == G_KEY_FILE_ERROR_INVALID_VALUE) g_warning ("Stylus %s (%s) %s\n", stylus->name, groups[i], error->message); g_clear_error (&error); if (stylus->is_eraser == FALSE) { stylus->has_eraser = g_key_file_get_boolean(keyfile, groups[i], "HasEraser", &error); if (error && error->code == G_KEY_FILE_ERROR_INVALID_VALUE) g_warning ("Stylus %s (%s) %s\n", stylus->name, groups[i], error->message); g_clear_error (&error); stylus->has_lens = g_key_file_get_boolean(keyfile, groups[i], "HasLens", &error); if (error && error->code == G_KEY_FILE_ERROR_INVALID_VALUE) g_warning ("Stylus %s (%s) %s\n", stylus->name, groups[i], error->message); g_clear_error (&error); stylus->has_wheel = g_key_file_get_boolean(keyfile, groups[i], "HasWheel", &error); if (error && error->code == G_KEY_FILE_ERROR_INVALID_VALUE) g_warning ("Stylus %s (%s) %s\n", stylus->name, groups[i], error->message); g_clear_error (&error); } else { stylus->has_eraser = FALSE; stylus->has_lens = FALSE; stylus->has_wheel = FALSE; } stylus->num_buttons = g_key_file_get_integer(keyfile, groups[i], "Buttons", &error); if (stylus->num_buttons == 0 && error != NULL) { stylus->num_buttons = -1; g_clear_error (&error); } string_list = g_key_file_get_string_list (keyfile, groups[i], "Axes", NULL, NULL); if (string_list) { WacomAxisTypeFlags axes = WACOM_AXIS_TYPE_NONE; guint i; for (i = 0; string_list[i]; i++) { WacomAxisTypeFlags flag = WACOM_AXIS_TYPE_NONE; if (streq(string_list[i], "Tilt")) { flag = WACOM_AXIS_TYPE_TILT; } else if (streq(string_list[i], "RotationZ")) { flag = WACOM_AXIS_TYPE_ROTATION_Z; } else if (streq(string_list[i], "Distance")) { flag = WACOM_AXIS_TYPE_DISTANCE; } else if (streq(string_list[i], "Pressure")) { flag = WACOM_AXIS_TYPE_PRESSURE; } else if (streq(string_list[i], "Slider")) { flag = WACOM_AXIS_TYPE_SLIDER; } else { g_warning ("Invalid axis %s for stylus ID %s\n", string_list[i], groups[i]); } if (axes & flag) g_warning ("Duplicate axis %s for stylus ID %s\n", string_list[i], groups[i]); axes |= flag; } stylus->axes = axes; g_strfreev (string_list); } type = g_key_file_get_string(keyfile, groups[i], "Type", NULL); stylus->type = type_from_str (type); g_free (type); if (g_hash_table_lookup (db->stylus_ht, GINT_TO_POINTER (id)) != NULL) g_warning ("Duplicate definition for stylus ID '0x%x'", id); g_hash_table_insert (db->stylus_ht, GINT_TO_POINTER (id), stylus); } g_strfreev (groups); if (keyfile) g_key_file_free (keyfile); } struct { const char *key; WacomButtonFlags flag; } options[] = { { "Left", WACOM_BUTTON_POSITION_LEFT }, { "Right", WACOM_BUTTON_POSITION_RIGHT }, { "Top", WACOM_BUTTON_POSITION_TOP }, { "Bottom", WACOM_BUTTON_POSITION_BOTTOM }, { "Ring", WACOM_BUTTON_RING_MODESWITCH }, { "Ring2", WACOM_BUTTON_RING2_MODESWITCH }, { "Touchstrip", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH }, { "Touchstrip2", WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH }, { "OLEDs", WACOM_BUTTON_OLED } }; struct { const char *key; WacomStatusLEDs value; } supported_leds[] = { { "Ring", WACOM_STATUS_LED_RING }, { "Ring2", WACOM_STATUS_LED_RING2 }, { "Touchstrip", WACOM_STATUS_LED_TOUCHSTRIP }, { "Touchstrip2", WACOM_STATUS_LED_TOUCHSTRIP2 } }; struct { const char *key; WacomIntegrationFlags value; } integration_flags[] = { { "Display", WACOM_DEVICE_INTEGRATED_DISPLAY }, { "System", WACOM_DEVICE_INTEGRATED_SYSTEM } }; static void libwacom_parse_buttons_key(WacomDevice *device, GKeyFile *keyfile, const char *key, WacomButtonFlags flag) { guint i; char **vals; vals = g_key_file_get_string_list (keyfile, BUTTONS_GROUP, key, NULL, NULL); if (vals == NULL) return; for (i = 0; vals[i] != NULL; i++) { char val; val = *vals[i]; if (strlen (vals[i]) > 1 || val < 'A' || val > 'Z') { g_warning ("Ignoring value '%s' in key '%s'", vals[i], key); continue; } val -= 'A'; device->buttons[(int) val] |= flag; } g_strfreev (vals); } static inline bool set_button_codes_from_string(WacomDevice *device, char **strvals) { gint i; assert(strvals); for (i = 0; i < device->num_buttons; i++) { glong val; if (!strvals[i]) { g_error ("%s: Missing EvdevCode for button %d, ignoring all codes\n", device->name, i); return false; } val = strtol (strvals[i], NULL, 0); if (val < BTN_MISC || val >= BTN_DIGI) { g_warning ("%s: Invalid EvdevCode %ld for button %d, ignoring all codes\n", device->name, val, i); return false; } device->button_codes[i] = (int)val; } return true; } static inline void set_button_codes_from_heuristics(WacomDevice *device) { gint i; for (i = 0; i < device->num_buttons; i++) { if (device->cls == WCLASS_BAMBOO || device->cls == WCLASS_GRAPHIRE) { switch (i) { case 0: device->button_codes[i] = BTN_LEFT; break; case 1: device->button_codes[i] = BTN_RIGHT; break; case 2: device->button_codes[i] = BTN_FORWARD; break; case 3: device->button_codes[i] = BTN_BACK; break; default: device->button_codes[i] = 0; break; } } else { /* Assume traditional ExpressKey ordering */ switch (i) { case 0 ... 9: device->button_codes[i] = BTN_0 + i; break; case 10 ... 15: device->button_codes[i] = BTN_A + (i-10); break; case 16: case 17: device->button_codes[i] = BTN_BASE + (i-16); break; default: device->button_codes[i] = 0; break; } } if (device->button_codes[i] == 0) g_warning ("Unable to determine evdev code for button %d (%s)", i, device->name); } } static void libwacom_parse_button_codes(WacomDevice *device, GKeyFile *keyfile) { char **vals; vals = g_key_file_get_string_list(keyfile, BUTTONS_GROUP, "EvdevCodes", NULL, NULL); if (!vals || !set_button_codes_from_string(device, vals)) set_button_codes_from_heuristics(device); g_strfreev (vals); } static int libwacom_parse_num_modes (WacomDevice *device, GKeyFile *keyfile, const char *key, WacomButtonFlags flag) { int num; int i; num = g_key_file_get_integer (keyfile, BUTTONS_GROUP, key, NULL); if (num > 0) return num; for (i = 0; i < device->num_buttons; i++) { if (device->buttons[i] & flag) num++; } return num; } static void libwacom_parse_buttons(WacomDevice *device, GKeyFile *keyfile) { guint i; for (i = 0; i < G_N_ELEMENTS (options); i++) libwacom_parse_buttons_key(device, keyfile, options[i].key, options[i].flag); libwacom_parse_button_codes(device, keyfile); device->ring_num_modes = libwacom_parse_num_modes(device, keyfile, "RingNumModes", WACOM_BUTTON_RING_MODESWITCH); device->ring2_num_modes = libwacom_parse_num_modes(device, keyfile, "Ring2NumModes", WACOM_BUTTON_RING2_MODESWITCH); device->strips_num_modes = libwacom_parse_num_modes(device, keyfile, "StripsNumModes", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH); } static int styli_id_sort(gconstpointer pa, gconstpointer pb) { const int *a = pa, *b = pb; return *a > *b ? 1 : *a == *b ? 0 : -1; } static void libwacom_parse_styli_list(WacomDeviceDatabase *db, WacomDevice *device, char **ids) { GArray *array; guint i; array = g_array_new (FALSE, FALSE, sizeof(int)); device->num_styli = 0; for (i = 0; ids[i]; i++) { const char *id = ids[i]; if (strneq(id, "0x", 2)) { glong long_value = strtol (ids[i], NULL, 0); int int_value = long_value; g_array_append_val (array, int_value); device->num_styli++; } else if (strneq(id, "@", 1)) { const char *group = &id[1]; GHashTableIter iter; gpointer key, value; g_hash_table_iter_init(&iter, db->stylus_ht); while (g_hash_table_iter_next (&iter, &key, &value)) { WacomStylus *stylus = value; if (stylus->group && streq(group, stylus->group)) { g_array_append_val (array, stylus->id); device->num_styli++; } } } else { g_warning ("Invalid prefix for '%s'!", id); } } /* Using groups means we don't get the styli in ascending order. Sort it so the output is predictable */ g_array_sort(array, styli_id_sort); device->supported_styli = (int *) g_array_free (array, FALSE); } static WacomDevice* libwacom_parse_tablet_keyfile(WacomDeviceDatabase *db, const char *datadir, const char *filename) { WacomDevice *device = NULL; GKeyFile *keyfile; GError *error = NULL; gboolean rc; char *path; char *layout; char *class; char *paired; char **string_list; bool success = FALSE; keyfile = g_key_file_new(); path = g_build_filename (datadir, filename, NULL); rc = g_key_file_load_from_file(keyfile, path, G_KEY_FILE_NONE, &error); if (!rc) { DBG("%s: %s\n", path, error->message); goto out; } device = g_new0 (WacomDevice, 1); device->refcnt = 1; string_list = g_key_file_get_string_list(keyfile, DEVICE_GROUP, "DeviceMatch", NULL, NULL); if (!string_list) { DBG("Missing DeviceMatch= line in '%s'\n", path); goto out; } else { guint i; guint nmatches = 0; guint first_valid_match = 0; for (i = 0; string_list[i]; i++) { if (libwacom_matchstr_to_match (device, string_list[i])) nmatches++; if (nmatches == 1) first_valid_match = i; } if (nmatches == 0) { DBG("failed to match '%s' for product/vendor IDs in '%s'\n", string_list[i], path); g_strfreev (string_list); goto out; } if (nmatches > 1) { /* set default to first entry */ libwacom_matchstr_to_match(device, string_list[first_valid_match]); } g_strfreev (string_list); } paired = g_key_file_get_string(keyfile, DEVICE_GROUP, "PairedID", NULL); if (paired) { libwacom_matchstr_to_paired(device, paired); g_free(paired); } device->name = g_key_file_get_string(keyfile, DEVICE_GROUP, "Name", NULL); device->model_name = g_key_file_get_string(keyfile, DEVICE_GROUP, "ModelName", NULL); /* ModelName= would give us the empty string, let's make it NULL * instead */ if (device->model_name && strlen(device->model_name) == 0) { free(device->model_name); device->model_name = NULL; } device->width = g_key_file_get_integer(keyfile, DEVICE_GROUP, "Width", NULL); device->height = g_key_file_get_integer(keyfile, DEVICE_GROUP, "Height", NULL); device->integration_flags = WACOM_DEVICE_INTEGRATED_UNSET; string_list = g_key_file_get_string_list(keyfile, DEVICE_GROUP, "IntegratedIn", NULL, NULL); if (string_list) { guint i, n; gboolean found; device->integration_flags = WACOM_DEVICE_INTEGRATED_NONE; for (i = 0; string_list[i]; i++) { found = FALSE; for (n = 0; n < G_N_ELEMENTS (integration_flags); n++) { if (streq(string_list[i], integration_flags[n].key)) { device->integration_flags |= integration_flags[n].value; found = TRUE; break; } } if (!found) g_warning ("Unrecognized integration flag '%s'", string_list[i]); } g_strfreev (string_list); } layout = g_key_file_get_string(keyfile, DEVICE_GROUP, "Layout", NULL); if (layout) { /* For the layout, we store the full path to the SVG layout */ device->layout = g_build_filename (datadir, "layouts", layout, NULL); g_free (layout); } class = g_key_file_get_string(keyfile, DEVICE_GROUP, "Class", NULL); device->cls = libwacom_class_string_to_enum(class); g_free(class); string_list = g_key_file_get_string_list(keyfile, DEVICE_GROUP, "Styli", NULL, NULL); if (string_list) { libwacom_parse_styli_list(db, device, string_list); g_strfreev (string_list); } else { device->supported_styli = g_new (int, 2); device->supported_styli[0] = WACOM_ERASER_FALLBACK_ID; device->supported_styli[1] = WACOM_STYLUS_FALLBACK_ID; device->num_styli = 2; } /* Features */ if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Stylus", NULL)) device->features |= FEATURE_STYLUS; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Touch", NULL)) device->features |= FEATURE_TOUCH; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Ring", NULL)) device->features |= FEATURE_RING; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Ring2", NULL)) device->features |= FEATURE_RING2; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Reversible", NULL)) device->features |= FEATURE_REVERSIBLE; if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "TouchSwitch", NULL)) device->features |= FEATURE_TOUCHSWITCH; if (device->integration_flags != WACOM_DEVICE_INTEGRATED_UNSET && device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY && device->features & FEATURE_REVERSIBLE) g_warning ("Tablet '%s' is both reversible and integrated in screen. This is impossible", libwacom_get_match(device)); if (!(device->features & FEATURE_RING) && (device->features & FEATURE_RING2)) g_warning ("Tablet '%s' has Ring2 but no Ring. This is impossible", libwacom_get_match(device)); if (!(device->features & FEATURE_TOUCH) && (device->features & FEATURE_TOUCHSWITCH)) g_warning ("Tablet '%s' has touch switch but no touch tool. This is impossible", libwacom_get_match(device)); device->num_strips = g_key_file_get_integer(keyfile, FEATURES_GROUP, "NumStrips", NULL); device->num_buttons = g_key_file_get_integer(keyfile, FEATURES_GROUP, "Buttons", &error); if (device->num_buttons == 0 && g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND)) { g_warning ("Tablet '%s' has no buttons defined, do something!", libwacom_get_match(device)); g_clear_error (&error); } if (device->num_buttons > 0) { device->buttons = g_new0 (WacomButtonFlags, device->num_buttons); device->button_codes = g_new0 (gint, device->num_buttons); libwacom_parse_buttons(device, keyfile); } string_list = g_key_file_get_string_list(keyfile, FEATURES_GROUP, "StatusLEDs", NULL, NULL); if (string_list) { GArray *array; guint i, n; array = g_array_new (FALSE, FALSE, sizeof(WacomStatusLEDs)); device->num_leds = 0; for (i = 0; string_list[i]; i++) { for (n = 0; n < G_N_ELEMENTS (supported_leds); n++) { if (streq(string_list[i], supported_leds[n].key)) { g_array_append_val (array, supported_leds[n].value); device->num_leds++; break; } } } g_strfreev (string_list); device->status_leds = (WacomStatusLEDs *) g_array_free (array, FALSE); } success = TRUE; out: if (path) g_free(path); if (keyfile) g_key_file_free(keyfile); if (error) g_error_free(error); if (!success) device = libwacom_unref(device); return device; } static int scandir_tablet_filter(const struct dirent *entry) { const char *name = entry->d_name; int len, suffix_len; if (!name || name[0] == '.') return 0; len = strlen(name); suffix_len = strlen(TABLET_SUFFIX); if (len <= suffix_len) return 0; return streq(&name[len - suffix_len], TABLET_SUFFIX); } static int scandir_stylus_filter(const struct dirent *entry) { const char *name = entry->d_name; int len, suffix_len; if (!name || name[0] == '.') return 0; len = strlen(name); suffix_len = strlen(STYLUS_SUFFIX); if (len <= suffix_len) return 0; return streq(&name[len - suffix_len], STYLUS_SUFFIX); } static bool load_tablet_files(WacomDeviceDatabase *db, const char *datadir) { int n, nfiles; struct dirent **files; bool success = false; db->device_ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) libwacom_destroy); n = scandir(datadir, &files, scandir_tablet_filter, alphasort); if (n <= 0) return false; nfiles = n; while(n--) { WacomDevice *d; const WacomMatch **matches, **match; d = libwacom_parse_tablet_keyfile(db, datadir, files[n]->d_name); if (!d) continue; matches = libwacom_get_matches(d); if (!matches || !*matches) { g_critical("Device '%s' has no matches defined\n", libwacom_get_name(d)); libwacom_destroy(d); goto out; } for (match = matches; *match; match++) { const char *matchstr; matchstr = libwacom_match_get_match_string(*match); /* no duplicate matches allowed */ if (g_hash_table_lookup(db->device_ht, matchstr) != NULL) { g_critical("Duplicate match of '%s' on device '%s'.", matchstr, libwacom_get_name(d)); goto out; } g_hash_table_insert (db->device_ht, g_strdup (matchstr), d); libwacom_ref(d); } libwacom_unref(d); } if (g_hash_table_size (db->device_ht) == 0) goto out; success = true; out: while(nfiles--) free(files[nfiles]); free(files); return success; } static void stylus_destroy(void *data) { libwacom_stylus_unref((WacomStylus*)data); } static bool load_stylus_files(WacomDeviceDatabase *db, const char *datadir) { int n, nfiles; struct dirent **files; bool success = false; n = scandir(datadir, &files, scandir_stylus_filter, alphasort); if (n <= 0) return false; db->stylus_ht = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) stylus_destroy); nfiles = n; while(n--) { char *path; path = g_build_filename (datadir, files[n]->d_name, NULL); libwacom_parse_stylus_keyfile(db, path); g_free(path); } /* If we couldn't load _anything_ then something's wrong */ if (g_hash_table_size (db->stylus_ht) == 0) goto end; success = true; end: while(nfiles--) free(files[nfiles]); free(files); return success; } LIBWACOM_EXPORT WacomDeviceDatabase * libwacom_database_new_for_path (const char *datadir) { WacomDeviceDatabase *db; db = g_new0 (WacomDeviceDatabase, 1); if (!load_stylus_files(db, datadir) || !load_tablet_files(db, datadir)) { libwacom_database_destroy(db); db = NULL; } return db; } LIBWACOM_EXPORT WacomDeviceDatabase * libwacom_database_new (void) { return libwacom_database_new_for_path (DATADIR); } LIBWACOM_EXPORT void libwacom_database_destroy(WacomDeviceDatabase *db) { if (db->device_ht) g_hash_table_destroy(db->device_ht); if (db->stylus_ht) g_hash_table_destroy(db->stylus_ht); g_free (db); } static gint device_compare(gconstpointer pa, gconstpointer pb) { const WacomDevice *a = pa, *b = pb; int cmp; cmp = libwacom_get_vendor_id(a) - libwacom_get_vendor_id(b); if (cmp == 0) cmp = libwacom_get_product_id(a) - libwacom_get_product_id(b); return cmp; } LIBWACOM_EXPORT WacomDevice** libwacom_list_devices_from_database(const WacomDeviceDatabase *db, WacomError *error) { GList *cur, *devices; WacomDevice **list, **p; if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } devices = g_hash_table_get_values (db->device_ht); list = calloc (g_list_length (devices) + 1, sizeof (WacomDevice *)); if (!list) { libwacom_error_set(error, WERROR_BAD_ALLOC, "Memory allocation failed"); g_list_free (devices); return NULL; } devices = g_list_sort (devices, device_compare); for (p = list, cur = devices; cur; cur = g_list_next (cur)) *p++ = (WacomDevice *) cur->data; g_list_free (devices); return list; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/libwacom/libwacom-deprecated.c000066400000000000000000000057631363647401700226270ustar00rootroot00000000000000/* * Copyright © 2019 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define _GNU_SOURCE #include #include /* Deprecated symbols. Up to including libwacom 0.33, these symbols ended up * in the public ABI.But not the API, the declarations were always in an * internal header only. * * All of these have no use for the caller and in some cases only serve to * corrupt memory if the caller actually invokes them. There aren't any * legitimate users out there, but let's be safe anyway. For backwards * compatibility, we create noop functions for those and alias * them to the previously exposed public symbols. * * If the soname is ever bumped for an incompatible change, we can remove * all these. */ #define LIBWACOM_EXPORT __attribute__ ((visibility("default"))) void _match_destroy(WacomMatch *match); WacomMatch* _match_new(const char *name, WacomBusType bus, int vendor_id, int product_id); void _error_set(WacomError *error, enum WacomErrorCode code, const char *msg, ...); void _stylus_destroy(WacomStylus *stylus); void _update_match(WacomDevice *device, const WacomMatch *match); LIBWACOM_EXPORT void _match_destroy(WacomMatch *match) { } asm(".symver _match_destroy,libwacom_match_destroy@LIBWACOM_0.33"); LIBWACOM_EXPORT WacomMatch* _match_new(const char *name, WacomBusType bus, int vendor_id, int product_id) { return NULL; } asm(".symver _match_new,libwacom_match_new@LIBWACOM_0.33"); LIBWACOM_EXPORT void _error_set(WacomError *error, enum WacomErrorCode code, const char *msg, ...) { } asm(".symver _error_set,libwacom_error_set@LIBWACOM_0.33"); LIBWACOM_EXPORT void _stylus_destroy(WacomStylus *stylus) { } asm(".symver _stylus_destroy,libwacom_stylus_destroy@LIBWACOM_0.33"); LIBWACOM_EXPORT void _update_match(WacomDevice *device, const WacomMatch *newmatch) { } asm(".symver _update_match,libwacom_update_match@LIBWACOM_0.33"); libwacom-libwacom-1.3/libwacom/libwacom-error.c000066400000000000000000000042541363647401700216520ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define _GNU_SOURCE #include "libwacomint.h" #include #include #include LIBWACOM_EXPORT WacomError* libwacom_error_new(void) { WacomError *error = malloc(sizeof(*error)); error->code = WERROR_NONE; error->msg = NULL; return error; } LIBWACOM_EXPORT void libwacom_error_free(WacomError **error) { free((*error)->msg); free(*error); *error = NULL; } LIBWACOM_EXPORT enum WacomErrorCode libwacom_error_get_code(WacomError *error) { return error->code; } LIBWACOM_EXPORT const char* libwacom_error_get_message(WacomError *error) { return error->msg; } __attribute__ ((format (printf, 3, 4))) void libwacom_error_set(WacomError *error, enum WacomErrorCode code, const char *msg, ...) { if (!error) return; error->code = code; if (msg) { va_list ap; va_start(ap, msg); if (vasprintf(&error->msg, msg, ap) == -1) error->msg = NULL; va_end(ap); } } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/libwacom/libwacom.c000066400000000000000000001037651363647401700205320ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "libwacomint.h" #include #include #include #include #include #include #include static const WacomDevice * libwacom_get_device(const WacomDeviceDatabase *db, const char *match) { return (WacomDevice *) g_hash_table_lookup (db->device_ht, match); } static gboolean is_tablet (GUdevDevice *device) { return g_udev_device_get_property_as_boolean (device, "ID_INPUT_TABLET"); } static gboolean is_touchpad (GUdevDevice *device) { return g_udev_device_get_property_as_boolean (device, "ID_INPUT_TOUCHPAD"); } static gboolean is_tablet_or_touchpad (GUdevDevice *device) { return is_touchpad (device) || is_tablet (device); } /* Overriding SUBSYSTEM isn't allowed in udev (works sometimes, but not * always). For evemu devices we need to set custom properties to make them * detected by libwacom. */ static char * get_uinput_subsystem (GUdevDevice *device) { const char *bus_str; GUdevDevice *parent; bus_str = NULL; parent = g_object_ref (device); while (parent && !g_udev_device_get_property_as_boolean (parent, "UINPUT_DEVICE")) { GUdevDevice *old_parent = parent; parent = g_udev_device_get_parent (old_parent); g_object_unref (old_parent); } if (parent) { bus_str = g_udev_device_get_property (parent, "UINPUT_SUBSYSTEM"); g_object_unref (parent); } return bus_str ? g_strdup (bus_str) : NULL; } static gboolean get_bus_vid_pid (GUdevDevice *device, WacomBusType *bus, int *vendor_id, int *product_id, WacomError *error) { GUdevDevice *parent; const char *product_str; gchar **splitted_product = NULL; unsigned int bus_id; gboolean retval = FALSE; /* Parse that: * E: PRODUCT=5/56a/81/100 * into: * vendor 0x56a * product 0x81 */ parent = g_object_ref (device); product_str = g_udev_device_get_property (device, "PRODUCT"); while (!product_str && parent) { GUdevDevice *old_parent = parent; parent = g_udev_device_get_parent (old_parent); if (parent) product_str = g_udev_device_get_property (parent, "PRODUCT"); g_object_unref (old_parent); } if (!product_str) /* PRODUCT not found, hoping the old method will work */ goto out; splitted_product = g_strsplit (product_str, "/", 4); if (g_strv_length (splitted_product) != 4) { libwacom_error_set(error, WERROR_UNKNOWN_MODEL, "Unable to parse model identification"); goto out; } bus_id = (int)strtoul (splitted_product[0], NULL, 16); *vendor_id = (int)strtol (splitted_product[1], NULL, 16); *product_id = (int)strtol (splitted_product[2], NULL, 16); switch (bus_id) { case 3: *bus = WBUSTYPE_USB; retval = TRUE; break; case 5: *bus = WBUSTYPE_BLUETOOTH; retval = TRUE; break; case 24: *bus = WBUSTYPE_I2C; retval = TRUE; break; } out: if (splitted_product) g_strfreev (splitted_product); if (parent) g_object_unref (parent); return retval; } static char * get_bus (GUdevDevice *device) { const char *subsystem; char *bus_str; GUdevDevice *parent; bus_str = get_uinput_subsystem (device); if (bus_str) return bus_str; subsystem = g_udev_device_get_subsystem (device); parent = g_object_ref (device); while (parent && subsystem && (streq(subsystem, "input") || streq (subsystem, "hid"))) { GUdevDevice *old_parent = parent; parent = g_udev_device_get_parent (old_parent); if (parent) subsystem = g_udev_device_get_subsystem (parent); g_object_unref (old_parent); } if (parent) { if (subsystem && (streq(subsystem, "tty") || streq(subsystem, "serio"))) bus_str = g_strdup ("serial"); else bus_str = g_strdup (subsystem); g_object_unref (parent); } else bus_str = strdup("unknown"); return bus_str; } static gboolean get_device_info (const char *path, int *vendor_id, int *product_id, char **name, WacomBusType *bus, WacomIntegrationFlags *integration_flags, WacomError *error) { GUdevClient *client; GUdevDevice *device; const char * const subsystems[] = { "input", NULL }; gboolean retval; char *bus_str; const char *devname; #if NEED_G_TYPE_INIT g_type_init(); #endif retval = FALSE; /* The integration flags from device info are unset by default */ *integration_flags = WACOM_DEVICE_INTEGRATED_UNSET; *name = NULL; bus_str = NULL; client = g_udev_client_new (subsystems); device = g_udev_client_query_by_device_file (client, path); if (device == NULL) { libwacom_error_set(error, WERROR_INVALID_PATH, "Could not find device '%s' in udev", path); goto out; } /* Touchpads are only for the "Finger" part of Bamboo devices */ if (!is_tablet_or_touchpad(device)) { GUdevDevice *parent; parent = g_udev_device_get_parent(device); if (!parent || !is_tablet_or_touchpad(parent)) { libwacom_error_set(error, WERROR_INVALID_PATH, "Device '%s' is not a tablet", path); g_object_unref (parent); goto out; } g_object_unref (parent); } /* Is the device integrated in display? */ devname = g_udev_device_get_name (device); if (devname != NULL) { char *sysfs_path, *contents; sysfs_path = g_build_filename ("/sys/class/input", devname, "device/properties", NULL); if (g_file_get_contents (sysfs_path, &contents, NULL, NULL)) { int flag; flag = atoi(contents); flag &= (1 << INPUT_PROP_DIRECT) | (1 << INPUT_PROP_POINTER); /* * To ensure we are dealing with a screen tablet, need * to check that it has DIRECT and non-POINTER (DIRECT * alone is not sufficient since it's set for drawing * tablets as well) */ if (flag == (1 << INPUT_PROP_DIRECT)) *integration_flags = WACOM_DEVICE_INTEGRATED_DISPLAY; else *integration_flags = WACOM_DEVICE_INTEGRATED_NONE; g_free (contents); } g_free (sysfs_path); } *name = g_strdup (g_udev_device_get_sysfs_attr (device, "name")); /* Try getting the name from the parent if that fails */ if (*name == NULL) { GUdevDevice *parent; parent = g_udev_device_get_parent (device); if (!parent) goto out; *name = g_strdup (g_udev_device_get_sysfs_attr (parent, "name")); g_object_unref (parent); } /* Parse the PRODUCT attribute (for Bluetooth, USB, I2C) */ retval = get_bus_vid_pid (device, bus, vendor_id, product_id, error); if (retval) goto out; bus_str = get_bus (device); *bus = bus_from_str (bus_str); if (*bus == WBUSTYPE_SERIAL) { if (is_touchpad (device)) goto out; /* The serial bus uses 0:0 as the vid/pid */ *vendor_id = 0; *product_id = 0; retval = TRUE; } else { libwacom_error_set(error, WERROR_UNKNOWN_MODEL, "Unsupported bus '%s'", bus_str); } out: if (bus_str != NULL) g_free (bus_str); if (retval == FALSE) g_free (*name); if (device != NULL) g_object_unref (device); if (client != NULL) g_object_unref (client); return retval; } static WacomDevice * libwacom_copy(const WacomDevice *device) { WacomDevice *d; int i; d = g_new0 (WacomDevice, 1); g_atomic_int_inc(&d->refcnt); d->name = g_strdup (device->name); d->model_name = g_strdup (device->model_name); d->width = device->width; d->height = device->height; d->integration_flags = device->integration_flags; d->layout = g_strdup(device->layout); d->nmatches = device->nmatches; d->matches = g_malloc((d->nmatches + 1) * sizeof(WacomMatch*)); for (i = 0; i < d->nmatches; i++) d->matches[i] = libwacom_match_ref(device->matches[i]); d->matches[d->nmatches] = NULL; d->match = device->match; if (device->paired) d->paired = libwacom_match_ref(device->paired); d->cls = device->cls; d->num_strips = device->num_strips; d->features = device->features; d->strips_num_modes = device->strips_num_modes; d->ring_num_modes = device->ring_num_modes; d->ring2_num_modes = device->ring2_num_modes; d->num_styli = device->num_styli; d->supported_styli = g_memdup (device->supported_styli, sizeof(int) * device->num_styli); d->num_leds = device->num_leds; d->status_leds = g_memdup (device->status_leds, sizeof(WacomStatusLEDs) * device->num_leds); d->num_buttons = device->num_buttons; d->buttons = g_memdup (device->buttons, sizeof(WacomButtonFlags) * device->num_buttons); d->button_codes = g_memdup (device->button_codes, sizeof(int) * device->num_buttons); return d; } static int compare_matches(const WacomDevice *a, const WacomDevice *b) { const WacomMatch **ma, **mb, **match_a, **match_b; ma = libwacom_get_matches(a); mb = libwacom_get_matches(b); for (match_a = ma; *match_a; match_a++) { int found = 0; for (match_b = mb; !found && *match_b; match_b++) { if (streq((*match_a)->match, (*match_b)->match)) found = 1; } if (!found) return 1; } return 0; } /* Compare layouts based on file name, stripping the full path */ static gboolean libwacom_same_layouts (const WacomDevice *a, const WacomDevice *b) { gchar *file1, *file2; gboolean rc; /* Conveniently handle the null case */ if (a->layout == b->layout) return TRUE; file1 = NULL; file2 = NULL; if (a->layout != NULL) file1 = g_path_get_basename (a->layout); if (b->layout != NULL) file2 = g_path_get_basename (b->layout); rc = (g_strcmp0 (file1, file2) == 0); g_free (file1); g_free (file2); return rc; } LIBWACOM_EXPORT int libwacom_compare(const WacomDevice *a, const WacomDevice *b, WacomCompareFlags flags) { g_return_val_if_fail(a || b, 0); if (!a || !b) return 1; if (!streq(a->name, b->name)) return 1; if (a->width != b->width || a->height != b->height) return 1; if (!libwacom_same_layouts (a, b)) return 1; if (a->integration_flags != b->integration_flags) return 1; if (a->cls != b->cls) return 1; if (a->num_strips != b->num_strips) return 1; if (a->features != b->features) return 1; if (a->strips_num_modes != b->strips_num_modes) return 1; if (a->ring_num_modes != b->ring_num_modes) return 1; if (a->ring2_num_modes != b->ring2_num_modes) return 1; if (a->num_buttons != b->num_buttons) return 1; if (a->num_styli != b->num_styli) return 1; if (memcmp(a->supported_styli, b->supported_styli, sizeof(int) * a->num_styli) != 0) return 1; if (a->num_leds != b->num_leds) return 1; if (memcmp(a->status_leds, b->status_leds, sizeof(WacomStatusLEDs) * a->num_leds) != 0) return 1; if (memcmp(a->buttons, b->buttons, sizeof(WacomButtonFlags) * a->num_buttons) != 0) return 1; if (memcmp(a->button_codes, b->button_codes, sizeof(int) * a->num_buttons) != 0) return 1; if ((a->paired == NULL && b->paired != NULL) || (a->paired != NULL && b->paired == NULL) || (a->paired && b->paired && !streq(a->paired->match, b->paired->match))) return 1; if ((flags & WCOMPARE_MATCHES) && compare_matches(a, b) != 0) return 1; else if (!streq(a->matches[a->match]->match, b->matches[b->match]->match)) return 1; return 0; } static const WacomDevice * libwacom_new (const WacomDeviceDatabase *db, const char *name, int vendor_id, int product_id, WacomBusType bus, WacomError *error) { const WacomDevice *device; char *match; if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } match = make_match_string(name, bus, vendor_id, product_id); device = libwacom_get_device(db, match); g_free (match); return device; } LIBWACOM_EXPORT WacomDevice* libwacom_new_from_path(const WacomDeviceDatabase *db, const char *path, WacomFallbackFlags fallback, WacomError *error) { int vendor_id, product_id; WacomBusType bus; const WacomDevice *device; WacomDevice *ret = NULL; WacomIntegrationFlags integration_flags; char *name, *match_name; WacomMatch *match; switch (fallback) { case WFALLBACK_NONE: case WFALLBACK_GENERIC: break; default: libwacom_error_set(error, WERROR_BUG_CALLER, "invalid fallback flags"); return NULL; } if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } if (!path) { libwacom_error_set(error, WERROR_INVALID_PATH, "path is NULL"); return NULL; } if (!get_device_info (path, &vendor_id, &product_id, &name, &bus, &integration_flags, error)) return NULL; match_name = name; device = libwacom_new (db, match_name, vendor_id, product_id, bus, error); if (device == NULL) { match_name = NULL; device = libwacom_new (db, match_name, vendor_id, product_id, bus, error); } if (device != NULL) ret = libwacom_copy(device); else if (fallback == WFALLBACK_NONE) goto bail; if (device == NULL && fallback == WFALLBACK_GENERIC) { device = libwacom_get_device(db, "generic"); if (device == NULL) goto bail; ret = libwacom_copy(device); if (name != NULL) { g_free (ret->name); ret->name = g_strdup(name); } } /* for multiple-match devices, set to the one we requested */ match = libwacom_match_new(match_name, bus, vendor_id, product_id); libwacom_add_match(ret, match); libwacom_match_unref(match); if (device) { /* if unset, use the kernel flags. Could be unset as well. */ if (ret->integration_flags == WACOM_DEVICE_INTEGRATED_UNSET) ret->integration_flags = integration_flags; g_free (name); return ret; } bail: g_free (name); libwacom_error_set(error, WERROR_UNKNOWN_MODEL, NULL); return NULL; } LIBWACOM_EXPORT WacomDevice* libwacom_new_from_usbid(const WacomDeviceDatabase *db, int vendor_id, int product_id, WacomError *error) { const WacomDevice *device; if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } device = libwacom_new(db, NULL, vendor_id, product_id, WBUSTYPE_USB, error); if (device) return libwacom_copy(device); libwacom_error_set(error, WERROR_UNKNOWN_MODEL, NULL); return NULL; } LIBWACOM_EXPORT WacomDevice* libwacom_new_from_name(const WacomDeviceDatabase *db, const char *name, WacomError *error) { const WacomDevice *device; GList *keys, *l; if (!db) { libwacom_error_set(error, WERROR_INVALID_DB, "db is NULL"); return NULL; } g_return_val_if_fail(name != NULL, NULL); device = NULL; keys = g_hash_table_get_values (db->device_ht); for (l = keys; l; l = l->next) { WacomDevice *d = l->data; if (streq(d->name, name)) { device = d; break; } } g_list_free (keys); if (device) return libwacom_copy(device); libwacom_error_set(error, WERROR_UNKNOWN_MODEL, NULL); return NULL; } static void print_styli_for_device (int fd, const WacomDevice *device) { int nstyli; const int *styli; int i; unsigned idx = 0; char buf[1024] = {0}; if (!libwacom_has_stylus(device)) return; styli = libwacom_get_supported_styli(device, &nstyli); for (i = 0; i < nstyli; i++) { /* 20 digits for a stylus are enough, right */ assert(idx < sizeof(buf) - 20); idx += snprintf(buf + idx, 20, "%#x;", styli[i]); } dprintf(fd, "Styli=%s\n", buf); } static void print_layout_for_device (int fd, const WacomDevice *device) { const char *layout_filename; gchar *base_name; layout_filename = libwacom_get_layout_filename(device); if (layout_filename) { base_name = g_path_get_basename (layout_filename); dprintf(fd, "Layout=%s\n", base_name); g_free (base_name); } } static void print_supported_leds (int fd, const WacomDevice *device) { char *leds_name[] = { "Ring;", "Ring2;", "Touchstrip;", "Touchstrip2;" }; int num_leds; const WacomStatusLEDs *status_leds; char buf[256] = {0}; bool have_led = false; status_leds = libwacom_get_status_leds(device, &num_leds); snprintf(buf, sizeof(buf), "%s%s%s%s", num_leds > 0 ? leds_name[status_leds[0]] : "", num_leds > 1 ? leds_name[status_leds[1]] : "", num_leds > 2 ? leds_name[status_leds[2]] : "", num_leds > 3 ? leds_name[status_leds[3]] : ""); have_led = num_leds > 0; dprintf(fd, "%sStatusLEDs=%s\n", have_led ? "" : "# ", buf); } static void print_button_flag_if(int fd, const WacomDevice *device, const char *label, int flag) { int nbuttons = libwacom_get_num_buttons(device); char buf[nbuttons * 2 + 1]; int idx = 0; char b; bool have_flag = false; for (b = 'A'; b < 'A' + nbuttons; b++) { if (libwacom_get_button_flag(device, b) & flag) { buf[idx++] = b; buf[idx++] = ';'; have_flag = true; } } buf[idx] = '\0'; dprintf(fd, "%s%s=%s\n", have_flag ? "" : "# ", label, buf); } static void print_button_evdev_codes(int fd, const WacomDevice *device) { int nbuttons = libwacom_get_num_buttons(device); char b; char buf[1024] = {0}; unsigned idx = 0; for (b = 'A'; b < 'A' + nbuttons; b++) { assert(idx < sizeof(buf) - 30); idx += snprintf(buf + idx, 30, "0x%x;", libwacom_get_button_evdev_code(device, b)); } dprintf(fd, "EvdevCodes=%s\n", buf); } static void print_buttons_for_device (int fd, const WacomDevice *device) { int nbuttons = libwacom_get_num_buttons(device); if (nbuttons == 0) return; dprintf(fd, "[Buttons]\n"); print_button_flag_if(fd, device, "Left", WACOM_BUTTON_POSITION_LEFT); print_button_flag_if(fd, device, "Right", WACOM_BUTTON_POSITION_RIGHT); print_button_flag_if(fd, device, "Top", WACOM_BUTTON_POSITION_TOP); print_button_flag_if(fd, device, "Bottom", WACOM_BUTTON_POSITION_BOTTOM); print_button_flag_if(fd, device, "Touchstrip", WACOM_BUTTON_TOUCHSTRIP_MODESWITCH); print_button_flag_if(fd, device, "Touchstrip2", WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH); print_button_flag_if(fd, device, "OLEDs", WACOM_BUTTON_OLED); print_button_flag_if(fd, device, "Ring", WACOM_BUTTON_RING_MODESWITCH); print_button_flag_if(fd, device, "Ring2", WACOM_BUTTON_RING2_MODESWITCH); print_button_evdev_codes(fd, device); dprintf(fd, "RingNumModes=%d\n", libwacom_get_ring_num_modes(device)); dprintf(fd, "Ring2NumModes=%d\n", libwacom_get_ring2_num_modes(device)); dprintf(fd, "StripsNumModes=%d\n", libwacom_get_strips_num_modes(device)); dprintf(fd, "\n"); } static void print_integrated_flags_for_device (int fd, const WacomDevice *device) { /* * If flag is WACOM_DEVICE_INTEGRATED_UNSET, the info is not provided * by the tablet database but deduced otherwise (e.g. from sysfs device * properties on Linux) */ if (device->integration_flags == WACOM_DEVICE_INTEGRATED_UNSET) return; dprintf(fd, "IntegratedIn="); if (device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY) dprintf(fd, "Display;"); if (device->integration_flags & WACOM_DEVICE_INTEGRATED_SYSTEM) dprintf(fd, "System;"); dprintf(fd, "\n"); } static void print_match(int fd, const WacomMatch *match) { const char *name = libwacom_match_get_name(match); WacomBusType type = libwacom_match_get_bustype(match); int vendor = libwacom_match_get_vendor_id(match); int product = libwacom_match_get_product_id(match); const char *bus_name; switch(type) { case WBUSTYPE_BLUETOOTH: bus_name = "bluetooth"; break; case WBUSTYPE_USB: bus_name = "usb"; break; case WBUSTYPE_SERIAL: bus_name = "serial"; break; case WBUSTYPE_I2C: bus_name = "i2c"; break; case WBUSTYPE_UNKNOWN: bus_name = "unknown"; break; default: g_assert_not_reached(); break; } dprintf(fd, "%s:%04x:%04x", bus_name, vendor, product); if (name) dprintf(fd, ":%s", name); dprintf(fd, ";"); } LIBWACOM_EXPORT void libwacom_print_device_description(int fd, const WacomDevice *device) { const WacomMatch **match; WacomClass class; const char *class_name; class = libwacom_get_class(device); switch(class) { case WCLASS_UNKNOWN: class_name = "Unknown"; break; case WCLASS_INTUOS3: class_name = "Intuos3"; break; case WCLASS_INTUOS4: class_name = "Intuos4"; break; case WCLASS_INTUOS5: class_name = "Intuos5"; break; case WCLASS_CINTIQ: class_name = "Cintiq"; break; case WCLASS_BAMBOO: class_name = "Bamboo"; break; case WCLASS_GRAPHIRE: class_name = "Graphire";break; case WCLASS_ISDV4: class_name = "ISDV4"; break; case WCLASS_INTUOS: class_name = "Intuos"; break; case WCLASS_INTUOS2: class_name = "Intuos2"; break; case WCLASS_PEN_DISPLAYS: class_name = "PenDisplay"; break; case WCLASS_REMOTE: class_name = "Remote"; break; default: g_assert_not_reached(); break; } dprintf(fd, "[Device]\n"); dprintf(fd, "Name=%s\n", libwacom_get_name(device)); dprintf(fd, "ModelName=%s\n", libwacom_get_model_name(device) ? libwacom_get_model_name(device) : ""); dprintf(fd, "DeviceMatch="); for (match = libwacom_get_matches(device); *match; match++) print_match(fd, *match); dprintf(fd, "\n"); if (libwacom_get_paired_device(device)) { dprintf(fd, "PairedID="); print_match(fd, libwacom_get_paired_device(device)); dprintf(fd, "\n"); } dprintf(fd, "Class=%s\n", class_name); dprintf(fd, "Width=%d\n", libwacom_get_width(device)); dprintf(fd, "Height=%d\n", libwacom_get_height(device)); print_integrated_flags_for_device(fd, device); print_layout_for_device(fd, device); print_styli_for_device(fd, device); dprintf(fd, "\n"); dprintf(fd, "[Features]\n"); dprintf(fd, "Reversible=%s\n", libwacom_is_reversible(device) ? "true" : "false"); dprintf(fd, "Stylus=%s\n", libwacom_has_stylus(device) ? "true" : "false"); dprintf(fd, "Ring=%s\n", libwacom_has_ring(device) ? "true" : "false"); dprintf(fd, "Ring2=%s\n", libwacom_has_ring2(device) ? "true" : "false"); dprintf(fd, "Touch=%s\n", libwacom_has_touch(device) ? "true" : "false"); dprintf(fd, "TouchSwitch=%s\n", libwacom_has_touchswitch(device)? "true" : "false"); print_supported_leds(fd, device); dprintf(fd, "NumStrips=%d\n", libwacom_get_num_strips(device)); dprintf(fd, "Buttons=%d\n", libwacom_get_num_buttons(device)); dprintf(fd, "\n"); print_buttons_for_device(fd, device); } WacomDevice * libwacom_ref(WacomDevice *device) { assert(device->refcnt >= 1); g_atomic_int_inc(&device->refcnt); return device; } WacomDevice * libwacom_unref(WacomDevice *device) { int i; if (device == NULL) return NULL; assert(device->refcnt >= 1); if (!g_atomic_int_dec_and_test(&device->refcnt)) return NULL; g_free (device->name); g_free (device->model_name); g_free (device->layout); if (device->paired) libwacom_match_unref(device->paired); for (i = 0; i < device->nmatches; i++) libwacom_match_unref(device->matches[i]); g_free (device->matches); g_free (device->supported_styli); g_free (device->status_leds); g_free (device->buttons); g_free (device->button_codes); g_free (device); return NULL; } LIBWACOM_EXPORT void libwacom_destroy(WacomDevice *device) { libwacom_unref(device); } WacomMatch* libwacom_match_ref(WacomMatch *match) { g_atomic_int_inc(&match->refcnt); return match; } WacomMatch* libwacom_match_unref(WacomMatch *match) { if (!g_atomic_int_dec_and_test(&match->refcnt)) return NULL; g_free (match->match); g_free (match->name); g_free (match); return NULL; } WacomMatch* libwacom_match_new(const char *name, WacomBusType bus, int vendor_id, int product_id) { WacomMatch *match; char *newmatch; match = g_malloc(sizeof(*match)); match->refcnt = 1; if (name == NULL && bus == WBUSTYPE_UNKNOWN && vendor_id == 0 && product_id == 0) newmatch = g_strdup("generic"); else newmatch = make_match_string(name, bus, vendor_id, product_id); match->match = newmatch; match->name = g_strdup(name); match->bus = bus; match->vendor_id = vendor_id; match->product_id = product_id; return match; } void libwacom_add_match(WacomDevice *device, WacomMatch *newmatch) { int i; for (i = 0; i < device->nmatches; i++) { const char *matchstr = libwacom_match_get_match_string(device->matches[i]); if (streq(matchstr, newmatch->match)) { device->match = i; return; } } device->nmatches++; device->matches = g_realloc_n(device->matches, device->nmatches + 1, sizeof(WacomMatch*)); device->matches[device->nmatches] = NULL; device->matches[device->nmatches - 1] = libwacom_match_ref(newmatch); device->match = device->nmatches - 1; } LIBWACOM_EXPORT int libwacom_get_vendor_id(const WacomDevice *device) { g_return_val_if_fail(device->match >= 0, -1); g_return_val_if_fail(device->match < device->nmatches, -1); return device->matches[device->match]->vendor_id; } LIBWACOM_EXPORT const char* libwacom_get_name(const WacomDevice *device) { return device->name; } LIBWACOM_EXPORT const char* libwacom_get_model_name(const WacomDevice *device) { return device->model_name; } LIBWACOM_EXPORT const char* libwacom_get_layout_filename(const WacomDevice *device) { return device->layout; } LIBWACOM_EXPORT int libwacom_get_product_id(const WacomDevice *device) { g_return_val_if_fail(device->match >= 0, -1); g_return_val_if_fail(device->match < device->nmatches, -1); return device->matches[device->match]->product_id; } LIBWACOM_EXPORT const char* libwacom_get_match(const WacomDevice *device) { g_return_val_if_fail(device->match >= 0, NULL); g_return_val_if_fail(device->match < device->nmatches, NULL); return device->matches[device->match]->match; } LIBWACOM_EXPORT const WacomMatch** libwacom_get_matches(const WacomDevice *device) { return (const WacomMatch**)device->matches; } LIBWACOM_EXPORT const WacomMatch* libwacom_get_paired_device(const WacomDevice *device) { return (const WacomMatch*)device->paired; } LIBWACOM_EXPORT int libwacom_get_width(const WacomDevice *device) { return device->width; } LIBWACOM_EXPORT int libwacom_get_height(const WacomDevice *device) { return device->height; } LIBWACOM_EXPORT WacomClass libwacom_get_class(const WacomDevice *device) { return device->cls; } LIBWACOM_EXPORT int libwacom_has_stylus(const WacomDevice *device) { return !!(device->features & FEATURE_STYLUS); } LIBWACOM_EXPORT int libwacom_has_touch(const WacomDevice *device) { return !!(device->features & FEATURE_TOUCH); } LIBWACOM_EXPORT int libwacom_get_num_buttons(const WacomDevice *device) { return device->num_buttons; } LIBWACOM_EXPORT const int * libwacom_get_supported_styli(const WacomDevice *device, int *num_styli) { *num_styli = device->num_styli; return device->supported_styli; } LIBWACOM_EXPORT int libwacom_has_ring(const WacomDevice *device) { return !!(device->features & FEATURE_RING); } LIBWACOM_EXPORT int libwacom_has_ring2(const WacomDevice *device) { return !!(device->features & FEATURE_RING2); } LIBWACOM_EXPORT int libwacom_get_ring_num_modes(const WacomDevice *device) { return device->ring_num_modes; } LIBWACOM_EXPORT int libwacom_get_ring2_num_modes(const WacomDevice *device) { return device->ring2_num_modes; } LIBWACOM_EXPORT int libwacom_get_num_strips(const WacomDevice *device) { return device->num_strips; } LIBWACOM_EXPORT int libwacom_get_strips_num_modes(const WacomDevice *device) { return device->strips_num_modes; } LIBWACOM_EXPORT const WacomStatusLEDs * libwacom_get_status_leds(const WacomDevice *device, int *num_leds) { *num_leds = device->num_leds; return device->status_leds; } struct { WacomButtonFlags button_flags; WacomStatusLEDs status_leds; } button_status_leds[] = { { WACOM_BUTTON_RING_MODESWITCH, WACOM_STATUS_LED_RING }, { WACOM_BUTTON_RING2_MODESWITCH, WACOM_STATUS_LED_RING2 }, { WACOM_BUTTON_TOUCHSTRIP_MODESWITCH, WACOM_STATUS_LED_TOUCHSTRIP }, { WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH, WACOM_STATUS_LED_TOUCHSTRIP2 } }; LIBWACOM_EXPORT int libwacom_get_button_led_group (const WacomDevice *device, char button) { int button_index, led_index; WacomButtonFlags button_flags; g_return_val_if_fail (device->num_buttons > 0, -1); g_return_val_if_fail (button >= 'A', -1); g_return_val_if_fail (button < 'A' + device->num_buttons, -1); button_index = button - 'A'; button_flags = device->buttons[button_index]; if (!(button_flags & WACOM_BUTTON_MODESWITCH)) return -1; for (led_index = 0; led_index < device->num_leds; led_index++) { guint n; for (n = 0; n < G_N_ELEMENTS (button_status_leds); n++) { if ((button_flags & button_status_leds[n].button_flags) && (device->status_leds[led_index] == button_status_leds[n].status_leds)) { return led_index; } } } return WACOM_STATUS_LED_UNAVAILABLE; } LIBWACOM_EXPORT int libwacom_is_builtin(const WacomDevice *device) { return !!(libwacom_get_integration_flags (device) & WACOM_DEVICE_INTEGRATED_DISPLAY); } LIBWACOM_EXPORT int libwacom_is_reversible(const WacomDevice *device) { return !!(device->features & FEATURE_REVERSIBLE); } LIBWACOM_EXPORT int libwacom_has_touchswitch(const WacomDevice *device) { return !!(device->features & FEATURE_TOUCHSWITCH); } LIBWACOM_EXPORT WacomIntegrationFlags libwacom_get_integration_flags (const WacomDevice *device) { /* "unset" is for internal use only */ if (device->integration_flags == WACOM_DEVICE_INTEGRATED_UNSET) return WACOM_DEVICE_INTEGRATED_NONE; return device->integration_flags; } LIBWACOM_EXPORT WacomBusType libwacom_get_bustype(const WacomDevice *device) { g_return_val_if_fail(device->match >= 0, -1); g_return_val_if_fail(device->match < device->nmatches, -1); return device->matches[device->match]->bus; } LIBWACOM_EXPORT WacomButtonFlags libwacom_get_button_flag(const WacomDevice *device, char button) { int index; g_return_val_if_fail (device->num_buttons > 0, WACOM_BUTTON_NONE); g_return_val_if_fail (button >= 'A', WACOM_BUTTON_NONE); g_return_val_if_fail (button < 'A' + device->num_buttons, WACOM_BUTTON_NONE); index = button - 'A'; return device->buttons[index]; } LIBWACOM_EXPORT int libwacom_get_button_evdev_code(const WacomDevice *device, char button) { int index; g_return_val_if_fail (device->num_buttons > 0, 0); g_return_val_if_fail (button >= 'A', 0); g_return_val_if_fail (button < 'A' + device->num_buttons, 0); index = button - 'A'; return device->button_codes[index]; } LIBWACOM_EXPORT const WacomStylus *libwacom_stylus_get_for_id (const WacomDeviceDatabase *db, int id) { return g_hash_table_lookup (db->stylus_ht, GINT_TO_POINTER(id)); } LIBWACOM_EXPORT int libwacom_stylus_get_id (const WacomStylus *stylus) { return stylus->id; } LIBWACOM_EXPORT const char * libwacom_stylus_get_name (const WacomStylus *stylus) { return stylus->name; } LIBWACOM_EXPORT int libwacom_stylus_get_num_buttons (const WacomStylus *stylus) { if (stylus->num_buttons == -1) { g_warning ("Stylus '0x%x' has no number of buttons defined, falling back to 2", stylus->id); return 2; } return stylus->num_buttons; } LIBWACOM_EXPORT int libwacom_stylus_has_eraser (const WacomStylus *stylus) { return stylus->has_eraser; } LIBWACOM_EXPORT int libwacom_stylus_is_eraser (const WacomStylus *stylus) { return stylus->is_eraser; } LIBWACOM_EXPORT int libwacom_stylus_has_lens (const WacomStylus *stylus) { return stylus->has_lens; } LIBWACOM_EXPORT int libwacom_stylus_has_wheel (const WacomStylus *stylus) { return stylus->has_wheel; } LIBWACOM_EXPORT WacomAxisTypeFlags libwacom_stylus_get_axes (const WacomStylus *stylus) { return stylus->axes; } LIBWACOM_EXPORT WacomStylusType libwacom_stylus_get_type (const WacomStylus *stylus) { if (stylus->type == WSTYLUS_UNKNOWN) { g_warning ("Stylus '0x%x' has no type defined, falling back to 'General'", stylus->id); return WSTYLUS_GENERAL; } return stylus->type; } LIBWACOM_EXPORT void libwacom_print_stylus_description (int fd, const WacomStylus *stylus) { const char *type; WacomAxisTypeFlags axes; dprintf(fd, "[%#x]\n", libwacom_stylus_get_id(stylus)); dprintf(fd, "Name=%s\n", libwacom_stylus_get_name(stylus)); dprintf(fd, "Buttons=%d\n", libwacom_stylus_get_num_buttons(stylus)); dprintf(fd, "HasEraser=%s\n", libwacom_stylus_has_eraser(stylus) ? "true" : "false"); dprintf(fd, "IsEraser=%s\n", libwacom_stylus_is_eraser(stylus) ? "true" : "false"); dprintf(fd, "HasLens=%s\n", libwacom_stylus_has_lens(stylus) ? "true" : "false"); dprintf(fd, "HasWheel=%s\n", libwacom_stylus_has_wheel(stylus) ? "true" : "false"); axes = libwacom_stylus_get_axes(stylus); dprintf(fd, "Axes="); if (axes & WACOM_AXIS_TYPE_TILT) dprintf(fd, "Tilt;"); if (axes & WACOM_AXIS_TYPE_ROTATION_Z) dprintf(fd, "RotationZ;"); if (axes & WACOM_AXIS_TYPE_DISTANCE) dprintf(fd, "Distance;"); if (axes & WACOM_AXIS_TYPE_PRESSURE) dprintf(fd, "Pressure;"); if (axes & WACOM_AXIS_TYPE_SLIDER) dprintf(fd, "Slider;"); dprintf(fd, "\n"); switch(libwacom_stylus_get_type(stylus)) { case WSTYLUS_UNKNOWN: type = "Unknown"; break; case WSTYLUS_GENERAL: type = "General"; break; case WSTYLUS_INKING: type = "Inking"; break; case WSTYLUS_AIRBRUSH: type = "Airbrush"; break; case WSTYLUS_CLASSIC: type = "Classic"; break; case WSTYLUS_MARKER: type = "Marker"; break; case WSTYLUS_STROKE: type = "Stroke"; break; case WSTYLUS_PUCK: type = "Puck"; break; case WSTYLUS_3D: type = "3D"; break; default: g_assert_not_reached(); break; } dprintf(fd, "Type=%s\n", type); } WacomStylus* libwacom_stylus_ref(WacomStylus *stylus) { g_atomic_int_inc(&stylus->refcnt); return stylus; } WacomStylus* libwacom_stylus_unref(WacomStylus *stylus) { if (!g_atomic_int_dec_and_test(&stylus->refcnt)) return NULL; g_free (stylus->name); g_free (stylus->group); g_free (stylus); return NULL; } LIBWACOM_EXPORT const char * libwacom_match_get_name(const WacomMatch *match) { return match->name; } LIBWACOM_EXPORT WacomBusType libwacom_match_get_bustype(const WacomMatch *match) { return match->bus; } LIBWACOM_EXPORT uint32_t libwacom_match_get_product_id(const WacomMatch *match) { return match->product_id; } LIBWACOM_EXPORT uint32_t libwacom_match_get_vendor_id(const WacomMatch *match) { return match->vendor_id; } LIBWACOM_EXPORT const char* libwacom_match_get_match_string(const WacomMatch *match) { return match->match; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/libwacom/libwacom.h000066400000000000000000000500421363647401700205240ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ /** @cond hide_from_doxygen */ #ifndef _LIBWACOM_H_ #define _LIBWACOM_H_ /** @endcond */ #include #include #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301) #define LIBWACOM_DEPRECATED __attribute__((deprecated)) #else #define LIBWACOM_DEPRECATED #endif /* __GNUC__ */ /** @mainpage @section Introduction libwacom is a library to identify wacom tablets and their model-specific features. It provides easy access to information such as "is this a built-in on-screen tablet", "what is the size of this model", etc. @section Usage The usage of libwacom in an application could look like this:
      WacomDeviceDatabase *db;
      WacomDevice *device;
      WacomError *error;

      db = libwacom_database_new();
      error = libwacom_error_new();
      device = libwacom_new_from_path(db, "/dev/input/event0", WFALLBACK_NONE, error);
      if (!device)
           return; // should check for error here

      if (libwacom_device_is_builtin(device))
           printf("This is a built-in device\n");

      libwacom_destroy(device);
      libwacom_database_destroy(db);
 
For a full API reference to see libwacom.h. @section Database libwacom comes with a database of models and their features in key-value format. If you cannot use libwacom, the files may be parsed directly. Note that the file format may change over time, especially in the beginning. */ /** @file libwacom.h */ typedef struct _WacomDevice WacomDevice; typedef struct _WacomMatch WacomMatch; typedef struct _WacomStylus WacomStylus; typedef struct _WacomError WacomError; typedef struct _WacomDeviceDatabase WacomDeviceDatabase; #define WACOM_STYLUS_FALLBACK_ID 0xfffff #define WACOM_ERASER_FALLBACK_ID 0xffffe /** * Possible error codes. */ enum WacomErrorCode { WERROR_NONE, /**< No error has occured */ WERROR_BAD_ALLOC, /**< Allocation error */ WERROR_INVALID_PATH, /**< A path specified is invalid */ WERROR_INVALID_DB, /**< The passed DB is invalid */ WERROR_BAD_ACCESS, /**< Invalid permissions to access the path */ WERROR_UNKNOWN_MODEL, /**< Unsupported/unknown device */ WERROR_BUG_CALLER, /**< A bug in the caller */ }; /** * Bus types for tablets. */ typedef enum { WBUSTYPE_UNKNOWN, /**< Unknown/unsupported bus type */ WBUSTYPE_USB, /**< USB tablet */ WBUSTYPE_SERIAL, /**< Serial tablet */ WBUSTYPE_BLUETOOTH, /**< Bluetooth tablet */ WBUSTYPE_I2C, /**< I2C tablet */ } WacomBusType; /** * Tablet integration. */ typedef enum { WACOM_DEVICE_INTEGRATED_NONE = 0, WACOM_DEVICE_INTEGRATED_DISPLAY = (1 << 0), WACOM_DEVICE_INTEGRATED_SYSTEM = (1 << 1) } WacomIntegrationFlags; /** * Classes of devices. */ typedef enum { WCLASS_UNKNOWN, /**< Unknown/unsupported device class */ WCLASS_INTUOS3, /**< Any Intuos3 series */ WCLASS_INTUOS4, /**< Any Intuos4 series */ WCLASS_INTUOS5, /**< Any Intuos5 series */ WCLASS_CINTIQ, /**< Any Cintiq device */ WCLASS_BAMBOO, /**< Any Bamboo device */ WCLASS_GRAPHIRE, /**< Any Graphire device */ WCLASS_ISDV4, /**< Any serial ISDV4 device */ WCLASS_INTUOS, /**< Any Intuos series */ WCLASS_INTUOS2, /**< Any Intuos2 series */ WCLASS_PEN_DISPLAYS, /**< Any "interactive pen display" */ WCLASS_REMOTE, /**< Any Wacom Remote */ } WacomClass; /** * Class of stylus */ typedef enum { WSTYLUS_UNKNOWN, WSTYLUS_GENERAL, WSTYLUS_INKING, WSTYLUS_AIRBRUSH, WSTYLUS_CLASSIC, WSTYLUS_MARKER, WSTYLUS_STROKE, WSTYLUS_PUCK, WSTYLUS_3D, } WacomStylusType; /** * Capabilities of the various tablet buttons */ typedef enum { WACOM_BUTTON_NONE = 0, WACOM_BUTTON_POSITION_LEFT = (1 << 1), WACOM_BUTTON_POSITION_RIGHT = (1 << 2), WACOM_BUTTON_POSITION_TOP = (1 << 3), WACOM_BUTTON_POSITION_BOTTOM = (1 << 4), WACOM_BUTTON_RING_MODESWITCH = (1 << 5), WACOM_BUTTON_RING2_MODESWITCH = (1 << 6), WACOM_BUTTON_TOUCHSTRIP_MODESWITCH = (1 << 7), WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH = (1 << 8), WACOM_BUTTON_OLED = (1 << 9), WACOM_BUTTON_MODESWITCH = (WACOM_BUTTON_RING_MODESWITCH | WACOM_BUTTON_RING2_MODESWITCH | WACOM_BUTTON_TOUCHSTRIP_MODESWITCH | WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH), WACOM_BUTTON_DIRECTION = (WACOM_BUTTON_POSITION_LEFT | WACOM_BUTTON_POSITION_RIGHT | WACOM_BUTTON_POSITION_TOP | WACOM_BUTTON_POSITION_BOTTOM), WACOM_BUTTON_RINGS_MODESWITCH = (WACOM_BUTTON_RING_MODESWITCH | WACOM_BUTTON_RING2_MODESWITCH), WACOM_BUTTON_TOUCHSTRIPS_MODESWITCH = (WACOM_BUTTON_TOUCHSTRIP_MODESWITCH | WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH), } WacomButtonFlags; /** * Axis type for a stylus. Note that x/y is implied. */ typedef enum { WACOM_AXIS_TYPE_NONE = 0, /** Tilt in x and y direction */ WACOM_AXIS_TYPE_TILT = (1 << 1), /** Rotation in the z-axis */ WACOM_AXIS_TYPE_ROTATION_Z = (1 << 2), /** Distance to surface */ WACOM_AXIS_TYPE_DISTANCE = (1 << 3), /** Tip pressure */ WACOM_AXIS_TYPE_PRESSURE = (1 << 4), /** A absolute-position slider like the wheel on the airbrush */ WACOM_AXIS_TYPE_SLIDER = (1 << 5), } WacomAxisTypeFlags; typedef enum { WFALLBACK_NONE = 0, WFALLBACK_GENERIC = 1 } WacomFallbackFlags; typedef enum { WCOMPARE_NORMAL = 0, /**< compare the device only */ WCOMPARE_MATCHES = (1 << 1), /**< compare all possible matches too */ } WacomCompareFlags; typedef enum { WACOM_STATUS_LED_UNAVAILABLE = -1, WACOM_STATUS_LED_RING = 0, WACOM_STATUS_LED_RING2 = 1, WACOM_STATUS_LED_TOUCHSTRIP = 2, WACOM_STATUS_LED_TOUCHSTRIP2 = 3 } WacomStatusLEDs; /** * Allocate a new structure for error reporting. * * @return A newly allocated error structure or NULL if the allocation * failed. */ WacomError* libwacom_error_new(void); /** * Free the error and associated memory. * Resets error to NULL. * * @param error A reference to a error struct. * @see libwacom_error_new */ void libwacom_error_free(WacomError **error); /** * @return The code for this error. */ enum WacomErrorCode libwacom_error_get_code(WacomError *error); /** * @return A human-readable message for this error */ const char* libwacom_error_get_message(WacomError *error); /** * Loads the Tablet and Stylus databases, to be used * in libwacom_new_*() functions. * * @return A new database or NULL on error. */ WacomDeviceDatabase* libwacom_database_new(void); /** * Loads the Tablet and Stylus databases, to be used * in libwacom_new_*() functions, from the prefix * path passes. This is only useful for diagnostics * applications. * * @return A new database or NULL on error. */ WacomDeviceDatabase* libwacom_database_new_for_path(const char *datadir); /** * Free all memory used by the database. * * @param db A Tablet and Stylus database. */ void libwacom_database_destroy(WacomDeviceDatabase *db); /** * Create a new device reference from the given device path. * In case of error, NULL is returned and the error is set to the * appropriate value. * * @param db A device database * @param path A device path in the form of e.g. /dev/input/event0 * @param fallback Whether we should create a generic if model is unknown * @param error If not NULL, set to the error if any occurs * * @return A new reference to this device or NULL on errror. */ WacomDevice* libwacom_new_from_path(const WacomDeviceDatabase *db, const char *path, WacomFallbackFlags fallback, WacomError *error); /** * Create a new device reference from the given vendor/product IDs. * In case of error, NULL is returned and the error is set to the * appropriate value. * * @param db A device database * @param vendor_id The vendor ID of the device * @param product_id The product ID of the device * @param error If not NULL, set to the error if any occurs * * @return A new reference to this device or NULL on errror. */ WacomDevice* libwacom_new_from_usbid(const WacomDeviceDatabase *db, int vendor_id, int product_id, WacomError *error); /** * Create a new device reference from the given name. * In case of error, NULL is returned and the error is set to the * appropriate value. * * @param db A device database * @param name The name identifying the device * @param error If not NULL, set to the error if any occurs * * @return A new reference to this device or NULL on error. */ WacomDevice* libwacom_new_from_name(const WacomDeviceDatabase *db, const char *name, WacomError *error); /** * Returns the list of devices in the given database. * * @param db A device database * @param error If not NULL, set to the error if any occurs * * @return A NULL terminated list of pointers to all the devices inside the * database. * The content of the list is owned by the database and should not be * modified or freed. Use free() to free the list. */ WacomDevice** libwacom_list_devices_from_database(const WacomDeviceDatabase *db, WacomError *error); /** * Print the description of this device to the given file. * * @param fd The file descriptor to print to * @param device The device to print the description for. */ void libwacom_print_device_description (int fd, const WacomDevice *device); /** * Remove the device and free all memory and references to it. * * @param device The device to delete */ void libwacom_destroy(WacomDevice *device); /** * Compare the two devices for equal-ness. * * @param a The first device * @param b The second device * @param flags Flags to dictate what constitutes a match * * @return 0 if the devices are identical, nonzero otherwise */ int libwacom_compare(const WacomDevice *a, const WacomDevice *b, WacomCompareFlags flags); /** * @param device The tablet to query * @return The class of the device */ WacomClass libwacom_get_class(const WacomDevice *device); /** * @param device The tablet to query * @return The human-readable name for this device */ const char* libwacom_get_name(const WacomDevice *device); /** * @param device The tablet to query * @return The vendor-specific model name (e.g. CTE-650 for a Bamboo Fun), or NULL if none is set */ const char* libwacom_get_model_name(const WacomDevice *device); /** * @param device The tablet to query * @return The full filename including path to the SVG layout of the device * if available, or NULL otherwise */ const char* libwacom_get_layout_filename(const WacomDevice *device); /** * @param device The tablet to query * @return The numeric vendor ID for this device * * @bug The return value is a signed int but libwacom_match_get_vendor_id() * returns an unsigned int. This may cause compiler warnings, but the * effective range for vendor IDs is 16-bit only anyway. */ int libwacom_get_vendor_id(const WacomDevice *device); /** * @param device The tablet to query * @return The current match string used for this device (if set) or the first * match string in the tablet definition. */ const char* libwacom_get_match(const WacomDevice *device); /** * @param device The tablet to query * @return A pointer to the null-terminated list of possible matches for this device. Do not * modify this pointer or any content! */ const WacomMatch** libwacom_get_matches(const WacomDevice *device); /** * Return the match string of the paired device for this device. A paired * device is a device with a different match string but that shares the * physical device with this device. * * If the return value is NULL, no device is paired with this device or all * paired devices have the same WacomMatch as this device. * * The returned device may not be a libwacom device itself. * * @param device The tablet to query * @return A pointer to paired device for this device. Do not * modify this pointer or any content! */ const WacomMatch* libwacom_get_paired_device(const WacomDevice *device); /** * @param device The tablet to query * @return The numeric product ID for this device * * @bug The return value is a signed int but libwacom_match_get_product_id() * returns an unsigned int. This may cause compiler warning, but the * effective range for product IDs is 16-bit only anyway. */ int libwacom_get_product_id(const WacomDevice *device); /** * Retrieve the width of the device. This is the width of the usable area as * advertised, not the total size of the physical tablet. For e.g. an * Intuos4 6x9 this will return 9. * * @param device The tablet to query * @return The width of this device in inches */ int libwacom_get_width(const WacomDevice *device); /** * Retrieve the height of the device. This is the height of the usable area as * advertised, not the total size of the physical tablet. For e.g. an * Intuos4 6x9 this will return 6. * * @param device The tablet to query * @return The width of this device in inches */ int libwacom_get_height(const WacomDevice *device); /** * @param device The tablet to query * @return non-zero if the device supports styli or zero otherwise */ int libwacom_has_stylus(const WacomDevice *device); /** * @param device The tablet to query * @return non-zero if the device supports touch or zero otherwise */ int libwacom_has_touch(const WacomDevice *device); /** * Tablet buttons are numbered 'A' through to 'A' + number of buttons. * * @param device The tablet to query * @return The number of buttons on the tablet */ int libwacom_get_num_buttons(const WacomDevice *device); /** * @param device The tablet to query * @param num_styli Return location for the number of listed styli * @return an array of Styli IDs supported by the device */ const int *libwacom_get_supported_styli(const WacomDevice *device, int *num_styli); /** * @param device The tablet to query * @return non-zero if the device has a touch ring or zero otherwise */ int libwacom_has_ring(const WacomDevice *device); /** * @param device The tablet to query * @return non-zero if the device has a second touch ring or zero otherwise */ int libwacom_has_ring2(const WacomDevice *device); /** * @param device The tablet to query * @return non-zero if the device has a touch switch or zero otherwise */ int libwacom_has_touchswitch(const WacomDevice *device); /** * @param device The tablet to query * @return the number of modes for the touchring if it has a mode switch */ int libwacom_get_ring_num_modes(const WacomDevice *device); /** * @param device The tablet to query * @return the number of modes for the second touchring if it has a mode switch */ int libwacom_get_ring2_num_modes(const WacomDevice *device); /** * @param device The tablet to query * @return the number of touch strips on the tablet * otherwise */ int libwacom_get_num_strips(const WacomDevice *device); /** * @param device The tablet to query * @return the number of modes for each of the touchstrips if any */ int libwacom_get_strips_num_modes(const WacomDevice *device); /** * @param device The tablet to query * @param num_leds Return location for the number of supported status LEDs * @return an array of status LEDs supported by the device */ const WacomStatusLEDs *libwacom_get_status_leds(const WacomDevice *device, int *num_leds); /** * @param device The tablet to query * @param button The ID of the button to check for, between 'A' and 'Z' * @return the status LED group id to use * or -1 if no LED is available for the given tablet / button */ int libwacom_get_button_led_group (const WacomDevice *device, char button); /** * @param device The tablet to query * @return non-zero if the device is built into the screen (ie a screen tablet) * or zero if the device is an external tablet * @deprecated 0.7 Use libwacom_get_integration_flags() instead. */ int libwacom_is_builtin(const WacomDevice *device) LIBWACOM_DEPRECATED; /** * @param device The tablet to query * @return non-zero if the device can be used left-handed * (rotated 180 degrees) */ int libwacom_is_reversible(const WacomDevice *device); /** * @param device The tablet to query * @return the integration flags for the device */ WacomIntegrationFlags libwacom_get_integration_flags (const WacomDevice *device); /** * @param device The tablet to query * @return The bustype of this device. */ WacomBusType libwacom_get_bustype(const WacomDevice *device); /** * @param device The tablet to query * @param button The ID of the button to check for, between 'A' and 'Z' * @return a WacomButtonFlags with information about the button */ WacomButtonFlags libwacom_get_button_flag(const WacomDevice *device, char button); /** * @param device The tablet to query * @param button The ID of the button to check for, between 'A' and 'Z' * @return The evdev event code sent when the button is pressed or 0 if * unknown. */ int libwacom_get_button_evdev_code(const WacomDevice *device, char button); /** * Get the WacomStylus for the given tool ID. * * @param db A Tablet and Stylus database. * @param id The Tool ID for this stylus * @return A WacomStylus representing the stylus. Do not free. */ const WacomStylus *libwacom_stylus_get_for_id (const WacomDeviceDatabase *db, int id); /** * @param stylus The stylus to query * @return the ID of the tool */ int libwacom_stylus_get_id (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return The name of the stylus */ const char *libwacom_stylus_get_name (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return The number of buttons on the stylus */ int libwacom_stylus_get_num_buttons (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return Whether the stylus has an eraser */ int libwacom_stylus_has_eraser (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return Whether the stylus is actually an eraser */ 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 Whether the stylus has a relative mouse wheel */ int libwacom_stylus_has_wheel (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return The flags specifying the list of absolute axes */ WacomAxisTypeFlags libwacom_stylus_get_axes (const WacomStylus *stylus); /** * @param stylus The stylus to query * @return The type of stylus */ WacomStylusType libwacom_stylus_get_type (const WacomStylus *stylus); /** * Print the description of this stylus to the given file. * * @param fd The file descriptor * @param stylus The stylus to print the description for. */ void libwacom_print_stylus_description (int fd, const WacomStylus *stylus); const char *libwacom_match_get_name(const WacomMatch *match); WacomBusType libwacom_match_get_bustype(const WacomMatch *match); uint32_t libwacom_match_get_product_id(const WacomMatch *match); uint32_t libwacom_match_get_vendor_id(const WacomMatch *match); const char* libwacom_match_get_match_string(const WacomMatch *match); /** @cond hide_from_doxygen */ #endif /* _LIBWACOM_H_ */ /** @endcond */ /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/libwacom/libwacom.sym000066400000000000000000000037231363647401700211110ustar00rootroot00000000000000/* in alphabetical order! */ LIBWACOM_0.33 { global: libwacom_compare; libwacom_database_destroy; libwacom_database_new; libwacom_database_new_for_path; libwacom_destroy; libwacom_error_free; libwacom_error_get_code; libwacom_error_get_message; libwacom_error_new; libwacom_error_set; libwacom_get_bustype; libwacom_get_button_evdev_code; libwacom_get_button_flag; libwacom_get_button_led_group; libwacom_get_class; libwacom_get_height; libwacom_get_integration_flags; libwacom_get_layout_filename; libwacom_get_match; libwacom_get_matches; libwacom_get_model_name; libwacom_get_name; libwacom_get_num_buttons; libwacom_get_num_strips; libwacom_get_paired_device; libwacom_get_product_id; libwacom_get_ring2_num_modes; libwacom_get_ring_num_modes; libwacom_get_status_leds; libwacom_get_strips_num_modes; libwacom_get_supported_styli; libwacom_get_vendor_id; libwacom_get_width; libwacom_has_ring; libwacom_has_ring2; libwacom_has_stylus; libwacom_has_touch; libwacom_has_touchswitch; libwacom_is_builtin; libwacom_is_reversible; libwacom_list_devices_from_database; libwacom_match_destroy; libwacom_match_get_bustype; libwacom_match_get_match_string; libwacom_match_get_name; libwacom_match_get_product_id; libwacom_match_get_vendor_id; libwacom_match_new; libwacom_new_from_name; libwacom_new_from_path; libwacom_new_from_usbid; libwacom_print_device_description; libwacom_print_stylus_description; libwacom_stylus_destroy; libwacom_stylus_get_axes; libwacom_stylus_get_for_id; libwacom_stylus_get_id; libwacom_stylus_get_name; libwacom_stylus_get_num_buttons; libwacom_stylus_get_type; libwacom_stylus_has_eraser; libwacom_stylus_has_lens; libwacom_stylus_has_wheel; libwacom_stylus_is_eraser; libwacom_update_match; local: *; }; libwacom-libwacom-1.3/libwacom/libwacomint.h000066400000000000000000000101561363647401700212410ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef _LIBWACOMINT_H_ #define _LIBWACOMINT_H_ #include "libwacom.h" #include #include #define LIBWACOM_EXPORT __attribute__ ((visibility("default"))) #define DBG(...) \ printf(__VA_ARGS__) #define GENERIC_DEVICE_MATCH "generic" #define WACOM_DEVICE_INTEGRATED_UNSET (WACOM_DEVICE_INTEGRATED_NONE - 1U) enum WacomFeature { FEATURE_STYLUS = (1 << 0), FEATURE_TOUCH = (1 << 1), FEATURE_RING = (1 << 2), FEATURE_RING2 = (1 << 3), FEATURE_REVERSIBLE = (1 << 4), FEATURE_TOUCHSWITCH = (1 << 5) }; /* WARNING: When adding new members to this struct * make sure to update libwacom_copy_match() ! */ struct _WacomMatch { gint refcnt; char *match; char *name; WacomBusType bus; uint32_t vendor_id; uint32_t product_id; }; /* WARNING: When adding new members to this struct * make sure to update libwacom_copy() and * libwacom_print_device_description() ! */ struct _WacomDevice { char *name; char *model_name; int width; int height; int match; /* used match or first match by default */ WacomMatch **matches; /* NULL-terminated */ int nmatches; /* not counting NULL-terminated element */ WacomMatch *paired; WacomClass cls; int num_strips; uint32_t features; uint32_t integration_flags; int strips_num_modes; int ring_num_modes; int ring2_num_modes; gsize num_styli; int *supported_styli; int num_buttons; WacomButtonFlags *buttons; int *button_codes; int num_leds; WacomStatusLEDs *status_leds; char *layout; gint refcnt; /* for the db hashtable */ }; struct _WacomStylus { gint refcnt; int id; char *name; char *group; int num_buttons; gboolean has_eraser; gboolean is_eraser; gboolean has_lens; gboolean has_wheel; WacomStylusType type; WacomAxisTypeFlags axes; }; struct _WacomDeviceDatabase { GHashTable *device_ht; /* key = DeviceMatch (str), value = WacomDeviceData * */ GHashTable *stylus_ht; /* key = ID (int), value = WacomStylus * */ }; struct _WacomError { enum WacomErrorCode code; char *msg; }; WacomDevice* libwacom_ref(WacomDevice *device); WacomDevice* libwacom_unref(WacomDevice *device); WacomStylus* libwacom_stylus_ref(WacomStylus *stylus); WacomStylus* libwacom_stylus_unref(WacomStylus *stylus); WacomMatch* libwacom_match_ref(WacomMatch *match); WacomMatch* libwacom_match_unref(WacomMatch *match); void libwacom_error_set(WacomError *error, enum WacomErrorCode code, const char *msg, ...); void libwacom_add_match(WacomDevice *device, WacomMatch *newmatch); WacomMatch* libwacom_match_new(const char *name, WacomBusType bus, int vendor_id, int product_id); WacomBusType bus_from_str (const char *str); const char *bus_to_str (WacomBusType bus); char *make_match_string(const char *name, WacomBusType bus, int vendor_id, int product_id); #define streq(s1, s2) (strcmp((s1), (s2)) == 0) #define strneq(s1, s2, n) (strncmp((s1), (s2), (n)) == 0) #endif /* _LIBWACOMINT_H_ */ /* vim: set noexpandtab shiftwidth=8: */ libwacom-libwacom-1.3/meson.build000066400000000000000000000446511363647401700171340ustar00rootroot00000000000000project('libwacom', 'c', version: '1.3', # change configure.ac as well license: 'MIT/Expat', default_options: [ 'c_std=gnu99', 'warning_level=2' ], meson_version: '>= 0.47.0') dir_data = join_paths(get_option('prefix'), get_option('datadir'), 'libwacom') dir_layouts = join_paths(dir_data, 'layouts') dir_man1 = join_paths(get_option('prefix'), get_option('mandir'), 'man1') dir_src = join_paths(meson.source_root(), 'libwacom') dir_test = join_paths(meson.source_root(), 'test') dir_sys_udev= join_paths(get_option('prefix'), 'lib', 'udev') dir_udev = get_option('udev-dir') if dir_udev == '' dir_udev = dir_sys_udev endif # Do not modify this, use symbol versioning instead. libwacom_lt_c=8 libwacom_lt_r=1 libwacom_lt_a=6 # convert ltversion to soname libwacom_so_version = '@0@.@1@.@2@'.format((libwacom_lt_c - libwacom_lt_a), libwacom_lt_a, libwacom_lt_r) # Compiler setup cc = meson.get_compiler('c') cflags= ['-Wno-unused-parameter', '-fvisibility=hidden', '-Wmissing-prototypes', '-Wstrict-prototypes'] add_project_arguments(cflags, language: 'c') # Dependencies pkgconfig = import('pkgconfig') dep_gudev = dependency('gudev-1.0') dep_glib = dependency('glib-2.0') dep_librsvg = dependency('librsvg-2.0', required: false) dep_gtk2 = dependency('gtk+-2.0', required: false) includes_include = include_directories('include') includes_src = include_directories('libwacom') #################### libwacom.so ######################## src_libwacom = [ 'include/linux/input-event-codes.h', 'libwacom/libwacom.h', 'libwacom/libwacomint.h', 'libwacom/libwacom.c', 'libwacom/libwacom-error.c', 'libwacom/libwacom-database.c', 'libwacom/libwacom-deprecated.c', ] deps_libwacom = [ dep_gudev, dep_glib ] inc_libwacom = [ includes_include, includes_src, ] mapfile = join_paths(dir_src, 'libwacom.sym') version_flag = '-Wl,--version-script,@0@'.format(mapfile) lib_libwacom = shared_library('wacom', src_libwacom, include_directories: inc_libwacom, dependencies: deps_libwacom, version: libwacom_so_version, link_args: version_flag, link_depends: mapfile, c_args: [ '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()), '-DDATADIR="@0@"'.format(dir_data), ], install: true) dep_libwacom = declare_dependency(link_with: lib_libwacom) install_headers('libwacom/libwacom.h', subdir: 'libwacom-1.0/libwacom') pkgconfig.generate(filebase: 'libwacom', name: 'libwacom', description: 'Wacom model feature query library', version: meson.project_version(), subdirs: 'libwacom-1.0', requires_private: deps_libwacom, libraries: lib_libwacom) #################### data files ######################## data_files = [ # stylus data files 'data/libwacom.stylus', # tablet data files 'data/bamboo-0fg-m-p-alt.tablet', 'data/bamboo-0fg-s-p.tablet', 'data/bamboo-0fg-s-p-alt.tablet', 'data/bamboo-2fg-fun-m-pt.tablet', 'data/bamboo-2fg-fun-s-pt.tablet', 'data/bamboo-2fg-m-p.tablet', 'data/bamboo-2fg-s-p.tablet', 'data/bamboo-2fg-s-pt.tablet', 'data/bamboo-2fg-s-t.tablet', 'data/bamboo-4fg-fun-m.tablet', 'data/bamboo-4fg-fun-s.tablet', 'data/bamboo-4fg-se-m-pt.tablet', 'data/bamboo-4fg-se-s-pt.tablet', 'data/bamboo-4fg-s-pt.tablet', 'data/bamboo-4fg-s-t.tablet', 'data/bamboo-16fg-m-pt.tablet', 'data/bamboo-16fg-s-p.tablet', 'data/bamboo-16fg-s-pt.tablet', 'data/bamboo-16fg-s-t.tablet', 'data/bamboo-one.tablet', 'data/bamboo-one-m-p.tablet', 'data/bamboo-pad.tablet', 'data/bamboo-pad-wireless.tablet', 'data/cintiq-12wx.tablet', 'data/cintiq-13hd.tablet', 'data/cintiq-13hdt.tablet', 'data/cintiq-16.tablet', 'data/cintiq-20wsx.tablet', 'data/cintiq-21ux.tablet', 'data/cintiq-21ux2.tablet', 'data/cintiq-22.tablet', 'data/cintiq-22hd.tablet', 'data/cintiq-22hdt.tablet', 'data/cintiq-24hd.tablet', 'data/cintiq-24hd-touch.tablet', 'data/cintiq-27hd.tablet', 'data/cintiq-27hdt.tablet', 'data/cintiq-companion.tablet', 'data/cintiq-companion-2.tablet', 'data/cintiq-companion-hybrid.tablet', 'data/cintiq-pro-13.tablet', 'data/cintiq-pro-16.tablet', 'data/cintiq-pro-24-p.tablet', 'data/cintiq-pro-24-pt.tablet', 'data/cintiq-pro-32.tablet', 'data/dell-canvas-27.tablet', 'data/dtf-720.tablet', 'data/dth-1152.tablet', 'data/dth-2242.tablet', 'data/dth-2452.tablet', 'data/dti-520.tablet', 'data/dtk-1651.tablet', 'data/dtk-1660e.tablet', 'data/dtk-2241.tablet', 'data/dtk-2451.tablet', 'data/dtu-1031.tablet', 'data/dtu-1031x.tablet', 'data/dtu-1141.tablet', 'data/dtu-1141b.tablet', 'data/dtu-1631.tablet', 'data/dtu-1931.tablet', 'data/dtu-2231.tablet', 'data/ek-remote.tablet', 'data/elan-22e2.tablet', 'data/elan-24db.tablet', 'data/elan-29a1.tablet', 'data/elan-29b6.tablet', 'data/elan-262b.tablet', 'data/elan-264c.tablet', 'data/elan-2072.tablet', 'data/elan-2537.tablet', 'data/elan-2627.tablet', 'data/elan-2628.tablet', 'data/elan-5515.tablet', 'data/generic.tablet', 'data/graphire2-4x5.tablet', 'data/graphire2-5x7.tablet', 'data/graphire3-4x5.tablet', 'data/graphire3-6x8.tablet', 'data/graphire4-4x5.tablet', 'data/graphire4-6x8.tablet', 'data/graphire-usb.tablet', 'data/graphire-wireless-8x6.tablet', 'data/huion-h420.tablet', 'data/huion-h610-pro.tablet', 'data/intuos2-4x5.tablet', 'data/intuos2-6x8.tablet', 'data/intuos2-9x12.tablet', 'data/intuos2-12x12.tablet', 'data/intuos2-12x18.tablet', 'data/intuos3-4x5.tablet', 'data/intuos3-4x6.tablet', 'data/intuos3-6x8.tablet', 'data/intuos3-6x11.tablet', 'data/intuos3-9x12.tablet', 'data/intuos3-12x12.tablet', 'data/intuos3-12x19.tablet', 'data/intuos4-4x6.tablet', 'data/intuos4-6x9.tablet', 'data/intuos4-6x9-wl.tablet', 'data/intuos4-8x13.tablet', 'data/intuos4-12x19.tablet', 'data/intuos5-m.tablet', 'data/intuos5-s.tablet', 'data/intuos5-touch-l.tablet', 'data/intuos5-touch-m.tablet', 'data/intuos5-touch-s.tablet', 'data/intuos-4x5.tablet', 'data/intuos-6x8.tablet', 'data/intuos-9x12.tablet', 'data/intuos-12x12.tablet', 'data/intuos-12x18.tablet', 'data/intuos-m-p.tablet', 'data/intuos-m-p2.tablet', 'data/intuos-m-p3.tablet', 'data/intuos-m-p3-android.tablet', 'data/intuos-m-p3-wl.tablet', 'data/intuos-m-p3-wl-android.tablet', 'data/intuos-m-pt.tablet', 'data/intuos-m-pt2.tablet', 'data/intuos-pro-2-l.tablet', 'data/intuos-pro-2-m.tablet', 'data/intuos-pro-2-s.tablet', 'data/intuos-pro-l.tablet', 'data/intuos-pro-m.tablet', 'data/intuos-pro-s.tablet', 'data/intuos-s-p.tablet', 'data/intuos-s-p2.tablet', 'data/intuos-s-p3.tablet', 'data/intuos-s-p3-android.tablet', 'data/intuos-s-p3-wl.tablet', 'data/intuos-s-p3-wl-android.tablet', 'data/intuos-s-pt.tablet', 'data/intuos-s-pt2.tablet', 'data/isdv4-2d1f-001e.tablet', 'data/isdv4-2d1f-002e.tablet', 'data/isdv4-10d.tablet', 'data/isdv4-10e.tablet', 'data/isdv4-10f.tablet', 'data/isdv4-12c.tablet', 'data/isdv4-48c9.tablet', 'data/isdv4-48ec.tablet', 'data/isdv4-48ed.tablet', 'data/isdv4-48ee.tablet', 'data/isdv4-50b4.tablet', 'data/isdv4-50b6.tablet', 'data/isdv4-50b8.tablet', 'data/isdv4-50db.tablet', 'data/isdv4-50e9.tablet', 'data/isdv4-50ef.tablet', 'data/isdv4-50f1.tablet', 'data/isdv4-50f8.tablet', 'data/isdv4-50fd.tablet', 'data/isdv4-51a0.tablet', 'data/isdv4-51af.tablet', 'data/isdv4-51b0.tablet', 'data/isdv4-51b1.tablet', 'data/isdv4-51b2.tablet', 'data/isdv4-51b3.tablet', 'data/isdv4-51b6.tablet', 'data/isdv4-51b7.tablet', 'data/isdv4-51b8.tablet', 'data/isdv4-51b9.tablet', 'data/isdv4-51ba.tablet', 'data/isdv4-51bb.tablet', 'data/isdv4-51bc.tablet', 'data/isdv4-51bd.tablet', 'data/isdv4-51be.tablet', 'data/isdv4-51bf.tablet', 'data/isdv4-51c4.tablet', 'data/isdv4-51e2.tablet', 'data/isdv4-51f5.tablet', 'data/isdv4-51f6.tablet', 'data/isdv4-90.tablet', 'data/isdv4-93.tablet', 'data/isdv4-100.tablet', 'data/isdv4-101.tablet', 'data/isdv4-104.tablet', 'data/isdv4-114.tablet', 'data/isdv4-116.tablet', 'data/isdv4-117.tablet', 'data/isdv4-124.tablet', 'data/isdv4-149.tablet', 'data/isdv4-481a.tablet', 'data/isdv4-484c.tablet', 'data/isdv4-485e.tablet', 'data/isdv4-486a.tablet', 'data/isdv4-488f.tablet', 'data/isdv4-502a.tablet', 'data/isdv4-503e.tablet', 'data/isdv4-503f.tablet', 'data/isdv4-504a.tablet', 'data/isdv4-509d.tablet', 'data/isdv4-509f.tablet', 'data/isdv4-513b.tablet', 'data/isdv4-515a.tablet', 'data/isdv4-516b.tablet', 'data/isdv4-517d.tablet', 'data/isdv4-521f.tablet', 'data/isdv4-4004.tablet', 'data/isdv4-4800.tablet', 'data/isdv4-4806.tablet', 'data/isdv4-4807.tablet', 'data/isdv4-4809.tablet', 'data/isdv4-4814.tablet', 'data/isdv4-4822.tablet', 'data/isdv4-4824.tablet', 'data/isdv4-4831.tablet', 'data/isdv4-4841.tablet', 'data/isdv4-4865.tablet', 'data/isdv4-4870.tablet', 'data/isdv4-4875.tablet', 'data/isdv4-5000.tablet', 'data/isdv4-5002.tablet', 'data/isdv4-5010.tablet', 'data/isdv4-5013.tablet', 'data/isdv4-5014.tablet', 'data/isdv4-5040.tablet', 'data/isdv4-5044.tablet', 'data/isdv4-5048.tablet', 'data/isdv4-5090.tablet', 'data/isdv4-5099.tablet', 'data/isdv4-5110.tablet', 'data/isdv4-5115.tablet', 'data/isdv4-5122.tablet', 'data/isdv4-5128.tablet', 'data/isdv4-5146.tablet', 'data/isdv4-5147.tablet', 'data/isdv4-5150.tablet', 'data/isdv4-5157.tablet', 'data/isdv4-5158.tablet', 'data/isdv4-5169.tablet', 'data/isdv4-5196.tablet', 'data/isdv4-5221.tablet', 'data/isdv4-5222.tablet', 'data/isdv4-e2.tablet', 'data/isdv4-e3.tablet', 'data/isdv4-e5.tablet', 'data/isdv4-e6.tablet', 'data/isdv4-ec.tablet', 'data/isdv4-ed.tablet', 'data/isdv4-ef.tablet', 'data/mobilestudio-pro-13.tablet', 'data/mobilestudio-pro-13-2.tablet', 'data/mobilestudio-pro-16.tablet', 'data/mobilestudio-pro-16-2.tablet', 'data/mobilestudio-pro-16-3.tablet', 'data/n-trig-pen.tablet', 'data/one-by-wacom-m-p.tablet', 'data/one-by-wacom-m-p2.tablet', 'data/one-by-wacom-s-p.tablet', 'data/one-by-wacom-s-p2.tablet', 'data/serial-wacf004.tablet', 'data/wacom-one.tablet', 'data/xp-pen-star03.tablet', ] svg_files = [ 'data/layouts/bamboo-0fg-s-p.svg', 'data/layouts/bamboo-0fg-s-p-alt.svg', 'data/layouts/bamboo-2fg-fun-m-pt.svg', 'data/layouts/bamboo-2fg-fun-s-pt.svg', 'data/layouts/bamboo-2fg-s-pt.svg', 'data/layouts/bamboo-2fg-s-t.svg', 'data/layouts/bamboo-4fg-fun-m-pt.svg', 'data/layouts/bamboo-4fg-fun-s-pt.svg', 'data/layouts/bamboo-4fg-se-m-pt.svg', 'data/layouts/bamboo-4fg-se-s-pt.svg', 'data/layouts/bamboo-4fg-s-pt.svg', 'data/layouts/bamboo-4fg-s-t.svg', 'data/layouts/bamboo-16fg-m-pt.svg', 'data/layouts/bamboo-16fg-s-pt.svg', 'data/layouts/bamboo-16fg-s-t.svg', 'data/layouts/bamboo-pad.svg', 'data/layouts/cintiq-12wx.svg', 'data/layouts/cintiq-13hd.svg', 'data/layouts/cintiq-20wsx.svg', 'data/layouts/cintiq-21ux.svg', 'data/layouts/cintiq-21ux2.svg', 'data/layouts/cintiq-22hd.svg', 'data/layouts/cintiq-24hd.svg', 'data/layouts/cintiq-companion.svg', 'data/layouts/cintiq-companion-2.svg', 'data/layouts/cintiq-companion-hybrid.svg', 'data/layouts/dth-2242.svg', 'data/layouts/dth-2452.svg', 'data/layouts/dti-520.svg', 'data/layouts/dtk-1651.svg', 'data/layouts/dtk-2451.svg', 'data/layouts/dtu-1031.svg', 'data/layouts/dtu-1141.svg', 'data/layouts/dtu-1141b.svg', 'data/layouts/ek-remote.svg', 'data/layouts/graphire4-4x5.svg', 'data/layouts/graphire4-6x8.svg', 'data/layouts/graphire-wireless-8x6.svg', 'data/layouts/huion-h420.svg', 'data/layouts/huion-h610-pro.svg', 'data/layouts/intuos3-4x5.svg', 'data/layouts/intuos3-4x6.svg', 'data/layouts/intuos3-6x8.svg', 'data/layouts/intuos3-6x11.svg', 'data/layouts/intuos3-9x12.svg', 'data/layouts/intuos3-12x12.svg', 'data/layouts/intuos3-12x19.svg', 'data/layouts/intuos4-4x6.svg', 'data/layouts/intuos4-6x9.svg', 'data/layouts/intuos4-6x9-wl.svg', 'data/layouts/intuos4-8x13.svg', 'data/layouts/intuos4-12x19.svg', 'data/layouts/intuos5-l.svg', 'data/layouts/intuos5-m.svg', 'data/layouts/intuos5-s.svg', 'data/layouts/intuos-m-p.svg', 'data/layouts/intuos-m-p2.svg', 'data/layouts/intuos-m-p3.svg', 'data/layouts/intuos-m-pt.svg', 'data/layouts/intuos-m-pt2.svg', 'data/layouts/intuos-pro-2-l.svg', 'data/layouts/intuos-pro-2-m.svg', 'data/layouts/intuos-pro-2-s.svg', 'data/layouts/intuos-pro-l.svg', 'data/layouts/intuos-pro-m.svg', 'data/layouts/intuos-pro-s.svg', 'data/layouts/intuos-s-p.svg', 'data/layouts/intuos-s-p2.svg', 'data/layouts/intuos-s-p3.svg', 'data/layouts/intuos-s-pt.svg', 'data/layouts/intuos-s-pt2.svg', 'data/layouts/mobilestudio-pro-13.svg', 'data/layouts/mobilestudio-pro-16.svg', 'data/layouts/xp-pen-star03.svg', ] install_data(data_files, install_dir: dir_data) install_data(svg_files, install_dir: dir_layouts) test('files-in-git', find_program('data/check-files-in-git.sh'), args: [meson.source_root()], suite: ['all']) test('svg-layout-exists', find_program('data/check-svg-exists.sh'), args: [meson.source_root()], suite: ['all']) # meson requires that we specify all files one-by-one, so let's add a test # that we can't forget about that. test('data-files-in-meson.build', find_program('data/check-data-in-meson.build.sh'), args: [meson.source_root()], suite: ['all']) ############### tools ########################### executable('libwacom-list-local-devices', 'tools/list-local-devices.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], install: true) tools_cflags = ['-DTOPSRCDIR="@0@"'.format(meson.source_root())] gen_udev_rules = executable('generate-udev-rules', 'tools/generate-udev-rules.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tools_cflags, install: false) custom_target('udev-rules', command: gen_udev_rules, capture: true, output: '65-libwacom.rules', install: true, install_dir: join_paths(dir_udev, 'rules.d')) executable('list-devices', 'tools/list-devices.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tools_cflags, install: false) executable('list-compatible-styli', 'tools/list-compatible-styli.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tools_cflags, install: false) if dep_gtk2.found() and dep_librsvg.found() executable('show-svg-image', 'tools/show-svg-image.c', dependencies: [dep_libwacom, dep_gtk2, dep_librsvg], include_directories: [includes_src], c_args: tools_cflags, install: false) endif install_man(configure_file(input: 'tools/libwacom-list-local-devices.man', output: '@BASENAME@.1', copy: true)) ############### docs ########################### docs_feature = get_option('documentation') doxygen = find_program('doxygen', required: docs_feature) if doxygen.found() src_doxygen = [ join_paths(dir_src, 'libwacom.h'), ] doc_config = configuration_data() doc_config.set('PACKAGE_NAME', meson.project_name()) doc_config.set('PACKAGE_VERSION', meson.project_version()) doc_config.set('TOPSRCDIR', meson.source_root()) doxyfile = configure_file(input: 'doc/doxygen.conf.in', output: 'doxygen.conf', configuration: doc_config) custom_target('doxygen', input: [doxyfile] + src_doxygen, output: ['html'], command: [doxygen, doxyfile], install: false, build_by_default: true) endif ############# tests ############################ if get_option('tests').enabled() dep_libxml = dependency('libxml-2.0', required : false) dep_dl = meson.get_compiler('c').find_library('dl') tests_cflags = ['-DTOPSRCDIR="@0@"'.format(meson.source_root())] test_load = executable('test-load', 'test/test-load.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_include, includes_src], c_args: tests_cflags, install: false) test('test-load', test_load, suite: ['all', 'valgrind']) test_dbverify = executable('test-dbverify', 'test/test-dbverify.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tests_cflags, install: false) test('test-dbverify', test_dbverify, suite: ['all', 'valgrind']) test_tablet_validity = executable('test-tablet-validity', 'test/test-tablet-validity.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tests_cflags, install: false) test('test-tablet-validity', test_tablet_validity, suite: ['all', 'valgrind']) test_stylus_validity= executable('test-stylus-validity', 'test/test-stylus-validity.c', dependencies: [dep_libwacom, dep_glib], include_directories: [includes_src], c_args: tests_cflags, install: false) test('test-stylus-validity', test_stylus_validity, suite: ['all', 'valgrind']) if dep_libxml.found() test_svg_validity = executable('test-svg-validity', 'test/test-tablet-svg-validity.c', dependencies: [dep_libwacom, dep_libxml, dep_glib], include_directories: [includes_src], c_args: tests_cflags, install: false) test('test-svg-validity', test_svg_validity, suite: ['all', 'valgrind']) endif valgrind = find_program('valgrind', required : false) if valgrind.found() valgrind_suppressions_file = join_paths(dir_test, 'valgrind.suppressions') add_test_setup('valgrind', exe_wrapper: [valgrind, '--leak-check=full', '--gen-suppressions=all', '--error-exitcode=3', '--suppressions=' + valgrind_suppressions_file ], timeout_multiplier : 100) else message('valgrind not found, disabling valgrind test suite') endif # because of the tricks we use in calling the function and exposing # it to begin with, LTO gets confused and this fails to link. # Let's just disable it here. if not get_option('b_lto') test_deprecated = executable('test-deprecated', 'test/test-deprecated.c', dependencies: [dep_libwacom, dep_dl], include_directories: [includes_src], c_args: tests_cflags, install: false) test('test-deprecated', test_deprecated, suite: ['all']) endif endif # This is a non-optional test lt_version = '@0@:@1@:@2@'.format( libwacom_lt_c, libwacom_lt_r, libwacom_lt_a) test_ltversion = executable('test-ltversion', 'test/test-ltversion.c', c_args: ['-DLIBWACOM_LT_VERSION="@0@"'.format(lt_version)], install: false) test('test-ltversion', test_ltversion, suite: ['all']) # vim: set noexpandtab tabstop=8 shiftwidth=8: libwacom-libwacom-1.3/meson_options.txt000066400000000000000000000006051363647401700204160ustar00rootroot00000000000000option('documentation', type: 'feature', value: 'auto', description: 'Build doxygen documentation [default=auto]') option('udev-dir', type: 'string', value: '', description: 'udev base directory [default=$prefix/lib/udev]') option('tests', type: 'feature', value: 'enabled', description: 'Build the tests [default=enabled]') libwacom-libwacom-1.3/run-full-test.sh000077500000000000000000000034071363647401700200440ustar00rootroot00000000000000#!/usr/bin/env bash set -e date=`date +"%Y-%m-%d-%H.%M.%S"` builddir="build.$date" echo "####################################### running test suite" meson $builddir ninja -C $builddir test echo "####################################### running valgrind" pushd $builddir > /dev/null meson test --setup=valgrind --suite=valgrind popd > /dev/null echo "####################################### running ubsan" meson configure $builddir -Db_sanitize=undefined ninja -C $builddir test echo "####################################### running asan" meson configure $builddir -Db_sanitize=address ninja -C $builddir test echo "####################################### running scan-build" meson configure $builddir -Db_sanitize=none ninja -C $builddir scan-build echo "####################################### running make distcheck" # we can't configure with a custom sourcetree if we have run configure # previously. So let's only do this where we have a clean tree that we can # clone. if git diff --exit-code -s; then unset GIT_WORK_TREE mkdir -p "$builddir/autotools/build" mkdir -p "$builddir/autotools/inst" pushd "$builddir/autotools" > /dev/null git clone ../.. "src" pushd src > /dev/null autoreconf -ivf popd pushd build > /dev/null ../src/configure --prefix=$PWD/../inst/ make && make check make install make distcheck echo "############### running meson off tarball" mkdir -p _tarball_dir tar xf libwacom-*.tar.bz2 -C _tarball_dir pushd _tarball_dir/libwacom-*/ > /dev/null meson $builddir && ninja -C $builddir test popd > /dev/null popd > /dev/null popd > /dev/null else echo "local changes present, skipping make distcheck" fi echo "######## Success. Removing builddir #########" rm -rf "$buildir" libwacom-libwacom-1.3/test/000077500000000000000000000000001363647401700157375ustar00rootroot00000000000000libwacom-libwacom-1.3/test/Makefile.am000066400000000000000000000034531363647401700200000ustar00rootroot00000000000000noinst_PROGRAMS= \ test-load \ test-dbverify \ test-tablet-validity \ test-stylus-validity \ test-ltversion \ test-deprecated \ $(NULL) TESTS=$(noinst_PROGRAMS) AM_CPPFLAGS= \ -I$(top_srcdir)/libwacom \ -I$(top_srcdir)/include \ -DTOPSRCDIR="\"$(abs_top_srcdir)\"" test_load_SOURCES = test-load.c test_load_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) test_load_LDFLAGS = -no-install test_load_CFLAGS=$(AM_CFLAGS) $(GLIB_CFLAGS) test_dbverify_SOURCES = test-dbverify.c test_dbverify_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) test_dbverify_LDFLAGS = -no-install test_dbverify_CFLAGS=$(AM_CFLAGS) $(GLIB_CFLAGS) test_tablet_validity_SOURCES = test-tablet-validity.c test_tablet_validity_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) test_tablet_validity_LDFLAGS = -no-install test_tablet_validity_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) test_stylus_validity_SOURCES = test-stylus-validity.c test_stylus_validity_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) test_stylus_validity_LDFLAGS = -no-install test_stylus_validity_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) test_ltversion_SOURCES = test-ltversion.c test_ltversion_CFLAGS = $(AM_CFLAGS) -DLIBWACOM_LT_VERSION="\"$(LIBWACOM_LT_VERSION)\"" test_deprecated_SOURCES = test-deprecated.c test_deprecated_LDADD=$(top_builddir)/libwacom/libwacom.la $(DL_LIBS) test_deprecated_LDFLAGS = -no-install if HAVE_LIBXML noinst_PROGRAMS += test-tablet-svg-validity test_tablet_svg_validity_SOURCES = test-tablet-svg-validity.c test_tablet_svg_validity_LDADD = $(top_builddir)/libwacom/libwacom.la $(LIBXML_LIBS) test_tablet_svg_validity_LDFLAGS = -no-install test_tablet_svg_validity_CFLAGS = $(LIBXML_CFLAGS) endif clean-local: clean-local-check .PHONY: clean-local-check clean-local-check: rm -rf tmp.dbverify.* libwacom-libwacom-1.3/test/test-dbverify.c000066400000000000000000000142211363647401700206720ustar00rootroot00000000000000/* * Copyright © 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include "libwacom.h" #include static WacomDeviceDatabase *db_old; static WacomDeviceDatabase *db_new; static int scandir_filter(const struct dirent *entry) { return strncmp(entry->d_name, ".", 1); } static void rmtmpdir(const char *dir) { int nfiles; struct dirent **files; char *path = NULL; nfiles = scandir(dir, &files, scandir_filter, alphasort); while(nfiles--) { g_assert(asprintf(&path, "%s/%s", dir, files[nfiles]->d_name) != -1); g_assert(path); g_assert(remove(path) != -1); free(files[nfiles]); free(path); path = NULL; } free(files); g_assert(remove(dir) != -1); } static void find_matching(gconstpointer data) { WacomDevice **devs_old, **devs_new; WacomDevice **devices, **d; WacomDevice *other; gboolean found = FALSE; int index = GPOINTER_TO_INT(data); devs_old = libwacom_list_devices_from_database(db_old, NULL); devs_new = libwacom_list_devices_from_database(db_new, NULL); /* Make sure each device in old has a device in new */ devices = devs_old; other = devs_new[index]; for (d = devices; *d; d++) { if (libwacom_compare(other, *d, WCOMPARE_MATCHES) == 0) { found = TRUE; break; } } g_assert_true(found); /* Make sure each device in new has a device in old */ devices = devs_new; other = devs_old[index]; found = FALSE; for (d = devices; *d; d++) { /* devices with multiple matches will have multiple * devices in the list */ if (libwacom_compare(other, *d, WCOMPARE_MATCHES) == 0) { found = TRUE; break; } } g_assert_true(found); free(devs_old); free(devs_new); } static void test_database_size(void) { int sz1, sz2; WacomDevice **d1, **d2; d1 = libwacom_list_devices_from_database(db_old, NULL); d2 = libwacom_list_devices_from_database(db_new, NULL); g_assert_nonnull(d1); g_assert_nonnull(d2); sz1 = 0; for (WacomDevice **d = d1; *d; d++) sz1++; sz2 = 0; for (WacomDevice **d = d2; *d; d++) sz2++; g_assert_cmpint(sz1, ==, sz2); free(d1); free(d2); } static int compare_databases(WacomDeviceDatabase *orig, WacomDeviceDatabase *new) { int i, rc; WacomDevice **devs_new, **n; g_test_add_func("/dbverify/database-sizes", test_database_size); devs_new = libwacom_list_devices_from_database(new, NULL); for (n = devs_new, i = 0 ; *n; n++, i++) { char buf[1024]; /* We need to add the test index to avoid duplicate test names */ snprintf(buf, sizeof(buf), "/dbverify/%03d/%04x:%04x-%s", i, libwacom_get_vendor_id(*n), libwacom_get_product_id(*n), libwacom_get_name(*n)); g_test_add_data_func(buf, GINT_TO_POINTER(i), find_matching); } rc = g_test_run(); free(devs_new); return rc; } /* write out the current db, read it back in, compare */ static void duplicate_database(WacomDeviceDatabase *db, const char *dirname) { WacomDevice **device, **devices; int i; devices = libwacom_list_devices_from_database(db, NULL); g_assert(devices); g_assert(*devices); for (device = devices, i = 0; *device; device++, i++) { int i; int fd; char *path = NULL; int nstyli; const int *styli; g_assert(asprintf(&path, "%s/%s.tablet", dirname, libwacom_get_match(*device)) != -1); g_assert(path); fd = open(path, O_WRONLY|O_CREAT, S_IRWXU); g_assert(fd >= 0); libwacom_print_device_description(fd, *device); close(fd); free(path); if (!libwacom_has_stylus(*device)) continue; styli = libwacom_get_supported_styli(*device, &nstyli); for (i = 0; i < nstyli; i++) { int fd_stylus; const WacomStylus *stylus; g_assert(asprintf(&path, "%s/%#x.stylus", dirname, styli[i]) != -1); stylus = libwacom_stylus_get_for_id(db, styli[i]); g_assert(stylus); fd_stylus = open(path, O_WRONLY|O_CREAT, S_IRWXU); g_assert(fd_stylus >= 0); libwacom_print_stylus_description(fd_stylus, stylus); close(fd_stylus); free(path); } } free(devices); } static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } int main(int argc, char **argv) { WacomDeviceDatabase *db; char *dirname; int rc; g_test_init(&argc, &argv, NULL); g_test_set_nonfatal_assertions(); db = load_database(); dirname = strdup("tmp.dbverify.XXXXXX"); g_assert(mkdtemp(dirname)); /* just check for non-null to avoid Coverity complaints */ duplicate_database(db, dirname); db_new = libwacom_database_new_for_path(dirname); g_assert(db_new); db_old = db; rc = compare_databases(db_old, db_new); libwacom_database_destroy(db_new); libwacom_database_destroy(db_old); rmtmpdir(dirname); free(dirname); return rc; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/test/test-deprecated.c000066400000000000000000000056561363647401700211740ustar00rootroot00000000000000/* * Copyright © 2019 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "libwacom.h" /** * The normal symbols are hidden now when linking against a new library. * We know which version they're in though so we can remap them for this * test - if we get an unresolved symbol something has gone wrong. */ asm(".symver libwacom_match_destroy,libwacom_match_destroy@LIBWACOM_0.33"); asm(".symver libwacom_match_new,libwacom_match_new@LIBWACOM_0.33"); asm(".symver libwacom_error_set,libwacom_error_set@LIBWACOM_0.33"); asm(".symver libwacom_update_match,libwacom_update_match@LIBWACOM_0.33"); asm(".symver libwacom_stylus_destroy,libwacom_stylus_destroy@LIBWACOM_0.33"); /* Only generally matches the real functions, but since they're all noops * anyway it doesn't matter that we only have generic pointers. The basic * signatures are the same. */ extern void libwacom_match_destroy(void*); void* libwacom_match_new(void *, int, int, int); void libwacom_error_set(void *error, int, char *, ...); void libwacom_stylus_destroy(void *); void libwacom_update_match(void *, const void *); int main(void) { const char *syms[] = { "libwacom_match_destroy", "libwacom_match_new", "libwacom_error_set", "libwacom_update_match", "libwacom_stylus_destroy", NULL, }; void *lib, *sym; lib = dlopen("libwacom.so", RTLD_LAZY); assert(lib != NULL); for (const char **s = syms; *s; s++) { sym = dlsym(lib, *s); assert(sym == NULL); } /* These are all noops, so all we're looking for is not getting a linker * error */ libwacom_match_destroy(NULL); libwacom_match_new(NULL, 0, 0, 0); libwacom_error_set(NULL, 0, NULL); libwacom_stylus_destroy(NULL); libwacom_update_match(NULL, NULL); return 0; } libwacom-libwacom-1.3/test/test-load.c000066400000000000000000000217221363647401700200030ustar00rootroot00000000000000/* * Copyright © 2011 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "libwacom.h" struct fixture { WacomDeviceDatabase *db; }; static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } static void fixture_setup(struct fixture *f, gconstpointer user_data) { f->db = load_database(); } static void fixture_teardown(struct fixture *f, gconstpointer user_data) { libwacom_database_destroy(f->db); } static void check_multiple_match(WacomDevice *device) { const WacomMatch **match; int nmatches = 0; int found_bus = 0, found_vendor_id = 0, found_product_id = 0; for (match = libwacom_get_matches(device); *match; match++) { nmatches++; if (libwacom_match_get_bustype(*match) == libwacom_get_bustype(device)) found_bus = 1; if ((int)libwacom_match_get_vendor_id(*match) == libwacom_get_vendor_id(device)) found_vendor_id = 1; if ((int)libwacom_match_get_product_id(*match) == libwacom_get_product_id(device)) found_product_id = 1; } g_assert_cmpint(nmatches, ==, 2); g_assert_true(found_bus); g_assert_true(found_vendor_id); g_assert_true(found_product_id); } static void test_invalid_device(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0, 0, NULL); g_assert_null(device); } static void test_intuos4(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00bc, NULL); g_assert_nonnull(device); g_assert_cmpstr(libwacom_get_name(device), ==, "Wacom Intuos4 WL"); g_assert_cmpint(libwacom_get_class(device), ==, WCLASS_INTUOS4); g_assert_cmpint(libwacom_get_vendor_id(device), ==, 0x56a); g_assert_cmpint(libwacom_get_product_id(device), ==, 0xbc); g_assert_cmpint(libwacom_get_bustype(device), ==, WBUSTYPE_USB); g_assert_cmpint(libwacom_get_num_buttons(device), ==, 9); g_assert_true(libwacom_has_stylus(device)); g_assert_true(libwacom_is_reversible(device)); g_assert_false(libwacom_has_touch(device)); g_assert_true(libwacom_has_ring(device)); g_assert_false(libwacom_has_ring2(device)); g_assert_false(libwacom_has_touchswitch(device)); g_assert_cmpint(libwacom_get_num_strips(device), ==, 0); g_assert_cmpint(libwacom_get_integration_flags (device), ==, WACOM_DEVICE_INTEGRATED_NONE); g_assert_cmpint(libwacom_get_width(device), ==, 8); g_assert_cmpint(libwacom_get_height(device), ==, 5); check_multiple_match(device); libwacom_destroy(device); } static void test_intuos4_wl(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00b9, NULL); g_assert_nonnull(device); g_assert_true(libwacom_get_button_flag(device, 'A') & WACOM_BUTTON_RING_MODESWITCH); g_assert_true(libwacom_get_button_flag(device, 'I') & WACOM_BUTTON_OLED); #if 0 /* disabled - needs subprocesses testing but invalid data handling is better handled in a separate test suite */ /* * I4 WL has only 9 buttons, asking for a 10th button will raise a warning * in libwacom_get_button_flag() which is expected. */ printf("Following critical warning in libwacom_get_button_flag() is expected\n"); g_assert_cmpint(libwacom_get_button_flag(device, 'J'), ==, WACOM_BUTTON_NONE); #endif g_assert_cmpint(libwacom_get_ring_num_modes(device), ==, 4); libwacom_destroy(device); } static void test_cintiq24hd(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00f4, NULL); g_assert_nonnull(device); g_assert_cmpint(libwacom_get_ring_num_modes(device), ==, 3); g_assert_cmpint(libwacom_get_ring2_num_modes(device), ==, 3); libwacom_destroy(device); } static void test_cintiq21ux(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00cc, NULL); g_assert_nonnull(device); g_assert_cmpint(libwacom_get_num_strips(device), ==, 2); libwacom_destroy(device); } static void test_wacf004(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_name(f->db, "Wacom Serial Tablet WACf004", NULL); g_assert_nonnull(device); g_assert_true(libwacom_get_integration_flags(device) & WACOM_DEVICE_INTEGRATED_DISPLAY); g_assert_true(libwacom_get_integration_flags(device) & WACOM_DEVICE_INTEGRATED_SYSTEM); g_assert_null(libwacom_get_model_name(device)); libwacom_destroy(device); } static void test_cintiq24hdt(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_usbid(f->db, 0x56a, 0x00f8, NULL); const WacomMatch *match; g_assert_nonnull(device); /* 24HDT has one paired device */ match = libwacom_get_paired_device(device); g_assert_nonnull(match); g_assert_cmpint(libwacom_match_get_vendor_id(match), ==, 0x56a); g_assert_cmpint(libwacom_match_get_product_id(match), ==, 0xf6); g_assert_cmpint(libwacom_match_get_bustype(match), ==, WBUSTYPE_USB); libwacom_destroy(device); } static void test_cintiq13hd(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_name(f->db, "Wacom Cintiq 13HD", NULL); g_assert_nonnull(device); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'A'), ==, BTN_0); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'B'), ==, BTN_1); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'C'), ==, BTN_2); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'D'), ==, BTN_3); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'E'), ==, BTN_4); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'F'), ==, BTN_5); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'G'), ==, BTN_6); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'H'), ==, BTN_7); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'I'), ==, BTN_8); g_assert_cmpstr(libwacom_get_model_name(device), ==, "DTK-1300"); libwacom_destroy(device); } static void test_bamboopen(struct fixture *f, gconstpointer user_data) { WacomDevice *device = libwacom_new_from_name(f->db, "Wacom Bamboo Pen", NULL); g_assert_nonnull(device); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'A'), ==, BTN_BACK); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'B'), ==, BTN_FORWARD); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'C'), ==, BTN_LEFT); g_assert_cmpint(libwacom_get_button_evdev_code(device, 'D'), ==, BTN_RIGHT); g_assert_cmpstr(libwacom_get_model_name(device), ==, "MTE-450"); libwacom_destroy(device); } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_set_nonfatal_assertions(); g_test_add("/load/0000:0000", struct fixture, NULL, fixture_setup, test_invalid_device, fixture_teardown); g_test_add("/load/056a:00bc", struct fixture, NULL, fixture_setup, test_intuos4, fixture_teardown); g_test_add("/load/056a:00b8", struct fixture, NULL, fixture_setup, test_intuos4_wl, fixture_teardown); g_test_add("/load/056a:00f4", struct fixture, NULL, fixture_setup, test_cintiq24hd, fixture_teardown); g_test_add("/load/056a:00cc", struct fixture, NULL, fixture_setup, test_cintiq21ux, fixture_teardown); g_test_add("/load/056a:00f8", struct fixture, NULL, fixture_setup, test_cintiq24hdt, fixture_teardown); g_test_add("/load/056a:0304", struct fixture, NULL, fixture_setup, test_cintiq13hd, fixture_teardown); g_test_add("/load/056a:0065", struct fixture, NULL, fixture_setup, test_bamboopen, fixture_teardown); g_test_add("/load/056a:WACf004", struct fixture, NULL, fixture_setup, test_wacf004, fixture_teardown); return g_test_run(); } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/test/test-ltversion.c000066400000000000000000000006621363647401700211110ustar00rootroot00000000000000#include #include int main(void) { const char *version = LIBWACOM_LT_VERSION; int C, R, A; int rc; rc = sscanf(version, "%d:%d:%d", &C, &R, &A); assert(rc == 3); /* we don't change the soname anymore, we use symbol maps instead. So these can stay fixed until we properly break the ABI and bump the soname. */ assert(C == 8); assert(R == 1); assert(A == 6); return 0; } libwacom-libwacom-1.3/test/test-stylus-validity.c000066400000000000000000000213711363647401700222520ustar00rootroot00000000000000/* * Copyright © 2019 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software udo y and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include "libwacom.h" #include static const WacomStylus **all_styli; static void test_type(gconstpointer data) { const WacomStylus *stylus = data; switch (libwacom_stylus_get_type(stylus)) { case WSTYLUS_GENERAL: case WSTYLUS_INKING: case WSTYLUS_AIRBRUSH: case WSTYLUS_CLASSIC: case WSTYLUS_MARKER: case WSTYLUS_STROKE: case WSTYLUS_PUCK: case WSTYLUS_3D: break; case WSTYLUS_UNKNOWN: default: g_test_fail(); } } static void test_eraser(gconstpointer data) { const WacomStylus *stylus = data; WacomStylusType type; gboolean matching_eraser_found = FALSE; /* A stylus cannot be an eraser and have an eraser at the same time */ g_assert_true(libwacom_stylus_has_eraser(stylus)); g_assert_false(libwacom_stylus_is_eraser(stylus)); /* Search for another stylus with the same type as ours that is an eraser. FIXME: This is imprecise. Multiple pens share the same type but we are happy with the first eraser of that type we find. So once we have an eraser for each type, this will always be true, even if we forget to add the right eraser for a new pen. */ type = libwacom_stylus_get_type (stylus); for (const WacomStylus **s = all_styli; *s; s++) { if (libwacom_stylus_is_eraser(*s) && libwacom_stylus_get_type(*s) == type) { matching_eraser_found = TRUE; break; } } g_assert_true(matching_eraser_found); } static void test_puck(gconstpointer data) { const WacomStylus *stylus = data; int has_wheel = libwacom_stylus_has_wheel(stylus); int has_lens = libwacom_stylus_has_lens(stylus); /* 4D mouse is the only one with neither, everything * else has either wheel or lens */ if (libwacom_stylus_get_id(stylus) == 0x94) { g_assert_false(has_wheel); g_assert_false(has_lens); } else { g_assert_true(has_wheel != has_lens); } } static void test_tilt(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_tilt = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_TILT; g_assert_true(has_tilt); } static void test_no_tilt(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_tilt = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_TILT; g_assert_false(has_tilt); } static void test_pressure(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_pressure = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_PRESSURE; g_assert_true(has_pressure); } static void test_no_pressure(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_pressure = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_PRESSURE; g_assert_false(has_pressure); } static void test_distance(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_distance = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_DISTANCE; g_assert_true(has_distance); } static void test_no_distance(gconstpointer data) { const WacomStylus *stylus = data; gboolean has_distance = libwacom_stylus_get_axes(stylus) & WACOM_AXIS_TYPE_DISTANCE; g_assert_false(has_distance); } static void test_name(gconstpointer data) { const WacomStylus *stylus = data; g_assert_nonnull(libwacom_stylus_get_name(stylus)); } static void test_buttons(gconstpointer data) { const WacomStylus *stylus = data; g_assert_cmpint(libwacom_stylus_get_num_buttons(stylus), >, 0); } static void test_no_buttons(gconstpointer data) { const WacomStylus *stylus = data; g_assert_cmpint(libwacom_stylus_get_num_buttons(stylus), ==, 0); } /* Wrapper function to make adding tests simpler. g_test requires * a unique test case name so we assemble that from the test function and * the stylus data. */ static inline void _add_test(const WacomStylus *stylus, GTestDataFunc func, const char *funcname) { char buf[128]; const char *prefix; /* tests must be test_foobar */ g_assert(strncmp(funcname, "test_", 5) == 0); prefix = &funcname[5]; snprintf(buf, 128, "/stylus/%s/%03x-%s", prefix, libwacom_stylus_get_id(stylus), libwacom_stylus_get_name(stylus)); g_test_add_data_func(buf, stylus, func); } #define add_test(stylus, func_) \ _add_test(stylus, func_, #func_) static void setup_tests(const WacomStylus *stylus) { add_test(stylus, test_name); add_test(stylus, test_type); /* Button checks */ switch (libwacom_stylus_get_type(stylus)) { case WSTYLUS_PUCK: add_test(stylus, test_puck); add_test(stylus, test_buttons); break; case WSTYLUS_INKING: case WSTYLUS_STROKE: add_test(stylus, test_no_buttons); break; default: switch (libwacom_stylus_get_id(stylus)) { case 0x885: add_test(stylus, test_no_buttons); break; default: add_test(stylus, test_buttons); } } /* Axes checks */ switch (libwacom_stylus_get_id(stylus)) { case 0xffffd: add_test(stylus, test_pressure); add_test(stylus, test_no_distance); add_test(stylus, test_no_tilt); break; case 0x006: case 0x096: case 0x097: add_test(stylus, test_no_pressure); add_test(stylus, test_distance); add_test(stylus, test_no_tilt); break; case 0x007: case 0x017: case 0x094: case 0x806: add_test(stylus, test_no_pressure); add_test(stylus, test_distance); add_test(stylus, test_tilt); break; case 0x021: case 0x8e2: case 0x862: add_test(stylus, test_pressure); add_test(stylus, test_distance); add_test(stylus, test_no_tilt); break; default: add_test(stylus, test_pressure); add_test(stylus, test_tilt); add_test(stylus, test_distance); break; } if (libwacom_stylus_has_eraser(stylus)) add_test(stylus, test_eraser); } /** * Return a NULL-terminated list of all styli. * * libwacom only gives us the styli per-device so this is a bit more * complicated than it should be. */ static const WacomStylus ** assemble_styli(WacomDeviceDatabase *db) { WacomDevice **devices = libwacom_list_devices_from_database(db, NULL); const WacomStylus **styli; int *ids = NULL; int nids = 0; int sz = 0; g_assert(devices); for (WacomDevice **d = devices; *d; d++) { const int *styli; int nstyli; styli = libwacom_get_supported_styli(*d, &nstyli); /* Make sure our array is large enough to accommodate for all new styli. Simpler than reallocing after every entry */ if (nstyli > sz - nids) { sz = nids + nstyli; ids = realloc(ids, sz * sizeof(*ids)); g_assert(ids); } /* For each stylus in the current device, add it to ids[] if it's not already in there */ for (int i = 0; i < nstyli; i++) { gboolean found = FALSE; for (int j = 0; j < nids && !found; j++) { if (ids[j] == styli[i]) found = TRUE; } if (!found) ids[nids++] = styli[i]; } } styli = calloc(nids + 1, sizeof(*styli)); for (int i = 0; i < nids; i++) { styli[i] = libwacom_stylus_get_for_id (db, ids[i]); g_assert(styli[i]); } free(devices); free(ids); return styli; } static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } int main(int argc, char **argv) { WacomDeviceDatabase *db; int rc; g_test_init(&argc, &argv, NULL); g_test_set_nonfatal_assertions(); db = load_database(); all_styli = assemble_styli(db); for (const WacomStylus **s = all_styli; *s; s++) setup_tests(*s); rc = g_test_run(); free(all_styli); libwacom_database_destroy (db); return rc; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/test/test-tablet-svg-validity.c000066400000000000000000000237741363647401700227700ustar00rootroot00000000000000/* * Copyright ?? 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Olivier Fourdan */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include "libwacom.h" static xmlNodePtr verify_has_sub (xmlNodePtr cur, char *sub) { cur = cur->xmlChildrenNode; while (cur != NULL) { xmlChar *prop; /* Descend the tree if dealing with a group */ if (xmlStrcmp(cur->name, (const xmlChar *) "g") == 0) { xmlNodePtr sub_node; sub_node = verify_has_sub (cur, sub); if (sub_node != NULL) return sub_node; } prop = xmlGetProp(cur, (xmlChar *) "id"); if (prop) { int status = xmlStrcmp(prop, (const xmlChar *) sub); xmlFree(prop); if (status == 0) return cur; } cur = cur->next; } return NULL; } static gboolean class_found (gchar **classes, gchar *value) { gchar **ptr = classes; while (*ptr) { if (strcmp (*ptr++, value) == 0) return TRUE; } return FALSE; } static void verify_has_class (xmlNodePtr cur, const gchar *expected) { xmlChar *prop; gchar **classes_present; gchar **classes_expected; gchar **ptr; prop = xmlGetProp (cur, (xmlChar *) "class"); g_assert (prop != NULL); g_assert (strlen((const char *) prop) > 0); classes_present = g_strsplit ((const gchar *) prop, " ", -1); classes_expected = g_strsplit (expected, " ", -1); ptr = classes_expected; while (*ptr) g_assert (class_found (classes_present, *ptr++)); g_strfreev (classes_present); g_strfreev (classes_expected); xmlFree (prop); } static void check_button (xmlNodePtr cur, const WacomDevice *device, char button, gchar *type) { char *sub; char *class; xmlNodePtr node; WacomButtonFlags flags; /* Check ID */ sub = g_strdup_printf ("%s%c", type, button); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); /* Check class */ flags = libwacom_get_button_flag(device, button); if (flags & WACOM_BUTTON_MODESWITCH) class = g_strdup_printf ("%c ModeSwitch %s", button, type); else class = g_strdup_printf ("%c %s", button, type); verify_has_class (node, class); g_free (class); } static void check_touchstrip (xmlNodePtr cur, gchar *id) { char *sub; char *class; xmlNodePtr node; node = verify_has_sub (cur, id); g_assert (node != NULL); class = g_strdup_printf ("%s %s", id, "TouchStrip"); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Label%sUp", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sUp %s Label", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Label%sDown", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sDown %s Label", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Leader%sUp", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sUp %s Leader", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Leader%sDown", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sDown %s Leader", id, id); verify_has_class (node, class); g_free (class); } static void check_touchring (xmlNodePtr cur, gchar *id) { char *sub; char *class; xmlNodePtr node; node = verify_has_sub (cur, id); g_assert (node != NULL); class = g_strdup_printf ("%s %s", id, "TouchRing"); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Label%sCCW", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sCCW %s Label", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Label%sCW", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sCW %s Label", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Leader%sCCW", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sCCW %s Leader", id, id); verify_has_class (node, class); g_free (class); sub = g_strdup_printf ("Leader%sCW", id); node = verify_has_sub (cur, sub); g_assert (node != NULL); g_free (sub); class = g_strdup_printf ("%sCW %s Leader", id, id); verify_has_class (node, class); g_free (class); } struct fixture { xmlDocPtr doc; xmlNodePtr root; }; static void test_filename(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; const char *filename; filename = libwacom_get_layout_filename(device); if (libwacom_get_num_buttons(device) > 0) { g_assert_nonnull(filename); g_assert_cmpstr(filename, !=, ""); } } static void test_svg(struct fixture *f, gconstpointer data) { g_assert_nonnull(f->doc); g_assert_nonnull(f->root); g_assert_cmpint(xmlStrcmp(f->root->name, (const xmlChar*) "svg"), ==, 0); } static void test_dimensions(struct fixture *f, gconstpointer data) { xmlChar *prop; /* width is provided */ prop = xmlGetProp(f->root, (xmlChar *) "width") ; g_assert_nonnull(prop); xmlFree(prop); /* height is provided */ prop = xmlGetProp(f->root, (xmlChar *) "height") ; g_assert_nonnull(prop); xmlFree(prop); } static void test_rings(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; if (libwacom_has_ring(device)) check_touchring(f->root, "Ring"); if (libwacom_has_ring2(device)) check_touchring(f->root, "Ring2"); } static void test_strips(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; if (libwacom_get_num_strips(device) > 0) check_touchstrip(f->root, "Strip"); if (libwacom_get_num_strips(device) > 1) check_touchstrip(f->root, "Strip2"); } static void test_buttons(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; int num_buttons = libwacom_get_num_buttons (device); for (char button = 'A'; button < 'A' + num_buttons; button++) { check_button(f->root, device, button, "Button"); check_button(f->root, device, button, "Label"); check_button(f->root, device, button, "Leader"); } } static void setup_svg(struct fixture *f, gconstpointer data) { const WacomDevice *device = data; const char *filename = libwacom_get_layout_filename(device); xmlDocPtr doc; if (!filename) return; doc = xmlParseFile(filename); f->doc = doc; f->root = doc ? xmlDocGetRootElement(doc) : NULL; } static void teardown_svg(struct fixture *f, gconstpointer data) { if (f->doc) xmlFreeDoc(f->doc); } typedef void (*testfunc)(struct fixture *f, gconstpointer d); /* Wrapper function to make adding tests simpler. g_test requires * a unique test case name so we assemble that from the test function and * the tablet data. */ static inline void _add_test(WacomDevice *device, testfunc func, const char *funcname) { char buf[128]; static int count; /* guarantee unique test case names */ const char *prefix; /* tests must be test_foobar */ g_assert(strncmp(funcname, "test_", 5) == 0); prefix = &funcname[5]; snprintf(buf, 128, "/svg/%s/%03d/%04x:%04x-%s", prefix, ++count, libwacom_get_vendor_id(device), libwacom_get_product_id(device), libwacom_get_name(device)); g_test_add(buf, struct fixture, device, setup_svg, func, teardown_svg); } #define add_test(device_, func_) \ _add_test(device_, func_, #func_) #define add_test(device_, func_) \ _add_test(device_, func_, #func_) static void setup_tests(WacomDevice *device) { const char *name; name = libwacom_get_name(device); if (strcmp(name, "Generic") == 0) return; add_test(device, test_filename); if (!libwacom_get_layout_filename(device)) return; add_test(device, test_svg); add_test(device, test_dimensions); if (libwacom_get_num_buttons(device) > 0) add_test(device, test_buttons); if (libwacom_has_ring(device) || libwacom_has_ring2(device)) add_test(device, test_rings); if (libwacom_get_num_strips(device) > 0) add_test(device, test_strips); } static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice **devices; int rc; g_test_init(&argc, &argv, NULL); db = load_database(); devices = libwacom_list_devices_from_database(db, NULL); g_assert(devices); g_assert(*devices); for (WacomDevice **device = devices; *device; device++) setup_tests(*device); rc = g_test_run(); free(devices); libwacom_database_destroy (db); return rc; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/test/test-tablet-validity.c000066400000000000000000000231511363647401700221600ustar00rootroot00000000000000/* * Copyright © 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software udo y and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer (peter.hutterer@redhat.com) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include "libwacom.h" #include typedef int (*NumModesFn) (const WacomDevice *device); static gboolean buttons_have_direction(WacomDevice *device) { char button; int num_buttons; num_buttons = libwacom_get_num_buttons (device); if (num_buttons == 0) return TRUE; for (button = 'A'; button < 'A' + num_buttons; button++) { WacomButtonFlags flags; flags = libwacom_get_button_flag(device, button); if (!(flags & WACOM_BUTTON_DIRECTION)) return FALSE; } return TRUE; } static gboolean match_mode_switch(WacomDevice *device, NumModesFn get_num_modes, WacomButtonFlags flag) { char button; int num_buttons; int num_switches; int num_modes; num_buttons = libwacom_get_num_buttons (device); num_modes = get_num_modes (device); num_switches = 0; for (button = 'A'; button < 'A' + num_buttons; button++) { WacomButtonFlags flags; flags = libwacom_get_button_flag(device, button); if (flags & flag) num_switches++; } /* * If we have more than one mode-switch button, then the * number of modes must match the number of mode-switch buttons. */ if (num_switches > 1 && num_modes != num_switches) return FALSE; /* * If we have more than one mode, then we should find at least * one mode-switch button. */ if (num_modes > 1 && num_switches == 0) return FALSE; return TRUE; } static gboolean tablet_has_lr_buttons(WacomDevice *device) { int nleft = 0; int nright = 0; int num_buttons; char button; num_buttons = libwacom_get_num_buttons (device); for (button = 'A'; button < 'A' + num_buttons; button++) { WacomButtonFlags f = libwacom_get_button_flag(device, button); if (f & WACOM_BUTTON_POSITION_LEFT) nleft++; if (f & WACOM_BUTTON_POSITION_RIGHT) nright++; } if (nleft > 0 || nright > 0) return TRUE; return FALSE; } static void test_class(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; switch (libwacom_get_class(device)) { case WCLASS_BAMBOO: case WCLASS_ISDV4: case WCLASS_PEN_DISPLAYS: case WCLASS_GRAPHIRE: case WCLASS_REMOTE: case WCLASS_INTUOS: case WCLASS_INTUOS2: case WCLASS_INTUOS3: case WCLASS_INTUOS4: case WCLASS_INTUOS5: case WCLASS_CINTIQ: break; default: g_test_fail(); break; } } static void test_name(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_nonnull(libwacom_get_name(device)); g_assert_cmpstr(libwacom_get_name(device), !=, ""); } static void assert_vidpid(WacomBusType bus, int vid, int pid) { switch (bus) { case WBUSTYPE_SERIAL: g_assert_cmpint(vid, >=, 0); g_assert_cmpint(pid, >=, 0); break; case WBUSTYPE_USB: if (vid == 0x056A) g_assert_cmpint(pid, !=, 0x84); /* wireless dongle */ /* fall through */ case WBUSTYPE_BLUETOOTH: case WBUSTYPE_I2C: g_assert_cmpint(vid, >, 0); g_assert_cmpint(pid, >, 0); break; case WBUSTYPE_UNKNOWN: default: g_test_fail(); break; } } static void test_vidpid(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; WacomBusType bus = libwacom_get_bustype(device); assert_vidpid(bus, libwacom_get_vendor_id(device), libwacom_get_product_id(device)); } static void test_matches(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_nonnull(libwacom_get_match(device)); g_assert_nonnull(libwacom_get_matches(device)); } static void test_matches_vidpid(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; const WacomMatch **match = libwacom_get_matches(device); while (*match) { WacomBusType bus = libwacom_match_get_bustype(*match); assert_vidpid(bus, libwacom_match_get_vendor_id(*match), libwacom_match_get_product_id(*match)); match++; } } static void test_dimensions(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_cmpint(libwacom_get_width(device), >, 0); g_assert_cmpint(libwacom_get_height(device), >, 0); } static void test_buttons(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_cmpint(libwacom_get_num_buttons(device), >=, 0); g_assert_true(buttons_have_direction(device)); if (libwacom_is_reversible(device) && libwacom_get_num_buttons(device) > 0) g_assert_true(tablet_has_lr_buttons(device)); } static void test_styli(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; int nstyli; const int *styli = libwacom_get_supported_styli(device, &nstyli); g_assert_cmpint(nstyli, >, 0); g_assert_nonnull(styli); } static void test_realstylus(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; int nstyli; const int *styli = libwacom_get_supported_styli(device, &nstyli); for (int i = 0; i < nstyli; i++) { g_assert_cmpint(styli[i], !=, WACOM_STYLUS_FALLBACK_ID); g_assert_cmpint(styli[i], !=, WACOM_ERASER_FALLBACK_ID); } } static void test_rings(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_cmpint(libwacom_get_ring_num_modes(device), >=, 0); g_assert_cmpint(libwacom_get_ring2_num_modes(device), >=, 0); if (libwacom_has_ring(device)) g_assert_true(match_mode_switch(device, libwacom_get_ring_num_modes, WACOM_BUTTON_RING_MODESWITCH)); if (libwacom_has_ring2(device)) g_assert_true(match_mode_switch(device, libwacom_get_ring2_num_modes, WACOM_BUTTON_RING2_MODESWITCH)); } static void test_strips(gconstpointer data) { WacomDevice *device = (WacomDevice*)data; g_assert_cmpint(libwacom_get_num_strips(device), >=, 0); g_assert_cmpint(libwacom_get_strips_num_modes(device), >=, 0); if (libwacom_get_num_strips(device) > 0) g_assert_true(match_mode_switch(device, libwacom_get_strips_num_modes, WACOM_BUTTON_TOUCHSTRIP_MODESWITCH)); } /* Wrapper function to make adding tests simpler. g_test requires * a unique test case name so we assemble that from the test function and * the tablet data. */ static inline void _add_test(WacomDevice *device, GTestDataFunc func, const char *funcname) { char buf[128]; static int count; /* guarantee unique test case names */ const char *prefix; /* tests must be test_foobar */ g_assert(strncmp(funcname, "test_", 5) == 0); prefix = &funcname[5]; snprintf(buf, 128, "/tablet/%s/%03d/%04x:%04x-%s", prefix, ++count, libwacom_get_vendor_id(device), libwacom_get_product_id(device), libwacom_get_name(device)); g_test_add_data_func(buf, device, func); } #define add_test(device_, func_) \ _add_test(device_, func_, #func_) static void setup_tests(WacomDevice *device) { const char *name; name = libwacom_get_name(device); if (strcmp(name, "Generic") == 0) return; add_test(device, test_class); add_test(device, test_name); add_test(device, test_vidpid); add_test(device, test_matches); add_test(device, test_matches_vidpid); add_test(device, test_buttons); add_test(device, test_styli); add_test(device, test_rings); add_test(device, test_strips); /* ISDv4 are built-in, they may be of varying size */ if (libwacom_get_class(device) != WCLASS_ISDV4 && libwacom_get_class(device) != WCLASS_REMOTE) add_test(device, test_dimensions); /* FIXME: we force the generic pen for these, should add a test */ if (libwacom_has_stylus(device)) add_test(device, test_styli); switch (libwacom_get_class(device)) { case WCLASS_INTUOS: case WCLASS_INTUOS2: case WCLASS_INTUOS3: case WCLASS_INTUOS4: case WCLASS_INTUOS5: case WCLASS_CINTIQ: add_test(device, test_realstylus); break; default: break; } } static WacomDeviceDatabase * load_database(void) { WacomDeviceDatabase *db; const char *datadir; datadir = getenv("LIBWACOM_DATA_DIR"); if (!datadir) datadir = TOPSRCDIR"/data"; db = libwacom_database_new_for_path(datadir); if (!db) printf("Failed to load data from %s", datadir); g_assert(db); return db; } int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice **devices; int rc; g_test_init(&argc, &argv, NULL); g_test_set_nonfatal_assertions(); db = load_database(); devices = libwacom_list_devices_from_database(db, NULL); g_assert(devices); g_assert(*devices); for (WacomDevice **device = devices; *device; device++) setup_tests(*device); rc = g_test_run(); libwacom_database_destroy(db); free(devices); return rc; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/test/valgrind.suppressions000066400000000000000000000005571363647401700222530ustar00rootroot00000000000000{ Memcheck:Leak ... fun:g_type_register_static } { Memcheck:Leak ... fun:g_type_register_fundamental } { Memcheck:Leak ... fun:g_malloc0 } { Memcheck:Leak fun:malloc ... fun:g_get_language_names_with_category } libwacom-libwacom-1.3/tools/000077500000000000000000000000001363647401700161205ustar00rootroot00000000000000libwacom-libwacom-1.3/tools/Makefile.am000066400000000000000000000023041363647401700201530ustar00rootroot00000000000000AM_CPPFLAGS=-I$(top_srcdir)/libwacom -DTOPSRCDIR="\"$(abs_top_srcdir)\"" noinst_PROGRAMS = generate-udev-rules list-devices list-compatible-styli generate_udev_rules_SOURCES = generate-udev-rules.c generate_udev_rules_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) generate_udev_rules_CFLAGS=$(GLIB_CFLAGS) list_devices_SOURCES = list-devices.c list_devices_LDADD=$(top_builddir)/libwacom/libwacom.la list_compatible_styli_SOURCES = list-compatible-styli.c list_compatible_styli_LDADD=$(top_builddir)/libwacom/libwacom.la bin_PROGRAMS = libwacom-list-local-devices libwacom_list_local_devices_SOURCES = list-local-devices.c libwacom_list_local_devices_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) libwacom_list_local_devices_CFLAGS=$(GLIB_CFLAGS) if HAVE_GTK2 noinst_PROGRAMS += show-svg-image show_svg_image_SOURCES = show-svg-image.c show_svg_image_LDADD = $(top_builddir)/libwacom/libwacom.la $(GTK2_LIBS) show_svg_image_CFLAGS = $(GTK2_CFLAGS) endif dist_man1_MANS = libwacom-list-local-devices.man rules = 65-libwacom.rules udev_rulesdir=$(UDEV_DIR)/rules.d dist_udev_rules_DATA = $(rules) $(rules): generate-udev-rules $(builddir)/$< > $@ CLEANFILES = $(rules) EXTRA_DIST = $(rules) libwacom-libwacom-1.3/tools/clean_svg.py000077500000000000000000000221571363647401700204450ustar00rootroot00000000000000#! /usr/bin/env python # # Copyright (c) 2013 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Author: Joaquim Rocha # import sys from argparse import ArgumentParser from xml.etree import ElementTree as ET NAMESPACE = "http://www.w3.org/2000/svg" BRACKETS_NAMESPACE = '{' + NAMESPACE + '}' def human_round(number): ''' Round to closest .5 ''' return round(number * 2) / 2.0 def traverse_and_clean(node): ''' Clean the tree recursively ''' # Remove any non-SVG namespace attributes for key in node.attrib.keys(): if key.startswith('{'): del node.attrib[key] if node.tag == 'g' and node.attrib.has_key('id'): apply_id_and_class_from_group(node) del node.attrib['id'] if node.attrib.has_key('style'): if node.tag == 'text': node.attrib['style'] = 'text-anchor:start;' elif node.tag != 'svg': del node.attrib['style'] remove_transform_if_exists(node) round_attrib(node, 'd', 'x', 'y', 'rx', 'ry', 'width', 'height', 'cx', 'cy', 'r') for child in node.getchildren(): traverse_and_clean(child) def round_attrib(node, *attrs): for attr_name in attrs: attr_value = node.attrib.get(attr_name) if attr_value is None: continue if attr_name == 'd': d = attr_value.replace(',', ' ') values = [round_if_number(value) for value in d.split()] node.attrib[attr_name] = ' '.join(values) else: node.attrib[attr_name] = round_if_number(attr_value) def round_if_number(value): try: value = human_round(float(value.strip())) except ValueError: pass return str(value) def remove_non_svg_nodes_and_strip_namespace(root): if root.tag.startswith(BRACKETS_NAMESPACE): root.tag = root.tag[len(BRACKETS_NAMESPACE):] for elem in root.getchildren(): if not elem.tag.startswith(BRACKETS_NAMESPACE) or \ elem.tag == BRACKETS_NAMESPACE + 'metadata': root.remove(elem) else: remove_non_svg_nodes_and_strip_namespace(elem) def remove_transform_if_exists(node): TRANSLATE = 'translate' MATRIX = 'matrix' transform = node.attrib.get('transform') if transform is None: return transform = transform.strip() if transform.startswith(TRANSLATE): values = transform[len(TRANSLATE) + 1:-1].split(',') try: x, y = float(values[0]), float(values[1]) except: return apply_translation(node, 1, 0, 0, 1, x, y) elif transform.startswith(MATRIX): values = transform[len(MATRIX) + 1:-1].split(',') try: a, b, c, d, e, f = [float(value.strip()) for value in values] except: return apply_translation(node, a, b, c, d, e, f) apply_scaling(node, a, d) del node.attrib['transform'] def apply_translation(node, a, b, c, d, e, f): x_attr, y_attr = 'x', 'y' if node.tag == 'circle': x_attr, y_attr = 'cx', 'cy' elif node.tag == 'path': apply_translation_to_path(node, e, f) return try: x, y = float(node.attrib[x_attr]), float(node.attrib[y_attr]) new_x = x * a + y * c + 1 * e new_y = x * b + y * d + 1 * f node.attrib[x_attr] = str(new_x) node.attrib[y_attr] = str(new_y) except: pass def apply_translation_to_path(node, x, y): d = node.attrib.get('d') if d is None: return d = d.replace(',', ' ').split() m_init_index = 0 length = len(d) m_end_index = length operation = 'M' i = 0 while i < length: value = d[i] if value.lower() == 'm': operation = value m_init_index = i + 1 elif len(value) == 1 and value.isalpha(): m_end_index = i break i += 1 for i in range(m_init_index, m_end_index, 2): d[i] = str(float(d[i]) + x) d[i + 1] = str(float(d[i + 1]) + y) if operation == 'm': break node.attrib['d'] = ' '.join(d[:m_init_index]) + ' ' + ' '.join(d[m_init_index:m_end_index]) + ' '.join(d[m_end_index:]) def apply_scaling(node, x, y): w_attr, h_attr = 'width', 'height' if node.tag == 'circle': r = float(node.attrib.get('r', 1.0)) node.attrib['r'] = str(r * x) try: w = float(node.attrib[w_attr]) h = float(node.attrib[h_attr]) node.attrib[w_attr] = str(w * x) node.attrib[h_attr] = str(h * y) except: pass def to_string_rec(node, level=0): indent = '\n' + level * ' ' tag_name = node.tag # Remove 'defs' element. This cannot be done in the traverse_and_clean # because somehow it is never found if tag_name == 'defs': return '' # use a list to put id and class as the first arguments attribs = [] for attr in get_node_attrs_sorted(node): attr_value = node.attrib.get(attr) if attr_value is not None: attribs.append(indent + ' %s="%s"' % (attr, attr_value)) string = indent + '<' + tag_name + ''.join(attribs) if len(node) or node.text: string += '>' if not node.text or not node.text.strip(): node.text = indent + ' ' else: string += node.text if list(node): for child in get_node_children_sorted(node): string += to_string_rec(child, level+1) string += indent string += '' % tag_name else: string += ' />' return string def custom_tag_sort(arg): ''' Use as key functon in sorted(). Pre-fix arg tag name by a number in the sort order we want. Anything unspecified defaults to 9. i.e. circle -> 1circle, thus sorts lower than other tags. ''' tag_order = {'title': 0, 'rect': 1, 'circle': 2, 'path': 3 } return str(tag_order.get(arg.tag, 9)) + arg.tag def get_node_children_sorted(node): children = node.getchildren() return sorted(children, key=custom_tag_sort) def custom_attr_sort(arg): ''' Same as custom_tag_sort but for a node's attributes ''' attr_order = {'id': 0, 'class': 1, 'x': 2, 'y': 3, 'cx': 4, 'cy': 5, 'width': 6, 'height': 7} return str(attr_order.get(arg, 9)) + arg def get_node_attrs_sorted(node): attrs = node.attrib.keys() return sorted(attrs, key=custom_attr_sort) def apply_id_and_class_from_group(group_node): button_assigned = label_assigned = path_assigned = False _id = group_node.attrib.get('id') if _id is None: return for child in group_node.getchildren(): if child.tag == 'rect' or child.tag == 'circle': if button_assigned: continue child.attrib['id'] = 'Button%s' % _id child.attrib['class'] = '%s Button' % _id button_assigned = True elif child.tag == 'path': if path_assigned: continue child.attrib['id'] = 'Leader%s' % _id child.attrib['class'] = '%s Leader' % _id path_assigned = True elif child.tag == 'text': if label_assigned: continue child.attrib['id'] = 'Label%s' % _id child.attrib['class'] = '%s Label' % _id child.text = _id label_assigned = True def to_string(root): header = ''' ''' return header + to_string_rec(root) def clean_svg(root, tabletname): remove_non_svg_nodes_and_strip_namespace(root) title = root.find('title') if title is not None: title.text = tabletname root.attrib['xmlns'] = 'http://www.w3.org/2000/svg' traverse_and_clean(root) if __name__ == '__main__': parser = ArgumentParser(description='Clean SVG files for libwacom') parser.add_argument('filename', nargs=1, type=str, help='SVG file to clean', metavar='FILE') parser.add_argument('tabletname', nargs=1, type=str, help='The name of the tablet', metavar='TABLET_NAME') args = parser.parse_args() ET.register_namespace('', NAMESPACE) try: tree = ET.parse(args.filename[0]) except Exception, e: sys.stderr.write(str(e) + '\n') exit(1) root = tree.getroot() clean_svg(root, args.tabletname[0]) print to_string(root) libwacom-libwacom-1.3/tools/generate-udev-rules.c000066400000000000000000000177171363647401700221640ustar00rootroot00000000000000/* * Copyright © 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Olivier Fourdan (ofourdan@redhat.com) */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "libwacom.h" #include #include static gboolean need_uinput_rules = FALSE; static GOptionEntry opts[] = { {"with-uinput-rules", 0, 0, G_OPTION_ARG_NONE, &need_uinput_rules, N_("Print udev rules for uinput devices"), NULL }, {NULL} }; static void print_udev_header (void) { printf ("# udev rules for libwacom supported devices\n"); printf ("# This file is generated by libwacom, do not edit\n"); printf ("\n"); printf ("ACTION!=\"add|change\", GOTO=\"libwacom_end\"\n"); printf ("KERNEL!=\"event[0-9]*\", GOTO=\"libwacom_end\"\n"); printf ("\n"); } static void print_huion_quirk (void) { /* Huion tablets have a "consumer control" device with the same * VID/PID as the tablet but only a few buttons and no axes. * */ printf("# HUION consumer control devices are not tablets.\n"); printf("ATTRS{name}==\"HUION * Consumer Control\", GOTO=\"libwacom_end\"\n"); printf ("\n"); } static void print_wireless_kit_quirk (void) { /* Bamboo and Intuos devices connected to the system via Wacom's * Wireless Accessory Kit appear to udev as having the PID of the * dongle rather than the actual tablet. Make sure we properly tag * such devices. */ char *match = "ENV{ID_BUS}==\"usb\", ENV{ID_VENDOR_ID}==\"056a\", ENV{ID_MODEL_ID}==\"0084\""; printf("# Wacom Wireless Accessory Kit\n"); printf("%s, ENV{ID_INPUT}=\"1\", ENV{ID_INPUT_JOYSTICK}=\"\", ENV{ID_INPUT_TABLET}=\"1\"\n", match); printf("ATTRS{name}==\"* Finger\", %s, ENV{ID_INPUT_TOUCHPAD}=\"1\"\n", match); printf("ATTRS{name}==\"* Pad\", %s, ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", match); printf("\n"); } static char * generate_device_match(const WacomMatch *match) { WacomBusType type = libwacom_match_get_bustype (match); int vendor = libwacom_match_get_vendor_id (match); int product = libwacom_match_get_product_id (match); char *matchstr = NULL; switch (type) { case WBUSTYPE_USB: matchstr = g_strdup_printf ("ENV{ID_BUS}==\"usb\", ENV{ID_VENDOR_ID}==\"%04x\", ENV{ID_MODEL_ID}==\"%04x\", ", vendor, product); g_assert(matchstr != NULL); break; case WBUSTYPE_BLUETOOTH: /* Bluetooth tablets do not have ID_VENDOR_ID/ID_MODEL_ID etc set correctly. They * do have the PRODUCT set though. */ matchstr = g_strdup_printf ("ENV{PRODUCT}==\"5/%x/%x/*\", ", vendor, product); g_assert(matchstr != NULL); break; default: /* Not sure how to deal with serials */ return NULL; } return matchstr; } static void print_udev_entry_matchstr(WacomDevice *device, const char *matchstr) { printf ("# %s\n", libwacom_get_name (device)); /* unset joystick, set tablet */ printf ("%s ENV{ID_INPUT}=\"1\", ENV{ID_INPUT_JOYSTICK}=\"\", ENV{ID_INPUT_TABLET}=\"1\"\n", matchstr); if (libwacom_has_touch (device)) { const char *touchtype = "ID_INPUT_TOUCHPAD"; if (libwacom_get_integration_flags (device) != WACOM_DEVICE_INTEGRATED_NONE) touchtype = "ID_INPUT_TOUCHSCREEN"; printf( "ATTRS{name}==\"* Finger\", %s ENV{%s}=\"1\"\n", matchstr, touchtype); } /* set ID_INPUT_TABLET_PAD for pads */ if (libwacom_get_num_buttons (device) > 0) printf ("ATTRS{name}==\"* Pad\", %s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr); } static char * generate_uinput_match (const WacomMatch *match) { WacomBusType type = libwacom_match_get_bustype (match); int vendor = libwacom_match_get_vendor_id (match); int product = libwacom_match_get_product_id (match); const char *subsystem; char *matchstr; switch(type) { case WBUSTYPE_USB: subsystem = "usb"; break; case WBUSTYPE_BLUETOOTH: subsystem = "bluetooth"; break; case WBUSTYPE_SERIAL: subsystem = "tty"; break; default: return NULL; } matchstr = g_strdup_printf("ENV{DEVPATH}==\"/devices/virtual/*\", " "ATTRS{id/vendor}==\"%04x\", " "ATTRS{id/product}==\"%04x\", " "ENV{UINPUT_DEVICE}=\"1\", " "ENV{UINPUT_SUBSYSTEM}=\"%s\", " "ENV{ID_VENDOR_ID}=\"%04x\", " "ENV{ID_MODEL_ID}=\"%04x\", ", vendor, product, subsystem, vendor, product); return matchstr; } static void print_uinput_entry (WacomDevice *device, WacomBusType bus_type_filter) { const WacomMatch **matches, **match; matches = libwacom_get_matches(device); for (match = matches; *match; match++) { WacomBusType type = libwacom_match_get_bustype (*match); char *matchstr; if (bus_type_filter != type) continue; matchstr = generate_uinput_match (*match); if (matchstr == NULL) continue; print_udev_entry_matchstr (device, matchstr); g_free (matchstr); } } static void print_udev_entry (WacomDevice *device, WacomBusType bus_type_filter) { const WacomMatch **matches, **match; matches = libwacom_get_matches(device); for (match = matches; *match; match++) { WacomBusType type = libwacom_match_get_bustype (*match); char *matchstr; if (bus_type_filter != type) continue; matchstr = generate_device_match (*match); if (matchstr == NULL) continue; print_udev_entry_matchstr (device, matchstr); g_free (matchstr); } } static void print_udev_trailer (void) { printf ("\n"); printf ("# Match all serial wacom tablets with a serial ID starting with WACf\n"); printf ("ENV{ID_BUS}==\"tty|pnp\", ATTRS{id}==\"WACf*\", ENV{ID_INPUT}=\"1\", ENV{ID_INPUT_TABLET}=\"1\"\n"); printf ("ENV{ID_BUS}==\"tty|pnp\", ATTRS{id}==\"FUJ*\", ENV{ID_INPUT}=\"1\", ENV{ID_INPUT_TABLET}=\"1\"\n"); printf ("\n"); printf ("LABEL=\"libwacom_end\"\n"); } int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice **list, **p; GOptionContext *context; GError *error; gboolean rc; context = g_option_context_new (NULL); g_option_context_add_main_entries (context, opts, NULL); error = NULL; rc = g_option_context_parse (context, &argc, &argv, &error); g_option_context_free (context); if (!rc) { if (error != NULL) { fprintf (stderr, "%s\n", error->message); g_error_free (error); } return EXIT_FAILURE; } db = libwacom_database_new_for_path(TOPSRCDIR"/data"); list = libwacom_list_devices_from_database(db, NULL); if (!list) { fprintf(stderr, "Failed to load device database.\n"); return 1; } print_udev_header (); print_huion_quirk (); print_wireless_kit_quirk (); for (p = list; *p; p++) print_udev_entry ((WacomDevice *) *p, WBUSTYPE_USB); print_udev_trailer (); for (p = list; *p; p++) print_udev_entry ((WacomDevice *) *p, WBUSTYPE_BLUETOOTH); if (need_uinput_rules) { printf("\n# Start of uinput rules\n"); for (p = list; *p; p++) print_uinput_entry ((WacomDevice *) *p, WBUSTYPE_USB); for (p = list; *p; p++) print_uinput_entry ((WacomDevice *) *p, WBUSTYPE_BLUETOOTH); } g_free(list); libwacom_database_destroy (db); return 0; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/tools/libwacom-list-local-devices.man000066400000000000000000000015731363647401700241010ustar00rootroot00000000000000.TH libwacom-list-local-devices 1 .SH NAME libwacom-list-local-devices - utility to list tablet devices .SH SYNOPSIS .B libwacom-list-local-devices [--database /path/to/datadir] .SH DESCRIPTION libwacom-list-local-devices is a debug utility to list connected tablet devices identified by libwacom. It is usually used to check whether a libwacom data file is correct, present and/or applies to a specific device. .SH OPTIONS .TP 8 .B --database /path/do/datadir Sets the data directory path to be used. This is only useful when testing against a modified data path. Only libwacom developers need this option. .SH NOTES The Linux kernel provides separate \fI/dev/input/event*\fR nodes for the stylus, the pad and the touch part of the tablet. This usually results in a connected tablet being listed multiple times with this tool. This behavior is expected and should not be seen as a bug. libwacom-libwacom-1.3/tools/list-compatible-styli.c000066400000000000000000000052341363647401700225220ustar00rootroot00000000000000/* * Copyright © 2019 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define _GNU_SOURCE #include #include #include #include #include "libwacom.h" static void print_device_info(const WacomDeviceDatabase *db, const WacomDevice *device) { const int *styli; int nstyli; printf("%s", libwacom_get_name(device)); if (libwacom_get_model_name(device)) { printf(" (%s)", libwacom_get_model_name(device)); } printf(":\n"); if (!libwacom_has_stylus(device)) { printf("\tno styli defined\n"); return; } styli = libwacom_get_supported_styli(device, &nstyli); for (int i = 0; i < nstyli; i++) { const WacomStylus *s; s = libwacom_stylus_get_for_id(db, styli[i]); printf("\t%#8x:\t%s\n", libwacom_stylus_get_id(s), libwacom_stylus_get_name(s)); } } int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice **list, **p; if (argc > 1) { printf("Usage: %s [--help] - list all supported devices\n", basename(argv[0])); return !!(strcmp(argv[1], "--help")); } db = libwacom_database_new_for_path(TOPSRCDIR"/data"); list = libwacom_list_devices_from_database(db, NULL); if (!list) { fprintf(stderr, "Failed to load device database.\n"); return 1; } for (p = list; *p; p++) print_device_info(db, (WacomDevice *)*p); libwacom_database_destroy(db); return 0; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/tools/list-devices.c000066400000000000000000000052161363647401700206630ustar00rootroot00000000000000/* * Copyright © 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define _GNU_SOURCE #include #include #include #include #include "libwacom.h" static void print_device_info (WacomDevice *device, WacomBusType bus_type_filter) { const WacomMatch **match; for (match = libwacom_get_matches(device); *match; match++) { WacomBusType type = libwacom_match_get_bustype(*match); if (type == bus_type_filter) { libwacom_print_device_description(STDOUT_FILENO, device); dprintf(STDOUT_FILENO, "---------------------------------------------------------------\n"); } } } int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice **list, **p; if (argc > 1) { printf("Usage: %s [--help] - list all supported devices\n", basename(argv[0])); return !!(strcmp(argv[1], "--help")); } db = libwacom_database_new_for_path(TOPSRCDIR"/data"); list = libwacom_list_devices_from_database(db, NULL); if (!list) { fprintf(stderr, "Failed to load device database.\n"); return 1; } for (p = list; *p; p++) print_device_info ((WacomDevice *) *p, WBUSTYPE_USB); for (p = list; *p; p++) print_device_info ((WacomDevice *) *p, WBUSTYPE_BLUETOOTH); for (p = list; *p; p++) print_device_info ((WacomDevice *) *p, WBUSTYPE_SERIAL); for (p = list; *p; p++) print_device_info ((WacomDevice *) *p, WBUSTYPE_UNKNOWN); libwacom_database_destroy (db); return 0; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/tools/list-local-devices.c000066400000000000000000000062161363647401700217540ustar00rootroot00000000000000/* * Copyright © 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Peter Hutterer */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include "libwacom.h" static char *database_path; static GOptionEntry opts[] = { {"database", 0, 0, G_OPTION_ARG_FILENAME, &database_path, N_("Path to device database"), NULL }, {NULL} }; static int event_devices_only(const struct dirent *dir) { return strncmp("event", dir->d_name, 5) == 0; } int main(int argc, char **argv) { WacomDeviceDatabase *db; WacomDevice *dev; int i; struct dirent **namelist = NULL; GOptionContext *context; GError *error; context = g_option_context_new (NULL); g_option_context_add_main_entries (context, opts, NULL); error = NULL; if (!g_option_context_parse (context, &argc, &argv, &error)) { if (error != NULL) { fprintf (stderr, "%s\n", error->message); g_error_free (error); } return EXIT_FAILURE; } g_option_context_free (context); if (database_path) { db = libwacom_database_new_for_path(database_path); g_free (database_path); } else { db = libwacom_database_new(); } if (!db) { fprintf(stderr, "Failed to initialize device database\n"); return 1; } i = scandir("/dev/input", &namelist, event_devices_only, alphasort); if (i < 0 || i == 0) { fprintf(stderr, "Failed to find any devices.\n"); goto out; } while (i--) { char fname[PATH_MAX]; snprintf(fname, sizeof(fname), "/dev/input/%s", namelist[i]->d_name); dev = libwacom_new_from_path(db, fname, WFALLBACK_NONE, NULL); if (!dev) continue; dprintf(STDOUT_FILENO, "# Device node: %s\n", fname); libwacom_print_device_description(STDOUT_FILENO, dev); libwacom_destroy(dev); dprintf(STDOUT_FILENO, "---------------------------------------------------------------\n"); } out: if (namelist) free(namelist); libwacom_database_destroy (db); return 0; } /* vim: set noexpandtab tabstop=8 shiftwidth=8: */ libwacom-libwacom-1.3/tools/show-svg-image.c000066400000000000000000000344211363647401700211250ustar00rootroot00000000000000/* * Copyright ?? 2012 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: * Olivier Fourdan */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include "libwacom.h" #ifndef LIBRSVG_CHECK_VERSION #include #endif #if !LIBRSVG_CHECK_VERSION(2,36,2) #include #endif #define INACTIVE_COLOR "#ededed" #define ACTIVE_COLOR "#729fcf" #define STROKE_COLOR "#000000" #define DARK_COLOR "#535353" #define BACK_COLOR "#000000" /* Convenient struct to store our stuff around */ typedef struct { RsvgHandle *handle; GtkWidget *widget; guint timeout; WacomDevice *device; GdkRectangle area; char active_button; int num_buttons; } Tablet; static gboolean get_sub_location (cairo_t *cairo_context, RsvgHandle *handle, const char *sub, double *x, double *y, double *width, double *height) { if (x || y) { RsvgPositionData position; double tx, ty; if (!rsvg_handle_get_position_sub (handle, &position, sub)) { g_warning ("Failed to retrieve '%s' position", sub); return FALSE; } tx = (double) position.x; ty = (double) position.y; cairo_user_to_device (cairo_context, &tx, &ty); if (x) *x = tx; if (y) *y = ty; } if (width || height) { RsvgDimensionData dimensions; double twidth, theight; if (!rsvg_handle_get_dimensions_sub (handle, &dimensions, sub)) { g_warning ("Failed to retrieve '%s' dimension", sub); return FALSE; } twidth = (double) dimensions.width; theight = (double) dimensions.height; cairo_user_to_device_distance (cairo_context, &twidth, &theight); if (width) *width = twidth; if (height) *height = theight; } return TRUE; } static void print_label (cairo_t *cairo_context, Tablet *tablet, const char *sub, const char *markup, WacomButtonFlags flags) { GtkWidget *widget; GtkAllocation allocation; GtkStyle *style; PangoContext *pango_context; PangoLayout *pango_layout; PangoRectangle pango_rect; double label_x, label_y; int x, y; if (!get_sub_location (cairo_context, tablet->handle, sub, &label_x, &label_y, NULL, NULL)) return; widget = GTK_WIDGET(tablet->widget); gtk_widget_get_allocation(widget, &allocation); style = gtk_widget_get_style (widget); pango_context = gtk_widget_get_pango_context (widget); pango_layout = pango_layout_new (pango_context); pango_layout_set_markup (pango_layout, markup, -1); pango_layout_get_pixel_extents (pango_layout, NULL, &pango_rect); if (flags & WACOM_BUTTON_POSITION_LEFT) { pango_layout_set_alignment (pango_layout, PANGO_ALIGN_LEFT); x = (int) label_x + pango_rect.x; y = (int) label_y + pango_rect.y - pango_rect.height / 2; } else if (flags & WACOM_BUTTON_POSITION_RIGHT) { pango_layout_set_alignment (pango_layout, PANGO_ALIGN_RIGHT); x = (int) label_x + pango_rect.x - pango_rect.width; y = (int) label_y + pango_rect.y - pango_rect.height / 2; } else { pango_layout_set_alignment (pango_layout, PANGO_ALIGN_CENTER); x = (int) label_x + pango_rect.x - pango_rect.width / 2; y = (int) label_y + pango_rect.y; } gtk_paint_layout (style, gtk_widget_get_window (widget), 0, TRUE, &allocation, widget, NULL, x, y, pango_layout); g_object_unref (pango_layout); } static void print_button_labels (cairo_t *cairo_context, Tablet *tablet) { char button; for (button = 'A'; button < 'A' + tablet->num_buttons; button++) { WacomButtonFlags flags; gchar *sub; gchar *label; flags = libwacom_get_button_flag(tablet->device, button); sub = g_strdup_printf ("#Label%c", button); label = g_strdup_printf ("Button %c", (button == tablet->active_button) ? ACTIVE_COLOR : INACTIVE_COLOR, button); print_label (cairo_context, tablet, sub, label, flags); g_free (label); g_free (sub); } /* Touch rings */ if (libwacom_has_ring(tablet->device)) { print_label (cairo_context, tablet, "#LabelRingCCW", "Ring Counter Clockwise", WACOM_BUTTON_POSITION_LEFT); print_label (cairo_context, tablet, "#LabelRingCW", "Ring Clockwise", WACOM_BUTTON_POSITION_LEFT); } if (libwacom_has_ring2(tablet->device)) { print_label (cairo_context, tablet, "#LabelRing2CCW", "2nd Ring Counter Clockwise", WACOM_BUTTON_POSITION_RIGHT); print_label (cairo_context, tablet, "#LabelRing2CW", "2nd Ring Clockwise", WACOM_BUTTON_POSITION_RIGHT); } /* Touch strips */ if (libwacom_get_num_strips(tablet->device) > 0) { print_label (cairo_context, tablet, "#LabelStripUp", "Strip Up", WACOM_BUTTON_POSITION_LEFT); print_label (cairo_context, tablet, "#LabelStripDown", "Strip Down", WACOM_BUTTON_POSITION_LEFT); } if (libwacom_get_num_strips(tablet->device) > 1) { print_label (cairo_context, tablet, "#LabelStrip2Up", "2nd Strip Up", WACOM_BUTTON_POSITION_RIGHT); print_label (cairo_context, tablet, "#LabelStrip2Down", "2nd Strip Down", WACOM_BUTTON_POSITION_RIGHT); } } static void update_tablet (Tablet *tablet) { char *width, *height; char button; GError *error; gchar *file_data, *escaped_file_data, *data; gsize file_len; error = NULL; if (tablet->handle) g_object_unref (tablet->handle); if (!g_file_get_contents (libwacom_get_layout_filename (tablet->device), &file_data, &file_len, NULL)) return; escaped_file_data = g_base64_encode ((guchar*) file_data, file_len); width = g_strdup_printf ("%d", tablet->area.width); height = g_strdup_printf ("%d", tablet->area.height); data = g_strconcat ("\n" "\n" " \n" " \n" "", NULL); tablet->handle = rsvg_handle_new_from_data ((guint8 *) data, strlen(data), &error); g_free (data); g_free (escaped_file_data); g_free (file_data); } static void on_expose_cb (GtkWidget *widget, GdkEvent *event, Tablet *tablet) { GtkAllocation allocation; cairo_t *cairo_context; float scale; double twidth, theight; if (tablet->handle == NULL) update_tablet (tablet); /* Create a Cairo for the widget */ cairo_context = gdk_cairo_create (gtk_widget_get_window (widget)); cairo_set_operator (cairo_context, CAIRO_OPERATOR_CLEAR); cairo_paint (cairo_context); cairo_set_operator (cairo_context, CAIRO_OPERATOR_OVER); /* Scale to fit in window */ gtk_widget_get_allocation(widget, &allocation); scale = MIN ((float) allocation.width / tablet->area.width, (float) allocation.height / tablet->area.height); cairo_scale (cairo_context, scale, scale); /* Center the result in window */ twidth = (double) tablet->area.width; theight = (double) tablet->area.height; cairo_user_to_device_distance (cairo_context, &twidth, &theight); twidth = ((double) allocation.width - twidth) / 2.0; theight = ((double) allocation.height - theight) / 2.0; cairo_device_to_user_distance (cairo_context, &twidth, &theight); cairo_translate (cairo_context, twidth, theight); /* And render the tablet layout */ rsvg_handle_render_cairo (tablet->handle, cairo_context); print_button_labels (cairo_context, tablet); cairo_destroy (cairo_context); } static gboolean on_timer_cb (Tablet *tablet) { GtkAllocation allocation; int num_buttons; tablet->active_button++; num_buttons = libwacom_get_num_buttons (tablet->device); if (tablet->active_button >= 'A' + num_buttons) tablet->active_button = 'A'; update_tablet (tablet); gtk_widget_get_allocation (GTK_WIDGET(tablet->widget), &allocation); gdk_window_invalidate_rect(gtk_widget_get_window (tablet->widget), &allocation, FALSE); return TRUE; } static gboolean on_delete_cb (GtkWidget *widget, GdkEvent *event, Tablet *tablet) { gtk_main_quit (); return TRUE; } int main (int argc, char **argv) { GOptionContext *context; RsvgHandle *handle; RsvgDimensionData dimensions; GError *error; WacomDeviceDatabase *db; WacomDevice *device; Tablet *tablet; GdkWindow *gdk_win; GdkColor black; char *tabletname; const char *filename; GOptionEntry options[] = { {"tablet", 't', 0, G_OPTION_ARG_STRING, &tabletname, "Name of the tablet to show", ""}, {NULL} }; handle = NULL; error = NULL; tabletname = NULL; context = g_option_context_new ("- libwacom tablet viewer"); g_option_context_add_main_entries (context, options, NULL); g_option_context_add_group (context, gtk_get_option_group (TRUE)); g_option_context_set_help_enabled (context, TRUE); g_option_context_parse (context, &argc, &argv, NULL); g_option_context_free (context); gtk_init (&argc, &argv); if (tabletname == NULL) { g_warning ("No tablet name provided, exiting"); return 1; } db = libwacom_database_new_for_path(TOPSRCDIR"/data"); if (!db) { g_warning ("Failed to load libwacom database, exiting"); return 1; } device = libwacom_new_from_name(db, tabletname, NULL); if (!device) { g_warning ("Device '%s' not found in libwacom database, exiting", tabletname); return 1; } filename = libwacom_get_layout_filename(device); if (filename == NULL) { g_warning ("Device '%s' has no layout available, exiting", tabletname); return 1; } handle = rsvg_handle_new_from_file (filename, &error); if (error || handle == NULL) return 1; rsvg_handle_get_dimensions (handle, &dimensions); g_object_unref (handle); tablet = g_new0 (Tablet, 1); tablet->device = device; tablet->area.width = dimensions.width; tablet->area.height = dimensions.height; tablet->handle = NULL; tablet->active_button = 'A'; tablet->num_buttons = libwacom_get_num_buttons (device); tablet->widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_app_paintable (tablet->widget, TRUE); gtk_widget_realize (tablet->widget); gdk_win = gtk_widget_get_window (tablet->widget); gdk_color_parse (BACK_COLOR, &black); gdk_window_set_background (gdk_win, &black); gtk_window_set_default_size (GTK_WINDOW (tablet->widget), 800, 600); gtk_window_set_title (GTK_WINDOW (tablet->widget), libwacom_get_name (device)); g_signal_connect (tablet->widget, "expose-event", G_CALLBACK(on_expose_cb), tablet); g_signal_connect (tablet->widget, "delete-event", G_CALLBACK(on_delete_cb), tablet); tablet->timeout = g_timeout_add(750 /* ms */, (GSourceFunc) on_timer_cb, tablet); gtk_widget_show (tablet->widget); gtk_main(); libwacom_destroy(device); libwacom_database_destroy(db); return 0; }