Interface CoreFoundationExt

All Superinterfaces:
com.sun.jna.Library

public interface CoreFoundationExt extends com.sun.jna.Library
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
    static class 
    A CFError object encapsulates more rich and extensible error information than is possible using only an error code or error string.
    static class 
     
    static final record 
    Unwrapped version of CFErrorRef without native references

    Nested classes/interfaces inherited from interface com.sun.jna.Library

    com.sun.jna.Library.Handler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.sun.jna.platform.mac.CoreFoundation.CFTypeID
     
    static final CoreFoundationExt
     
    static final com.sun.jna.platform.mac.CoreFoundation.CFBooleanRef
    Boolean false value.
    static final com.sun.jna.platform.mac.CoreFoundation.CFBooleanRef
    Boolean true value.
    static final String
    Mac OS 9/Carbon errors

    Fields inherited from interface com.sun.jna.Library

    OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER
  • Method Summary

    Modifier and Type
    Method
    Description
    com.sun.jna.platform.mac.CoreFoundation.CFArrayRef
    CFArrayCreate(com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef alloc, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef[] values, com.sun.jna.platform.mac.CoreFoundation.CFIndex numValues, com.sun.jna.Pointer callBacks)
    Creates a new immutable array with the given values.
    com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef
    CFDictionaryCreate(com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef allocator, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef[] keys, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef[] values, com.sun.jna.platform.mac.CoreFoundation.CFIndex numValues, com.sun.jna.Pointer keyCallBacks, com.sun.jna.Pointer valueCallBacks)
    Creates an immutable dictionary containing the specified key-value pairs.
    com.sun.jna.platform.mac.CoreFoundation.CFIndex
    CFDictionaryGetCount(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef theDict)
    Returns the number of key-value pairs in a dictionary.
    boolean
    CFEqual(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef cf1, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef cf2)
    Determines whether two Core Foundation objects are considered equal.
    com.sun.jna.platform.mac.CoreFoundation.CFStringRef
    Returns a human-presentable description for a given error.
    com.sun.jna.platform.mac.CoreFoundation.CFIndex
    Returns the error code for a given CFError.
    com.sun.jna.platform.mac.CoreFoundation.CFStringRef
    Returns the error domain for a given CFError.
    com.sun.jna.platform.mac.CoreFoundation.CFTypeID
     
  • Field Details

  • Method Details

    • CFErrorGetTypeID

      com.sun.jna.platform.mac.CoreFoundation.CFTypeID CFErrorGetTypeID()
    • CFErrorGetDomain

      @NotNull com.sun.jna.platform.mac.CoreFoundation.CFStringRef CFErrorGetDomain(CoreFoundationExt.CFErrorRef error)
      Returns the error domain for a given CFError.
      Returns:
      The error domain for err. Ownership follows The Get Rule.
      See Also:
    • CFErrorCopyDescription

      @NotNull com.sun.jna.platform.mac.CoreFoundation.CFStringRef CFErrorCopyDescription(CoreFoundationExt.CFErrorRef err)
      Returns a human-presentable description for a given error.
      Returns:
      A localized, human-presentable description of err. This function never returns NULL.
      See Also:
    • CFErrorGetCode

      com.sun.jna.platform.mac.CoreFoundation.CFIndex CFErrorGetCode(CoreFoundationExt.CFErrorRef err)
      Returns the error code for a given CFError.
      Returns:
      The error code of err.
      See Also:
    • CFDictionaryGetCount

      com.sun.jna.platform.mac.CoreFoundation.CFIndex CFDictionaryGetCount(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef theDict)
      Returns the number of key-value pairs in a dictionary.
      Parameters:
      theDict - The dictionary to examine.
      Returns:
      The number of key-value pairs in theDict.
      See Also:
    • CFDictionaryCreate

      com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef CFDictionaryCreate(com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef allocator, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef[] keys, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef[] values, com.sun.jna.platform.mac.CoreFoundation.CFIndex numValues, com.sun.jna.Pointer keyCallBacks, com.sun.jna.Pointer valueCallBacks)
      Creates an immutable dictionary containing the specified key-value pairs.
      Returns:
      A new dictionary, or NULL if there was a problem creating the object. Ownership follows the Create Rule.
      See Also:
    • CFArrayCreate

      com.sun.jna.platform.mac.CoreFoundation.CFArrayRef CFArrayCreate(com.sun.jna.platform.mac.CoreFoundation.CFAllocatorRef alloc, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef[] values, com.sun.jna.platform.mac.CoreFoundation.CFIndex numValues, com.sun.jna.Pointer callBacks)
      Creates a new immutable array with the given values.

      This reference must be released with CoreFoundation.CFRelease(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef) to avoid leaking references.

      This is like CoreFoundation.CFArrayCreate(CoreFoundation.CFAllocatorRef, Pointer, CoreFoundation.CFIndex, Pointer) but it takes a Pointer[] instead.

      Parameters:
      alloc - The allocator to use to allocate memory for the new array and its storage for values. Pass null or kCFAllocatorDefault to use the current default allocator.
      values - A C array of the pointer-sized values to be in the new array. The values in the new array are ordered in the same order in which they appear in this C array. This value may be null if numValues is 0. This C array is not changed or freed by this function. If values is not a valid pointer to a C array of at least numValues elements, the behavior is undefined.
      numValues - The number of values to copy from the values C array into the new array. This number will be the count of the new array—it must not be negative or greater than the number of elements in values.
      callBacks - A pointer to a CFArrayCallBacks structure initialized with the callbacks for the array to use on each value in the collection. The retain callback is used within this function, for example, to retain all of the new values from the values C array. A copy of the contents of the callbacks structure is made so that a pointer to a structure on the stack can be passed in or can be reused for multiple collection creations.

      This value may be null, which is treated as if a valid structure of version 0 with all fields null had been passed in.

      Returns:
      A new immutable array containing numValues from values, or null if there was a problem creating the object.
      See Also:
    • CFEqual

      boolean CFEqual(com.sun.jna.platform.mac.CoreFoundation.CFTypeRef cf1, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef cf2)
      Determines whether two Core Foundation objects are considered equal.
      Parameters:
      cf1 - A CFType object to compare to cf2.
      cf2 - A CFType object to compare to cf1.
      Returns:
      true if cf1 and cf2 are of the same type and considered equal, otherwise false.
      See Also: