sbIWindowWatcher Interface Reference

import"sbIWindowWatcher.idl";

Inheritance diagram for sbIWindowWatcher:
[legend]
Collaboration diagram for sbIWindowWatcher:
[legend]

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...
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
aWindowTypeType of window with which to call.
aCallbackCallback to call with window.
aWaitIf 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.

Parameters
aWindowTypeType of window to get.
Returns
Window of specified type or null if none available.
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.

Parameters
aWindowTypeType of window to get.

Member Data Documentation

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.


The documentation for this interface was generated from the following file: