public class CoreFoundation
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static byte |
FALSE
Boolean values.
|
static long |
kCFAllocatorDefault
This is a synonym for
NULL, if you'd rather use a named constant. |
static long |
kCFAllocatorMalloc
This allocator uses
malloc(), realloc(), and free(). |
static long |
kCFAllocatorMallocZone
This allocator explicitly uses the default malloc zone, returned by
malloc_default_zone(). |
static long |
kCFAllocatorNull
Null allocator which does nothing and allocates no memory.
|
static long |
kCFAllocatorSystemDefault
Default system allocator; you rarely need to use this.
|
static long |
kCFAllocatorUseContext
Special allocator argument to CFAllocatorCreate which means "use the functions given in the context to allocate the allocator itself as well".
|
static int |
kCFStringEncodingASCII
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingISOLatin1
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingMacRoman
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingNextStepLatin
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingNonLossyASCII
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingUnicode
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingUTF16
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingUTF16BE
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingUTF16LE
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingUTF32
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingUTF32BE
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingUTF32LE
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingUTF8
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFStringEncodingWindowsLatin1
Platform-independent built-in encodings; always available on all platforms.
|
static int |
kCFURLHFSPathStyle
URL path styles.
|
static int |
kCFURLPOSIXPathStyle
URL path styles.
|
static int |
kCFURLWindowsPathStyle
URL path styles.
|
static byte |
TRUE
Boolean values.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
CFBundleCreate(long allocator,
long bundleURL)
Creates a
CFBundle object. |
static long |
CFBundleGetBundleWithIdentifier(long bundleID)
Locates a bundle given its program-defined identifier.
|
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.
|
static void |
CFRelease(long cf)
Releases a Core Foundation object.
|
static long |
CFRetain(long cf)
Retains a Core Foundation object.
|
static long |
CFStringCreateWithCString(long allocator,
java.nio.ByteBuffer cStr,
int encoding)
Creates an immutable string from a C string.
|
static long |
CFStringCreateWithCStringNoCopy(long allocator,
java.nio.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.
|
static long |
CFURLCreateWithFileSystemPath(long allocator,
long filePath,
long pathStyle,
boolean isDirectory)
Creates a
CFURL object using a local file system path string. |
static long |
nCFBundleCreate(long allocator,
long bundleURL)
Unsafe version of:
CFBundleCreate(long, long) |
static long |
nCFBundleGetBundleWithIdentifier(long bundleID)
Unsafe version of:
CFBundleGetBundleWithIdentifier(long) |
static long |
nCFBundleGetFunctionPointerForName(long bundle,
long functionName)
Unsafe version of:
CFBundleGetFunctionPointerForName(long, long) |
static void |
nCFRelease(long cf)
Unsafe version of:
CFRelease(long) |
static long |
nCFRetain(long cf)
Unsafe version of:
CFRetain(long) |
static long |
nCFStringCreateWithCString(long allocator,
long cStr,
int encoding)
Unsafe version of:
CFStringCreateWithCString(long, java.nio.ByteBuffer, int) |
static long |
nCFStringCreateWithCStringNoCopy(long allocator,
long cStr,
int encoding,
long contentsDeallocator)
Unsafe version of:
CFStringCreateWithCStringNoCopy(long, java.nio.ByteBuffer, int, long) |
static long |
nCFURLCreateWithFileSystemPath(long allocator,
long filePath,
long pathStyle,
boolean isDirectory)
Unsafe version of:
CFURLCreateWithFileSystemPath(long, long, long, boolean) |
public static final byte TRUE
public static final byte FALSE
public static final int kCFStringEncodingMacRoman
public static final int kCFStringEncodingWindowsLatin1
public static final int kCFStringEncodingISOLatin1
public static final int kCFStringEncodingNextStepLatin
public static final int kCFStringEncodingASCII
public static final int kCFStringEncodingUnicode
public static final int kCFStringEncodingUTF8
public static final int kCFStringEncodingNonLossyASCII
public static final int kCFStringEncodingUTF16
public static final int kCFStringEncodingUTF16BE
public static final int kCFStringEncodingUTF16LE
public static final int kCFStringEncodingUTF32
public static final int kCFStringEncodingUTF32BE
public static final int kCFStringEncodingUTF32LE
public static final int kCFURLPOSIXPathStyle
public static final int kCFURLHFSPathStyle
public static final int kCFURLWindowsPathStyle
public static final long kCFAllocatorDefault
NULL, if you'd rather use a named constant.public static final long kCFAllocatorSystemDefault
public static final long kCFAllocatorMalloc
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.public static final long kCFAllocatorMallocZone
malloc_default_zone(). It should only be used when an object is safe to be
allocated in non-scanned memory.public static final long kCFAllocatorNull
CFData or "contentsDeallocator"
in CFString where the memory should not be freed.public static final long kCFAllocatorUseContext
public static long nCFRetain(long cf)
CFRetain(long)public static long CFRetain(long cf)
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.
cf - the CFType object to retainpublic static void nCFRelease(long cf)
CFRelease(long)public static void CFRelease(long cf)
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(long) function) a Core Foundation object, you are responsible for releasing it when you no longer need it.
cf - the CFType object to releasepublic static long nCFBundleCreate(long allocator,
long bundleURL)
CFBundleCreate(long, long)public static long CFBundleCreate(long allocator,
long bundleURL)
CFBundle object.allocator - the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.bundleURL - the location of the bundle for which to create a CFBundle objectpublic static long nCFBundleGetBundleWithIdentifier(long bundleID)
CFBundleGetBundleWithIdentifier(long)public static long CFBundleGetBundleWithIdentifier(long bundleID)
bundleID - the identifier of the bundle to locate. Note that identifier names are case-sensitive.public static long nCFBundleGetFunctionPointerForName(long bundle,
long functionName)
CFBundleGetFunctionPointerForName(long, long)public static long CFBundleGetFunctionPointerForName(long bundle,
long functionName)
bundle - the bundle to examinefunctionName - the name of the function to locatepublic static long nCFStringCreateWithCString(long allocator,
long cStr,
int encoding)
CFStringCreateWithCString(long, java.nio.ByteBuffer, int)public static long CFStringCreateWithCString(long allocator,
java.nio.ByteBuffer cStr,
int encoding)
allocator - the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.cStr - the NULL-terminated C string to be used to create the CFString object. The string must use an 8-bit encoding.encoding - the encoding of the characters in the C string. The encoding must specify an 8-bit encoding. One of:public static long nCFStringCreateWithCStringNoCopy(long allocator,
long cStr,
int encoding,
long contentsDeallocator)
CFStringCreateWithCStringNoCopy(long, java.nio.ByteBuffer, int, long)public static long CFStringCreateWithCStringNoCopy(long allocator,
java.nio.ByteBuffer cStr,
int encoding,
long contentsDeallocator)
allocator - the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.cStr - the NULL-terminated C string to be used to create the CFString object. The string must use an 8-bit encoding.encoding - the encoding of the characters in the C string. The encoding must specify an 8-bit encoding. One of:contentsDeallocator - 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.public static long nCFURLCreateWithFileSystemPath(long allocator,
long filePath,
long pathStyle,
boolean isDirectory)
CFURLCreateWithFileSystemPath(long, long, long, boolean)public static long CFURLCreateWithFileSystemPath(long allocator,
long filePath,
long pathStyle,
boolean isDirectory)
CFURL object using a local file system path string.allocator - the allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.filePath - 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 - the operating system path style used in filePath. One of:kCFURLPOSIXPathStyle | kCFURLHFSPathStyle | kCFURLWindowsPathStyle |
isDirectory - 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.Copyright LWJGL. All Rights Reserved. License terms.