From 5df1089fdc67d1853b11edf3295b659c068c2ec8 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 18 Dec 2011 20:38:49 +0100 Subject: Move interface related properties into new interface struct --- src/pa-sink-ctl.h | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'src/pa-sink-ctl.h') 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 #include -#include +#include #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 -- cgit