CGDisplayIsOnline(_:)
Returns a Boolean value indicating whether a display is connected or online.
Declaration
func CGDisplayIsOnline(_ display: CGDirectDisplayID) -> boolean_tParameters
- display:
The identifier of the display to be accessed.
Return Value
If true, the specified display is connected; otherwise, false.
Discussion
A display is considered connected or online when the framebuffer hardware is connected to a monitor.
You can use this function to determine whether someone has plugged a display into the system while the main power was on. This hardware feature, called hot-plugging, may not be present on all displays.
See Also
Functions
CGAcquireDisplayFadeReservation(_:_:)CGAssociateMouseAndMouseCursorPosition(_:)CGBeginDisplayConfiguration(_:)CGCancelDisplayConfiguration(_:)CGCaptureAllDisplays()CGCaptureAllDisplaysWithOptions(_:)CGCompleteDisplayConfiguration(_:_:)CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)CGConfigureDisplayMirrorOfDisplay(_:_:_:)CGConfigureDisplayMode(_:_:_:)CGConfigureDisplayOrigin(_:_:_:_:)CGConfigureDisplayStereoOperation(_:_:_:_:)CGConfigureDisplayWithDisplayMode(_:_:_:_:)CGCursorIsDrawnInFramebuffer()CGCursorIsVisible()