/* NSScreen.h Application Kit Copyright (c) 1994-2012, Apple Inc. All rights reserved. */ #import #import #import @class NSArray, NSColorSpace; typedef struct NSScreenAuxiliary NSScreenAuxiliaryOpaque; @interface NSScreen : NSObject { /*All instance variables are private*/ @private NSRect _frame; // cached value, possibly stale NSWindowDepth _depth; int _screenNumber; id _auxiliaryStorage; } + (NSArray *)screens; /* All screens; first one is "zero" screen */ + (NSScreen *)mainScreen; /* Screen with key window */ + (NSScreen *)deepestScreen; - (NSWindowDepth)depth; - (NSRect)frame; - (NSRect)visibleFrame; - (NSDictionary *)deviceDescription; - (NSColorSpace *)colorSpace NS_AVAILABLE_MAC(10_6); - (const NSWindowDepth *)supportedWindowDepths NS_RETURNS_INNER_POINTER; /* 0 terminated */ /* Convert to/from the device pixel aligned coordinates sytem of a display */ - (NSRect)convertRectToBacking:(NSRect)aRect NS_AVAILABLE_MAC(10_7); - (NSRect)convertRectFromBacking:(NSRect)aRect NS_AVAILABLE_MAC(10_7); /* Uses NSIntegralRectWithOptions() to produce a pixel aligned rectangle on the target screen from the given input rectangle in global screen coordinates. */ - (NSRect)backingAlignedRect:(NSRect)aRect options:(NSAlignmentOptions)options NS_AVAILABLE_MAC(10_7); /* Returns the scale factor representing the number of backing store pixels corresponding to each linear unit in screen space on this NSScreen. This method is provided for rare cases when the explicit scale factor is needed. Please use -convert*ToBacking: methods whenever possible. */ - (CGFloat)backingScaleFactor NS_AVAILABLE_MAC(10_7); @end /* Notifications */ APPKIT_EXTERN NSString * const NSScreenColorSpaceDidChangeNotification NS_AVAILABLE_MAC(10_6); // the notification object is the screen whose profile has changed @interface NSScreen(NSDeprecated) /* This method is deprecated and should not be used by applications targeting Mac OS X 10.7 or later. The implementation of this method will always return 1.0. Please use -convertRectToBacking: or -backingScaleFactor instead. */ - (CGFloat)userSpaceScaleFactor; @end