playlist.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. enum {
  2. PLGNONE = 0x0000,
  3. PLGNORM = 0x0001,
  4. PLGSHUF = 0x0002,
  5. PLGRAND = 0x0003,
  6. PLGTYPE = 0x000F,
  7. PLSAUTO = 0x0000,
  8. PLSCMP = 0x0010,
  9. PLSGLOB = 0x0020,
  10. PLSBRE = 0x0030,
  11. PLSERE = 0x0040,
  12. PLSTYPE = 0x00F0,
  13. PLRNONE = 0x0000,
  14. PLRONCE = 0x0100,
  15. PLRFULL = 0x0200,
  16. PLRTYPE = 0x0300,
  17. PLVQUIET = 0x0000,
  18. PLVSIMPLE = 0x0400,
  19. PLVFULL = 0x0800,
  20. PLVTYPE = 0x0C00,
  21. PLLOOP = 0x1000,
  22. PLGOTO = 0x2000
  23. };
  24. struct playlist;
  25. struct playlist *playlist_create(size_t, int);
  26. void playlist_destroy(struct playlist *);
  27. void playlist_loop(struct playlist *);
  28. void playlist_onadd(struct playlist *,
  29. void (*)(void *, const char *), void *);
  30. void playlist_onrem(struct playlist *,
  31. void (*)(void *, const char *), void *);
  32. void playlist_gbegin(struct playlist *, int);
  33. int playlist_gend(struct playlist *);
  34. void playlist_append(struct playlist *, const char *);
  35. int playlist_add(struct playlist *, const char *, int);
  36. int playlist_rem(struct playlist *, const char *, int);
  37. const char *playlist_current(struct playlist *);
  38. const char *playlist_next(struct playlist *);
  39. const char *playlist_prev(struct playlist *);
  40. const char *playlist_search(struct playlist *, const char *, int);
  41. #define playlist_goto(p, s, f) playlist_search((p), (s), (f) | PLGOTO)