Name

NSScreen — Mac OS X 10.0

Synopsis

This class represents a user’s monitor, and allows clients to ascertain properties of the display such as width and height in pixels, or color bit-depth. This class works only in the presence of an instance of NSApplication; NSScreen requires that an application have a connection to the window server to obtain information about the screen, which is provided by NSApplication.

image with no caption

@interface NSScreen : NSObject
                                  // Convenience Constructors
   + (NSArray *)screens;
                                  // Class Methods
   + (NSScreen *)deepestScreen;
   + (NSScreen *)mainScreen;
                                  // Instance Methods
   - (NSWindowDepth)depth;
   - (NSDictionary *)deviceDescription;
   - (NSRect)frame;
   - (const NSWindowDepth *)supportedWindowDepths;
   - (NSRect)visibleFrame;

Get Cocoa in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.