1
0

pldir.mi 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //----------------------------------------------------------------------------------------------------------------
  2. // pldir.mi
  3. //
  4. // standard handles for PlEdit manipulation
  5. //----------------------------------------------------------------------------------------------------------------
  6. extern class @{345BEEBC-0229-4921-90BE-6CB6A49A79D9}@ Object _predecl &PlEdit; // Our Winamp Playlist Editor
  7. extern class @{61A7ABAD-7D79-41f6-B1D0-E1808603A4F4}@ Object _predecl PlDir; // <PlEditDirectory/>
  8. //*****************************************************************************
  9. // PlEdit CLASS
  10. //*****************************************************************************
  11. /**
  12. PlEdit Class.
  13. @short Our main PlEdit Editor.
  14. @author Nullsoft Inc.
  15. @ver 1.0
  16. */
  17. // General PlEdit Information
  18. extern int PlEdit.getNumTracks (); // Returns total number of tracks
  19. extern int PlEdit.getCurrentIndex (); // Index of the currently Playing Item
  20. extern int PlEdit.getNumSelectedTracks ();
  21. extern int PlEdit.getNextSelectedTrack (int i);
  22. // Manipulate PlEdit View
  23. extern PlEdit.showCurrentlyPlayingTrack (); // Scrolls the PL to the currently playling item (mostly used with onKeyDown: space)
  24. extern PlEdit.showTrack (int item);
  25. // Manipulate PlEdit Entries
  26. extern PlEdit.enqueueFile (string file); // Enqueues a file at the end of the PL
  27. extern PlEdit.clear ();
  28. extern PlEdit.removeTrack (int item); // Removes a specific Track from PL
  29. extern PlEdit.swapTracks (int item1, int item2); // Changes the position of item1 and item2
  30. extern PlEdit.moveUp (int item); // Moves item one position up
  31. extern PlEdit.moveDown (int item); // Moves item one position down
  32. extern PlEdit.moveTo (int item, int pos); // Moves an item to a new position in our PlEdit (this one is faster as calling multiple swaps in maki)
  33. extern PlEdit.playTrack (int item);
  34. // Metadata Stuff
  35. extern int PlEdit.getRating (int item);
  36. extern PlEdit.setRating (int item, int rating); // Sets Rating of track #item to a value from 0-5
  37. extern String PlEdit.getTitle (int item);
  38. extern String PlEdit.getLength (int item);
  39. extern String PlEdit.getMetaData (int item, String metadatastring); // You know the metadata strings, don't you?
  40. extern String PlEdit.getFileName (int item);
  41. /**
  42. Hookable.
  43. You need to instanciate a PlEdit object first. so basically it goes like this:
  44. Global PlEdit PeListener;
  45. System.onScriptLoaded ()
  46. {
  47. PeListener = new PlEdit;
  48. }
  49. PeListener.onPleditModified ()
  50. {
  51. // Do some crazy stuff
  52. }
  53. */
  54. extern PlEdit.onPleditModified ();
  55. //*****************************************************************************
  56. // PlDir CLASS
  57. //*****************************************************************************
  58. /**
  59. PlDir Class.
  60. @short Handles for the <PlEditDirectory/> XML object and ML PlEdits view.
  61. @author Nullsoft Inc.
  62. @ver 1.0
  63. */
  64. // General PlEdits Information
  65. extern int PlDir.getNumItems (); // Returns total number of stored PlEdits in your ml
  66. extern String PlDir.getItemName (int item);
  67. // Manipulate PlDir View
  68. extern PlDir.showCurrentlyPlayingEntry (); // Backwards Compatibility (wa3 relict), does the same as PlEdit.showCurrentlyPlayingTrack ()
  69. extern PlDir.refresh(); // Not working 100% on ml lists
  70. // Manipulate PlDir Entries
  71. extern PlDir.renameItem (int item, String name);
  72. // Playback funtions
  73. extern PlDir.enqueueItem (int item);
  74. extern PlDir.playItem (int item);