SDL_PenDeviceType(3type)
π SDL_PenDeviceType π
okay bestie, welcome to the SDL_PenDeviceType(3type) page β it's part of the SDL3 DATATYPES collection, and it's literally just a little enum that tells you what kind of pen you're dealing with. tiny page, big vibes. let's go ποΈβ¨
β¨ NAME β¨
SDL_PenDeviceType β an enum that describes the type of a pen device.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_pen.h>
typedef enum SDL_PenDeviceType
{
SDL_PEN_DEVICE_TYPE_INVALID = -1, /**< Not a valid pen device. */
SDL_PEN_DEVICE_TYPE_UNKNOWN, /**< Don't know specifics of this pen. */
SDL_PEN_DEVICE_TYPE_DIRECT, /**< Pen touches display. */
SDL_PEN_DEVICE_TYPE_INDIRECT /**< Pen touches something that isn't the display. */
} SDL_PenDeviceType;
π¦ DESCRIPTION π¦
so the tea is this: a "direct" device is a pen that touches a graphic display β think an Apple Pencil straight-up poking an iPad's screen. very touch-the-pixels, very main character energy π
an "indirect" device is the opposite vibe β it touches an external tablet surface that's plugged into the machine but is not a display. like a lower-end Wacom tablet chillin' over USB. you draw over there, the cursor moves over here. iykyk π
and the way apps use this?? they can decide whether to draw a cursor at all. if the pen is touching the screen directly, a cursor doesn't make sense and is lowkey just in the way π. but for indirect devices it becomes necessary, because otherwise you'd have no idea where on the display you're interacting. cursor = the blueprint. periodt.
β AVAILABILITY β
this enum is available since SDL 3.4.0. not a day earlier, no cap.
π«Ά reminder bestie:SDL_PEN_DEVICE_TYPE_INVALIDis-1and it means not a valid pen device, andSDL_PEN_DEVICE_TYPE_UNKNOWNmeans we genuinely don't know the specifics. don't go treating either of those as a real pen, okay??
that's the whole page, babe β short and iconic, like a good caption. this was brought to you by Simple Directmedia Layer π, version SDL 3.4.18, and yeah the page itself is SDL_PenDeviceType(3type). mwah π go touch grass (or a tablet surface, indirect girlies) π§π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms