Record Class SDL_PenButtonEvent

java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_PenButtonEvent
All Implemented Interfaces:
IPointer, ISDL_PenButtonEvent

@ValueBasedCandidate @UnsafeConstructor public record SDL_PenButtonEvent(@NotNull MemorySegment segment) extends Record implements ISDL_PenButtonEvent

Pressure-sensitive pen button event structure (event.pbutton.*)

This is for buttons on the pen itself that the user might click. The pen itself pressing down to draw triggers a SDL_EVENT_PEN_DOWN event instead.

Since: This struct is available since SDL 3.2.0.

Structure

typedef struct SDL_PenButtonEvent {
    SDL_EventType type;
    Uint32 reserved;
    Uint64 timestamp;
    SDL_WindowID windowID;
    SDL_PenID which;
    SDL_PenInputFlags pen_state;
    float x;
    float y;
    Uint8 button;
    bool down;
} SDL_PenButtonEvent;

Contracts

The property segment() should always be not-null (segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java null instead. See the documentation of IPointer.segment() for more details.

The constructor of this class is marked as UnsafeConstructor, because it does not perform any runtime check. The constructor can be useful for automatic code generators.