Class IOSurface

    • Constructor Detail

      • IOSurface

        protected IOSurface​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allAttachments

        public NSDictionary<java.lang.String,​?> allAttachments()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • allocationSize

        public long allocationSize()
        The total allocation size of the IOSurface
      • allowsPixelSizeCasting

        public boolean allowsPixelSizeCasting()
        This property returns YES if it is legal to choose an OpenGL or Metal pixel format with a bytes per pixel value that is different than the bytesPerElement value(s) of this IOSurface. Returns NO if the bytes per pixel value must be an exact match.
      • attachmentForKey

        public java.lang.Object attachmentForKey​(java.lang.String key)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • baseAddress

        public org.moe.natj.general.ptr.VoidPtr baseAddress()
      • baseAddressOfPlaneAtIndex

        public org.moe.natj.general.ptr.VoidPtr baseAddressOfPlaneAtIndex​(long planeIndex)
      • bytesPerElement

        public long bytesPerElement()
      • bytesPerElementOfPlaneAtIndex

        public long bytesPerElementOfPlaneAtIndex​(long planeIndex)
      • bytesPerRow

        public long bytesPerRow()
        Note: These properties may not return well-defined values for planar surfaces
      • bytesPerRowOfPlaneAtIndex

        public long bytesPerRowOfPlaneAtIndex​(long planeIndex)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • decrementUseCount

        public void decrementUseCount()
      • description_static

        public static java.lang.String description_static()
      • elementHeight

        public long elementHeight()
      • elementHeightOfPlaneAtIndex

        public long elementHeightOfPlaneAtIndex​(long planeIndex)
      • elementWidth

        public long elementWidth()
      • elementWidthOfPlaneAtIndex

        public long elementWidthOfPlaneAtIndex​(long planeIndex)
      • hash_static

        public static long hash_static()
      • height

        public long height()
      • heightOfPlaneAtIndex

        public long heightOfPlaneAtIndex​(long planeIndex)
      • incrementUseCount

        public void incrementUseCount()
      • initWithProperties

        public IOSurface initWithProperties​(NSDictionary<java.lang.String,​?> properties)
        Create a new IOSurface
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isInUse

        public boolean isInUse()
        There are cases where it is useful to know whether or not an IOSurface buffer is considered to be "in use" by other users of the same IOSurface. In particular, CoreVideo and other APIs make use of the IOSurface use count facility to know when it is safe to recycle an IOSurface backed CVPixelBuffer object. This is particularly important when IOSurface objects are being shared across process boundaries and the normal mechanisms one might use would not be viable. The IOSurface use count is similar in concept to any other reference counting scheme. When the global use count of an IOSurface goes to zero, it is no longer considered "in use". When it is anything other than zero, then the IOSurface is still "in use" by someone and therefore anyone attempting to maintain a pool of IOSurfaces to be recycled should not reclaim that IOSurface. Note that IOSurface maintains both a per-process and an internal system wide usage count. In the current implementation, when the per-process usage count goes from zero to one, the system wide usage count is incremented by one. When the per-process usage count drops back to zero (either via explicit decrement calls or the process terminates), the global usage count is decremented by one.
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • localUseCount

        public int localUseCount()
        The localUseCount property returns the local per-process usage count for an IOSurface. This call is only provided for logging/debugging purposes and should never be used to determine whether an IOSurface is considered to be "in use". The isInUse property is the only call that should be used for that purpose.
      • lockWithOptionsSeed

        public int lockWithOptionsSeed​(int options,
                                       org.moe.natj.general.ptr.IntPtr seed)
        "Lock" or "Unlock" a IOSurface for reading or writing. The term "lock" is used loosely in this context, and is simply used along with the "unlock" information to put a bound on CPU access to the raw IOSurface data. If the seed parameter is non-NULL, IOSurfaceLock() will store the buffer's internal modification seed value at the time you made the lock call. You can compare this value to a value returned previously to determine of the contents of the buffer has been changed since the last lock. In the case of IOSurfaceUnlock(), the seed value returned will be the internal seed value at the time of the unlock. If you locked the buffer for writing, this value will be incremented as the unlock is performed and the new value will be returned. See the IOSurfacePropertyKeyLock enums for more information. Note: Locking and unlocking a IOSurface is not a particularly cheap operation, so care should be taken to avoid the calls whenever possible. The seed values are particularly useful for keeping a cache of the buffer contents.
      • new_objc

        public static java.lang.Object new_objc()
      • pixelFormat

        public int pixelFormat()
      • planeCount

        public long planeCount()
        Return the number of planes in this buffer. Will be 0 if the surface is non-planar
      • removeAllAttachments

        public void removeAllAttachments()
      • removeAttachmentForKey

        public void removeAttachmentForKey​(java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • seed

        public int seed()
        This will return the current seed value of the buffer and is a cheap property to read to see if the contents of the buffer have changed since the last lock/unlock.
      • setAllAttachments

        public void setAllAttachments​(NSDictionary<java.lang.String,​?> dict)
      • setAttachmentForKey

        public void setAttachmentForKey​(java.lang.Object anObject,
                                        java.lang.String key)
        These calls let you attach property list types to a IOSurface buffer. These calls are expensive (they essentially must serialize the data into the kernel) and thus should be avoided whenever possible. Note: These functions can not be used to change the underlying surface properties.
      • setPurgeableOldState

        public int setPurgeableOldState​(int newState,
                                        org.moe.natj.general.ptr.IntPtr oldState)
        See comments in IOSurfaceAPI.h
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • unlockWithOptionsSeed

        public int unlockWithOptionsSeed​(int options,
                                         org.moe.natj.general.ptr.IntPtr seed)
      • version_static

        public static long version_static()
      • width

        public long width()
        Basic surface layout information
      • widthOfPlaneAtIndex

        public long widthOfPlaneAtIndex​(long planeIndex)
        These properties return information about a particular plane of a IOSurface. They will raise if called on non-planar surfaces or if the index value is not less than the number of planes.