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 00033 #include "nsISupports.idl" 00034 00035 interface sbIMediaListView; 00036 interface sbIPlaylistCommands; 00037 interface sbIPropertyInfo; 00038 interface sbIPlaylistClickEvent; 00039 00040 /* 00041 Class PlaylistWidget 00042 */ 00047 [scriptable, uuid(7660f28b-6b55-40b8-8660-353aad8df5a3)] 00048 interface sbIPlaylistWidget : nsISupports 00049 { 00059 void rescanCommands(); 00060 00068 sbIMediaListView getListView(); 00069 00082 void bind( in sbIMediaListView mediaListView, 00083 in sbIPlaylistCommands commands, 00084 in boolean resize, 00085 in boolean collapse ); 00086 00091 /* 00092 Method: getColumnCount() 00093 00094 Get the total number of columns in the web playlist 00095 00096 See Also: 00097 <clearColumns()> 00098 <insertColumnBefore()> 00099 <removeColumn()> 00100 */ 00101 unsigned long getColumnCount(); 00102 00106 /* 00107 Method: clearColumns() 00108 00109 Clear all columns from the web playlist 00110 */ 00111 void clearColumns( ); 00112 00121 /* 00122 Method: appendColumn() 00123 00124 Arguments: 00125 aPropertyID - The ID of the property you want to add as a column 00126 aWidth - The width in pixels of the column. If there has been a 00127 width set for this particular column then that width 00128 will be respected and this ignored. 00129 00130 Add a column to the right side of visible columns 00131 */ 00132 void appendColumn( in AString aPropertyID, 00133 [optional] in AString aWidth ); 00134 00146 /* 00147 Method: insertColumnBefore() 00148 00149 Insert a column into the web playlist 00150 00151 Arguments: 00152 aPropertyID - The ID of the property you want to add as a column 00153 aBeforePropertyID - If specified, the new column will appear before the 00154 column that is bound to the specified property. If not specified, the 00155 column will be added to the end of the list. 00156 aWidth - The width in pixels of the column. If there has been a 00157 width set for this particular column then that width 00158 will be respected and this ignored. 00159 */ 00160 void insertColumnBefore( in AString aPropertyID, 00161 [optional] in AString aBeforePropertyID, 00162 [optional] in AString aWidth ); 00163 00170 /* 00171 Method: removeColumn() 00172 00173 Remove a column from the playlist 00174 00175 Arguments: 00176 aPropertyID - The ID of the property that is bound to the column you wish 00177 to remove. 00178 */ 00179 void removeColumn( in AString aPropertyID ); 00180 00189 /* 00190 Method: getColumnPropertyIDByIndex() 00191 00192 Get the property ID bould to a particular column at a given index 00193 00194 Arguments: 00195 aIndex - The index of the column from which you want to retrieve the bound 00196 property 00197 00198 Returns: 00199 The ID of the property bound to the specified column 00200 */ 00201 AString getColumnPropertyIDByIndex( in unsigned long aIndex ); 00202 00211 /* 00212 Method: setSortColumn() 00213 00214 Set the sort of the web playlist 00215 00216 Arguments: 00217 aPropertyID - The ID of the property that is bound to the column you wish 00218 to sort. 00219 aIsAscending - True if the sort should be ascending, false if the sort 00220 should be descending. 00221 */ 00222 void setSortColumn( in AString aPropertyID, 00223 in boolean aIsAscending ); 00224 00231 readonly attribute sbIPlaylistClickEvent lastClickEvent; 00232 };