From c2c3cab90ad6375bcd4bd976f802d29e19a8d0f4 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 19 Dec 2011 10:15:03 +0100 Subject: Rename sink.h to ctl.h --- src/Makefile.am | 2 +- src/command.c | 2 +- src/ctl.h | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/interface.c | 2 +- src/pa-sink-ctl.c | 2 +- src/sink.h | 62 ------------------------------------------------------- 6 files changed, 66 insertions(+), 66 deletions(-) create mode 100644 src/ctl.h delete mode 100644 src/sink.h (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 19decc4..4401bfa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,4 +11,4 @@ AM_CPPFLAGS = $(PULSE_CFLAGS) $(PULSE_MAINLOOP_CFLAGS) $(GLIB_CFLAGS) \ -include $(top_builddir)/config.h pa_sink_ctl_LDADD = $(GLIB_LIBS) $(PULSE_LIBS) $(PULSE_MAINLOOP_LIBS) $(CURSES_LIBS) -noinst_HEADERS = interface.h command.h config.h pa-sink-ctl.h sink.h unix_signal.h +noinst_HEADERS = interface.h command.h config.h pa-sink-ctl.h ctl.h unix_signal.h diff --git a/src/command.c b/src/command.c index 4da2aa2..47e42a4 100644 --- a/src/command.c +++ b/src/command.c @@ -21,7 +21,7 @@ #include "pa-sink-ctl.h" #include "interface.h" -#include "sink.h" +#include "ctl.h" #include "command.h" static int diff --git a/src/ctl.h b/src/ctl.h new file mode 100644 index 0000000..eb169b1 --- /dev/null +++ b/src/ctl.h @@ -0,0 +1,62 @@ +/* + * pa-sink-ctl - NCurses based Pulseaudio control client + * Copyright (C) 2011 Benjamin Franzke + * Copyright (C) 2010 Jan Klemkow + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef SINK_H +#define SINK_H + +#include +#include + +struct context; + +struct vol_ctl { + guint32 index; + gchar *name; /* displayed name */ + gint indent; /* indentation when displayed */ + gboolean hide_index; + + pa_volume_t vol; // TOTO: exchange with the channel-list + gint mute; + guint8 channels; + + pa_operation *(*mute_set)(pa_context *, guint32, int, + pa_context_success_cb_t, void *); + + pa_operation *(*volume_set)(pa_context *, guint32, const pa_cvolume *, + pa_context_success_cb_t, gpointer); + + void (*childs_foreach)(struct vol_ctl *ctx, GFunc func, gpointer udata); +}; + +struct main_ctl { + struct vol_ctl base; + gint priority; + + GList **childs_list; + + pa_operation *(*move_child)(pa_context *, guint32 idx, guint32 parent_idx, + pa_context_success_cb_t, gpointer); +}; + +struct slave_ctl { + struct vol_ctl base; + guint32 parent_index; +}; + +#endif diff --git a/src/interface.c b/src/interface.c index f168b71..d4b65e7 100644 --- a/src/interface.c +++ b/src/interface.c @@ -27,7 +27,7 @@ #include #include "interface.h" -#include "sink.h" +#include "ctl.h" #include "command.h" #include "pa-sink-ctl.h" diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c index f6b6fb4..70c5ffa 100644 --- a/src/pa-sink-ctl.c +++ b/src/pa-sink-ctl.c @@ -22,7 +22,7 @@ #include #include -#include "sink.h" +#include "ctl.h" #include "interface.h" #include "config.h" #include "pa-sink-ctl.h" diff --git a/src/sink.h b/src/sink.h deleted file mode 100644 index eb169b1..0000000 --- a/src/sink.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * pa-sink-ctl - NCurses based Pulseaudio control client - * Copyright (C) 2011 Benjamin Franzke - * Copyright (C) 2010 Jan Klemkow - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef SINK_H -#define SINK_H - -#include -#include - -struct context; - -struct vol_ctl { - guint32 index; - gchar *name; /* displayed name */ - gint indent; /* indentation when displayed */ - gboolean hide_index; - - pa_volume_t vol; // TOTO: exchange with the channel-list - gint mute; - guint8 channels; - - pa_operation *(*mute_set)(pa_context *, guint32, int, - pa_context_success_cb_t, void *); - - pa_operation *(*volume_set)(pa_context *, guint32, const pa_cvolume *, - pa_context_success_cb_t, gpointer); - - void (*childs_foreach)(struct vol_ctl *ctx, GFunc func, gpointer udata); -}; - -struct main_ctl { - struct vol_ctl base; - gint priority; - - GList **childs_list; - - pa_operation *(*move_child)(pa_context *, guint32 idx, guint32 parent_idx, - pa_context_success_cb_t, gpointer); -}; - -struct slave_ctl { - struct vol_ctl base; - guint32 parent_index; -}; - -#endif -- cgit