summaryrefslogtreecommitdiff
path: root/src/pa-sink-ctl.h
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-18 20:38:49 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-18 20:46:24 +0100
commit5df1089fdc67d1853b11edf3295b659c068c2ec8 (patch)
tree03211a3c9ff617d9464de84da194e4d0bff98a16 /src/pa-sink-ctl.h
parent6c177cfa63af0433da3b17a3c85aab9dc52aefda (diff)
downloadpa-sink-ctl-5df1089fdc67d1853b11edf3295b659c068c2ec8.tar.gz
pa-sink-ctl-5df1089fdc67d1853b11edf3295b659c068c2ec8.tar.bz2
pa-sink-ctl-5df1089fdc67d1853b11edf3295b659c068c2ec8.zip
Move interface related properties into new interface struct
Diffstat (limited to 'src/pa-sink-ctl.h')
-rw-r--r--src/pa-sink-ctl.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/pa-sink-ctl.h b/src/pa-sink-ctl.h
index bc93ccb..e3eebdd 100644
--- a/src/pa-sink-ctl.h
+++ b/src/pa-sink-ctl.h
@@ -22,38 +22,22 @@
#include <glib.h>
#include <pulse/pulseaudio.h>
-#include <ncurses.h>
+#include <stddef.h>
#include "config.h"
+#include "interface.h"
struct context {
pa_context *context;
pa_operation *op;
gboolean context_ready;
- WINDOW *menu_win;
- WINDOW *msg_win;
- gint volume_bar_len;
- gchar *volume_bar;
-
- guint resize_source_id;
-#ifdef HAVE_SIGNALFD
- int signal_fd;
-#endif
- guint input_source_id;
-
- gint chooser_sink;
- gint chooser_input;
-
- guint max_name_len;
-
GMainLoop *loop;
GList *sink_list;
GList *input_list;
- gchar *status;
-
+ struct interface interface;
struct config config;
int return_value;
};
@@ -70,4 +54,8 @@ quit(struct context *ctx);
#define list_foreach(list, el) \
for (GList *__l = (list); __l && ((el) = __l->data); __l = __l->next)
+#define container_of(ptr, type, member) \
+ (type *)(((char *) ((const __typeof__( ((type *)0)->member ) *)(ptr))) \
+ - offsetof(type,member) )
+
#endif