Songbird / Development / Songbird Add-Ons API Documentation

sbIFeathersManager Interface Reference

Controls the appearance of the application. More...

import "sbIFeathersManager.idl";

List of all members.

Public Member Functions

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

Public Attributes

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


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::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:
aSkin Skin description

void sbIFeathersManager::unregisterSkin ( in sbISkinDescription  aSkin  ) 

Disable the given skin.

Parameters:
aSkin Skin description

sbISkinDescription sbIFeathersManager::getSkinDescription ( in AString  aInternalName  ) 

Gets the full skin description associated with a skin identifier.

Parameters:
aInternalName Skin identifier (provider)
Returns:
Skin description

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:
aLayout Window description

void sbIFeathersManager::unregisterLayout ( in sbILayoutDescription  aLayout  ) 

Disable the given window.

Parameters:
aLayout Window description

sbILayoutDescription sbIFeathersManager::getLayoutDescription ( in AString  aLayoutURL  ) 

Gets the full layout description associated with a layout URL.

Parameters:
aLayoutURL Unique identifier
Returns:
Layout description

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:
aLayoutURL URL for a xul window
aInternalName Identifier for a skin
aShowChrome Whether or not the OS titlebar should be used when the skin-window pair is active

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:
aLayoutURL URL for a xul window
aInternalName Identifier for a skin

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:
aLayoutURL URL for a XUL winodw
aInternalName Identifier for a skin.

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:
aInternalName The identifier for a skin.
Returns:
The URL for the default XUL window.

boolean sbIFeathersManager::isChromeEnabled ( in AString  aLayoutURL,
in AString  aInternalName 
)

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

Parameters:
aLayoutURL URL for a xul window
aInternalName Identifier 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:
aLayoutURL URL for a xul window
aInternalName Identifier for a skin
Returns:
True if the given pair should be kept on top

void sbIFeathersManager::setOnTop ( in AString  aLayoutURL,
in AString  aInternalName,
in boolean  aOnTop 
)

Should the window be kept on top.

Parameters:
aLayoutURL URL for a xul window
aInternalName Identifier for a skin
aOnTop Should the window be kept on top

boolean sbIFeathersManager::canOnTop ( in AString  aLayoutURL,
in AString  aInternalName 
)

Can the window be kept on top.

Parameters:
aLayoutURL URL for a xul window
aInternalName Identifier for a skin
Returns:
True if the given pair can be kept on top

nsISimpleEnumerator sbIFeathersManager::getSkinsForLayout ( in AString  aLayoutURL  ) 

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

Parameters:
aLayoutURL URL for a xul window
Returns:
Enumerator for a list of sbISkinDescription objects

nsISimpleEnumerator sbIFeathersManager::getLayoutsForSkin ( in AString  aInternalName  ) 

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

Parameters:
aInternalName Identifier for a skin
Returns:
Enumerator for a list of sbILayoutDescription objects

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:
aLayoutURL URL for a xul window
aInternalName Identifier for a skin
See also:
sbIFeathersChangeListener
Exceptions:
NS_ERROR_FAILURE if the given feathers are invalid or incompatible

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::addListener ( in sbIFeathersManagerListener  aListener  ) 

Register to receive modification callbacks.

Parameters:
aListener Callback interface

void sbIFeathersManager::removeListener ( in sbIFeathersManagerListener  aListener  ) 

Unregister modification callbacks.

Parameters:
aListener Callback interface


The documentation for this interface was generated from the following file:
Generated on Tue Mar 10 14:28:58 2009 for Songbird by  doxygen 1.5.2