handle btn1 in sidebar, switchable tracks
[uwplayer.git] / application / window.h
index 66db8ae..c00f29e 100644 (file)
@@ -27,6 +27,7 @@
 #include <Xm/XmAll.h>
 #include <stdbool.h>
 #include <unistd.h>
+#include <ucx/list.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -39,30 +40,78 @@ typedef struct Player {
     int ipc;
     int status;
     bool isactive;
-    
+    bool isstarted;
+    Window window;
     double playback_time;
     int width;
     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;
     Widget player_widget;
+    Widget sidebar;
     char *file;
     Player *player;
     bool fullscreen;
     bool mbvisible;
+    bool sidebarvisible;
+    bool cursorhidden;
+    bool buttongrab;
+    bool pwbuttonpressed;
+    
+    Widget playRepeatTrackButton;
+    Widget playRepeatListButton;
+    Widget playAutoPlayButton;
+    Widget viewSidebarButton;
+    
+    PlayList playlist;
+    
+    Time player_event_time;
+    Time button_press_time;
+    double motion_playback_time;
+    int mouse_x;
+    int mouse_y;
+    
+    
 } MainWindow;
 
 MainWindow* WindowCreate(Display *dp);
 
+MainWindow* GetMainWindow(void);
+
 void WindowShow(MainWindow *win);
 
 void WindowFullscreen(MainWindow *win, bool enableFullscreen);
 
 void WindowMenubarSetVisible(MainWindow *win, bool visible);
 
+void WindowAdjustAspectRatio(MainWindow *win);
+
+void WindowClosePlayer(MainWindow *win);
+
+void WindowHidePlayerCursor(MainWindow *win);
+void WindowShowPlayerCursor(MainWindow *win);
+
+void WindowHandlePlayerEvent(MainWindow *win, XEvent *event);
+
+void WindowHideSidebar(MainWindow *win);
+void WindowShowSidebar(MainWindow *win);
+
+void WindowUpdate(MainWindow *win);
+
+
 #ifdef __cplusplus
 }
 #endif