sbIPlaylistClickEvent.idl
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25 */
26 
27 #include "nsISupports.idl"
28 
29 interface sbIMediaItem;
30 
31 /*
32 Event: PlaylistClickEvent
33 
34 A <PlaylistClickEvent> is passed to any event handlers listening for the
35 PlaylistCellClick event fired on the document object. This event object also
36 has some of the properties of MouseEvent.
37 
38 Note that the <Songbird> object must be accessed before any events will be raised.
39 This will likely change in the future.
40 
41 Fired on:
42  document
43 
44 Properties inherited from MouseEvent:
45 ctrlKey - true if the control key is down when the click occurred
46 altKey - true if the alt key is down
47 shiftKey - true if the shift key is down
48 metaKey - true if the meta key is down
49 button - which mouse button was pressed;
50  0 for primary, 1 for middle, and 2 for secondary.
51 type - constant string, "PlaylistCellClick"
52 target - the document object of the content page which displayed the playlist
53 bubbles - contant true
54 cancelable - constant true
55 timeStamp - the time at which the click occurred, as milliseconds from epoch
56 
57 Properties inherited from MouseEvent, but not used:
58 screenX
59 screenY
60 clientX
61 clientY
62 relatedTarget
63 view
64 detail
65 
66 Example:
67  (start code)
68  function onPlaylistCellClick( aEvent ) {
69  // we can get the property that was clicked on...
70  alert(aEvent.property);
71 
72  // or the <MediaItem>
73  alert(aEvent.item.guid);
74 
75  // as well as key states from MouseEvent
76  alert(aEvent.ctrlKey);
77  }
78 
79  // initialize the event system
80  songbird;
81 
82  // attach the event handler
83  document.addEventListener("PlaylistCellClick", onPlaylistCellClick, false);
84  (end code)
85 
86  See Also:
87  <MediaItem>
88  <http://developer.mozilla.org/en/docs/DOM:event>
89  <http://developer.mozilla.org/en/docs/DOM:element.addEventListener>
90 */
91 
97 [scriptable, uuid(83b06ce0-b364-4861-afff-9b8de773cd75)]
99 {
100  /*
101  Prop: property
102 
103  The name of the property (column) that was clicked on e.g.,
104  "http://songbirdnest.com/data/1.0#trackName". See
105  <MediaItem::getProperty()> for standard properties.
106 
107  Type: String
108 
109  See Also:
110  <MediaItem::getProperty()>
111  */
112  readonly attribute AString property;
113 
114  /*
115  Prop: item
116 
117  The <MediaItem> that corresponds to the row clicked on.
118 
119  Type: <MediaItem>
120  */
121  readonly attribute sbIMediaItem item;
122 };
var uuid
an interface to maintain information about the last event that occurred
readonly attribute sbIMediaItem item
readonly attribute AString property
Interface that defines a single item of media in the system.