Package org.lwjgl.system.macosx
Class CGPoint
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct
org.lwjgl.system.macosx.CGPoint
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class CGPoint
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionCGPoint
(ByteBuffer container) Creates aCGPoint
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic CGPoint
calloc()
Returns a newCGPoint
instance allocated withmemCalloc
.static CGPoint.Buffer
calloc
(int capacity) Returns a newCGPoint.Buffer
instance allocated withmemCalloc
.static CGPoint.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCGPoint.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CGPoint
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newCGPoint
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CGPoint
Deprecated.static CGPoint.Buffer
callocStack
(int capacity) Deprecated.static CGPoint.Buffer
callocStack
(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CGPoint
callocStack
(org.lwjgl.system.MemoryStack stack) Deprecated.static CGPoint
create()
Returns a newCGPoint
instance allocated withBufferUtils
.static CGPoint.Buffer
create
(int capacity) Returns a newCGPoint.Buffer
instance allocated withBufferUtils
.static CGPoint
create
(long address) Returns a newCGPoint
instance for the specified memory address.static CGPoint.Buffer
create
(long address, int capacity) Create aCGPoint.Buffer
instance at the specified memory.static CGPoint
createSafe
(long address) static CGPoint.Buffer
createSafe
(long address, int capacity) static CGPoint
malloc()
Returns a newCGPoint
instance allocated withmemAlloc
.static CGPoint.Buffer
malloc
(int capacity) Returns a newCGPoint.Buffer
instance allocated withmemAlloc
.static CGPoint.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCGPoint.Buffer
instance allocated on the specifiedMemoryStack
.static CGPoint
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newCGPoint
instance allocated on the specifiedMemoryStack
.static CGPoint
Deprecated.static CGPoint.Buffer
mallocStack
(int capacity) Deprecated.static CGPoint.Buffer
mallocStack
(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static CGPoint
mallocStack
(org.lwjgl.system.MemoryStack stack) Deprecated.static double
nx
(long struct) Unsafe version ofx()
.static void
nx
(long struct, double value) Unsafe version ofx
.static double
ny
(long struct) Unsafe version ofy()
.static void
ny
(long struct, double value) Unsafe version ofy
.set
(double x, double y) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
double
x()
the x-coordinate of the pointx
(double value) Sets the specified value to thex()
field.double
y()
the y-coordinate of the pointy
(double value) Sets the specified value to they()
field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
X
public static final int XThe struct member offsets. -
Y
public static final int YThe struct member offsets.
-
-
Constructor Details
-
CGPoint
Creates aCGPoint
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
x
public double x()the x-coordinate of the point -
y
public double y()the y-coordinate of the point -
x
Sets the specified value to thex()
field. -
y
Sets the specified value to they()
field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newCGPoint
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newCGPoint
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newCGPoint
instance allocated withBufferUtils
. -
create
Returns a newCGPoint
instance for the specified memory address. -
createSafe
-
malloc
Returns a newCGPoint.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newCGPoint.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newCGPoint.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aCGPoint.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
@Deprecated public static CGPoint.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
@Deprecated public static CGPoint.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newCGPoint
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newCGPoint
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newCGPoint.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newCGPoint.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nx
public static double nx(long struct) Unsafe version ofx()
. -
ny
public static double ny(long struct) Unsafe version ofy()
. -
nx
public static void nx(long struct, double value) Unsafe version ofx
. -
ny
public static void ny(long struct, double value) Unsafe version ofy
.
-