Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGDisplayMBS class.

Previous items

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 of a display monitor.
Example
dim d as new CGDisplayMBS // pick main display

MsgBox str(D.SerialNumber)

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
Returns the logical unit number of a display.
Example
dim d as new CGDisplayMBS // pick main display

MsgBox str(D.UnitNumber)

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
Returns a Boolean value indicating whether Quartz is using OpenGL-based window acceleration (Quartz Extreme) to render in a display.
Example
dim d as new CGDisplayMBS // pick main display

MsgBox str(D.UsesOpenGLAcceleration)

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
Returns the vendor number of the specified display's monitor.
Example
dim d as new CGDisplayMBS // pick main display

MsgBox str(D.VendorNumber)
// 1552 seems to be Apple

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)

Previous items

The items on this page are in the following plugins: MBS MacCG Plugin.


💬 Ask a question or report a problem
The biggest plugin in space...