Package org.lwjgl.system
Class Struct
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- All Implemented Interfaces:
Pointer
- Direct Known Subclasses:
CGEventTapInformation
,CGPoint
,DEVMODE
,DISPLAY_DEVICE
,HARDWAREINPUT
,INPUT
,JNINativeMethod
,KEYBDINPUT
,MONITORINFOEX
,MOUSEINPUT
,MSG
,ObjCMethodDescription
,ObjCPropertyAttribute
,PIXELFORMATDESCRIPTOR
,POINT
,POINTL
,RECT
,SECURITY_ATTRIBUTES
,TOUCHINPUT
,Visual
,WINDOWPLACEMENT
,WNDCLASSEX
,XAnyEvent
,XButtonEvent
,XCirculateEvent
,XCirculateRequestEvent
,XClientMessageEvent
,XColormapEvent
,XConfigureEvent
,XConfigureRequestEvent
,XCreateWindowEvent
,XCrossingEvent
,XDestroyWindowEvent
,XErrorEvent
,XEvent
,XExposeEvent
,XFocusChangeEvent
,XGenericEvent
,XGenericEventCookie
,XGraphicsExposeEvent
,XGravityEvent
,XKeyEvent
,XKeymapEvent
,XMapEvent
,XMappingEvent
,XMapRequestEvent
,XMotionEvent
,XNoExposeEvent
,XPropertyEvent
,XReparentEvent
,XResizeRequestEvent
,XSelectionClearEvent
,XSelectionEvent
,XSelectionRequestEvent
,XSetWindowAttributes
,XTimeCoord
,XUnmapEvent
,XVisibilityEvent
,XVisualInfo
public abstract class Struct extends Pointer.Default
Base class of all struct implementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clear()
Zeroes-out the struct data.void
free()
Frees the struct allocation.boolean
isNull(int memberOffset)
Returns true if the pointer member that corresponds to the specifiedmemberOffset
isNULL
.abstract int
sizeof()
Returnssizeof(struct)
.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
Method Detail
-
sizeof
public abstract int sizeof()
Returnssizeof(struct)
.
-
clear
public void clear()
Zeroes-out the struct data.
-
free
public void free()
Frees the struct allocation.This method should not be used if the memory backing this struct is not owned by the struct.
-
isNull
public boolean isNull(int memberOffset)
Returns true if the pointer member that corresponds to the specifiedmemberOffset
isNULL
.This is useful to verify that not nullable members of an untrusted struct instance are indeed not
NULL
.- Parameters:
memberOffset
- the byte offset of the member to query- Returns:
- true if the member is
NULL
-
-