chiark / gitweb /
Remove tracks now works again. queue_entry pointers are now stashed
[disorder] / disobedience / disobedience.h
index 452526d9fd8f26ca818070dcc70e227db7d4bdd2..21f3bf6088ba5646b66d1302373e876a5624a7eb 100644 (file)
@@ -47,6 +47,7 @@
 #include "selection.h"
 #include "kvp.h"
 #include "eventdist.h"
+#include "split.h"
 
 #include <glib.h>
 #include <gtk/gtk.h>
@@ -86,12 +87,14 @@ struct callbackdata {
  * have some callbacks to set them appropriately.
  */
 struct tabtype {
-  int (*properties_sensitive)(GtkWidget *tab);
-  int (*selectall_sensitive)(GtkWidget *tab);
-  int (*selectnone_sensitive)(GtkWidget *tab);
-  void (*properties_activate)(GtkWidget *tab);
-  void (*selectall_activate)(GtkWidget *tab);
-  void (*selectnone_activate)(GtkWidget *tab);
+  int (*properties_sensitive)(void *extra);
+  int (*selectall_sensitive)(void *extra);
+  int (*selectnone_sensitive)(void *extra);
+  void (*properties_activate)(void *extra);
+  void (*selectall_activate)(void *extra);
+  void (*selectnone_activate)(void *extra);
+  void (*selected)(void);
+  void *extra;
 };
 
 /** @brief Button definitions */
@@ -111,6 +114,7 @@ extern GtkWidget *tabs;                 /* main tabs */
 extern disorder_eclient *client;        /* main client */
 
 extern unsigned long last_state;        /* last reported state */
+extern rights_type last_rights;         /* last reported rights bitmap */
 extern int playing;                     /* true if playing some track */
 extern int volume_l, volume_r;          /* current volume */
 extern double goesupto;                 /* volume upper bound */
@@ -134,8 +138,6 @@ void popup_protocol_error(int code,
 void properties(int ntracks, const char **tracks);
 /* Pop up a properties window for a list of tracks */
 
-void properties_reset(void);
-
 GtkWidget *scroll_widget(GtkWidget *child);
 /* Wrap a widget up for scrolling */
 
@@ -166,13 +168,7 @@ GtkWidget *create_buttons_box(struct button *buttons,
                               size_t nbuttons,
                               GtkWidget *box);
 
-/** @brief Type signature for a reset callback */
-typedef void reset_callback(void);
-
-void register_reset(reset_callback *callback);
-/* Register a reset callback */
-
-void reset(void);
+void logged_in(void);
 
 void all_update(void);
 /* Update everything */
@@ -218,6 +214,8 @@ void namepart_update(const char *track,
                      const char *part);
 /* Called when a namepart might have changed */
 
+extern struct queue_entry *playing_track;
+
 /* Choose */
 
 GtkWidget *choose_widget(void);
@@ -268,35 +266,6 @@ void load_settings(void);
 void set_tool_colors(GtkWidget *w);
 void popup_settings(void);
 
-/* Widget leakage debugging rubbish ---------------------------------------- */
-
-#if MDEBUG
-#define NW(what) do {                                   \
-  if(++current##what % 100 > max##what) {               \
-    fprintf(stderr, "%s:%d: %d %s\n",                   \
-            __FILE__, __LINE__, current##what, #what);  \
-    max##what = current##what;                          \
-  }                                                     \
-} while(0)
-#define WT(what) static int current##what, max##what
-#define DW(what) (--current##what)
-#else
-#define NW(what) do { } while(0)
-#define DW(what) do { } while(0)
-#define WT(what) struct neverused
-#endif
-
-#if MTRACK
-extern const char *mtag;
-#define MTAG(x) do { mtag = x; } while(0)
-#define MTAG_PUSH(x) do { const char *save_mtag = mtag; mtag = x; (void)0
-#define MTAG_POP() mtag = save_mtag; } while(0)
-#else
-#define MTAG(x) do { } while(0)
-#define MTAG_PUSH(x) do {} while(0)
-#define MTAG_POP() do {} while(0)
-#endif
-
 #endif /* DISOBEDIENCE_H */
 
 /*