1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659
// This file is auto-generated by rute_gen. DO NOT EDIT.
use std::cell::Cell;
use std::rc::Rc;
#[allow(unused_imports)]
use std::marker::PhantomData;
#[allow(unused_imports)]
use std::os::raw::c_void;
#[allow(unused_imports)]
use std::mem::transmute;
#[allow(unused_imports)]
use std::ffi::{CStr, CString};
use rute_ffi_base::*;
#[allow(unused_imports)]
use auto::*;
/// **Notice these docs are heavy WIP and not very relevent yet**
///
/// *Tablet events* are generated from tablet peripherals such as Wacom
/// tablets and various other brands, and electromagnetic stylus devices
/// included with some types of tablet computers. (It is not the same as
/// [QTouchEvent](QTouchEvent)
/// which a touchscreen generates, even when a passive stylus is
/// used on a touchscreen.)
///
/// Tablet events are similar to mouse events; for example, the [x(),](x(),)
/// [y(),](y(),)
///
/// [pos(),](pos(),)
/// [globalX(),](globalX(),)
/// [globalY(),](globalY(),)
/// and [globalPos()](globalPos())
/// accessors provide
/// the cursor position, and you can see which [buttons()](buttons())
/// are pressed
/// (pressing the stylus tip against the tablet surface is equivalent to a left
/// mouse button). But tablet events also pass through some extra information
/// that the tablet device driver provides; for example, you might want to do
/// subpixel rendering with higher resolution coordinates ( [hiResGlobalX()](hiResGlobalX())
///
/// and [hiResGlobalY()),](hiResGlobalY()),)
/// adjust color brightness based on the [pressure()](pressure())
///
/// of the tool against the tablet surface, use different brushes depending on
/// the type of tool in use ( [device()),](device()),)
/// modulate the brush shape in some way
/// according to the X-axis and Y-axis tilt of the tool with respect to the
/// tablet surface ( [xTilt()](xTilt())
/// and [yTilt()),](yTilt()),)
/// and use a virtual eraser
/// instead of a brush if the user switches to the other end of a double-ended
/// stylus ( [pointerType()).](pointerType()).)
///
/// Every event contains an accept flag that indicates whether the receiver
/// wants the event. You should call QTabletEvent::accept() if you handle the
/// tablet event; otherwise it will be sent to the parent widget. The exception
/// are TabletEnterProximity and TabletLeaveProximity events: these are only
/// sent to QApplication and do not check whether or not they are accepted.
///
/// The QWidget::setEnabled() function can be used to enable or disable
/// mouse, tablet and keyboard events for a widget.
///
/// The event handler QWidget::tabletEvent() receives TabletPress,
/// TabletRelease and TabletMove events. Qt will first send a
/// tablet event, then if it is not accepted by any widget, it will send a
/// mouse event. This allows users of applications that are not designed for
/// tablets to use a tablet like a mouse. However high-resolution drawing
/// applications should handle the tablet events, because they can occur at a
/// higher frequency, which is a benefit for smooth and accurate drawing.
/// If the tablet events are rejected, the synthetic mouse events may be
/// compressed for efficiency.
///
/// New in Qt 5.4: QTabletEvent includes all information available from the
/// device, including [QTabletEvent::buttons().](QTabletEvent::buttons().)
/// Previously it was not
/// possible to accept all tablet events and also know which stylus buttons
/// were pressed.
///
/// Note that pressing the stylus button while the stylus hovers over the
/// tablet will generate a button press on some types of tablets, while on
/// other types it will be necessary to press the stylus against the tablet
/// surface in order to register the simultaneous stylus button press.
///
/// # Notes for X11 Users
///
/// If the tablet is configured in xorg.conf to use the Wacom driver, there
/// will be separate XInput for the stylus, eraser, and (optionally)
/// cursor and touchpad. Qt recognizes these by their names. Otherwise, if the
/// tablet is configured to use the evdev driver, there will be only one device
/// and applications may not be able to distinguish the stylus from the eraser.
///
/// # Notes for Windows Users
///
/// Tablet support currently requires the WACOM windows driver providing the DLL
/// `wintab32.dll` to be installed. It is contained in older packages,
/// for example `pentablet_5.3.5-3.exe` .
///
/// # Licence
///
/// The documentation is an adoption of the original [Qt Documentation](http://doc.qt.io/) and provided herein is licensed under the terms of the [GNU Free Documentation License version 1.3](http://www.gnu.org/licenses/fdl.html) as published by the Free Software Foundation.
#[derive(Clone)]
pub struct TabletEvent<'a> {
#[doc(hidden)]
pub data: Rc<Cell<Option<*const RUBase>>>,
#[doc(hidden)]
pub all_funcs: *const RUTabletEventAllFuncs,
#[doc(hidden)]
pub owned: bool,
#[doc(hidden)]
pub _marker: PhantomData<::std::cell::Cell<&'a ()>>,
}
impl<'a> TabletEvent<'a> {
#[allow(dead_code)]
pub(crate) fn new_from_rc(ffi_data: RUTabletEvent) -> TabletEvent<'a> {
TabletEvent {
data: unsafe { Rc::from_raw(ffi_data.host_data as *const Cell<Option<*const RUBase>>) },
all_funcs: ffi_data.all_funcs,
owned: false,
_marker: PhantomData,
}
}
#[allow(dead_code)]
pub(crate) fn new_from_owned(ffi_data: RUTabletEvent) -> TabletEvent<'a> {
TabletEvent {
data: Rc::new(Cell::new(Some(ffi_data.qt_data as *const RUBase))),
all_funcs: ffi_data.all_funcs,
owned: true,
_marker: PhantomData,
}
}
#[allow(dead_code)]
pub(crate) fn new_from_temporary(ffi_data: RUTabletEvent) -> TabletEvent<'a> {
TabletEvent {
data: Rc::new(Cell::new(Some(ffi_data.qt_data as *const RUBase))),
all_funcs: ffi_data.all_funcs,
owned: false,
_marker: PhantomData,
}
}
///
/// Returns the position of the device, relative to the widget that
/// received the event.
///
/// If you move widgets around in response to mouse events, use
/// globalPos() instead of this function.
///
/// **See also:** [`x()`]
/// [`y()`]
/// [`global_pos()`]
///
/// Returns the position of the device, relative to the widget that
/// received the event.
///
/// If you move widgets around in response to mouse events, use
/// globalPosF() instead of this function.
///
/// **See also:** [`global_pos_f()`]
pub fn pos(&self) -> Point {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).pos)(obj_data);
let t = ret_val;
let ret_val;
if t.host_data != ::std::ptr::null() {
ret_val = Point::new_from_rc(t);
} else {
ret_val = Point::new_from_owned(t);
}
ret_val
}
}
///
/// Returns the global position of the device *at the time of the
/// event* . This is important on asynchronous windows systems like X11;
/// whenever you move your widgets around in response to mouse events,
/// globalPos() can differ significantly from the current position
/// QCursor::pos().
///
/// **See also:** [`global_x()`]
/// [`global_y()`]
/// [`hi_res_global_pos()`]
///
/// Returns the global position of the device *at the time of the
/// event* . This is important on asynchronous windows systems like X11;
/// whenever you move your widgets around in response to mouse events,
/// globalPosF() can differ significantly from the current position
/// QCursor::pos().
///
/// **See also:** [`pos_f()`]
pub fn global_pos(&self) -> Point {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).global_pos)(obj_data);
let t = ret_val;
let ret_val;
if t.host_data != ::std::ptr::null() {
ret_val = Point::new_from_rc(t);
} else {
ret_val = Point::new_from_owned(t);
}
ret_val
}
}
///
/// Returns the position of the device, relative to the widget that
/// received the event.
///
/// If you move widgets around in response to mouse events, use
/// globalPosF() instead of this function.
///
/// **See also:** [`global_pos_f()`]
pub fn pos_f(&self) -> Option<PointF> {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).pos_f)(obj_data);
if ret_val.qt_data == ::std::ptr::null() {
return None;
}
let t = ret_val;
let ret_val;
if t.host_data != ::std::ptr::null() {
ret_val = PointF::new_from_rc(t);
} else {
ret_val = PointF::new_from_owned(t);
}
Some(ret_val)
}
}
///
/// Returns the global position of the device *at the time of the
/// event* . This is important on asynchronous windows systems like X11;
/// whenever you move your widgets around in response to mouse events,
/// globalPosF() can differ significantly from the current position
/// QCursor::pos().
///
/// **See also:** [`pos_f()`]
pub fn global_pos_f(&self) -> Option<PointF> {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).global_pos_f)(obj_data);
if ret_val.qt_data == ::std::ptr::null() {
return None;
}
let t = ret_val;
let ret_val;
if t.host_data != ::std::ptr::null() {
ret_val = PointF::new_from_rc(t);
} else {
ret_val = PointF::new_from_owned(t);
}
Some(ret_val)
}
}
///
/// Returns the angle between the device (a pen, for example) and the
/// perpendicular in the direction of the x axis.
/// Positive values are towards the tablet's physical right. The angle
/// is in the range -60 to +60 degrees.
///
/// ![qtabletevent-tilt.png](qtabletevent-tilt.png)
///
/// **See also:** [`y_tilt()`]
///
/// Returns the x position of the device, relative to the widget that
/// received the event.
///
/// **See also:** [`y()`]
/// [`pos()`]
pub fn x(&self) -> i32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).x)(obj_data);
ret_val
}
}
///
/// Returns the angle between the device (a pen, for example) and the
/// perpendicular in the direction of the y axis.
/// Positive values are towards the bottom of the tablet. The angle is
/// within the range -60 to +60 degrees.
///
/// **See also:** [`x_tilt()`]
///
/// Returns the y position of the device, relative to the widget that
/// received the event.
///
/// **See also:** [`x()`]
/// [`pos()`]
pub fn y(&self) -> i32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).y)(obj_data);
ret_val
}
}
///
/// Returns the global x position of the mouse pointer at the time of
/// the event.
///
/// **See also:** [`global_y()`]
/// [`global_pos()`]
/// [`hi_res_global_x()`]
pub fn global_x(&self) -> i32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).global_x)(obj_data);
ret_val
}
}
///
/// Returns the global y position of the tablet device at the time of
/// the event.
///
/// **See also:** [`global_x()`]
/// [`global_pos()`]
/// [`hi_res_global_y()`]
pub fn global_y(&self) -> i32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).global_y)(obj_data);
ret_val
}
}
///
/// The high precision x position of the tablet device.
pub fn hi_res_global_x(&self) -> f32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).hi_res_global_x)(obj_data);
ret_val
}
}
///
/// The high precision y position of the tablet device.
pub fn hi_res_global_y(&self) -> f32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).hi_res_global_y)(obj_data);
ret_val
}
}
///
/// Returns the type of device that generated the event.
///
/// **See also:** TabletDevice
pub fn device(&self) -> TabletDevice {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).device)(obj_data);
let ret_val = { transmute::<i32, TabletDevice>(ret_val) };
ret_val
}
}
///
/// Returns the type of point that generated the event.
pub fn pointer_type(&self) -> PointerType {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).pointer_type)(obj_data);
let ret_val = { transmute::<i32, PointerType>(ret_val) };
ret_val
}
}
///
/// Returns a unique ID for the current device, making it possible
/// to differentiate between multiple devices being used at the same
/// time on the tablet.
///
/// Support of this feature is dependent on the tablet.
///
/// Values for the same device may vary from OS to OS.
///
/// Later versions of the Wacom driver for Linux will now report
/// the ID information. If you have a tablet that supports unique ID
/// and are not getting the information on Linux, consider upgrading
/// your driver.
///
/// As of Qt 4.2, the unique ID is the same regardless of the orientation
/// of the pen. Earlier versions would report a different value when using
/// the eraser-end versus the pen-end of the stylus on some OS's.
///
/// **See also:** [`pointer_type()`]
pub fn unique_id(&self) -> i64 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).unique_id)(obj_data);
ret_val
}
}
///
/// Returns the pressure for the device. 0.0 indicates that the stylus is not
/// on the tablet, 1.0 indicates the maximum amount of pressure for the stylus.
///
/// **See also:** [`tangential_pressure()`]
pub fn pressure(&self) -> f32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).pressure)(obj_data);
ret_val
}
}
///
/// Returns the z position of the device. Typically this is represented by a
/// wheel on a 4D Mouse. If the device does not support a Z-axis, this value is
/// always zero. This is **not** the same as pressure.
///
/// **See also:** [`pressure()`]
pub fn z(&self) -> i32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).z)(obj_data);
ret_val
}
}
///
/// Returns the tangential pressure for the device. This is typically given by a finger
/// wheel on an airbrush tool. The range is from -1.0 to 1.0. 0.0 indicates a
/// neutral position. Current airbrushes can only move in the positive
/// direction from the neutrual position. If the device does not support
/// tangential pressure, this value is always 0.0.
///
/// **See also:** [`pressure()`]
pub fn tangential_pressure(&self) -> f32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).tangential_pressure)(obj_data);
ret_val
}
}
///
/// Returns the rotation of the current tool in degrees, where zero means the
/// tip of the stylus is pointing towards the top of the tablet, a positive
/// value means it's turned to the right, and a negative value means it's
/// turned to the left. This can be given by a 4D Mouse or a rotation-capable
/// stylus (such as the Wacom Art Pen or the Apple Pencil). If the device does
/// not support rotation, this value is always 0.0.
pub fn rotation(&self) -> f32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).rotation)(obj_data);
ret_val
}
}
///
/// Returns the angle between the device (a pen, for example) and the
/// perpendicular in the direction of the x axis.
/// Positive values are towards the tablet's physical right. The angle
/// is in the range -60 to +60 degrees.
///
/// ![qtabletevent-tilt.png](qtabletevent-tilt.png)
///
/// **See also:** [`y_tilt()`]
pub fn x_tilt(&self) -> i32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).x_tilt)(obj_data);
ret_val
}
}
///
/// Returns the angle between the device (a pen, for example) and the
/// perpendicular in the direction of the y axis.
/// Positive values are towards the bottom of the tablet. The angle is
/// within the range -60 to +60 degrees.
///
/// **See also:** [`x_tilt()`]
pub fn y_tilt(&self) -> i32 {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).y_tilt)(obj_data);
ret_val
}
}
///
/// Returns the button that caused the event.
///
/// Note that the returned value is always Qt::NoButton for [TabletMove,](TabletMove,)
///
/// [TabletEnterProximity](TabletEnterProximity)
/// and [TabletLeaveProximity](TabletLeaveProximity)
/// events.
///
/// **See also:** [`buttons()`]
/// [`t::mouse_button()`]
///
/// Returns the button state when the event was generated. The button state is
/// a combination of buttons from the [Qt::MouseButton](Qt::MouseButton)
/// enum using the OR
/// operator. For [TabletMove](TabletMove)
/// events, this is all buttons that are pressed
/// down. For [TabletPress](TabletPress)
/// events this includes the button that caused the
/// event. For [TabletRelease](TabletRelease)
/// events this excludes the button that caused the
/// event.
///
/// **See also:** [`button()`]
/// [`t::mouse_button()`]
pub fn button(&self) -> MouseButton {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).button)(obj_data);
let ret_val = { transmute::<i32, MouseButton>(ret_val) };
ret_val
}
}
///
/// Returns the button state when the event was generated. The button state is
/// a combination of buttons from the [Qt::MouseButton](Qt::MouseButton)
/// enum using the OR
/// operator. For [TabletMove](TabletMove)
/// events, this is all buttons that are pressed
/// down. For [TabletPress](TabletPress)
/// events this includes the button that caused the
/// event. For [TabletRelease](TabletRelease)
/// events this excludes the button that caused the
/// event.
///
/// **See also:** [`button()`]
/// [`t::mouse_button()`]
pub fn buttons(&self) -> MouseButtons {
let (obj_data, funcs) = self.get_tablet_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).buttons)(obj_data);
let ret_val = { transmute::<i32, MouseButtons>(ret_val) };
ret_val
}
}
#[doc(hidden)]
pub fn modifiers(&self) -> KeyboardModifiers {
let (obj_data, funcs) = self.get_input_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).modifiers)(obj_data);
let ret_val = { transmute::<i32, KeyboardModifiers>(ret_val) };
ret_val
}
}
#[doc(hidden)]
pub fn set_modifiers(&self, amodifiers: KeyboardModifiers) -> &Self {
let enum_amodifiers_1 = amodifiers as i32;
let (obj_data, funcs) = self.get_input_event_obj_funcs();
unsafe {
((*funcs).set_modifiers)(obj_data, enum_amodifiers_1);
}
self
}
#[doc(hidden)]
pub fn timestamp(&self) -> u64 {
let (obj_data, funcs) = self.get_input_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).timestamp)(obj_data);
ret_val
}
}
#[doc(hidden)]
pub fn set_timestamp(&self, atimestamp: u64) -> &Self {
let (obj_data, funcs) = self.get_input_event_obj_funcs();
unsafe {
((*funcs).set_timestamp)(obj_data, atimestamp);
}
self
}
#[doc(hidden)]
pub fn spontaneous(&self) -> bool {
let (obj_data, funcs) = self.get_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).spontaneous)(obj_data);
ret_val
}
}
#[doc(hidden)]
pub fn set_accepted(&self, accepted: bool) -> &Self {
let (obj_data, funcs) = self.get_event_obj_funcs();
unsafe {
((*funcs).set_accepted)(obj_data, accepted);
}
self
}
#[doc(hidden)]
pub fn is_accepted(&self) -> bool {
let (obj_data, funcs) = self.get_event_obj_funcs();
unsafe {
let ret_val = ((*funcs).is_accepted)(obj_data);
ret_val
}
}
#[doc(hidden)]
pub fn accept(&self) -> &Self {
let (obj_data, funcs) = self.get_event_obj_funcs();
unsafe {
((*funcs).accept)(obj_data);
}
self
}
#[doc(hidden)]
pub fn ignore(&self) -> &Self {
let (obj_data, funcs) = self.get_event_obj_funcs();
unsafe {
((*funcs).ignore)(obj_data);
}
self
}
}
pub trait TabletEventTrait<'a> {
#[inline]
#[doc(hidden)]
fn get_tablet_event_obj_funcs(&self) -> (*const RUBase, *const RUTabletEventFuncs);
}
impl<'a> EventTrait<'a> for TabletEvent<'a> {
#[doc(hidden)]
fn get_event_obj_funcs(&self) -> (*const RUBase, *const RUEventFuncs) {
let obj = self.data.get().unwrap();
unsafe { (obj, (*self.all_funcs).event_funcs) }
}
}
impl<'a> InputEventTrait<'a> for TabletEvent<'a> {
#[doc(hidden)]
fn get_input_event_obj_funcs(&self) -> (*const RUBase, *const RUInputEventFuncs) {
let obj = self.data.get().unwrap();
unsafe { (obj, (*self.all_funcs).input_event_funcs) }
}
}
impl<'a> TabletEventTrait<'a> for TabletEvent<'a> {
#[doc(hidden)]
fn get_tablet_event_obj_funcs(&self) -> (*const RUBase, *const RUTabletEventFuncs) {
let obj = self.data.get().unwrap();
unsafe { (obj, (*self.all_funcs).tablet_event_funcs) }
}
}
#[repr(u32)]
pub enum TabletDevice {
NoDevice,
Puck,
Stylus,
Airbrush,
FourDMouse,
XFreeEraser,
RotationStylus,
}
#[repr(u32)]
pub enum PointerType {
UnknownPointer,
Pen,
Cursor,
Eraser,
}