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 classCGPoint.BufferAn array ofCGPointstructs.
-
Constructor Summary
Constructors Constructor Description CGPoint(java.nio.ByteBuffer container)Creates aCGPointinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CGPointcalloc()Returns a newCGPointinstance allocated withmemCalloc.static CGPoint.Buffercalloc(int capacity)Returns a newCGPoint.Bufferinstance allocated withmemCalloc.static CGPoint.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCGPoint.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CGPointcalloc(org.lwjgl.system.MemoryStack stack)Returns a newCGPointinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CGPointcallocStack()Deprecated.static CGPoint.BuffercallocStack(int capacity)Deprecated.static CGPoint.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CGPointcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static CGPointcreate()Returns a newCGPointinstance allocated withBufferUtils.static CGPoint.Buffercreate(int capacity)Returns a newCGPoint.Bufferinstance allocated withBufferUtils.static CGPointcreate(long address)Returns a newCGPointinstance for the specified memory address.static CGPoint.Buffercreate(long address, int capacity)Create aCGPoint.Bufferinstance at the specified memory.static CGPointcreateSafe(long address)static CGPoint.BuffercreateSafe(long address, int capacity)static CGPointmalloc()Returns a newCGPointinstance allocated withmemAlloc.static CGPoint.Buffermalloc(int capacity)Returns a newCGPoint.Bufferinstance allocated withmemAlloc.static CGPoint.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newCGPoint.Bufferinstance allocated on the specifiedMemoryStack.static CGPointmalloc(org.lwjgl.system.MemoryStack stack)Returns a newCGPointinstance allocated on the specifiedMemoryStack.static CGPointmallocStack()Deprecated.static CGPoint.BuffermallocStack(int capacity)Deprecated.static CGPoint.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static CGPointmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static doublenx(long struct)Unsafe version ofx().static voidnx(long struct, double value)Unsafe version ofx.static doubleny(long struct)Unsafe version ofy().static voidny(long struct, double value)Unsafe version ofy.CGPointset(double x, double y)Initializes this struct with the specified values.CGPointset(CGPoint src)Copies the specified struct data to this struct.intsizeof()doublex()the x-coordinate of the pointCGPointx(double value)Sets the specified value to thex()field.doubley()the y-coordinate of the pointCGPointy(double value)Sets the specified value to they()field.
-
-
-
Constructor Detail
-
CGPoint
public CGPoint(java.nio.ByteBuffer container)
Creates aCGPointinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin 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 newCGPointinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static CGPoint calloc()
Returns a newCGPointinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static CGPoint create()
Returns a newCGPointinstance allocated withBufferUtils.
-
create
public static CGPoint create(long address)
Returns a newCGPointinstance for the specified memory address.
-
createSafe
@Nullable public static CGPoint createSafe(long address)
-
malloc
public static CGPoint.Buffer malloc(int capacity)
Returns a newCGPoint.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static CGPoint.Buffer calloc(int capacity)
Returns a newCGPoint.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static CGPoint.Buffer create(int capacity)
Returns a newCGPoint.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static CGPoint.Buffer create(long address, int capacity)
Create aCGPoint.Bufferinstance 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 newCGPointinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static CGPoint calloc(org.lwjgl.system.MemoryStack stack)
Returns a newCGPointinstance allocated on the specifiedMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-