Code

the updated sources
[ncmpc.git] / src / screen.h
index d3cad8cb2ff30aa36c47272b6468a80d6db4d3b6..71489f211e8b584be8da11b80e97b381e7a92fd1 100644 (file)
@@ -3,35 +3,20 @@
 #include <ncurses.h>
 #include "list_window.h"
 
-/* minumum window size */
-#define SCREEN_MIN_COLS 14
-#define SCREEN_MIN_ROWS  5
-
 #define IS_PLAYING(s) (s==MPD_STATUS_STATE_PLAY)
 #define IS_PAUSED(s) (s==MPD_STATUS_STATE_PAUSE)
 #define IS_STOPPED(s) (!(IS_PLAYING(s) | IS_PAUSED(s)))
 
-
-typedef enum
-{
-  SCREEN_PLAY_WINDOW = 0,
-  SCREEN_FILE_WINDOW,
-  SCREEN_HELP_WINDOW,
-  SCREEN_KEYDEF_WINDOW,
-  SCREEN_CLOCK_WINDOW,
-  SCREEN_SEARCH_WINDOW
-
-} screen_mode_t;
+#define MAX_SONGNAME_LENGTH   512
 
 typedef struct
 {
   WINDOW *w;
   int rows, cols;
-
+  int cur_action_id;
 } window_t;
 
 
-
 typedef struct
 {
   window_t top_window;
@@ -39,16 +24,15 @@ typedef struct
   window_t progress_window;
   window_t status_window;
 
-  GList *screen_list;
-
-  time_t start_timestamp;
-  time_t status_timestamp;
-  time_t input_timestamp;
-  command_t last_cmd;
+  /* GTime is equivalent to time_t */
+  GTime start_timestamp;
+  GTime status_timestamp;
+  GTime input_timestamp;
+  GTime last_cmd;
 
   int cols, rows;
 
-  screen_mode_t mode;
+  int mode;
 
   char *buf;
   size_t buf_size;
@@ -99,6 +83,8 @@ void screen_update(mpdclient_t *c);
 void screen_idle(mpdclient_t *c);
 void screen_cmd(mpdclient_t *c, command_t cmd);
 
+
+gint get_cur_mode_id();
 int screen_get_mouse_event(mpdclient_t *c,
                           list_window_t *lw, int lw_length, 
                           unsigned long *bstate, int *row);