sbIFeathersManager Interface Reference

Controls the appearance of the application. More...

import"sbIFeathersManager.idl";

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

Public Member Functions

nsISimpleEnumerator getSkinDescriptions ()
 Enumerator for all registered sbISkinDescription objects. More...
 
nsISimpleEnumerator getLayoutDescriptions ()
 Enumerator for all registered sbILayoutDescription objects. More...
 
void registerSkin (in sbISkinDescription aSkin)
 Make the given skin available for use. More...
 
void unregisterSkin (in sbISkinDescription aSkin)
 Disable the given skin. More...
 
sbISkinDescription getSkinDescription (in AString aInternalName)
 Gets the full skin description associated with a skin identifier. More...
 
void registerLayout (in sbILayoutDescription aLayout)
 Make the given XUL window available for use. More...
 
void unregisterLayout (in sbILayoutDescription aLayout)
 Disable the given window. More...
 
sbILayoutDescription getLayoutDescription (in AString aLayoutURL)
 Gets the full layout description associated with a layout URL. More...
 
void assertCompatibility (in AString aLayoutURL, in AString aInternalName, in boolean aShowChrome, in boolean onTop)
 Assert compatibility of a skin-layout pair. More...
 
void unassertCompatibility (in AString aLayoutURL, in AString aInternalName)
 Unassert compatibility of a skin-layout pair. More...
 
void setDefaultLayout (in AString aLayoutURL, in AString aInternalName)
 Designate a default layout for a skin. More...
 
AString getDefaultLayout (in AString aInternalName)
 Get the default layout (as a URL) for a given skin name. More...
 
boolean isChromeEnabled (in AString aLayoutURL, in AString aInternalName)
 Should window chrome be used with the given window-skin pair. More...
 
boolean isOnTop (in AString aLayoutURL, in AString aInternalName)
 Should the window be kept on top. More...
 
void setOnTop (in AString aLayoutURL, in AString aInternalName, in boolean aOnTop)
 Should the window be kept on top. More...
 
boolean canOnTop (in AString aLayoutURL, in AString aInternalName)
 Can the window be kept on top. More...
 
nsISimpleEnumerator getSkinsForLayout (in AString aLayoutURL)
 Get an enumerator for all registered skins compatible with the given layoutID. More...
 
nsISimpleEnumerator getLayoutsForSkin (in AString aInternalName)
 Get an enumerator for all registered layouts compatible with the given skin. More...
 
void switchFeathers (in AString aLayoutURL, in AString aInternalName)
 Switch to the given window-skin pair. More...
 
void switchToNextLayout ()
 Switch to the next layout for the current loaded feather. More...
 
void openPlayerWindow ()
 Launch the player window for the current feathers. More...
 
void addListener (in sbIFeathersManagerListener aListener)
 Register to receive modification callbacks. More...
 
void removeListener (in sbIFeathersManagerListener aListener)
 Unregister modification callbacks. More...
 

Public Attributes

readonly attribute AString currentLayoutURL
 URL for the active layout. More...
 
readonly attribute AString currentSkinName
 Skin internalName string for the active skin. More...
 
readonly attribute AString previousLayoutURL
 URL for the previously active or default layout. More...
 
readonly attribute AString previousSkinName
 Skin internalName string for the previously active or default skin. More...
 
readonly attribute unsigned long skinCount
 Number of registered skins. More...
 
readonly attribute unsigned long layoutCount
 Number of registered XUL windows. More...
 

Detailed Description

Controls the appearance of the application.

Acts as a registry for installed skins and alternate XUL windows, and provides a mechanism for switching between them.

See Also
sbISkinDescription, sbILayoutDescription, sbIFeathersChangeListener

Definition at line 52 of file sbIFeathersManager.idl.

Member Function Documentation

void sbIFeathersManager::addListener ( in sbIFeathersManagerListener  aListener)

Register to receive modification callbacks.

Parameters
aListenerCallback interface
void sbIFeathersManager::assertCompatibility ( in AString  aLayoutURL,
in AString  aInternalName,
in boolean  aShowChrome,
in boolean  onTop 
)

Assert compatibility of a skin-layout pair.

Indicate that layoutURL and internalName can be active at the same time, and whether the window chrome (titlebar, borders) should be shown.

Note that the given skin and xul window IDs do not need to be registered with the feathers manager.

Parameters
aLayoutURLURL for a xul window
aInternalNameIdentifier for a skin
aShowChromeWhether or not the OS titlebar should be used when the skin-window pair is active
boolean sbIFeathersManager::canOnTop ( in AString  aLayoutURL,
in AString  aInternalName 
)

Can the window be kept on top.

Parameters
aLayoutURLURL for a xul window
aInternalNameIdentifier for a skin
Returns
True if the given pair can be kept on top
AString sbIFeathersManager::getDefaultLayout ( in AString  aInternalName)

Get the default layout (as a URL) for a given skin name.

NOTE: The default layout can be set in the RDF install of a feather by specifiying a |<songbird:isDefault>true</songbird:isDefault>| tag in the skin description.

If no default layout has been specified, than the layoutURL that is first listed in the install RDF will be specified as the default.

Parameters
aInternalNameThe identifier for a skin.
Returns
The URL for the default XUL window.
sbILayoutDescription sbIFeathersManager::getLayoutDescription ( in AString  aLayoutURL)

Gets the full layout description associated with a layout URL.

Parameters
aLayoutURLUnique identifier
Returns
Layout description
nsISimpleEnumerator sbIFeathersManager::getLayoutDescriptions ( )

Enumerator for all registered sbILayoutDescription objects.

nsISimpleEnumerator sbIFeathersManager::getLayoutsForSkin ( in AString  aInternalName)

Get an enumerator for all registered layouts compatible with the given skin.

Parameters
aInternalNameIdentifier for a skin
Returns
Enumerator for a list of sbILayoutDescription objects
sbISkinDescription sbIFeathersManager::getSkinDescription ( in AString  aInternalName)

Gets the full skin description associated with a skin identifier.

Parameters
aInternalNameSkin identifier (provider)
Returns
Skin description
nsISimpleEnumerator sbIFeathersManager::getSkinDescriptions ( )

Enumerator for all registered sbISkinDescription objects.

nsISimpleEnumerator sbIFeathersManager::getSkinsForLayout ( in AString  aLayoutURL)

Get an enumerator for all registered skins compatible with the given layoutID.

Parameters
aLayoutURLURL for a xul window
Returns
Enumerator for a list of sbISkinDescription objects
boolean sbIFeathersManager::isChromeEnabled ( in AString  aLayoutURL,
in AString  aInternalName 
)

Should window chrome be used with the given window-skin pair.

Parameters
aLayoutURLURL for a xul window
aInternalNameIdentifier for a skin
Returns
True if the given pair should be displayed with native chrome (titlebar, etc.)
boolean sbIFeathersManager::isOnTop ( in AString  aLayoutURL,
in AString  aInternalName 
)

Should the window be kept on top.

Parameters
aLayoutURLURL for a xul window
aInternalNameIdentifier for a skin
Returns
True if the given pair should be kept on top
void sbIFeathersManager::openPlayerWindow ( )

Launch the player window for the current feathers.

Attempts to open the XUL player window layout for the current feathers. If the current layout or skin is invalid, the default feathers will be loaded instead.

void sbIFeathersManager::registerLayout ( in sbILayoutDescription  aLayout)

Make the given XUL window available for use.

Register the the given layout description. Note that any existing registration with the same URL will be overwritten.

Parameters
aLayoutWindow description
void sbIFeathersManager::registerSkin ( in sbISkinDescription  aSkin)

Make the given skin available for use.

Register the the given skin description. Note that any existing registration with the same skin provider name will be overwritten.

Parameters
aSkinSkin description
void sbIFeathersManager::removeListener ( in sbIFeathersManagerListener  aListener)

Unregister modification callbacks.

Parameters
aListenerCallback interface
void sbIFeathersManager::setDefaultLayout ( in AString  aLayoutURL,
in AString  aInternalName 
)

Designate a default layout for a skin.

NOTE: The default layout can be set in the RDF install of a feather by specifiying a |<songbird:isDefault>true</songbird:isDefault>| tag in the skin description.

If no default layout has been specified, than the layoutURL that is first listed in the install RDF will be specified as the default.

Parameters
aLayoutURLURL for a XUL winodw
aInternalNameIdentifier for a skin.
void sbIFeathersManager::setOnTop ( in AString  aLayoutURL,
in AString  aInternalName,
in boolean  aOnTop 
)

Should the window be kept on top.

Parameters
aLayoutURLURL for a xul window
aInternalNameIdentifier for a skin
aOnTopShould the window be kept on top
void sbIFeathersManager::switchFeathers ( in AString  aLayoutURL,
in AString  aInternalName 
)

Switch to the given window-skin pair.

Attempts to reopen all Songbird windows using the given layout and skin.

Note: triggers the onSelectRequest callback

Parameters
aLayoutURLURL for a xul window
aInternalNameIdentifier for a skin
See Also
sbIFeathersChangeListener
Exceptions
NS_ERROR_FAILUREif the given feathers are invalid or incompatible
void sbIFeathersManager::switchToNextLayout ( )

Switch to the next layout for the current loaded feather.

void sbIFeathersManager::unassertCompatibility ( in AString  aLayoutURL,
in AString  aInternalName 
)

Unassert compatibility of a skin-layout pair.

Indicate that layoutURL and internalName cannot be active at the same time.

TODO: Throw an exception if the mapping is currently in use?

Parameters
aLayoutURLURL for a xul window
aInternalNameIdentifier for a skin
void sbIFeathersManager::unregisterLayout ( in sbILayoutDescription  aLayout)

Disable the given window.

Parameters
aLayoutWindow description
void sbIFeathersManager::unregisterSkin ( in sbISkinDescription  aSkin)

Disable the given skin.

Parameters
aSkinSkin description

Member Data Documentation

readonly attribute AString sbIFeathersManager::currentLayoutURL

URL for the active layout.

Definition at line 57 of file sbIFeathersManager.idl.

readonly attribute AString sbIFeathersManager::currentSkinName

Skin internalName string for the active skin.

Definition at line 62 of file sbIFeathersManager.idl.

readonly attribute unsigned long sbIFeathersManager::layoutCount

Number of registered XUL windows.

Definition at line 95 of file sbIFeathersManager.idl.

readonly attribute AString sbIFeathersManager::previousLayoutURL

URL for the previously active or default layout.

Definition at line 67 of file sbIFeathersManager.idl.

readonly attribute AString sbIFeathersManager::previousSkinName

Skin internalName string for the previously active or default skin.

Definition at line 72 of file sbIFeathersManager.idl.

readonly attribute unsigned long sbIFeathersManager::skinCount

Number of registered skins.

Definition at line 83 of file sbIFeathersManager.idl.


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