#[repr(transparent)]pub struct SDL_PenDeviceType(pub c_int);Expand description
An enum that describes the type of a pen device.
A “direct” device is a pen that touches a graphic display (like an Apple Pencil on an iPad’s screen). “Indirect” devices touch an external tablet surface that is connected to the machine but is not a display (like a lower-end Wacom tablet connected over USB).
Apps may use this information to decide if they should draw a cursor; if the pen is touching the screen directly, a cursor doesn’t make sense and can be in the way, but becomes necessary for indirect devices to know where on the display they are interacting.
§Availability
This enum is available since SDL 3.4.0.
§Known values (sdl3-sys)
| Associated constant | Global constant | Description |
|---|---|---|
INVALID | SDL_PEN_DEVICE_TYPE_INVALID | Not a valid pen device. |
UNKNOWN | SDL_PEN_DEVICE_TYPE_UNKNOWN | Don’t know specifics of this pen. |
DIRECT | SDL_PEN_DEVICE_TYPE_DIRECT | Pen touches display. |
INDIRECT | SDL_PEN_DEVICE_TYPE_INDIRECT | Pen touches something that isn’t the display. |
Tuple Fields§
§0: c_intImplementations§
Trait Implementations§
Source§impl Clone for SDL_PenDeviceType
impl Clone for SDL_PenDeviceType
Source§fn clone(&self) -> SDL_PenDeviceType
fn clone(&self) -> SDL_PenDeviceType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_PenDeviceType
Available on crate feature debug-impls only.
impl Debug for SDL_PenDeviceType
Available on crate feature
debug-impls only.Source§impl Default for SDL_PenDeviceType
impl Default for SDL_PenDeviceType
Source§fn default() -> SDL_PenDeviceType
fn default() -> SDL_PenDeviceType
Returns the “default value” for a type. Read more
Source§impl From<SDL_PenDeviceType> for c_int
impl From<SDL_PenDeviceType> for c_int
Source§fn from(value: SDL_PenDeviceType) -> Self
fn from(value: SDL_PenDeviceType) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_PenDeviceType
Available on crate feature metadata only.
impl GroupMetadata for SDL_PenDeviceType
Available on crate feature
metadata only.Source§const GROUP_METADATA: &'static Group
const GROUP_METADATA: &'static Group
Metadata for this group
Source§impl Hash for SDL_PenDeviceType
impl Hash for SDL_PenDeviceType
Source§impl Ord for SDL_PenDeviceType
impl Ord for SDL_PenDeviceType
Source§fn cmp(&self, other: &SDL_PenDeviceType) -> Ordering
fn cmp(&self, other: &SDL_PenDeviceType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<SDL_PenDeviceType> for c_int
impl PartialEq<SDL_PenDeviceType> for c_int
Source§impl PartialEq<i32> for SDL_PenDeviceType
impl PartialEq<i32> for SDL_PenDeviceType
Source§impl PartialEq for SDL_PenDeviceType
impl PartialEq for SDL_PenDeviceType
Source§impl PartialOrd for SDL_PenDeviceType
impl PartialOrd for SDL_PenDeviceType
impl Copy for SDL_PenDeviceType
impl Eq for SDL_PenDeviceType
impl StructuralPartialEq for SDL_PenDeviceType
Auto Trait Implementations§
impl Freeze for SDL_PenDeviceType
impl RefUnwindSafe for SDL_PenDeviceType
impl Send for SDL_PenDeviceType
impl Sync for SDL_PenDeviceType
impl Unpin for SDL_PenDeviceType
impl UnwindSafe for SDL_PenDeviceType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more