Contents

CGDisplayUnitNumber(_:)

Returns the logical unit number of a display.

Declaration

func CGDisplayUnitNumber(_ display: CGDirectDisplayID) -> UInt32

Parameters

  • display:

    The identifier of the display to be accessed.

Return Value

A logical unit number for the specified display.

Discussion

The logical unit number represents a particular node in the I/O Kit device tree associated with the display’s framebuffer.

For a particular hardware configuration, this value will not change when the attached monitor is changed. The number will change, though, if the I/O Kit device tree changes, for example, when hardware is reconfigured, drivers are replaced, or significant changes occur to I/O Kit. Therefore keep in mind that this number may vary across login sessions.

For more information about I/O Kit, see IOKit Fundamentals.

See Also

Functions