libwacom
Wacom model identification library
|
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.
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.
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.