Package apple.uikit
Class UIScreen
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.uikit.UIScreen
-
- All Implemented Interfaces:
NSObject,UITraitEnvironment
public class UIScreen extends NSObject implements UITraitEnvironment
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUIScreen(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static UIScreenalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)CGRectapplicationFrame()Deprecated.static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)NSArray<? extends UIScreenMode>availableModes()The list of modes that this screen supportsCGRectbounds()Bounds of entire screen in pointsdoublebrightness()0 .. 1.0, where 1.0 is maximum brightness.doublecalibratedLatency()The latency of the display hardware associated with this screen.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()UICoordinateSpacecoordinateSpace()UIScreenModecurrentMode()Current mode of this screenstatic java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()CADisplayLinkdisplayLinkWithTargetSelector(java.lang.Object target, org.moe.natj.objc.SEL sel)UICoordinateSpacefixedCoordinateSpace()UIFocusItemfocusedItem()Returns the focused item for this screen's focus system.UIViewfocusedView()If focusedItem is not a view, this returns that item's containing view.static longhash_static()UIScreeninit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisCaptured()True if this screen is being captured (e.g. recorded, AirPlayed, mirrored, etc.)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static UIScreenmainScreen()the device's internal screenlongmaximumFramesPerSecond()The maximumFramesPerSecond this screen is capable ofUIScreenmirroredScreen()The screen being mirrored by the receiver. nil if mirroring is disabled or unsupported.CGRectnativeBounds()Native bounds of the physical screen in pixelsdoublenativeScale()Native scale factor of the physical screenstatic java.lang.Objectnew_objc()longoverscanCompensation()Default is UIScreenOverscanCompensationScale.UIEdgeInsetsoverscanCompensationInsets()The amount that should be inset to avoid clippingUIScreenModepreferredMode()Preferred mode of this screen.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)doublescale()static NSArray<? extends UIScreen>screens()all screens currently attached to the devicevoidsetBrightness(double value)0 .. 1.0, where 1.0 is maximum brightness.voidsetCurrentMode(UIScreenMode value)Current mode of this screenvoidsetOverscanCompensation(long value)Default is UIScreenOverscanCompensationScale.static voidsetVersion_static(long aVersion)voidsetWantsSoftwareDimming(boolean value)Default is NO.UIViewsnapshotViewAfterScreenUpdates(boolean afterUpdates)Please see snapshotViewAfterScreenUpdates: in UIView.h for some important details on the behavior of this method when called from layoutSubviews.static org.moe.natj.objc.Classsuperclass_static()booleansupportsFocus()UITraitCollectiontraitCollection()voidtraitCollectionDidChange(UITraitCollection previousTraitCollection)To be overridden as needed to provide custom behavior when the environment's traits change.static longversion_static()booleanwantsSoftwareDimming()Default is NO.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static UIScreen alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
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()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
mainScreen
public static UIScreen mainScreen()
the device's internal screen
-
new_objc
public static java.lang.Object new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
screens
public static NSArray<? extends UIScreen> screens()
all screens currently attached to the device
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
applicationFrame
@Deprecated public CGRect applicationFrame()
Deprecated.
-
availableModes
public NSArray<? extends UIScreenMode> availableModes()
The list of modes that this screen supports
-
bounds
public CGRect bounds()
Bounds of entire screen in points
-
brightness
public double brightness()
0 .. 1.0, where 1.0 is maximum brightness. Only supported by main screen.
-
coordinateSpace
public UICoordinateSpace coordinateSpace()
-
currentMode
public UIScreenMode currentMode()
Current mode of this screen
-
displayLinkWithTargetSelector
public CADisplayLink displayLinkWithTargetSelector(java.lang.Object target, org.moe.natj.objc.SEL sel)
-
fixedCoordinateSpace
public UICoordinateSpace fixedCoordinateSpace()
-
focusedItem
public UIFocusItem focusedItem()
Returns the focused item for this screen's focus system. Use UIFocusSystem's focusedItem property instead – this property will be deprecated in a future release.
-
focusedView
public UIView focusedView()
If focusedItem is not a view, this returns that item's containing view. Otherwise they are equal. Use UIFocusSystem's focusedItem property instead – this property will be deprecated in a future release.
-
mirroredScreen
public UIScreen mirroredScreen()
The screen being mirrored by the receiver. nil if mirroring is disabled or unsupported. Moving a UIWindow to this screen will disable mirroring
-
nativeBounds
public CGRect nativeBounds()
Native bounds of the physical screen in pixels
-
nativeScale
public double nativeScale()
Native scale factor of the physical screen
-
overscanCompensation
public long overscanCompensation()
Default is UIScreenOverscanCompensationScale. Determines how the screen behaves if the connected display is overscanning
-
overscanCompensationInsets
public UIEdgeInsets overscanCompensationInsets()
The amount that should be inset to avoid clipping
-
preferredMode
public UIScreenMode preferredMode()
Preferred mode of this screen. Choosing this mode will likely produce the best results
-
scale
public double scale()
-
setBrightness
public void setBrightness(double value)
0 .. 1.0, where 1.0 is maximum brightness. Only supported by main screen.
-
setCurrentMode
public void setCurrentMode(UIScreenMode value)
Current mode of this screen
-
setOverscanCompensation
public void setOverscanCompensation(long value)
Default is UIScreenOverscanCompensationScale. Determines how the screen behaves if the connected display is overscanning
-
setWantsSoftwareDimming
public void setWantsSoftwareDimming(boolean value)
Default is NO. If YES, brightness levels lower than that of which the hardware is capable are emulated in software, if neccessary. Having enabled may entail performance cost.
-
snapshotViewAfterScreenUpdates
public UIView snapshotViewAfterScreenUpdates(boolean afterUpdates)
Please see snapshotViewAfterScreenUpdates: in UIView.h for some important details on the behavior of this method when called from layoutSubviews.
-
supportsFocus
public boolean supportsFocus()
-
traitCollection
public UITraitCollection traitCollection()
- Specified by:
traitCollectionin interfaceUITraitEnvironment
-
traitCollectionDidChange
public void traitCollectionDidChange(UITraitCollection previousTraitCollection)
Description copied from interface:UITraitEnvironmentTo be overridden as needed to provide custom behavior when the environment's traits change.- Specified by:
traitCollectionDidChangein interfaceUITraitEnvironment
-
wantsSoftwareDimming
public boolean wantsSoftwareDimming()
Default is NO. If YES, brightness levels lower than that of which the hardware is capable are emulated in software, if neccessary. Having enabled may entail performance cost.
-
isCaptured
public boolean isCaptured()
True if this screen is being captured (e.g. recorded, AirPlayed, mirrored, etc.)
-
maximumFramesPerSecond
public long maximumFramesPerSecond()
The maximumFramesPerSecond this screen is capable of
-
calibratedLatency
public double calibratedLatency()
The latency of the display hardware associated with this screen. Can be used along with CoreAudio devices' kAudioDeviceLatencyProperty to achieve A/V sync when writing custom video playback software. Will be `0` if display latency has not been calibrated by the user.
-
-