add playlist data structure
[uwplayer.git] / application / window.h
index e3202c0..617ff71 100644 (file)
@@ -27,6 +27,7 @@
 #include <Xm/XmAll.h>
 #include <stdbool.h>
 #include <unistd.h>
+#include <ucx/list.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -46,7 +47,16 @@ typedef struct Player {
     int height;
     int osd_height;
 } Player;
+
+typedef struct {
+    UcxList *tracks;
+    int current_track;
     
+    Boolean repeatTrack;
+    Boolean repeatList;
+    Boolean autoplayFolder;
+} PlayList;
+
 typedef struct MainWindow {
     Widget window;
     Widget menubar;
@@ -66,15 +76,15 @@ typedef struct MainWindow {
     Widget playAutoPlayButton;
     Widget viewSidebarButton;
     
+    PlayList playlist;
+    
     Time player_event_time;
     Time button_press_time;
     double motion_playback_time;
     int mouse_x;
     int mouse_y;
     
-    Boolean repeatTrack;
-    Boolean repeatList;
-    Boolean autoplayFolder;
+    
 } MainWindow;
 
 MainWindow* WindowCreate(Display *dp);
@@ -87,8 +97,6 @@ void WindowFullscreen(MainWindow *win, bool enableFullscreen);
 
 void WindowMenubarSetVisible(MainWindow *win, bool visible);
 
-void WindowSetFile(MainWindow *win, char *file);
-
 void WindowAdjustAspectRatio(MainWindow *win);
 
 void WindowClosePlayer(MainWindow *win);
@@ -101,6 +109,7 @@ void WindowHandlePlayerEvent(MainWindow *win, XEvent *event);
 void WindowHideSidebar(MainWindow *win);
 void WindowShowSidebar(MainWindow *win);
 
+
 #ifdef __cplusplus
 }
 #endif