sbIPrompter Interface Reference

import"sbIPrompter.idl";

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

Public Member Functions

nsIDOMWindow openDialog (in nsIDOMWindow aParent, in DOMString aUrl, in DOMString aName, in DOMString aOptions, in nsISupports aExtraArgument)
 
nsIDOMWindow openWindow (in nsIDOMWindow aParent, in DOMString aUrl, in DOMString aName, in DOMString aOptions, in nsISupports aExtraArgument)
 
void cancel ()
 

Public Attributes

attribute AString parentWindowType
 
attribute boolean waitForWindow
 
attribute boolean renderHTML
 

Detailed Description

The sbIPrompter interface provides an nsIPromptService to environments without a default window (e.g., XPCOM components). For all methods that take a parent window as an argument, the parent may be set to null. If a parent window is set to null, this interface will use a window of the type specified by parentWindowType. If no parent window type is specified, this interface uses a default type (e.g., "Songbird:Main"). If a window of the specified type is not available, this interface finds an appropriate default window to use. This interface allows a parent window type to be set to be used as the parent window in these cases. In addition, the sbIPrompter interface can be set to wait for a parent window to be available before calling the nsIPromptService methods. If the parent window type is not available and wait for window is false, dialogs are opened with the currently active window as the parent. A window is not considered to be available until after its overlays have loaded. If a method is called from a non-main thread, and wait for window is set, and a window is not available, the method will wait for a window to become available. If a method is called from the main thread, and wait for window is set, and a window is not available, the method will return NS_ERROR_NOT_AVAILABLE. If any error occurs, the method will return NS_ERROR_FAILURE.

"@songbirdnest.com/Songbird/Prompter;1" Use create instance with this component. No default parent window type is set and the default waitForWindow is false.

Definition at line 62 of file sbIPrompter.idl.

Member Function Documentation

void sbIPrompter::cancel ( )

Cancel and close the current prompter window.

nsIDOMWindow sbIPrompter::openDialog ( in nsIDOMWindow  aParent,
in DOMString  aUrl,
in DOMString  aName,
in DOMString  aOptions,
in nsISupports  aExtraArgument 
)

Open a dialog window with the chrome URL specified by aUrl and parent specified by aParent. The window name is specified by aName and the window options are specified by aOptions. Additional window arguments may be provided in aExtraArguments.

Default window options for openDialog are the following: "centerscreen,chrome,modal,titlebar".

Parameters
aParentParent window.
aUrlURL of window chrome.
aNameWindow name.
aOptionsWindow options.
aExtraArgumentsExtra window arguments.
nsIDOMWindow sbIPrompter::openWindow ( in nsIDOMWindow  aParent,
in DOMString  aUrl,
in DOMString  aName,
in DOMString  aOptions,
in nsISupports  aExtraArgument 
)

Open a window with the chrome URL specified by aUrl and parent specified by aParent. The window name is specified by aName and the window options are specified by aOptions. Additional window arguments may be provided in aExtraArguments.

There are no default options for openWindow.

Parameters
aParentParent window.
aUrlURL of window chrome.
aNameWindow name.
aOptionsWindow options.
aExtraArgumentsExtra window arguments.

Member Data Documentation

attribute AString sbIPrompter::parentWindowType

The parent window type.

Definition at line 67 of file sbIPrompter.idl.

attribute boolean sbIPrompter::renderHTML

If true, render prompt text as HTML.

Definition at line 78 of file sbIPrompter.idl.

attribute boolean sbIPrompter::waitForWindow

If true, wait for a parent window of the configured type to be available before prompting.

Definition at line 73 of file sbIPrompter.idl.


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