Top Description Fields Constructors Methods
org.lwjgl.system.macosx

public Class CoreFoundation

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

Native bindings to <CoreFoundation.h>.

Field Summary

Modifier and TypeField and Description
public static final byte
FALSE

Boolean values.

public static final long
kCFAllocatorDefault

This is a synonym for NULL, if you'd rather use a named constant.

public static final long
kCFAllocatorMalloc

This allocator uses malloc(), realloc(), and free().

public static final long
kCFAllocatorMallocZone

This allocator explicitly uses the default malloc zone, returned by malloc_default_zone().

public static final long
kCFAllocatorNull

Null allocator which does nothing and allocates no memory.

public static final long
kCFAllocatorSystemDefault

Default system allocator; you rarely need to use this.

public static final long
kCFAllocatorUseContext

Special allocator argument to CFAllocatorCreate which means "use the functions given in the context to allocate the allocator itself as well".

public static final int
kCFStringEncodingASCII

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingISOLatin1

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingMacRoman

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingNextStepLatin

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingNonLossyASCII

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingUnicode

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingUTF16

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingUTF16BE

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingUTF16LE

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingUTF32

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingUTF32BE

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingUTF32LE

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingUTF8

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFStringEncodingWindowsLatin1

Platform-independent built-in encodings; always available on all platforms.

public static final int
kCFURLHFSPathStyle

URL path styles.

public static final int
kCFURLPOSIXPathStyle

URL path styles.

public static final int
kCFURLWindowsPathStyle

URL path styles.

public static final byte
TRUE

Boolean values.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
CFBundleCreate(long
the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
allocator
,
long
the location of the bundle for which to create a CFBundle object
bundleURL
)

Creates a CFBundle object.

public static long
CFBundleGetBundleWithIdentifier(long
the identifier of the bundle to locate. Note that identifier names are case-sensitive.
bundleID
)

Locates a bundle given its program-defined identifier.

public static long
CFBundleGetFunctionPointerForName(long
the bundle to examine
bundle
,
long
the name of the function to locate
functionName
)

Returns a pointer to a function in a bundle’s executable code using the function name as the search key.

public static void
CFRelease(long
the CFType object to release
cf
)

Releases a Core Foundation object.

public static long
CFRetain(long
the CFType object to retain
cf
)

Retains a Core Foundation object.

public static long
CFStringCreateWithCString(long
the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
allocator
,
ByteBuffer
the NULL-terminated C string to be used to create the CFString object. The string must use an 8-bit encoding.
cStr
,
int encoding)

Creates an immutable string from a C string.

public static long
CFStringCreateWithCStringNoCopy(long
the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
allocator
,
ByteBuffer
the NULL-terminated C string to be used to create the CFString object. The string must use an 8-bit encoding.
cStr
,
int encoding, long
the CFAllocator object to use to deallocate the external string buffer when it is no longer needed. You can pass NULL or kCFAllocatorDefault to request the default allocator for this purpose. If the buffer does not need to be deallocated, or if you want to assume responsibility for deallocating the buffer (and not have the CFString object deallocate it), pass kCFAllocatorNull.
contentsDeallocator
)

Creates a CFString object from an external C string buffer that might serve as the backing store for the object.

public static long
CFURLCreateWithFileSystemPath(long
the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
allocator
,
long
the path string to convert to a CFURL object. If filePath is not absolute, the resulting URL will be considered relative to the current working directory (evaluated when this function is being invoked).
filePath
,
long
the operating system path style used in filePath. One of:
kCFURLPOSIXPathStylekCFURLHFSPathStylekCFURLWindowsPathStyle
pathStyle
,
boolean
a Boolean value that specifies whether filePath is treated as a directory path when resolving against relative path components. Pass true if the pathname indicates a directory, false otherwise.
isDirectory
)

Creates a CFURL object using a local file system path string.

private static native long
private static native long
private static native long
private static native long
private static native long
private static native long
public static native long
nCFBundleCreate(long allocator, long bundleURL)

Unsafe version of: CFBundleCreate

public static native long
public static native long
nCFBundleGetFunctionPointerForName(long bundle, long functionName)

Unsafe version of: CFBundleGetFunctionPointerForName

public static native void
nCFRelease(long cf)

Unsafe version of: CFRelease

public static native long
nCFRetain(long cf)

Unsafe version of: CFRetain

public static native long
nCFStringCreateWithCString(long allocator, long cStr, int encoding)

Unsafe version of: CFStringCreateWithCString

public static native long
nCFStringCreateWithCStringNoCopy(long allocator, long cStr, int encoding, long contentsDeallocator)

Unsafe version of: CFStringCreateWithCStringNoCopy

public static native long
nCFURLCreateWithFileSystemPath(long allocator, long filePath, long pathStyle, boolean isDirectory)

Unsafe version of: CFURLCreateWithFileSystemPath

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FALSEback to summary
public static final byte FALSE

Boolean values.

kCFAllocatorDefaultback to summary
public static final long kCFAllocatorDefault

This is a synonym for NULL, if you'd rather use a named constant.

kCFAllocatorMallocback to summary
public static final long kCFAllocatorMalloc

This allocator uses malloc(), realloc(), and free(). This should not be generally used; stick to kCFAllocatorDefault whenever possible. This allocator is useful as the "bytesDeallocator" in CFData or "contentsDeallocator" in CFString where the memory was obtained as a result of malloc() type functions.

kCFAllocatorMallocZoneback to summary
public static final long kCFAllocatorMallocZone

This allocator explicitly uses the default malloc zone, returned by malloc_default_zone(). It should only be used when an object is safe to be allocated in non-scanned memory.

kCFAllocatorNullback to summary
public static final long kCFAllocatorNull

Null allocator which does nothing and allocates no memory. This allocator is useful as the "bytesDeallocator" in CFData or "contentsDeallocator" in CFString where the memory should not be freed.

kCFAllocatorSystemDefaultback to summary
public static final long kCFAllocatorSystemDefault

Default system allocator; you rarely need to use this.

kCFAllocatorUseContextback to summary
public static final long kCFAllocatorUseContext

Special allocator argument to CFAllocatorCreate which means "use the functions given in the context to allocate the allocator itself as well".

kCFStringEncodingASCIIback to summary
public static final int kCFStringEncodingASCII

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingISOLatin1back to summary
public static final int kCFStringEncodingISOLatin1

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingMacRomanback to summary
public static final int kCFStringEncodingMacRoman

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingNextStepLatinback to summary
public static final int kCFStringEncodingNextStepLatin

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingNonLossyASCIIback to summary
public static final int kCFStringEncodingNonLossyASCII

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingUnicodeback to summary
public static final int kCFStringEncodingUnicode

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingUTF16back to summary
public static final int kCFStringEncodingUTF16

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingUTF16BEback to summary
public static final int kCFStringEncodingUTF16BE

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingUTF16LEback to summary
public static final int kCFStringEncodingUTF16LE

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingUTF32back to summary
public static final int kCFStringEncodingUTF32

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingUTF32BEback to summary
public static final int kCFStringEncodingUTF32BE

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingUTF32LEback to summary
public static final int kCFStringEncodingUTF32LE

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingUTF8back to summary
public static final int kCFStringEncodingUTF8

Platform-independent built-in encodings; always available on all platforms.

kCFStringEncodingWindowsLatin1back to summary
public static final int kCFStringEncodingWindowsLatin1

Platform-independent built-in encodings; always available on all platforms.

kCFURLHFSPathStyleback to summary
public static final int kCFURLHFSPathStyle

URL path styles.

kCFURLPOSIXPathStyleback to summary
public static final int kCFURLPOSIXPathStyle

URL path styles.

kCFURLWindowsPathStyleback to summary
public static final int kCFURLWindowsPathStyle

URL path styles.

TRUEback to summary
public static final byte TRUE

Boolean values.

Constructor Detail

CoreFoundationback to summary
protected CoreFoundation()

Method Detail

CFBundleCreateback to summary
public static long CFBundleCreate(long allocator, long bundleURL)

Creates a CFBundle object.

Parameters
allocator:long

the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

bundleURL:long

the location of the bundle for which to create a CFBundle object

Annotations
@NativeType:CFBundleRef
CFBundleGetBundleWithIdentifierback to summary
public static long CFBundleGetBundleWithIdentifier(long bundleID)

Locates a bundle given its program-defined identifier.

Parameters
bundleID:long

the identifier of the bundle to locate. Note that identifier names are case-sensitive.

Annotations
@NativeType:CFBundleRef
CFBundleGetFunctionPointerForNameback to summary
public static long CFBundleGetFunctionPointerForName(long bundle, long functionName)

Returns a pointer to a function in a bundle’s executable code using the function name as the search key.

Parameters
bundle:long

the bundle to examine

functionName:long

the name of the function to locate

Annotations
@NativeType:void *
CFReleaseback to summary
public static void CFRelease(long cf)

Releases a Core Foundation object.

If the retain count of cf becomes zero the memory allocated to the object is deallocated and the object is destroyed. If you create, copy, or explicitly retain (see the CFRetain function) a Core Foundation object, you are responsible for releasing it when you no longer need it.

Parameters
cf:long

the CFType object to release

CFRetainback to summary
public static long CFRetain(long cf)

Retains a Core Foundation object.

You should retain a Core Foundation object when you receive it from elsewhere (that is, you did not create or copy it) and you want it to persist. If you retain a Core Foundation object you are responsible for releasing it.

Parameters
cf:long

the CFType object to retain

Annotations
@NativeType:CFTypeRef
CFStringCreateWithCStringback to summary
public static long CFStringCreateWithCString(long allocator, ByteBuffer cStr, int encoding)

Creates an immutable string from a C string.

Parameters
allocator:long

the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

cStr:ByteBuffer

the NULL-terminated C string to be used to create the CFString object. The string must use an 8-bit encoding.

encoding:int

the encoding of the characters in the C string. The encoding must specify an 8-bit encoding. One of:

kCFStringEncodingMacRomankCFStringEncodingWindowsLatin1kCFStringEncodingISOLatin1
kCFStringEncodingNextStepLatinkCFStringEncodingASCIIkCFStringEncodingUnicode
kCFStringEncodingUTF8kCFStringEncodingNonLossyASCIIkCFStringEncodingUTF16
kCFStringEncodingUTF16BEkCFStringEncodingUTF16LEkCFStringEncodingUTF32
kCFStringEncodingUTF32BEkCFStringEncodingUTF32LE
Annotations
@NativeType:CFStringRef
CFStringCreateWithCStringNoCopyback to summary
public static long CFStringCreateWithCStringNoCopy(long allocator, ByteBuffer cStr, int encoding, long contentsDeallocator)

Creates a CFString object from an external C string buffer that might serve as the backing store for the object.

Parameters
allocator:long

the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

cStr:ByteBuffer

the NULL-terminated C string to be used to create the CFString object. The string must use an 8-bit encoding.

encoding:int

the encoding of the characters in the C string. The encoding must specify an 8-bit encoding. One of:

kCFStringEncodingMacRomankCFStringEncodingWindowsLatin1kCFStringEncodingISOLatin1
kCFStringEncodingNextStepLatinkCFStringEncodingASCIIkCFStringEncodingUnicode
kCFStringEncodingUTF8kCFStringEncodingNonLossyASCIIkCFStringEncodingUTF16
kCFStringEncodingUTF16BEkCFStringEncodingUTF16LEkCFStringEncodingUTF32
kCFStringEncodingUTF32BEkCFStringEncodingUTF32LE
contentsDeallocator:long

the CFAllocator object to use to deallocate the external string buffer when it is no longer needed. You can pass NULL or kCFAllocatorDefault to request the default allocator for this purpose. If the buffer does not need to be deallocated, or if you want to assume responsibility for deallocating the buffer (and not have the CFString object deallocate it), pass kCFAllocatorNull.

Annotations
@NativeType:CFStringRef
CFURLCreateWithFileSystemPathback to summary
public static long CFURLCreateWithFileSystemPath(long allocator, long filePath, long pathStyle, boolean isDirectory)

Creates a CFURL object using a local file system path string.

Parameters
allocator:long

the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

filePath:long

the path string to convert to a CFURL object. If filePath is not absolute, the resulting URL will be considered relative to the current working directory (evaluated when this function is being invoked).

pathStyle:long

the operating system path style used in filePath. One of:

kCFURLPOSIXPathStylekCFURLHFSPathStylekCFURLWindowsPathStyle
isDirectory:boolean

a Boolean value that specifies whether filePath is treated as a directory path when resolving against relative path components. Pass true if the pathname indicates a directory, false otherwise.

Annotations
@NativeType:CFURLRef
kCFAllocatorDefaultback to summary
private static native long kCFAllocatorDefault()
Annotations
@NativeType:CFAllocatorRef
kCFAllocatorMallocback to summary
private static native long kCFAllocatorMalloc()
Annotations
@NativeType:CFAllocatorRef
kCFAllocatorMallocZoneback to summary
private static native long kCFAllocatorMallocZone()
Annotations
@NativeType:CFAllocatorRef
kCFAllocatorNullback to summary
private static native long kCFAllocatorNull()
Annotations
@NativeType:CFAllocatorRef
kCFAllocatorSystemDefaultback to summary
private static native long kCFAllocatorSystemDefault()
Annotations
@NativeType:CFAllocatorRef
kCFAllocatorUseContextback to summary
private static native long kCFAllocatorUseContext()
Annotations
@NativeType:CFAllocatorRef
nCFBundleCreateback to summary
public static native long nCFBundleCreate(long allocator, long bundleURL)

Unsafe version of: CFBundleCreate

nCFBundleGetBundleWithIdentifierback to summary
public static native long nCFBundleGetBundleWithIdentifier(long bundleID)

Unsafe version of: CFBundleGetBundleWithIdentifier

nCFBundleGetFunctionPointerForNameback to summary
public static native long nCFBundleGetFunctionPointerForName(long bundle, long functionName)

Unsafe version of: CFBundleGetFunctionPointerForName

nCFReleaseback to summary
public static native void nCFRelease(long cf)

Unsafe version of: CFRelease

nCFRetainback to summary
public static native long nCFRetain(long cf)

Unsafe version of: CFRetain

nCFStringCreateWithCStringback to summary
public static native long nCFStringCreateWithCString(long allocator, long cStr, int encoding)

Unsafe version of: CFStringCreateWithCString

nCFStringCreateWithCStringNoCopyback to summary
public static native long nCFStringCreateWithCStringNoCopy(long allocator, long cStr, int encoding, long contentsDeallocator)

Unsafe version of: CFStringCreateWithCStringNoCopy

nCFURLCreateWithFileSystemPathback to summary
public static native long nCFURLCreateWithFileSystemPath(long allocator, long filePath, long pathStyle, boolean isDirectory)

Unsafe version of: CFURLCreateWithFileSystemPath