libwacom Wacom model identification library

libwacom.h
Go to the documentation of this file.
1/*
2 * Copyright © 2011 Red Hat, Inc.
3 *
4 * Permission to use, copy, modify, distribute, and sell this software
5 * and its documentation for any purpose is hereby granted without
6 * fee, provided that the above copyright notice appear in all copies
7 * and that both that copyright notice and this permission notice
8 * appear in supporting documentation, and that the name of Red Hat
9 * not be used in advertising or publicity pertaining to distribution
10 * of the software without specific, written prior permission. Red
11 * Hat makes no representations about the suitability of this software
12 * for any purpose. It is provided "as is" without express or implied
13 * warranty.
14 *
15 * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
17 * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
19 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
20 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 *
23 * Authors:
24 * Peter Hutterer (peter.hutterer@redhat.com)
25 */
26
27
29#ifndef _LIBWACOM_H_
30#define _LIBWACOM_H_
33#include <stdint.h>
34#include <stdio.h>
35
36#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
37#define LIBWACOM_DEPRECATED __attribute__((deprecated))
38#else
39#define LIBWACOM_DEPRECATED
40#endif /* __GNUC__ */
41
95 typedef struct _WacomDevice WacomDevice;
96
100 typedef struct _WacomMatch WacomMatch;
101
105 typedef struct _WacomStylus WacomStylus;
106
110 typedef struct _WacomError WacomError;
111
115 typedef struct _WacomDeviceDatabase WacomDeviceDatabase;
116
120#define WACOM_STYLUS_FALLBACK_ID 0xfffff
124#define WACOM_ERASER_FALLBACK_ID 0xffffe
125
131 enum WacomErrorCode {
132 WERROR_NONE,
133 WERROR_BAD_ALLOC,
134 WERROR_INVALID_PATH,
135 WERROR_INVALID_DB,
136 WERROR_BAD_ACCESS,
137 WERROR_UNKNOWN_MODEL,
138 WERROR_BUG_CALLER,
139};
140
146 typedef enum {
147 WBUSTYPE_UNKNOWN,
148 WBUSTYPE_USB,
149 WBUSTYPE_SERIAL,
150 WBUSTYPE_BLUETOOTH,
151 WBUSTYPE_I2C,
152} WacomBusType;
153
159 typedef enum {
160 WACOM_DEVICE_INTEGRATED_NONE = 0,
161 WACOM_DEVICE_INTEGRATED_DISPLAY = (1 << 0),
162 WACOM_DEVICE_INTEGRATED_SYSTEM = (1 << 1)
163} WacomIntegrationFlags;
164
173 typedef enum {
174 WCLASS_UNKNOWN,
175 WCLASS_INTUOS3,
176 WCLASS_INTUOS4,
177 WCLASS_INTUOS5,
178 WCLASS_CINTIQ,
179 WCLASS_BAMBOO,
180 WCLASS_GRAPHIRE,
181 WCLASS_ISDV4,
182 WCLASS_INTUOS,
183 WCLASS_INTUOS2,
184 WCLASS_PEN_DISPLAYS,
185 WCLASS_REMOTE,
186} WacomClass;
187
193 typedef enum {
194 WSTYLUS_UNKNOWN,
195 WSTYLUS_GENERAL,
196 WSTYLUS_INKING,
197 WSTYLUS_AIRBRUSH,
198 WSTYLUS_CLASSIC,
199 WSTYLUS_MARKER,
200 WSTYLUS_STROKE,
201 WSTYLUS_PUCK,
202 WSTYLUS_3D,
203 WSTYLUS_MOBILE,
204} WacomStylusType;
205
211 typedef enum {
212 WACOM_ERASER_UNKNOWN,
213 WACOM_ERASER_NONE,
214 WACOM_ERASER_INVERT,
215 WACOM_ERASER_BUTTON,
216} WacomEraserType;
217
223 typedef enum {
224 WACOM_BUTTON_NONE = 0,
225 WACOM_BUTTON_POSITION_LEFT = (1 << 1),
226 WACOM_BUTTON_POSITION_RIGHT = (1 << 2),
227 WACOM_BUTTON_POSITION_TOP = (1 << 3),
228 WACOM_BUTTON_POSITION_BOTTOM = (1 << 4),
229 WACOM_BUTTON_RING_MODESWITCH = (1 << 5),
230 WACOM_BUTTON_RING2_MODESWITCH = (1 << 6),
231 WACOM_BUTTON_TOUCHSTRIP_MODESWITCH = (1 << 7),
232 WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH = (1 << 8),
233 WACOM_BUTTON_OLED = (1 << 9),
234 WACOM_BUTTON_MODESWITCH = (WACOM_BUTTON_RING_MODESWITCH | WACOM_BUTTON_RING2_MODESWITCH | WACOM_BUTTON_TOUCHSTRIP_MODESWITCH | WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH),
235 WACOM_BUTTON_DIRECTION = (WACOM_BUTTON_POSITION_LEFT | WACOM_BUTTON_POSITION_RIGHT | WACOM_BUTTON_POSITION_TOP | WACOM_BUTTON_POSITION_BOTTOM),
236 WACOM_BUTTON_RINGS_MODESWITCH = (WACOM_BUTTON_RING_MODESWITCH | WACOM_BUTTON_RING2_MODESWITCH),
237 WACOM_BUTTON_TOUCHSTRIPS_MODESWITCH = (WACOM_BUTTON_TOUCHSTRIP_MODESWITCH | WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH),
238} WacomButtonFlags;
239
245 typedef enum {
246 WACOM_AXIS_TYPE_NONE = 0,
248 WACOM_AXIS_TYPE_TILT = (1 << 1),
250 WACOM_AXIS_TYPE_ROTATION_Z = (1 << 2),
252 WACOM_AXIS_TYPE_DISTANCE = (1 << 3),
254 WACOM_AXIS_TYPE_PRESSURE = (1 << 4),
256 WACOM_AXIS_TYPE_SLIDER = (1 << 5),
257} WacomAxisTypeFlags;
258
262 typedef enum {
263 WFALLBACK_NONE = 0,
264 WFALLBACK_GENERIC = 1
265} WacomFallbackFlags;
266
270 typedef enum {
271 WCOMPARE_NORMAL = 0,
272 WCOMPARE_MATCHES = (1 << 1),
273} WacomCompareFlags;
274
278 typedef enum {
279 WACOM_STATUS_LED_UNAVAILABLE = -1,
280 WACOM_STATUS_LED_RING = 0,
281 WACOM_STATUS_LED_RING2 = 1,
282 WACOM_STATUS_LED_TOUCHSTRIP = 2,
283 WACOM_STATUS_LED_TOUCHSTRIP2 = 3
284} WacomStatusLEDs;
285
294 WacomError* libwacom_error_new(void);
295
305 void libwacom_error_free(WacomError **error);
306
312 enum WacomErrorCode libwacom_error_get_code(WacomError *error);
313
319 const char* libwacom_error_get_message(WacomError *error);
320
329 WacomDeviceDatabase* libwacom_database_new(void);
330
341 WacomDeviceDatabase* libwacom_database_new_for_path(const char *datadir);
342
350 void libwacom_database_destroy(WacomDeviceDatabase *db);
351
366 WacomDevice* libwacom_new_from_path(const WacomDeviceDatabase *db, const char *path, WacomFallbackFlags fallback, WacomError *error);
367
385 WacomDevice* libwacom_new_from_usbid(const WacomDeviceDatabase *db, int vendor_id, int product_id, WacomError *error);
386
400 WacomDevice* libwacom_new_from_name(const WacomDeviceDatabase *db, const char *name, WacomError *error);
401
415 WacomDevice** libwacom_list_devices_from_database(const WacomDeviceDatabase *db, WacomError *error);
416
425 void libwacom_print_device_description (int fd, const WacomDevice *device);
426
427
435 void libwacom_destroy(WacomDevice *device);
436
448 int libwacom_compare(const WacomDevice *a, const WacomDevice *b, WacomCompareFlags flags);
449
459 LIBWACOM_DEPRECATED
460 WacomClass libwacom_get_class(const WacomDevice *device);
461
468 const char* libwacom_get_name(const WacomDevice *device);
469
476 const char* libwacom_get_model_name(const WacomDevice *device);
477
485 const char* libwacom_get_layout_filename(const WacomDevice *device);
486
497 int libwacom_get_vendor_id(const WacomDevice *device);
498
506 const char* libwacom_get_match(const WacomDevice *device);
507
515 const WacomMatch** libwacom_get_matches(const WacomDevice *device);
516
533 const WacomMatch* libwacom_get_paired_device(const WacomDevice *device);
534
545 int libwacom_get_product_id(const WacomDevice *device);
546
557 int libwacom_get_width(const WacomDevice *device);
558
569 int libwacom_get_height(const WacomDevice *device);
570
577 int libwacom_has_stylus(const WacomDevice *device);
578
585 int libwacom_has_touch(const WacomDevice *device);
586
595 int libwacom_get_num_buttons(const WacomDevice *device);
596
604 const int *libwacom_get_supported_styli(const WacomDevice *device, int *num_styli);
605
612 int libwacom_has_ring(const WacomDevice *device);
613
620 int libwacom_has_ring2(const WacomDevice *device);
621
628 int libwacom_has_touchswitch(const WacomDevice *device);
629
636 int libwacom_get_ring_num_modes(const WacomDevice *device);
637
644 int libwacom_get_ring2_num_modes(const WacomDevice *device);
645
653 int libwacom_get_num_strips(const WacomDevice *device);
654
661 int libwacom_get_strips_num_modes(const WacomDevice *device);
662
670 const WacomStatusLEDs *libwacom_get_status_leds(const WacomDevice *device, int *num_leds);
671
680 int libwacom_get_button_led_group (const WacomDevice *device,
681 char button);
682
691 int libwacom_is_builtin(const WacomDevice *device) LIBWACOM_DEPRECATED;
692
700 int libwacom_is_reversible(const WacomDevice *device);
701
708 WacomIntegrationFlags libwacom_get_integration_flags (const WacomDevice *device);
709
716 WacomBusType libwacom_get_bustype(const WacomDevice *device);
717
725 WacomButtonFlags libwacom_get_button_flag(const WacomDevice *device,
726 char button);
727
736 int libwacom_get_button_evdev_code(const WacomDevice *device,
737 char button);
738
748 const WacomStylus *libwacom_stylus_get_for_id (const WacomDeviceDatabase *db, int id);
749
756 int libwacom_stylus_get_id (const WacomStylus *stylus);
757
764 const char *libwacom_stylus_get_name (const WacomStylus *stylus);
765
773 const int *libwacom_stylus_get_paired_ids(const WacomStylus *stylus, int *num_paired_ids);
774
781 int libwacom_stylus_get_num_buttons (const WacomStylus *stylus);
782
797 int libwacom_stylus_has_eraser (const WacomStylus *stylus);
798
814 int libwacom_stylus_is_eraser (const WacomStylus *stylus);
815
822 int libwacom_stylus_has_lens (const WacomStylus *stylus);
823
830 int libwacom_stylus_has_wheel (const WacomStylus *stylus);
831
838 WacomAxisTypeFlags libwacom_stylus_get_axes (const WacomStylus *stylus);
839
846 WacomStylusType libwacom_stylus_get_type (const WacomStylus *stylus);
847
854 WacomEraserType libwacom_stylus_get_eraser_type (const WacomStylus *stylus);
855
864 void libwacom_print_stylus_description (int fd, const WacomStylus *stylus);
865
868 const char *libwacom_match_get_name(const WacomMatch *match);
869 WacomBusType libwacom_match_get_bustype(const WacomMatch *match);
870uint32_t libwacom_match_get_product_id(const WacomMatch *match);
871uint32_t libwacom_match_get_vendor_id(const WacomMatch *match);
872 const char* libwacom_match_get_match_string(const WacomMatch *match);
876#endif /* _LIBWACOM_H_ */
879/* vim: set noexpandtab tabstop=8 shiftwidth=8: */
libwacom_error_new
WacomError * libwacom_error_new(void)
Allocate a new structure for error reporting.
libwacom_error_get_message
const char * libwacom_error_get_message(WacomError *error)
libwacom_database_new_for_path
WacomDeviceDatabase * libwacom_database_new_for_path(const char *datadir)
Loads the Tablet and Stylus databases, to be used in libwacom_new_*() functions, from the prefix path...
libwacom_error_free
void libwacom_error_free(WacomError **error)
Free the error and associated memory.
WacomDeviceDatabase
struct _WacomDeviceDatabase WacomDeviceDatabase
Definition: libwacom.h:115
libwacom_error_get_code
enum WacomErrorCode libwacom_error_get_code(WacomError *error)
libwacom_database_new
WacomDeviceDatabase * libwacom_database_new(void)
Loads the Tablet and Stylus databases, to be used in libwacom_new_*() functions.
WacomErrorCode
WacomErrorCode
Possible error codes.
Definition: libwacom.h:131
WacomError
struct _WacomError WacomError
Definition: libwacom.h:110
libwacom_database_destroy
void libwacom_database_destroy(WacomDeviceDatabase *db)
Free all memory used by the database.
WERROR_NONE
@ WERROR_NONE
No error has occured.
Definition: libwacom.h:132
WERROR_BAD_ALLOC
@ WERROR_BAD_ALLOC
Allocation error.
Definition: libwacom.h:133
WERROR_UNKNOWN_MODEL
@ WERROR_UNKNOWN_MODEL
Unsupported/unknown device.
Definition: libwacom.h:137
WERROR_INVALID_DB
@ WERROR_INVALID_DB
The passed DB is invalid.
Definition: libwacom.h:135
WERROR_BUG_CALLER
@ WERROR_BUG_CALLER
A bug in the caller.
Definition: libwacom.h:138
WERROR_BAD_ACCESS
@ WERROR_BAD_ACCESS
Invalid permissions to access the path.
Definition: libwacom.h:136
WERROR_INVALID_PATH
@ WERROR_INVALID_PATH
A path specified is invalid.
Definition: libwacom.h:134
libwacom_has_stylus
int libwacom_has_stylus(const WacomDevice *device)
libwacom_get_layout_filename
const char * libwacom_get_layout_filename(const WacomDevice *device)
libwacom_get_num_strips
int libwacom_get_num_strips(const WacomDevice *device)
libwacom_new_from_usbid
WacomDevice * libwacom_new_from_usbid(const WacomDeviceDatabase *db, int vendor_id, int product_id, WacomError *error)
Create a new device reference from the given vendor/product IDs.
WacomStatusLEDs
WacomStatusLEDs
Definition: libwacom.h:278
libwacom_get_strips_num_modes
int libwacom_get_strips_num_modes(const WacomDevice *device)
libwacom_get_width
int libwacom_get_width(const WacomDevice *device)
Retrieve the width of the device.
libwacom_get_ring_num_modes
int libwacom_get_ring_num_modes(const WacomDevice *device)
libwacom_has_touch
int libwacom_has_touch(const WacomDevice *device)
libwacom_get_paired_device
const WacomMatch * libwacom_get_paired_device(const WacomDevice *device)
Return the match string of the paired device for this device.
libwacom_get_match
const char * libwacom_get_match(const WacomDevice *device)
libwacom_get_product_id
int libwacom_get_product_id(const WacomDevice *device)
libwacom_get_button_led_group
int libwacom_get_button_led_group(const WacomDevice *device, char button)
libwacom_get_name
const char * libwacom_get_name(const WacomDevice *device)
libwacom_print_device_description
void libwacom_print_device_description(int fd, const WacomDevice *device)
Print the description of this device to the given file.
libwacom_get_vendor_id
int libwacom_get_vendor_id(const WacomDevice *device)
libwacom_destroy
void libwacom_destroy(WacomDevice *device)
Remove the device and free all memory and references to it.
WacomButtonFlags
WacomButtonFlags
Capabilities of the various tablet buttons.
Definition: libwacom.h:223
libwacom_is_builtin
int libwacom_is_builtin(const WacomDevice *device) LIBWACOM_DEPRECATED
libwacom_get_integration_flags
WacomIntegrationFlags libwacom_get_integration_flags(const WacomDevice *device)
WacomIntegrationFlags
WacomIntegrationFlags
Tablet integration.
Definition: libwacom.h:159
libwacom_has_ring2
int libwacom_has_ring2(const WacomDevice *device)
libwacom_match_get_bustype
WacomBusType libwacom_match_get_bustype(const WacomMatch *match)
libwacom_match_get_name
const char * libwacom_match_get_name(const WacomMatch *match)
libwacom_get_button_evdev_code
int libwacom_get_button_evdev_code(const WacomDevice *device, char button)
libwacom_compare
int libwacom_compare(const WacomDevice *a, const WacomDevice *b, WacomCompareFlags flags)
Compare the two devices for equal-ness.
libwacom_match_get_vendor_id
uint32_t libwacom_match_get_vendor_id(const WacomMatch *match)
libwacom_get_matches
const WacomMatch ** libwacom_get_matches(const WacomDevice *device)
WacomCompareFlags
WacomCompareFlags
Definition: libwacom.h:270
libwacom_match_get_product_id
uint32_t libwacom_match_get_product_id(const WacomMatch *match)
libwacom_is_reversible
int libwacom_is_reversible(const WacomDevice *device)
libwacom_get_model_name
const char * libwacom_get_model_name(const WacomDevice *device)
libwacom_list_devices_from_database
WacomDevice ** libwacom_list_devices_from_database(const WacomDeviceDatabase *db, WacomError *error)
Returns the list of devices in the given database.
libwacom_get_bustype
WacomBusType libwacom_get_bustype(const WacomDevice *device)
libwacom_get_button_flag
WacomButtonFlags libwacom_get_button_flag(const WacomDevice *device, char button)
WacomClass
WacomClass
Classes of devices.
Definition: libwacom.h:173
WacomBusType
WacomBusType
Bus types for tablets.
Definition: libwacom.h:146
WacomFallbackFlags
WacomFallbackFlags
Definition: libwacom.h:262
libwacom_new_from_path
WacomDevice * libwacom_new_from_path(const WacomDeviceDatabase *db, const char *path, WacomFallbackFlags fallback, WacomError *error)
Create a new device reference from the given device path.
libwacom_get_num_buttons
int libwacom_get_num_buttons(const WacomDevice *device)
Tablet buttons are numbered 'A' through to 'A' + number of buttons.
libwacom_get_height
int libwacom_get_height(const WacomDevice *device)
Retrieve the height of the device.
libwacom_get_class
LIBWACOM_DEPRECATED WacomClass libwacom_get_class(const WacomDevice *device)
libwacom_get_ring2_num_modes
int libwacom_get_ring2_num_modes(const WacomDevice *device)
libwacom_has_touchswitch
int libwacom_has_touchswitch(const WacomDevice *device)
WacomMatch
struct _WacomMatch WacomMatch
Definition: libwacom.h:100
WacomDevice
struct _WacomDevice WacomDevice
Definition: libwacom.h:95
libwacom_match_get_match_string
const char * libwacom_match_get_match_string(const WacomMatch *match)
libwacom_new_from_name
WacomDevice * libwacom_new_from_name(const WacomDeviceDatabase *db, const char *name, WacomError *error)
Create a new device reference from the given name.
libwacom_has_ring
int libwacom_has_ring(const WacomDevice *device)
libwacom_get_status_leds
const WacomStatusLEDs * libwacom_get_status_leds(const WacomDevice *device, int *num_leds)
WACOM_STATUS_LED_TOUCHSTRIP2
@ WACOM_STATUS_LED_TOUCHSTRIP2
Definition: libwacom.h:283
WACOM_STATUS_LED_UNAVAILABLE
@ WACOM_STATUS_LED_UNAVAILABLE
Definition: libwacom.h:279
WACOM_STATUS_LED_RING
@ WACOM_STATUS_LED_RING
Definition: libwacom.h:280
WACOM_STATUS_LED_RING2
@ WACOM_STATUS_LED_RING2
Definition: libwacom.h:281
WACOM_STATUS_LED_TOUCHSTRIP
@ WACOM_STATUS_LED_TOUCHSTRIP
Definition: libwacom.h:282
WACOM_BUTTON_POSITION_BOTTOM
@ WACOM_BUTTON_POSITION_BOTTOM
Definition: libwacom.h:228
WACOM_BUTTON_TOUCHSTRIPS_MODESWITCH
@ WACOM_BUTTON_TOUCHSTRIPS_MODESWITCH
Definition: libwacom.h:237
WACOM_BUTTON_NONE
@ WACOM_BUTTON_NONE
Definition: libwacom.h:224
WACOM_BUTTON_RINGS_MODESWITCH
@ WACOM_BUTTON_RINGS_MODESWITCH
Definition: libwacom.h:236
WACOM_BUTTON_DIRECTION
@ WACOM_BUTTON_DIRECTION
Definition: libwacom.h:235
WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH
@ WACOM_BUTTON_TOUCHSTRIP2_MODESWITCH
Definition: libwacom.h:232
WACOM_BUTTON_POSITION_TOP
@ WACOM_BUTTON_POSITION_TOP
Definition: libwacom.h:227
WACOM_BUTTON_RING2_MODESWITCH
@ WACOM_BUTTON_RING2_MODESWITCH
Definition: libwacom.h:230
WACOM_BUTTON_POSITION_LEFT
@ WACOM_BUTTON_POSITION_LEFT
Definition: libwacom.h:225
WACOM_BUTTON_POSITION_RIGHT
@ WACOM_BUTTON_POSITION_RIGHT
Definition: libwacom.h:226
WACOM_BUTTON_MODESWITCH
@ WACOM_BUTTON_MODESWITCH
Definition: libwacom.h:234
WACOM_BUTTON_OLED
@ WACOM_BUTTON_OLED
Definition: libwacom.h:233
WACOM_BUTTON_TOUCHSTRIP_MODESWITCH
@ WACOM_BUTTON_TOUCHSTRIP_MODESWITCH
Definition: libwacom.h:231
WACOM_BUTTON_RING_MODESWITCH
@ WACOM_BUTTON_RING_MODESWITCH
Definition: libwacom.h:229
WACOM_DEVICE_INTEGRATED_DISPLAY
@ WACOM_DEVICE_INTEGRATED_DISPLAY
Definition: libwacom.h:161
WACOM_DEVICE_INTEGRATED_NONE
@ WACOM_DEVICE_INTEGRATED_NONE
Definition: libwacom.h:160
WACOM_DEVICE_INTEGRATED_SYSTEM
@ WACOM_DEVICE_INTEGRATED_SYSTEM
Definition: libwacom.h:162
WCOMPARE_NORMAL
@ WCOMPARE_NORMAL
compare the device only
Definition: libwacom.h:271
WCOMPARE_MATCHES
@ WCOMPARE_MATCHES
compare all possible matches too
Definition: libwacom.h:272
WCLASS_INTUOS3
@ WCLASS_INTUOS3
Any Intuos3 series.
Definition: libwacom.h:175
WCLASS_REMOTE
@ WCLASS_REMOTE
Any Wacom Remote.
Definition: libwacom.h:185
WCLASS_CINTIQ
@ WCLASS_CINTIQ
Any Cintiq device.
Definition: libwacom.h:178
WCLASS_UNKNOWN
@ WCLASS_UNKNOWN
Unknown/unsupported device class.
Definition: libwacom.h:174
WCLASS_INTUOS2
@ WCLASS_INTUOS2
Any Intuos2 series.
Definition: libwacom.h:183
WCLASS_GRAPHIRE
@ WCLASS_GRAPHIRE
Any Graphire device.
Definition: libwacom.h:180
WCLASS_INTUOS5
@ WCLASS_INTUOS5
Any Intuos5 series.
Definition: libwacom.h:177
WCLASS_INTUOS
@ WCLASS_INTUOS
Any Intuos series.
Definition: libwacom.h:182
WCLASS_PEN_DISPLAYS
@ WCLASS_PEN_DISPLAYS
Any "interactive pen display".
Definition: libwacom.h:184
WCLASS_ISDV4
@ WCLASS_ISDV4
Any serial ISDV4 device.
Definition: libwacom.h:181
WCLASS_INTUOS4
@ WCLASS_INTUOS4
Any Intuos4 series.
Definition: libwacom.h:176
WCLASS_BAMBOO
@ WCLASS_BAMBOO
Any Bamboo device.
Definition: libwacom.h:179
WBUSTYPE_I2C
@ WBUSTYPE_I2C
I2C tablet.
Definition: libwacom.h:151
WBUSTYPE_USB
@ WBUSTYPE_USB
USB tablet.
Definition: libwacom.h:148
WBUSTYPE_UNKNOWN
@ WBUSTYPE_UNKNOWN
Unknown/unsupported bus type.
Definition: libwacom.h:147
WBUSTYPE_SERIAL
@ WBUSTYPE_SERIAL
Serial tablet.
Definition: libwacom.h:149
WBUSTYPE_BLUETOOTH
@ WBUSTYPE_BLUETOOTH
Bluetooth tablet.
Definition: libwacom.h:150
WFALLBACK_GENERIC
@ WFALLBACK_GENERIC
Definition: libwacom.h:264
WFALLBACK_NONE
@ WFALLBACK_NONE
Definition: libwacom.h:263
libwacom_stylus_get_paired_ids
const int * libwacom_stylus_get_paired_ids(const WacomStylus *stylus, int *num_paired_ids)
libwacom_stylus_get_type
WacomStylusType libwacom_stylus_get_type(const WacomStylus *stylus)
libwacom_stylus_has_wheel
int libwacom_stylus_has_wheel(const WacomStylus *stylus)
libwacom_stylus_get_axes
WacomAxisTypeFlags libwacom_stylus_get_axes(const WacomStylus *stylus)
libwacom_stylus_has_lens
int libwacom_stylus_has_lens(const WacomStylus *stylus)
libwacom_stylus_get_id
int libwacom_stylus_get_id(const WacomStylus *stylus)
libwacom_stylus_get_name
const char * libwacom_stylus_get_name(const WacomStylus *stylus)
WacomEraserType
WacomEraserType
Type of eraser on a stylus.
Definition: libwacom.h:211
WacomStylusType
WacomStylusType
Class of stylus.
Definition: libwacom.h:193
libwacom_stylus_get_eraser_type
WacomEraserType libwacom_stylus_get_eraser_type(const WacomStylus *stylus)
libwacom_print_stylus_description
void libwacom_print_stylus_description(int fd, const WacomStylus *stylus)
Print the description of this stylus to the given file.
libwacom_stylus_has_eraser
int libwacom_stylus_has_eraser(const WacomStylus *stylus)
Check if the given stylus is paired with a separate eraser.
libwacom_get_supported_styli
const int * libwacom_get_supported_styli(const WacomDevice *device, int *num_styli)
libwacom_stylus_get_for_id
const WacomStylus * libwacom_stylus_get_for_id(const WacomDeviceDatabase *db, int id)
Get the WacomStylus for the given tool ID.
libwacom_stylus_get_num_buttons
int libwacom_stylus_get_num_buttons(const WacomStylus *stylus)
WacomStylus
struct _WacomStylus WacomStylus
Definition: libwacom.h:105
libwacom_stylus_is_eraser
int libwacom_stylus_is_eraser(const WacomStylus *stylus)
Check if the given stylus may act like an eraser.
WacomAxisTypeFlags
WacomAxisTypeFlags
Axis type for a stylus.
Definition: libwacom.h:245
WACOM_ERASER_UNKNOWN
@ WACOM_ERASER_UNKNOWN
Definition: libwacom.h:212
WACOM_ERASER_NONE
@ WACOM_ERASER_NONE
No eraser is present on the stylus.
Definition: libwacom.h:213
WACOM_ERASER_BUTTON
@ WACOM_ERASER_BUTTON
Eraser is a button alongside any other stylus buttons.
Definition: libwacom.h:215
WACOM_ERASER_INVERT
@ WACOM_ERASER_INVERT
Eraser is a separate tool on the opposite end of the stylus.
Definition: libwacom.h:214
WSTYLUS_MARKER
@ WSTYLUS_MARKER
Definition: libwacom.h:199
WSTYLUS_AIRBRUSH
@ WSTYLUS_AIRBRUSH
Definition: libwacom.h:197
WSTYLUS_3D
@ WSTYLUS_3D
Definition: libwacom.h:202
WSTYLUS_MOBILE
@ WSTYLUS_MOBILE
Definition: libwacom.h:203
WSTYLUS_CLASSIC
@ WSTYLUS_CLASSIC
Definition: libwacom.h:198
WSTYLUS_INKING
@ WSTYLUS_INKING
Definition: libwacom.h:196
WSTYLUS_GENERAL
@ WSTYLUS_GENERAL
Definition: libwacom.h:195
WSTYLUS_STROKE
@ WSTYLUS_STROKE
Definition: libwacom.h:200
WSTYLUS_PUCK
@ WSTYLUS_PUCK
Definition: libwacom.h:201
WSTYLUS_UNKNOWN
@ WSTYLUS_UNKNOWN
Definition: libwacom.h:194
WACOM_AXIS_TYPE_NONE
@ WACOM_AXIS_TYPE_NONE
Definition: libwacom.h:246
WACOM_AXIS_TYPE_ROTATION_Z
@ WACOM_AXIS_TYPE_ROTATION_Z
Rotation in the z-axis.
Definition: libwacom.h:250
WACOM_AXIS_TYPE_PRESSURE
@ WACOM_AXIS_TYPE_PRESSURE
Tip pressure.
Definition: libwacom.h:254
WACOM_AXIS_TYPE_SLIDER
@ WACOM_AXIS_TYPE_SLIDER
A absolute-position slider like the wheel on the airbrush.
Definition: libwacom.h:256
WACOM_AXIS_TYPE_TILT
@ WACOM_AXIS_TYPE_TILT
Tilt in x and y direction.
Definition: libwacom.h:248
WACOM_AXIS_TYPE_DISTANCE
@ WACOM_AXIS_TYPE_DISTANCE
Distance to surface.
Definition: libwacom.h:252
LIBWACOM_DEPRECATED
#define LIBWACOM_DEPRECATED
Definition: libwacom.h:39