add handler for motion/button events
[uwplayer.git] / application / window.h
index eb47127..4424273 100644 (file)
@@ -21,8 +21,8 @@
  */
 
 
-#ifndef WINDOW_H
-#define WINDOW_H
+#ifndef UWP_WINDOW_H
+#define UWP_WINDOW_H
 
 #include <Xm/XmAll.h>
 #include <stdbool.h>
@@ -33,10 +33,18 @@ extern "C" {
 #endif
 
 typedef struct Player {
+    char *tmp;
     pid_t process;
-    int in;
-    int out;
+    int log;
+    int ipc;
+    int status;
     bool isactive;
+    bool isstarted;
+    Window window;
+    double playback_time;
+    int width;
+    int height;
+    int osd_height;
 } Player;
     
 typedef struct MainWindow {
@@ -47,19 +55,34 @@ typedef struct MainWindow {
     Player *player;
     bool fullscreen;
     bool mbvisible;
+    bool cursorhidden;
+    bool buttongrab;
 } 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 WindowSetFile(MainWindow *win, char *file);
+
+void WindowAdjustAspectRatio(MainWindow *win);
+
+void WindowClosePlayer(MainWindow *win);
+
+void WindowHidePlayerCursor(MainWindow *win);
+void WindowShowPlayerCursor(MainWindow *win);
+
+void WindowPlayerWidgetEvent(MainWindow *win, XEvent *event);
+
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* WINDOW_H */
+#endif /* UWP_WINDOW_H */