Contents

CGDisplayModelNumber(_:)

Returns the model number of a display monitor.

Declaration

func CGDisplayModelNumber(_ display: CGDirectDisplayID) -> UInt32

Parameters

  • display:

    The identifier of the display to be accessed.

Return Value

A model number for the monitor associated with the specified display, or a constant to indicate an exception—see the discussion below.

Discussion

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.

See Also

Functions