00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00031 #include "nsISupports.idl"
00032
00033 interface nsISimpleEnumerator;
00034 interface sbIMediaItem;
00035
00040 [scriptable, uuid(8e4e9f65-9c90-4381-a8ed-b8aa2d1ad028)]
00041 interface sbIMediaListViewSelectionListener : nsISupports
00042 {
00046 void onSelectionChanged();
00047
00052 void onCurrentIndexChanged();
00053 };
00054
00060 [scriptable, uuid(ea5d0e88-6b5b-4c22-a753-7274ab774d8a)]
00061 interface sbIMediaListViewSelection : nsISupports
00062 {
00066 readonly attribute long count;
00067
00071 attribute long currentIndex;
00072
00076 readonly attribute sbIMediaItem currentMediaItem;
00077
00083 boolean isIndexSelected(in long aIndex);
00084
00091 readonly attribute nsISimpleEnumerator selectedIndexedMediaItems;
00092
00098 readonly attribute nsISimpleEnumerator selectedMediaItems;
00099
00104 void select(in long aIndex);
00105
00111 void selectOnly(in long aIndex);
00112
00117 void toggle(in long aIndex);
00118
00123 void clear(in long aIndex);
00124
00130 void selectRange(in long aStartIndex, in long aEndIndex);
00131
00137 void clearRange(in long aStartIndex, in long aEndIndex);
00138
00142 void selectNone();
00143
00147 void selectAll();
00148
00154 void addListener(in sbIMediaListViewSelectionListener aListener);
00155
00160 void removeListener(in sbIMediaListViewSelectionListener aListener);
00161
00165 attribute boolean selectionNotificationsSuppressed;
00166 };