Platforms to show: All Mac Windows Linux Cross-Platform
NSScreenMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa | MBS MacBase Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
An application may use an NSScreen object to retrieve information about a screen and use this information to decide what to display upon that screen. For example, an application may use the deepestScreen method to find out which of the available screens can best represent color and then may choose to display all of its windows on that screen.
The application object should be created before you use the methods in this class, so that the application object can make the necessary connection to the window system. You can make sure the application object exists by invoking the sharedApplication method of NSApplication. If you created your application with Xcode, the application object is automatically created for you during initialization.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 9 properties
- property backingScaleFactor as Double
- property colorSpace as Variant
- property depth as Integer
- property deviceDescription as dictionary
- property frame as NSRectMBS
- property Handle as Integer
- property localizedName as String
- property userSpaceScaleFactor as Double
- property visibleFrame as NSRectMBS
- 5 shared properties
- shared property deepestScreen as NSScreenMBS
- shared property firstScreen as NSScreenMBS
- shared property mainScreen as NSScreenMBS
- shared property screensHaveSeparateSpaces as Boolean
- shared property secondScreen as NSScreenMBS
- 5 methods
- method backingAlignedRect(r as NSRectMBS, options as UInt64) as NSRectMBS
- method Constructor Private
- method convertRectFromBacking(r as NSRectMBS) as NSRectMBS
- method convertRectToBacking(r as NSRectMBS) as NSRectMBS
- method supportedWindowDepths as Integer()
- 2 shared methods
- shared method NSScreenColorSpaceDidChangeNotification as string
- shared method screens as NSScreenMBS()
This class has no sub classes.
Some methods using this class:
- NSWorkspaceMBS.desktopImageOptionsForScreen(screen as NSScreenMBS) as dictionary
- NSWorkspaceMBS.desktopImageURLForScreen(screen as NSScreenMBS) as folderitem
- NSWorkspaceMBS.setDesktopImageURL(file as folderitem, screen as NSScreenMBS, options as dictionary, byref error as NSErrorMBS) as boolean
- QLPreviewPanelMBS.enterFullScreenMode(screen as NSScreenMBS)
Some properties using for this class:
- NSScreenMBS.deepestScreen as NSScreenMBS
- NSScreenMBS.firstScreen as NSScreenMBS
- NSScreenMBS.mainScreen as NSScreenMBS
- NSScreenMBS.secondScreen as NSScreenMBS
- NSWindowMBS.deepestScreen as NSScreenMBS
- NSWindowMBS.screen as NSScreenMBS
Some examples using this class:
- /DynaPDF/Raster/RenderPageToImage with color management
- /DynaPDF/Raster/RenderPDFFile Test with Color Management
- /Images/JPEG/JPEG with LCMS/JPEG with LCMS
- /Images/LCMS2/Query Display Profile
- /MacBase/NSScreen
- /MacCG/Mac ColorSpace tests
- /MacCocoa/MovableByBackground
- /MacCocoa/Window Colorspace
- /MacControls/Draw full red on screen
Blog Entries
- MBS Xojo Plugins, version 19.4pr2
- Colorspaces in MacOS with Xojo
- Nearly 2000 new Functions in the 9.6 prerelease of MBS
- MBS REALbasic plug-in 9.6
Xojo Developer Magazine
Release notes
- Version 19.4
- Modernized NSScreenMBS class with more real properties.
The items on this page are in the following plugins: MBS MacBase Plugin.
NSSavePanelObserverMBS - NSScrollerMBS