Mac Developer Library

Developer

AXValue.h Reference

Options
Deployment Target:

On This Page
Language:

AXValue.h Reference

This header contains functions and data types for working with AXValueType wrappers.

Included Headers

  • <AvailabilityMacros.h>

  • <CoreServices/CoreServices.h>

  • <CoreFoundation/CoreFoundation.h>

Functions

  • Declaration

    Swift

    func AXValueCreate(_ theType: AXValueType, _ valuePtr: UnsafePointer<Void>) -> Unmanaged<AXValue>!

    Objective-C

    AXValueRef AXValueCreate ( AXValueType theType, const void *valuePtr );

    Parameters

    theType
    valuePtr

    Discussion

    Encodes a structure pointed to by valuePtr into a CFTypeRef.

    Import Statement

    import ApplicationServices

    Availability

    Available in OS X v10.2 and later.

  • Declaration

    Swift

    func AXValueGetType(_ value: AXValue!) -> AXValueType

    Objective-C

    AXValueType AXValueGetType ( AXValueRef value );

    Parameters

    value

    Discussion

    Returns the structure type encoded in value. If the type is not recognized, it returns kAXValueIllegalType.

    Import Statement

    import ApplicationServices

    Availability

    Available in OS X v10.2 and later.

  • Declaration

    Swift

    func AXValueGetTypeID() -> CFTypeID

    Objective-C

    CFTypeID AXValueGetTypeID ( void );

    Import Statement

    import ApplicationServices

    Availability

    Available in OS X v10.3 and later.

  • Declaration

    Swift

    func AXValueGetValue(_ value: AXValue!, _ theType: AXValueType, _ valuePtr: UnsafeMutablePointer<Void>) -> Boolean

    Objective-C

    Boolean AXValueGetValue ( AXValueRef value, AXValueType theType, void *valuePtr );

    Parameters

    value

    Discussion

    Decodes the structure stored in value and copies it into valuePtr. If the structure stored in value is not the same as requested by theType, the function returns false.

    Import Statement

    import ApplicationServices

    Availability

    Available in OS X v10.2 and later.

Data Types

See the Overview section above for header-level documentation.

  • Declaration

    Swift

    typealias AXValueRef = AXValue

    Objective-C

    typedef const struct __AXValue *AXValueRef;

    Import Statement

    import ApplicationServices

    Availability

    Available in OS X v10.3 and later.

  • Declaration

    Swift

    struct AXValueType { init(_ value: UInt32) var value: UInt32 }

    Objective-C

    typedef enum { kAXValueCGPointType = 1, kAXValueCGSizeType = 2, kAXValueCGRectType = 3, kAXValueCFRangeType = 4, kAXValueAXErrorType = 5, kAXValueIllegalType = 0 } AXValueType;

    Constants

    • kAXValueCGPointType

      kAXValueCGPointType

      a wrapper for CGPoint; see CoreGraphics.h

      Available in OS X v10.2 and later.

    • kAXValueCGSizeType

      kAXValueCGSizeType

      a wrapper for CGSize; see CoreGraphics.h

      Available in OS X v10.2 and later.

    • kAXValueCGRectType

      kAXValueCGRectType

      a wrapper for CGRect; see CoreGraphics.h

      Available in OS X v10.2 and later.

    • kAXValueCFRangeType

      kAXValueCFRangeType

      a wrapper for CFRange; see CFBase.h

      Available in OS X v10.2 and later.

    • kAXValueAXErrorType

      kAXValueAXErrorType

      See AXError.h

      Available in OS X v10.4 and later.

    • kAXValueIllegalType

      kAXValueIllegalType

      a wrapper for unsupported structures

      Available in OS X v10.2 and later.

    Discussion

    These are AXValueType wrappers for other structures. You must use the AXValueCreate and AXValueGetValue functions to convert between the wrapped structure and the native structure.

    Import Statement

    import ApplicationServices

    Availability

    Available in OS X v10.2 and later.