Platforms to show: All Mac Windows Linux Cross-Platform
CGDisplayMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreGraphics | MBS MacCG Plugin | 3.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
- 33 properties
- property BeamPosition as UInt32
- property Bounds as CGRectMBS
- property Brightness as Double
- property CanSetPalette as boolean
- property ColorSpace as CGColorSpaceMBS
- property CurrentMode as Dictionary
- property DisplayMode as CGDisplayModeMBS
- property DisplayProductNames as Dictionary
- property Handle as Integer
- property IOServicePort as Integer
- property IsActive as boolean
- property IsAlwaysInMirrorSet as boolean
- property IsAsleep as boolean
- property IsBuiltin as boolean
- property IsInHWMirrorSet as boolean
- property IsInMirrorSet as boolean
- property IsMain as boolean
- property IsOnline as boolean
- property IsStereo as boolean
- property LastError as Integer
- property MirrorsDisplay as CGDisplayMBS
- property ModelNumber as Integer
- property PixelsHigh as Integer
- property PixelsWide as Integer
- property PrimaryDisplay as CGDisplayMBS
- property RefreshRate as Integer
- property Rotation as Double
- property ScreenSizeHeight as Double
- property ScreenSizeWidth as Double
- property SerialNumber as Integer
- property UnitNumber as Integer
- property UsesOpenGLAcceleration as boolean
- property VendorNumber as Integer
- 30 methods
- method AllDisplayModes(Options as Dictionary = nil) as CGDisplayModeMBS()
- method AvailableModes as Dictionary()
- method BestModeForParameters(BitsPerPixel as Integer, Width as Integer, Height as Integer, byref ExactMatch as boolean) as Dictionary
- method BestModeForParametersAndRefreshRate(BitsPerPixel as Integer, Width as Integer, Height as Integer, RefreshRate as Integer, byref ExactMatch as boolean) as Dictionary
- method BestModeForParametersAndRefreshRateWithProperty(BitsPerPixel as Integer, Width as Integer, Height as Integer, RefreshRate as Integer, propertyName as string, byref ExactMatch as boolean) as Dictionary
- method Capture as Integer
- method CaptureWithOptions(options as Integer) as Integer
- method CreateImage as CGImageMBS
- method CreateImageAsync(receiverDelegate as CreateImageAsyncDelegateMBS, jpegQuality as Double = 0.9, tag as Variant = nil)
- method CreateImageForRect(rect as CGRectMBS) as CGImageMBS
- method DrawingContext as CGContextMBS
- method GetDisplayTransferByTable(capacity as Integer, red as memoryblock, green as memoryblock, blue as memoryblock, byref samplecount as Integer) as Integer
- method GetDisplayTransferFormula(byref formula as CGDisplayTransferFormulaMBS) as Integer
- method HideCursor as Integer
- method Info as Dictionary
- method InfoAsCFDictionary as Variant
- method IsCaptured as boolean
- method MoveCursorToPoint(x as Double, y as Double) as Integer
- method OpenGLDisplayMask as Integer
- method Release as Integer
- method SetDisplayMode(mode as CGDisplayModeMBS) as Integer
- method SetDisplayTransferByByteTable(count as Integer, red as memoryblock, green as memoryblock, blue as memoryblock) as Integer
- method SetDisplayTransferByTable(count as Integer, red as memoryblock, green as memoryblock, blue as memoryblock) as Integer
- method SetDisplayTransferFormula(formula as CGDisplayTransferFormulaMBS) as Integer
- method SetRotation(angle as Integer) as Integer
- method SetStereoOperation(stereo as boolean, forceBlueLine as boolean, option as Integer) as Integer
- method ShieldingWindowID as UInt32
- method ShowCursor as Integer
- method SwitchToMode(Mode as Dictionary) as Integer
- method WaitForBeamPositionOutsideLines(upperScanLine as UInt32, lowerScanLine as UInt32) as Integer
- 14 shared methods
- shared method CaptureAllDisplays as Integer
- shared method CaptureAllDisplaysWithOptions(options as Integer) as Integer
- shared method GetActiveDisplayList as CGDisplayMBS()
- shared method GetDisplaysWithOpenGLDisplayMask(mask as Integer) as CGDisplayMBS()
- shared method GetDisplaysWithPoint(cgpoint as CGPointMBS) as CGDisplayMBS()
- shared method GetDisplaysWithPoint(x as Double, y as Double) as CGDisplayMBS()
- shared method GetDisplaysWithRect(cgrect as CGRectMBS) as CGDisplayMBS()
- shared method GetDisplaysWithRect(x as Double, y as Double, w as Double, h as Double) as CGDisplayMBS()
- shared method GetLastMouseDelta(byref deltax as Integer, byref deltay as Integer)
- shared method GetOnlineDisplayList as CGDisplayMBS()
- shared method MainDisplay as CGDisplayMBS
- shared method ReleaseAllDisplays as Integer
- shared method RestoreColorSyncSettings
- shared method ShieldingWindowLevel as Int32
- delegate CreateImageAsyncDelegateMBS(img as CGImageMBS, JPEGData as MemoryBlock, Tag as Variant)
- 18 constants
Capture option flags.
Constant | Value | Description |
---|---|---|
kCGCaptureNoFill | 1 |
Disables fill with black on capture. |
kCGCaptureNoOptions | 0 |
Default behavior. |
Keys for mode dictionary
Constant | Value | Description |
---|---|---|
kCGDisplayBitsPerPixel | "BitsPerPixel" |
The number of bits per pixel. The value for this key is a number inside the dictionary. |
kCGDisplayBitsPerSample | "BitsPerSample" |
The number of bits per sample. The value for this key is a number inside the dictionary. |
kCGDisplayBytesPerRow | "kCGDisplayBytesPerRow" | |
kCGDisplayHeight | "Height" |
The display height. The value for this key is a number inside the dictionary. |
kCGDisplayIOFlags | "IOFlags" |
The value for this key is a number inside the dictionary. |
kCGDisplayMode | "Mode" |
The value for this key is a number inside the dictionary. |
kCGDisplayModeIsInterlaced | "kCGDisplayModeIsInterlaced" |
This key reflects interesting bits of the IOKit display mode flags. |
kCGDisplayModeIsSafeForHardware | "kCGDisplayModeIsSafeForHardware" |
Set if display mode doesn't need a confirmation dialog to be set. |
kCGDisplayModeIsStretched | "kCGDisplayModeIsStretched" |
This key reflects interesting bits of the IOKit display mode flags. |
kCGDisplayModeIsTelevisionOutput | "kCGDisplayModeIsTelevisionOutput" |
This key reflects interesting bits of the IOKit display mode flags. |
kCGDisplayModeUsableForDesktopGUI | "UsableForDesktopGUI" |
Whether this display can be used for desktop GUI. The value for this key is a boolean inside the dictionary. |
kCGDisplayRefreshRate | "RefreshRate" |
The refresh rate. The value for this key is a number inside the dictionary. |
kCGDisplaySamplesPerPixel | "SamplesPerPixel" |
The number of samples per pixel. The value for this key is a number inside the dictionary. |
kCGDisplayWidth | "Width" |
The width of the display. The value for this key is a number inside the dictionary. |
kCGIODisplayModeID | "IODisplayModeID" |
Keys for options dictionary
Constant | Value | Description |
---|---|---|
kCGDisplayShowDuplicateLowResolutionModes | "kCGDisplayResolution" |
Pass to AllDisplayModes with boolean to indicate whether to include duplicate low resolution modes. |
This class has no sub classes.
Blog Entries
- MBS Xojo Plugins, version 21.5pr3
- MBS Xojo / Real Studio Plugins, version 15.4pr3
- MBS Xojo / Real Studio Plugins, version 15.3pr5
- MBS Xojo / Real Studio Plugins, version 15.1pr4
- MBS Xojo / Real Studio Plugins, version 15.0pr7
- MBS Xojo / Real Studio Plugins, version 14.4pr2
- Display Rotation
- MBS Plugins 11.1 Release notes
- MBS Plugins 10.3 Release Notes
- MonkeyBread Software Releases the MBS REALbasic plug-ins 8.6
Release notes
- Version 21.5
- Added kCGDisplayShowDuplicateLowResolutionModes constant for CGDisplayMBS class.
Some methods using this class:
- CGDisplayConfigMBS.DisplayMode(display as CGDisplayMBS, mode as CGDisplayModeMBS)
- CGDisplayConfigMBS.MirrorOfDisplay(display as CGDisplayMBS, master as CGDisplayMBS)
- CGDisplayConfigMBS.Mode(display as CGDisplayMBS, mode as Dictionary)
- CGDisplayConfigMBS.Origin(display as CGDisplayMBS, x as Integer, y as Integer)
- CGDisplayConfigMBS.StereoOperation(display as CGDisplayMBS, stereo as Boolean, forceBlueLine as Boolean)
Some properties using for this class:
- CGDisplayMBS.MirrorsDisplay as CGDisplayMBS
- CGDisplayMBS.PrimaryDisplay as CGDisplayMBS
Some examples using this class:
- /AVFoundation/Screen Recorder
- /MacCG/CGImage with different color spaces
- /MacCG/CoreGraphics DirectDisplay/CG Displaylist
- /MacCG/CoreGraphics DirectDisplay/CG Modelist
- /MacCG/CoreGraphics DirectDisplay/CGDisplay Rotation
- /MacCG/CoreGraphics DirectDisplay/CGDisplayMBS CreateImageAsync
- /MacCG/CoreGraphics DirectDisplay/CGDisplayStreamEvent test
- /MacCG/CoreGraphics DirectDisplay/Gamma Test
- /MacCG/Display Brightness
- /MacCocoa/EasyStatusItem
Some related classes:
- class CGColorSpaceMBS
- class CGContextMBS
- class CGDisplayConfigMBS
- class CGDisplayModeMBS
- class CGDisplayTransferFormulaMBS
- class CGImageMBS
- class CGPointMBS
- class CGRectMBS
The items on this page are in the following plugins: MBS MacCG Plugin.
CGDisplayConfigMBS - CGDisplayModeMBS
