Debian Codegraph @

src/widget-gain.h

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2022-2025 Geoffrey D. Bennett <[email protected]>
2 // SPDX-License-Identifier: GPL-3.0-or-later
3
4 #pragma once
5
6 #include <gtk/gtk.h>
7
8 #include "alsa.h"
9
10 enum {
11 WIDGET_GAIN_TAPER_LINEAR,
12 WIDGET_GAIN_TAPER_LOG,
13 WIDGET_GAIN_TAPER_GEN4_VOLUME
14 };
15
16 GtkWidget *make_gain_alsa_elem(
17 struct alsa_elem *elem,
18 int zero_is_off,
19 int taper_type,
20 int can_control,
21 gboolean show_level
22 );
23
24 // Get the dial widget from a gain widget container (for level updates)
25 GtkWidget *get_gain_dial(GtkWidget *gain_widget);
26
27 // Clean up a gain widget (remove callbacks) before destroying it
28 // Must be called before unreffing/destroying the widget
29 void cleanup_gain_widget(GtkWidget *gain_widget);
30
31 // Maximum number of elements that can be controlled by a stereo gain widget
32 #define MAX_STEREO_GAIN_ELEMS 4
33
34 // Create a stereo gain widget controlling multiple elements in sync
35 // All elements must have compatible value ranges
36 GtkWidget *make_stereo_gain_alsa_elem(
37 struct alsa_elem **elems,
38 int elem_count,
39 int zero_is_off,
40 int taper_type,
41 int can_control,
42 gboolean show_level
43 );