mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-15 04:54:29 +00:00
Added CPWindowList and CPWindowObjectList functions for grabbing the currently visible windows.
Reviewed by me.
This commit is contained in:
1 parent
adde315e2d
commit
d57e7050db
1 file changed
+40
@@ -1018,3 +1018,43 @@ var CPDOMEventStop = function(aDOMEvent)
|
||||
CPSharedDOMWindowBridge._DOMFocusElement.blur();
|
||||
}
|
||||
}
|
||||
|
||||
function CPWindowObjectList()
|
||||
{
|
||||
var bridge = [CPDOMWindowBridge sharedDOMWindowBridge],
|
||||
levels = bridge._windowLevels,
|
||||
layers = bridge._windowLayers,
|
||||
levelCount = levels.length,
|
||||
windowObjects = [];
|
||||
|
||||
while (levelCount--)
|
||||
{
|
||||
var windows = [layers objectForKey:levels[levelCount]]._windows,
|
||||
windowCount = windows.length;
|
||||
|
||||
while (windowCount--)
|
||||
windowObjects.push(windows[windowCount]);
|
||||
}
|
||||
|
||||
return windowObjects;
|
||||
}
|
||||
|
||||
function CPWindowList()
|
||||
{
|
||||
var bridge = [CPDOMWindowBridge sharedDOMWindowBridge],
|
||||
levels = bridge._windowLevels,
|
||||
layers = bridge._windowLayers,
|
||||
levelCount = levels.length,
|
||||
windowNumbers = [];
|
||||
|
||||
while (levelCount--)
|
||||
{
|
||||
var windows = [layers objectForKey:levels[levelCount]]._windows,
|
||||
windowCount = windows.length;
|
||||
|
||||
while (windowCount--)
|
||||
windowNumbers.push([windows[windowCount] windowNumber]);
|
||||
}
|
||||
|
||||
return windowNumbers;
|
||||
}
|
||||
Reference in new issue
Block a user