CGWindowMBS constants

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGWindowMBS module.

Window Info Dictionary Key Constants

CGWindowMBS.kCGWindowAlpha = "kCGWindowAlpha"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

The alpha fade of the window. The value of this key is a floating-point value. The value 1.0 is normal (opaque); the value 0.0 is fully transparent (invisible).

CGWindowMBS.kCGWindowBackingLocationVideoMemory = "kCGWindowBackingLocationVideoMemory"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

Optional. If present, true if the window backing store is in video memory, false otherwise. If the key is not present, then the window backing store is in main memory. The value of this key is a Boolean.

CGWindowMBS.kCGWindowBounds = "kCGWindowBounds"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.
Example
dim a(-1) as Dictionary = CGWindowMBS.GetWindowListInfo(CGWindowMBS.kCGWindowListOptionOnScreenOnly,0)

//cycle thru window names and get window size

for each d as Dictionary in a
dim windowname as string = d.Lookup(CGWindowMBS.kCGWindowName, "")
if Instr(1,windowname,"Play") > 0 then
dim bounds as Dictionary = d.Lookup(CGWindowMBS.kCGWindowBounds,nil)

dim x as Integer = bounds.Lookup("X", 0)
dim y as Integer = bounds.Lookup("Y", 0)
dim w as Integer = bounds.Lookup("Width", 0)
dim h as Integer = bounds.Lookup("Height", 0)

MsgBox "Found window at "+str(x)+"/"+str(y)+" with size "+str(w)+"/"+str(h)
end if
next

The bounds of the window in screen space, with the origin at the upper-left corner of the main display. The value of this key is a Dictionary.

CGWindowMBS.kCGWindowIsOnscreen = "kCGWindowIsOnscreen"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

Optional. If present, true if the window is ordered on screen, false otherwise. If the key is not present, then the window is not ordered on screen. The value of this key is a boolean.

CGWindowMBS.kCGWindowLayer = "kCGWindowLayer"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

The window layer number of the window. The value of this key is a 32-bit signed integer value.

CGWindowMBS.kCGWindowMemoryUsage = "kCGWindowMemoryUsage"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

An estimate of the memory in bytes currently used by the window and its supporting data structures. The value of this key is a 64-bit signed integer value.

CGWindowMBS.kCGWindowName = "kCGWindowName"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.
Example
// find window with containing "Play" in name.
dim a(-1) as Dictionary = CGWindowMBS.GetWindowListInfo(CGWindowMBS.kCGWindowListOptionOnScreenOnly, 0)

for each d as Dictionary in a
dim windowname as string = d.Lookup(CGWindowMBS.kCGWindowName, "")
if Instr(1,windowname,"Play") > 0 then
msgBox "I found it and the ID is "+d.Lookup(CGWindowMBS.kCGWindowNumber, "")
end if
next

Optional. If present, the name of the window. The value of this key is a string.

CGWindowMBS.kCGWindowNumber = "kCGWindowNumber"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.
Example
// find window with containing "Play" in name.
dim a(-1) as Dictionary = CGWindowMBS.GetWindowListInfo(CGWindowMBS.kCGWindowListOptionOnScreenOnly, 0)

for each d as Dictionary in a
dim windowname as string = d.Lookup(CGWindowMBS.kCGWindowName, "")
if Instr(1,windowname,"Play") > 0 then
msgBox "I found it and the ID is "+d.Lookup(CGWindowMBS.kCGWindowNumber, "")
end if
next

The window ID, a unique value within the user session representing the window. The value of this key is a 32-bit signed integer value.

CGWindowMBS.kCGWindowOwnerName = "kCGWindowOwnerName"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

Optional. If present, the name of the application process which owns the window. The value of this key is a string.

CGWindowMBS.kCGWindowOwnerPID = "kCGWindowOwnerPID"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

The process ID of the process that owns the window. The value of this key is a 32-bit signed integer value.

CGWindowMBS.kCGWindowSharingState = "kCGWindowSharingState"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

The sharing state of the window, one of kCGWindowSharingNone, kCGWindowSharingReadOnly, or kCGWindowSharingReadWrite. The value of this key is a 32-bit signed integer value.

CGWindowMBS.kCGWindowStoreType = "kCGWindowStoreType"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

The backing store type of the window, one of kCGBackingStoreRetained, kCGBackingStoreNonretained, or kCGBackingStoreBuffered. The value of this key is a 32-bit signed integer value.

CGWindowMBS.kCGWindowWorkspace = "kCGWindowWorkspace"

Type Topic Plugin Version
const CoreGraphics MBS MacFrameworks Plugin 11.2
One of the possible keys in the window info dictionary.

Optional. If present, the workspace ID of the workspace associated with the window. The value of this key is a 32-bit signed integer value.

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


💬 Ask a question or report a problem