import"sbIWindowWatcher.idl";
Public Member Functions | |
void | callWithWindow (in AString aWindowType, in sbICallWithWindowCallback aCallback, [optional] in boolean aWait) |
Call callback specified by aCallback with a window of the type specified by aWindowType. Wait until a window of the specified type is available or until shutdown. Call callback with null window on shutdown. Call callback on main thread. If aWait is true, don't return until callback is called. More... | |
nsIDOMWindow | getWindow (in AString aWindowType) |
Get the top-most available window of the type specified by aWindowType. Return null if no matching window is available. Since nsIDOMWindow is not thread-safe, this method may only be called on the main thread. More... | |
void | waitForWindow (in AString aWindowType) |
Wait until a window of the type specified by aWindowType is available or until shutdown. This method may not be called on the main thread. Since the available window can only be used on the main thread, the available window may become unavailable after waitForWindow returns but before processing continues on the main thread. More... | |
Public Attributes | |
readonly attribute boolean | isShuttingDown |
True if the window watcher is shutting down and no more windows will become available. More... | |
The sbIWindowWatcher interface provides support for using ready windows. Windows are considered ready when all of their overlays have loaded. Main thread code may use callWithWindow to be called when a window is ready. Main thread code may also use getWindow to get a ready window, but there's no guarantee that a window will be ready, and getWindow won't wait for one. Non-main thread code may use waitForWindow to wait until a window is ready. This code may then dispatch to the main thread to get and use the window.
"@songbirdnest.com/Songbird/window-watcher;1" Use get service with this component.
Definition at line 52 of file sbIWindowWatcher.idl.
void sbIWindowWatcher::callWithWindow | ( | in AString | aWindowType, |
in sbICallWithWindowCallback | aCallback, | ||
[optional] in boolean | aWait | ||
) |
Call callback specified by aCallback with a window of the type specified by aWindowType. Wait until a window of the specified type is available or until shutdown. Call callback with null window on shutdown. Call callback on main thread. If aWait is true, don't return until callback is called.
aWindowType | Type of window with which to call. |
aCallback | Callback to call with window. |
aWait | If true, wait until callback is called. |
nsIDOMWindow sbIWindowWatcher::getWindow | ( | in AString | aWindowType | ) |
Get the top-most available window of the type specified by aWindowType. Return null if no matching window is available. Since nsIDOMWindow is not thread-safe, this method may only be called on the main thread.
aWindowType | Type of window to get. |
void sbIWindowWatcher::waitForWindow | ( | in AString | aWindowType | ) |
Wait until a window of the type specified by aWindowType is available or until shutdown. This method may not be called on the main thread. Since the available window can only be used on the main thread, the available window may become unavailable after waitForWindow returns but before processing continues on the main thread.
aWindowType | Type of window to get. |
readonly attribute boolean sbIWindowWatcher::isShuttingDown |
True if the window watcher is shutting down and no more windows will become available.
Definition at line 59 of file sbIWindowWatcher.idl.