Songbird / Development / Songbird Add-Ons API Documentation

sbIMediaPage Interface Reference

A generic interface for UI that renders a media list view. More...

import "sbIMediaPage.idl";

List of all members.

Public Member Functions

PRBool highlightItem (in unsigned long aViewIndex)
 Tell the page to make the MediaItem at the given index visible and highlighted.
PRBool canDrop (in nsIDOMEvent aEvent, in nsIDragSession aSession)
 Called when something is dragged over the tabbrowser tab for this page.
PRBool onDrop (in nsIDOMEvent aEvent, in nsIDragSession aSession)
 Called when something is dropped on the tabbrowser tab for this page.

Public Attributes

attribute sbIMediaListView mediaListView
 A filtered, sorted view of the media list that the page is supposed to render.


Detailed Description

A generic interface for UI that renders a media list view.

Pages that display libraries or other media lists must supply this interface in order for browser history, playback, find current track, and other external functionality to work as expected.

The primary purpose of the interface is to facilitate setting the sbIMediaListView that the page is to display.

For sample code and more information, see http://developer.songbirdnest.com/add-on-api/

See also:
sbIMediaListView, sbIMediaList, playlistPage.xul

Definition at line 49 of file sbIMediaPage.idl.


Member Function Documentation

PRBool sbIMediaPage::highlightItem ( in unsigned long  aViewIndex  ) 

Tell the page to make the MediaItem at the given index visible and highlighted.

Parameters:
aViewIndex Index into the MediaListView (needed, since MediaItems may appear multiple times in a list)
Returns:
True if the page is able to show the corresponding item

PRBool sbIMediaPage::canDrop ( in nsIDOMEvent  aEvent,
in nsIDragSession  aSession 
)

Called when something is dragged over the tabbrowser tab for this page.

Parameters:
aEvent The draggedover event
aSession The items to be dropped
Returns:
True if the drop can proceed

PRBool sbIMediaPage::onDrop ( in nsIDOMEvent  aEvent,
in nsIDragSession  aSession 
)

Called when something is dropped on the tabbrowser tab for this page.

Parameters:
aEvent The drop event
aSession The items to be dropped
Returns:
True if the drop succeeded


Member Data Documentation

attribute sbIMediaListView sbIMediaPage::mediaListView

A filtered, sorted view of the media list that the page is supposed to render.

The mediaListView will be set by the browser during the capturing phase of the window load event, meaning that it should be available by standard onLoad time.

Note that the mediaListView should not be set again after load.

Definition at line 62 of file sbIMediaPage.idl.


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