Platforms to show: All Mac Windows Linux Cross-Platform
Back to CGDisplayMBS class.
CGDisplayMBS.BeamPosition as UInt32
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If display is invalid, or the display does not implement conventional video vertical and horizontal sweep in painting, or the driver does not implement this functionality, 0 is returned.
(Read only property)
CGDisplayMBS.Bounds as CGRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Empty rect or nil if display is invalid.
(Read only property)
CGDisplayMBS.Brightness as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns -1 if not supported.
Lasterror is set.
(Read and Write property)
CGDisplayMBS.CanSetPalette as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read only property)
CGDisplayMBS.ColorSpace as CGColorSpaceMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This function returns a display-dependent ICC-based color space. You can use this function when rendering content for a specific display in order to produce color-matched output for that display.
Available in Mac OS X v10.5 and later.
(Read only property)
CGDisplayMBS.CurrentMode as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns nil on any error.
(Read only property)
CGDisplayMBS.DisplayMode as CGDisplayModeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns nil on any error.
Requires Mac OS X 10.6
(Read only property)
CGDisplayMBS.DisplayProductNames as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 14.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read only property)
CGDisplayMBS.Handle as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Internally: The DisplayID.
0 is the main display (to keep it easier).
(Read only property)
CGDisplayMBS.IOServicePort as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read only property)
CGDisplayMBS.IsActive as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If true, the specified display is active; otherwise, false.
An active display is connected, awake, and available for drawing. In a hardware mirroring set, only the primary display is active.
(Read only property)
CGDisplayMBS.IsAlwaysInMirrorSet as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If true, the specified display is in a mirroring set and cannot be removed from this set.
Some hardware configurations support the connection of auxiliary displays that always mirror the main display, and therefore cannot be removed from the mirroring set to which they belong.
(Read only property)
CGDisplayMBS.IsAsleep as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If true, the specified display is in sleep mode; otherwise, false.
A display is sleeping when its frame buffer and the attached monitor are in reduced power mode. A sleeping display is still considered to be a part of global display (desktop) space, but it is not drawable.
(Read only property)
CGDisplayMBS.IsBuiltin as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If true, the specified display is considered to be a built-in display; otherwise, false.
Portable systems typically identify the internal LCD panel as a built-in display.
Note that it is possible and reasonable for a system to have no displays marked as built-in. For example, a portable system running with the lid closed may report no built-in displays.
(Read only property)
CGDisplayMBS.IsInHWMirrorSet as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If true, the specified display is a member of a hardware mirroring set; otherwise, false.
When hardware mirroring is enabled, the contents of a double frame buffer are rendered in all displays in the hardware mirroring set.
(Read only property)
CGDisplayMBS.IsInMirrorSet as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read only property)
CGDisplayMBS.IsMain as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If true, the specified display is currently the main display; otherwise, false.
(Read only property)
CGDisplayMBS.IsOnline as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns true if the specified display is connected; otherwise, false.
A display is considered connected or online when the frame buffer hardware is connected to a monitor.
You can use this function to determine if someone has hot-plugged a display to the system. Note that hot-plugging is a hardware feature that may not be present on all displays.
(Read only property)
CGDisplayMBS.IsStereo as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If true, the specified display is running in a stereo graphics mode; otherwise, false.
Available in Mac OS X v10.4 and later.
(Read only property)
CGDisplayMBS.LastError as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 15.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Only set for a few properties like brightness where we do have an error code.
(Read only property)
CGDisplayMBS.MirrorsDisplay as CGDisplayMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns the primary display in the mirroring set. Returns kCGNullDirectDisplay if the specified display is actually the primary display or is not in a mirroring set.
(Read only property)
CGDisplayMBS.ModelNumber as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
A model number for the monitor associated with the specified display, or a constant to indicate an exception—see the discussion below.
This function uses I/O Kit to identify the monitor associated with the specified display. The return value depends on the following:
If I/O Kit can identify the monitor, the product ID code for the monitor is returned.
If I/O Kit can't identify the monitor, kDisplayProductIDGeneric is returned.
If no monitor is connected, a value of 0xFFFFFFFF is returned.
(Read only property)
CGDisplayMBS.PixelsHigh as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
dim d as new CGDisplayMBS // pick main display
MsgBox str(D.PixelsHigh)
(Read only property)
CGDisplayMBS.PixelsWide as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read only property)
CGDisplayMBS.PrimaryDisplay as CGDisplayMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The primary display in the mirror set. If display is not hardware-mirrored, this function simply returns display.
In hardware mirroring, the contents of a double frame buffer are rendered in two or more displays simultaneously. The mirrored displays are said to be in a hardware mirroring set.
At the discretion of the device driver, one of the displays in a hardware mirroring set is designated as the primary display. The device driver binds the drawing engine, hardware accelerator, and 3D engine to the primary display, and directs all drawing operations to this display.
(Read only property)
CGDisplayMBS.RefreshRate as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 15.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns 60 for LCD displays.
(Read only property)
CGDisplayMBS.Rotation as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The rotation angle of the display in degrees, or 0 if the display is not valid.
This function returns the rotation angle of a display in a clockwise direction. For example, if the specified display is rotated clockwise 90 degrees then this function returns 90.0. After a 90 degree clockwise rotation, the physical bottom of the display is on the left side and the physical top is on the right side.
Available in Mac OS X v10.5 and later.
(Read only property)
CGDisplayMBS.ScreenSizeHeight as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If Extended Display Identification Data (EDID) for the display device is not available, the size is estimated based on the device width and height in pixels from CGDisplayBounds, with an assumed resolution of 2.835 pixels/mm or 72 DPI, a reasonable guess for displays predating EDID support.
(Read only property)
CGDisplayMBS.ScreenSizeWidth as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If Extended Display Identification Data (EDID) for the display device is not available, the size is estimated based on the device width and height in pixels from CGDisplayBounds, with an assumed resolution of 2.835 pixels/mm or 72 DPI, a reasonable guess for displays predating EDID support.
(Read only property)
CGDisplayMBS.SerialNumber as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns the serial number for the monitor associated with the specified display, or a constant to indicate an exception—see the discussion below.
This function uses I/O Kit to identify the monitor associated with the specified display.
If I/O Kit can identify the monitor:
If the manufacturer has encoded a serial number for the monitor, the number is returned.
If there is no encoded serial number, 0x00000000 is returned.
If I/O Kit cannot identify the monitor:
If a monitor is connected to the display, 0x00000000 is returned.
If no monitor is connected to the display hardware, a value of 0xFFFFFFFF is returned.
Note that a serial number is meaningful only in conjunction with a specific vendor and product or model.
(Read only property)
CGDisplayMBS.UnitNumber as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
A logical unit number for the specified display.
The logical unit number represents a particular node in the I/O Kit device tree associated with the display's frame buffer. For a particular hardware configuration, this value will not change when the attached monitor is changed.
The unit number will change if the I/O Kit device tree changes, as when hardware is reconfigured, drivers are replaced, or significant changes occur to I/O Kit, so it should not be assumed to be invariant across login sessions.
For more information about I/O Kit, see the Apple publication "I/O Kit Fundamentals".
(Read only property)
CGDisplayMBS.UsesOpenGLAcceleration as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Return value: If true, Quartz Extreme is used to render in the specified display; otherwise, false.
Quartz Extreme is an OpenGL-based, hardware-accelerated window compositor available in Mac OS X version 10.2 and later. Quartz Extreme requires a minimum hardware configuration to operate.
The information this function provides is typically used to adjust the demands of drawing operations to the capabilities of the display hardware. For example, an application running on an unaccelerated system could disable live window-resizing.
(Read only property)
CGDisplayMBS.VendorNumber as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | CoreGraphics | MBS MacCG Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
A vendor number for the monitor associated with the specified display, or a constant to indicate an exception—see the discussion below.
This function uses I/O Kit to identify the monitor associated with the specified display.
There are three cases:
If I/O Kit can identify the monitor, the vendor ID is returned.
If I/O Kit cannot identify the monitor, kDisplayVendorIDUnknown is returned.
If there is no monitor associated with the display, 0xFFFFFFFF is returned.
(Read only property)
The items on this page are in the following plugins: MBS MacCG Plugin.