Platforms to show: All Mac Windows Linux Cross-Platform
CGDisplayReconfigurationEventMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreGraphics | MBS MacCG Plugin | 11.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
In constructor the plugin registers for the event and in destructor unregisters. So keep the object reference alive to receive events.
events are invoked when the app is listening for events, on the event processing thread, or from within the display reconfiguration function when in the program that is driving the reconfiguration.
events should avoid changing display configurations, and should not raise exceptions or perform a non-local return such as calling longjmp.
Before display reconfiguration, a event fires to inform applications of a configuration change. The event runs once for each on-line display. The flag is set to kCGDisplayBeginConfigurationFlag. This event does not carry other per-display information, as details of how a reconfiguration affects a particular device rely on device-specific behaviors which may not be exposed by a device driver.
After display reconfiguration, at the time the event function is invoked, all display state reported by CoreGraphics, QuickDraw, and the Carbon Display Manager API will be up to date. This event runs after the Carbon Display Manager notification events. The event runs once for each added, removed, and currently on-line display. Note that in the case of removed displays, calls into the CoreGraphics API with the removed display ID will fail.
- event DisplayReconfiguration(DisplayID as Integer, flags as Integer)
- 11 constants
Possible Flag Values
Constant | Value | Description |
---|---|---|
kCGDisplayAddFlag | 16 |
Display Added |
kCGDisplayBeginConfigurationFlag | 1 |
Begin Configuration for display. |
kCGDisplayDesktopShapeChangedFlag | 4096 |
Desktop Shape Changed. |
kCGDisplayDisabledFlag | 512 |
Display disabled. |
kCGDisplayEnabledFlag | 256 |
Display enabled. |
kCGDisplayMirrorFlag | 1024 |
Mirror enabled |
kCGDisplayMovedFlag | 2 |
Display Moved |
kCGDisplayRemoveFlag | 32 |
Display Removed |
kCGDisplaySetMainFlag | 4 |
Set Main |
kCGDisplaySetModeFlag | 8 |
Set Mode |
kCGDisplayUnMirrorFlag | 2048 |
Mirror disabled |
This class has no sub classes.
Some examples using this class:
Blog Entries
The items on this page are in the following plugins: MBS MacCG Plugin.
CGDisplayModeMBS - CGDisplayStreamEventMBS