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:
java.lang.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 Classes Modifier and Type Class Description static class
CGPoint.Buffer
An array ofCGPoint
structs.
-
Constructor Summary
Constructors Constructor Description CGPoint(java.nio.ByteBuffer container)
Creates aCGPoint
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static 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
callocStack()
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
mallocStack()
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
.CGPoint
set(double x, double y)
Initializes this struct with the specified values.CGPoint
set(CGPoint src)
Copies the specified struct data to this struct.int
sizeof()
double
x()
the x-coordinate of the pointCGPoint
x(double value)
Sets the specified value to thex()
field.double
y()
the y-coordinate of the pointCGPoint
y(double value)
Sets the specified value to they()
field.
-
-
-
Constructor Detail
-
CGPoint
public CGPoint(java.nio.ByteBuffer container)
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 Detail
-
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
-
set
public CGPoint set(double x, double y)
Initializes this struct with the specified values.
-
set
public CGPoint set(CGPoint src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static CGPoint malloc()
Returns a newCGPoint
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static CGPoint calloc()
Returns a newCGPoint
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static CGPoint create()
Returns a newCGPoint
instance allocated withBufferUtils
.
-
create
public static CGPoint create(long address)
Returns a newCGPoint
instance for the specified memory address.
-
createSafe
@Nullable public static CGPoint createSafe(long address)
-
malloc
public static CGPoint.Buffer malloc(int capacity)
Returns a newCGPoint.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static CGPoint.Buffer calloc(int capacity)
Returns a newCGPoint.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static CGPoint.Buffer create(int capacity)
Returns a newCGPoint.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static CGPoint.Buffer create(long address, int capacity)
Create aCGPoint.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static CGPoint.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static CGPoint mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static CGPoint callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static CGPoint mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static CGPoint callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static CGPoint.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static CGPoint.Buffer callocStack(int capacity)
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
public static CGPoint malloc(org.lwjgl.system.MemoryStack stack)
Returns a newCGPoint
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static CGPoint calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCGPoint
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
public static CGPoint.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newCGPoint.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public 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.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
.
-
-