Songbird / Development / Songbird Add-Ons API Documentation

bindings/public/sbIPlaylistClickEvent.idl

00001 /*
00002 //
00003 // BEGIN SONGBIRD GPL
00004 //
00005 // This file is part of the Songbird web player.
00006 //
00007 // Copyright(c) 2005-2008 POTI, Inc.
00008 // http://songbirdnest.com
00009 //
00010 // This file may be licensed under the terms of of the
00011 // GNU General Public License Version 2 (the "GPL").
00012 //
00013 // Software distributed under the License is distributed
00014 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
00015 // express or implied. See the GPL for the specific language
00016 // governing rights and limitations.
00017 //
00018 // You should have received a copy of the GPL along with this
00019 // program. If not, go to http://www.gnu.org/licenses/gpl.html
00020 // or write to the Free Software Foundation, Inc.,
00021 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00022 //
00023 // END SONGBIRD GPL
00024 //
00025 */
00026 
00027 #include "nsISupports.idl"
00028 
00029 interface sbIMediaItem;
00030 
00031 /*
00032 Event: PlaylistClickEvent
00033 
00034 A <PlaylistClickEvent> is passed to any event handlers listening for the
00035 PlaylistCellClick event fired on the document object.  This event object also
00036 has some of the properties of MouseEvent.
00037 
00038 Note that the <Songbird> object must be accessed before any events will be raised.
00039 This will likely change in the future.
00040 
00041 Fired on:
00042   document
00043 
00044 Properties inherited from MouseEvent:
00045 ctrlKey - true if the control key is down when the click occurred
00046 altKey - true if the alt key is down
00047 shiftKey - true if the shift key is down
00048 metaKey - true if the meta key is down
00049 button - which mouse button was pressed;
00050          0 for primary, 1 for middle, and 2 for secondary.
00051 type - constant string, "PlaylistCellClick"
00052 target - the document object of the content page which displayed the playlist
00053 bubbles - contant true
00054 cancelable - constant true
00055 timeStamp - the time at which the click occurred, as milliseconds from epoch
00056 
00057 Properties inherited from MouseEvent, but not used:
00058 screenX
00059 screenY
00060 clientX
00061 clientY
00062 relatedTarget
00063 view
00064 detail
00065 
00066 Example:
00067   (start code)
00068   function onPlaylistCellClick( aEvent ) {
00069     // we can get the property that was clicked on...
00070     alert(aEvent.property);
00071     
00072     // or the <MediaItem>
00073     alert(aEvent.item.guid);
00074     
00075     // as well as key states from MouseEvent
00076     alert(aEvent.ctrlKey);
00077   }
00078   
00079   // initialize the event system
00080   songbird;
00081   
00082   // attach the event handler
00083   document.addEventListener("PlaylistCellClick", onPlaylistCellClick, false);
00084   (end code)
00085 
00086   See Also:
00087     <MediaItem>
00088     <http://developer.mozilla.org/en/docs/DOM:event>
00089     <http://developer.mozilla.org/en/docs/DOM:element.addEventListener>
00090 */
00091 
00097 [scriptable, uuid(83b06ce0-b364-4861-afff-9b8de773cd75)]
00098  interface sbIPlaylistClickEvent : nsISupports
00099 {
00100   /*
00101   Prop: property
00102   
00103   The name of the property (column) that was clicked on e.g.,
00104              "http://songbirdnest.com/data/1.0#trackName".  See
00105              <MediaItem::getProperty()> for standard properties.
00106   
00107   Type: String
00108   
00109   See Also:
00110     <MediaItem::getProperty()>
00111   */
00112   readonly attribute AString property;
00113   
00114   /*
00115   Prop: item
00116   
00117   The <MediaItem> that corresponds to the row clicked on.
00118   
00119   Type: <MediaItem>
00120   */
00121   readonly attribute sbIMediaItem item;
00122 };

Generated on Tue Mar 10 14:28:54 2009 for Songbird by  doxygen 1.5.2