Record Class SDL_Event
java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_Event
- All Implemented Interfaces:
IPointer,ISDL_Event
@ValueBasedCandidate
@UnsafeConstructor
public record SDL_Event(@NotNull MemorySegment segment)
extends Record
implements ISDL_Event
The structure for all events in SDL.
The SDL_Event structure is the core of all event handling in SDL. SDL_Event is a union of all event structures used in SDL.
\since This struct is available since SDL 3.2.0.
Structure
typedef struct SDL_Event {
Uint32 type;
SDL_CommonEvent common;
SDL_DisplayEvent display;
SDL_WindowEvent window;
SDL_KeyboardDeviceEvent kdevice;
SDL_KeyboardEvent key;
SDL_TextEditingEvent edit;
SDL_TextEditingCandidatesEvent edit_candidates;
SDL_TextInputEvent text;
SDL_MouseDeviceEvent mdevice;
SDL_MouseMotionEvent motion;
SDL_MouseButtonEvent button;
SDL_MouseWheelEvent wheel;
SDL_JoyDeviceEvent jdevice;
SDL_JoyAxisEvent jaxis;
SDL_JoyBallEvent jball;
SDL_JoyHatEvent jhat;
SDL_JoyButtonEvent jbutton;
SDL_JoyBatteryEvent jbattery;
SDL_GamepadDeviceEvent gdevice;
SDL_GamepadAxisEvent gaxis;
SDL_GamepadButtonEvent gbutton;
SDL_GamepadTouchpadEvent gtouchpad;
SDL_GamepadSensorEvent gsensor;
SDL_AudioDeviceEvent adevice;
SDL_CameraDeviceEvent cdevice;
SDL_SensorEvent sensor;
SDL_QuitEvent quit;
SDL_UserEvent user;
SDL_TouchFingerEvent tfinger;
SDL_PenProximityEvent pproximity;
SDL_PenTouchEvent ptouch;
SDL_PenMotionEvent pmotion;
SDL_PenButtonEvent pbutton;
SDL_PenAxisEvent paxis;
SDL_RenderEvent render;
SDL_DropEvent drop;
SDL_ClipboardEvent clipboard;
Uint8[128] padding;
} SDL_Event;
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final UnionLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final SequenceLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final ValueLayout.OfIntstatic final StructLayoutstatic final StructLayoutstatic final StructLayoutstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_Event(@NotNull MemorySegment segment) Creates an instance of aSDL_Eventrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull SDL_AudioDeviceEventadevice()adevice(@NotNull SDL_AudioDeviceEvent value) adevice(Consumer<@NotNull SDL_AudioDeviceEvent> consumer) static SDL_Eventstatic SDL_Event.Ptr@NotNull SDL_MouseButtonEventbutton()button(@NotNull SDL_MouseButtonEvent value) button(Consumer<@NotNull SDL_MouseButtonEvent> consumer) @NotNull SDL_CameraDeviceEventcdevice()cdevice(@NotNull SDL_CameraDeviceEvent value) cdevice(Consumer<@NotNull SDL_CameraDeviceEvent> consumer) @NotNull SDL_ClipboardEventclipboard(@NotNull SDL_ClipboardEvent value) clipboard(Consumer<@NotNull SDL_ClipboardEvent> consumer) static SDL_Event@NotNull SDL_CommonEventcommon()common(@NotNull SDL_CommonEvent value) common(Consumer<@NotNull SDL_CommonEvent> consumer) @NotNull SDL_DisplayEventdisplay()display(@NotNull SDL_DisplayEvent value) display(Consumer<@NotNull SDL_DisplayEvent> consumer) @NotNull SDL_DropEventdrop()drop(@NotNull SDL_DropEvent value) drop(Consumer<@NotNull SDL_DropEvent> consumer) @NotNull SDL_TextEditingEventedit()edit(@NotNull SDL_TextEditingEvent value) edit(Consumer<@NotNull SDL_TextEditingEvent> consumer) @NotNull SDL_TextEditingCandidatesEventedit_candidates(@NotNull SDL_TextEditingCandidatesEvent value) edit_candidates(Consumer<@NotNull SDL_TextEditingCandidatesEvent> consumer) final booleanIndicates whether some other object is "equal to" this one.@NotNull SDL_GamepadAxisEventgaxis()gaxis(@NotNull SDL_GamepadAxisEvent value) gaxis(Consumer<@NotNull SDL_GamepadAxisEvent> consumer) @NotNull SDL_GamepadButtonEventgbutton()gbutton(@NotNull SDL_GamepadButtonEvent value) gbutton(Consumer<@NotNull SDL_GamepadButtonEvent> consumer) @NotNull SDL_GamepadDeviceEventgdevice()gdevice(@NotNull SDL_GamepadDeviceEvent value) gdevice(Consumer<@NotNull SDL_GamepadDeviceEvent> consumer) @NotNull SDL_GamepadSensorEventgsensor()gsensor(@NotNull SDL_GamepadSensorEvent value) gsensor(Consumer<@NotNull SDL_GamepadSensorEvent> consumer) @NotNull SDL_GamepadTouchpadEventgtouchpad(@NotNull SDL_GamepadTouchpadEvent value) gtouchpad(Consumer<@NotNull SDL_GamepadTouchpadEvent> consumer) final inthashCode()Returns a hash code value for this object.@NotNull SDL_JoyAxisEventjaxis()jaxis(@NotNull SDL_JoyAxisEvent value) jaxis(Consumer<@NotNull SDL_JoyAxisEvent> consumer) @NotNull SDL_JoyBallEventjball()jball(@NotNull SDL_JoyBallEvent value) jball(Consumer<@NotNull SDL_JoyBallEvent> consumer) @NotNull SDL_JoyBatteryEventjbattery()jbattery(@NotNull SDL_JoyBatteryEvent value) jbattery(Consumer<@NotNull SDL_JoyBatteryEvent> consumer) @NotNull SDL_JoyButtonEventjbutton()jbutton(@NotNull SDL_JoyButtonEvent value) jbutton(Consumer<@NotNull SDL_JoyButtonEvent> consumer) @NotNull SDL_JoyDeviceEventjdevice()jdevice(@NotNull SDL_JoyDeviceEvent value) jdevice(Consumer<@NotNull SDL_JoyDeviceEvent> consumer) @NotNull SDL_JoyHatEventjhat()jhat(@NotNull SDL_JoyHatEvent value) jhat(Consumer<@NotNull SDL_JoyHatEvent> consumer) @NotNull SDL_KeyboardDeviceEventkdevice()kdevice(@NotNull SDL_KeyboardDeviceEvent value) kdevice(Consumer<@NotNull SDL_KeyboardDeviceEvent> consumer) @NotNull SDL_KeyboardEventkey()key(@NotNull SDL_KeyboardEvent value) key(Consumer<@NotNull SDL_KeyboardEvent> consumer) @NotNull SDL_MouseDeviceEventmdevice()mdevice(@NotNull SDL_MouseDeviceEvent value) mdevice(Consumer<@NotNull SDL_MouseDeviceEvent> consumer) @NotNull SDL_MouseMotionEventmotion()motion(@NotNull SDL_MouseMotionEvent value) motion(Consumer<@NotNull SDL_MouseMotionEvent> consumer) padding()@NotNull SDL_PenAxisEventpaxis()paxis(@NotNull SDL_PenAxisEvent value) paxis(Consumer<@NotNull SDL_PenAxisEvent> consumer) @NotNull SDL_PenButtonEventpbutton()pbutton(@NotNull SDL_PenButtonEvent value) pbutton(Consumer<@NotNull SDL_PenButtonEvent> consumer) @NotNull SDL_PenMotionEventpmotion()pmotion(@NotNull SDL_PenMotionEvent value) pmotion(Consumer<@NotNull SDL_PenMotionEvent> consumer) @NotNull SDL_PenProximityEventpproximity(@NotNull SDL_PenProximityEvent value) pproximity(Consumer<@NotNull SDL_PenProximityEvent> consumer) @NotNull SDL_PenTouchEventptouch()ptouch(@NotNull SDL_PenTouchEvent value) ptouch(Consumer<@NotNull SDL_PenTouchEvent> consumer) @NotNull SDL_QuitEventquit()quit(@NotNull SDL_QuitEvent value) quit(Consumer<@NotNull SDL_QuitEvent> consumer) @NotNull SDL_RenderEventrender()render(@NotNull SDL_RenderEvent value) render(Consumer<@NotNull SDL_RenderEvent> consumer) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.@NotNull SDL_SensorEventsensor()sensor(@NotNull SDL_SensorEvent value) sensor(Consumer<@NotNull SDL_SensorEvent> consumer) @NotNull SDL_TextInputEventtext()text(@NotNull SDL_TextInputEvent value) text(Consumer<@NotNull SDL_TextInputEvent> consumer) @NotNull SDL_TouchFingerEventtfinger()tfinger(@NotNull SDL_TouchFingerEvent value) tfinger(Consumer<@NotNull SDL_TouchFingerEvent> consumer) final StringtoString()Returns a string representation of this record class.inttype()type(int value) @NotNull SDL_UserEventuser()user(@NotNull SDL_UserEvent value) user(Consumer<@NotNull SDL_UserEvent> consumer) @NotNull SDL_MouseWheelEventwheel()wheel(@NotNull SDL_MouseWheelEvent value) wheel(Consumer<@NotNull SDL_MouseWheelEvent> consumer) @NotNull SDL_WindowEventwindow()window(@NotNull SDL_WindowEvent value) window(Consumer<@NotNull SDL_WindowEvent> consumer)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$type
-
PATH$common
-
PATH$display
-
PATH$window
-
PATH$kdevice
-
PATH$key
-
PATH$edit
-
PATH$edit_candidates
-
PATH$text
-
PATH$mdevice
-
PATH$motion
-
PATH$button
-
PATH$wheel
-
PATH$jdevice
-
PATH$jaxis
-
PATH$jball
-
PATH$jhat
-
PATH$jbutton
-
PATH$jbattery
-
PATH$gdevice
-
PATH$gaxis
-
PATH$gbutton
-
PATH$gtouchpad
-
PATH$gsensor
-
PATH$adevice
-
PATH$cdevice
-
PATH$sensor
-
PATH$quit
-
PATH$user
-
PATH$tfinger
-
PATH$pproximity
-
PATH$ptouch
-
PATH$pmotion
-
PATH$pbutton
-
PATH$paxis
-
PATH$render
-
PATH$drop
-
PATH$clipboard
-
PATH$padding
-
LAYOUT$type
-
LAYOUT$common
-
LAYOUT$display
-
LAYOUT$window
-
LAYOUT$kdevice
-
LAYOUT$key
-
LAYOUT$edit
-
LAYOUT$edit_candidates
-
LAYOUT$text
-
LAYOUT$mdevice
-
LAYOUT$motion
-
LAYOUT$button
-
LAYOUT$wheel
-
LAYOUT$jdevice
-
LAYOUT$jaxis
-
LAYOUT$jball
-
LAYOUT$jhat
-
LAYOUT$jbutton
-
LAYOUT$jbattery
-
LAYOUT$gdevice
-
LAYOUT$gaxis
-
LAYOUT$gbutton
-
LAYOUT$gtouchpad
-
LAYOUT$gsensor
-
LAYOUT$adevice
-
LAYOUT$cdevice
-
LAYOUT$sensor
-
LAYOUT$quit
-
LAYOUT$user
-
LAYOUT$tfinger
-
LAYOUT$pproximity
-
LAYOUT$ptouch
-
LAYOUT$pmotion
-
LAYOUT$pbutton
-
LAYOUT$paxis
-
LAYOUT$render
-
LAYOUT$drop
-
LAYOUT$clipboard
-
LAYOUT$padding
-
SIZE$type
public static final long SIZE$type -
SIZE$common
public static final long SIZE$common -
SIZE$display
public static final long SIZE$display -
SIZE$window
public static final long SIZE$window -
SIZE$kdevice
public static final long SIZE$kdevice -
SIZE$key
public static final long SIZE$key -
SIZE$edit
public static final long SIZE$edit -
SIZE$edit_candidates
public static final long SIZE$edit_candidates -
SIZE$text
public static final long SIZE$text -
SIZE$mdevice
public static final long SIZE$mdevice -
SIZE$motion
public static final long SIZE$motion -
SIZE$button
public static final long SIZE$button -
SIZE$wheel
public static final long SIZE$wheel -
SIZE$jdevice
public static final long SIZE$jdevice -
SIZE$jaxis
public static final long SIZE$jaxis -
SIZE$jball
public static final long SIZE$jball -
SIZE$jhat
public static final long SIZE$jhat -
SIZE$jbutton
public static final long SIZE$jbutton -
SIZE$jbattery
public static final long SIZE$jbattery -
SIZE$gdevice
public static final long SIZE$gdevice -
SIZE$gaxis
public static final long SIZE$gaxis -
SIZE$gbutton
public static final long SIZE$gbutton -
SIZE$gtouchpad
public static final long SIZE$gtouchpad -
SIZE$gsensor
public static final long SIZE$gsensor -
SIZE$adevice
public static final long SIZE$adevice -
SIZE$cdevice
public static final long SIZE$cdevice -
SIZE$sensor
public static final long SIZE$sensor -
SIZE$quit
public static final long SIZE$quit -
SIZE$user
public static final long SIZE$user -
SIZE$tfinger
public static final long SIZE$tfinger -
SIZE$pproximity
public static final long SIZE$pproximity -
SIZE$ptouch
public static final long SIZE$ptouch -
SIZE$pmotion
public static final long SIZE$pmotion -
SIZE$pbutton
public static final long SIZE$pbutton -
SIZE$paxis
public static final long SIZE$paxis -
SIZE$render
public static final long SIZE$render -
SIZE$drop
public static final long SIZE$drop -
SIZE$clipboard
public static final long SIZE$clipboard -
SIZE$padding
public static final long SIZE$padding -
OFFSET$type
public static final long OFFSET$type -
OFFSET$common
public static final long OFFSET$common -
OFFSET$display
public static final long OFFSET$display -
OFFSET$window
public static final long OFFSET$window -
OFFSET$kdevice
public static final long OFFSET$kdevice -
OFFSET$key
public static final long OFFSET$key -
OFFSET$edit
public static final long OFFSET$edit -
OFFSET$edit_candidates
public static final long OFFSET$edit_candidates -
OFFSET$text
public static final long OFFSET$text -
OFFSET$mdevice
public static final long OFFSET$mdevice -
OFFSET$motion
public static final long OFFSET$motion -
OFFSET$button
public static final long OFFSET$button -
OFFSET$wheel
public static final long OFFSET$wheel -
OFFSET$jdevice
public static final long OFFSET$jdevice -
OFFSET$jaxis
public static final long OFFSET$jaxis -
OFFSET$jball
public static final long OFFSET$jball -
OFFSET$jhat
public static final long OFFSET$jhat -
OFFSET$jbutton
public static final long OFFSET$jbutton -
OFFSET$jbattery
public static final long OFFSET$jbattery -
OFFSET$gdevice
public static final long OFFSET$gdevice -
OFFSET$gaxis
public static final long OFFSET$gaxis -
OFFSET$gbutton
public static final long OFFSET$gbutton -
OFFSET$gtouchpad
public static final long OFFSET$gtouchpad -
OFFSET$gsensor
public static final long OFFSET$gsensor -
OFFSET$adevice
public static final long OFFSET$adevice -
OFFSET$cdevice
public static final long OFFSET$cdevice -
OFFSET$sensor
public static final long OFFSET$sensor -
OFFSET$quit
public static final long OFFSET$quit -
OFFSET$user
public static final long OFFSET$user -
OFFSET$tfinger
public static final long OFFSET$tfinger -
OFFSET$pproximity
public static final long OFFSET$pproximity -
OFFSET$ptouch
public static final long OFFSET$ptouch -
OFFSET$pmotion
public static final long OFFSET$pmotion -
OFFSET$pbutton
public static final long OFFSET$pbutton -
OFFSET$paxis
public static final long OFFSET$paxis -
OFFSET$render
public static final long OFFSET$render -
OFFSET$drop
public static final long OFFSET$drop -
OFFSET$clipboard
public static final long OFFSET$clipboard -
OFFSET$padding
public static final long OFFSET$padding
-
-
Constructor Details
-
SDL_Event
Creates an instance of aSDL_Eventrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
type
-
type
-
common
-
common
-
common
-
display
-
display
-
display
-
window
-
window
-
window
-
kdevice
-
kdevice
-
kdevice
-
key
-
key
-
key
-
edit
-
edit
-
edit
-
edit_candidates
-
edit_candidates
-
edit_candidates
-
text
-
text
-
text
-
mdevice
-
mdevice
-
mdevice
-
motion
-
motion
-
motion
-
button
-
button
-
button
-
wheel
-
wheel
-
wheel
-
jdevice
-
jdevice
-
jdevice
-
jaxis
-
jaxis
-
jaxis
-
jball
-
jball
-
jball
-
jhat
-
jhat
-
jhat
-
jbutton
-
jbutton
-
jbutton
-
jbattery
-
jbattery
-
jbattery
-
gdevice
-
gdevice
-
gdevice
-
gaxis
-
gaxis
-
gaxis
-
gbutton
-
gbutton
-
gbutton
-
gtouchpad
-
gtouchpad
-
gtouchpad
-
gsensor
-
gsensor
-
gsensor
-
adevice
-
adevice
-
adevice
-
cdevice
-
cdevice
-
cdevice
-
sensor
-
sensor
-
sensor
-
quit
-
quit
-
quit
-
user
-
user
-
user
-
tfinger
-
tfinger
-
tfinger
-
pproximity
-
pproximity
-
pproximity
-
ptouch
-
ptouch
-
ptouch
-
pmotion
-
pmotion
-
pmotion
-
pbutton
-
pbutton
-
pbutton
-
paxis
-
paxis
-
paxis
-
render
-
render
-
render
-
drop
-
drop
-
drop
-
clipboard
-
clipboard
-
clipboard
-
padding
-
padding
-
paddingRaw
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
segment
Returns the value of thesegmentrecord component.
-