Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
* Copyright (C) 2022 Marco Melorio |
3 |
|
|
* |
4 |
|
|
* This program is free software; you can redistribute it and/or |
5 |
|
|
* modify it under the terms of the GNU General Public License as |
6 |
|
|
* published by the Free Software Foundation; either version 2 of the |
7 |
|
|
* License, or (at your option) any later version. |
8 |
|
|
* |
9 |
|
|
* This program is distributed in the hope that it will be useful, but |
10 |
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 |
|
|
* Lesser General Public License for more details. |
13 |
|
|
* |
14 |
|
|
* You should have received a copy of the GNU General Public License |
15 |
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>. |
16 |
|
|
*/ |
17 |
|
|
|
18 |
|
|
#include "cc-output-test-wheel.h" |
19 |
|
|
#include "cc-output-test-window.h" |
20 |
|
|
|
21 |
|
|
struct _CcOutputTestWindow |
22 |
|
|
{ |
23 |
|
|
AdwDialog parent_instance; |
24 |
|
|
|
25 |
|
|
CcOutputTestWheel *wheel; |
26 |
|
|
}; |
27 |
|
|
|
28 |
|
✗ |
G_DEFINE_TYPE (CcOutputTestWindow, cc_output_test_window, ADW_TYPE_DIALOG) |
29 |
|
|
|
30 |
|
|
void |
31 |
|
✗ |
cc_output_test_window_class_init (CcOutputTestWindowClass *klass) |
32 |
|
|
{ |
33 |
|
✗ |
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); |
34 |
|
|
|
35 |
|
✗ |
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/sound/cc-output-test-window.ui"); |
36 |
|
|
|
37 |
|
✗ |
gtk_widget_class_bind_template_child (widget_class, CcOutputTestWindow, wheel); |
38 |
|
|
|
39 |
|
✗ |
g_type_ensure (CC_TYPE_OUTPUT_TEST_WHEEL); |
40 |
|
✗ |
} |
41 |
|
|
|
42 |
|
|
void |
43 |
|
✗ |
cc_output_test_window_init (CcOutputTestWindow *self) |
44 |
|
|
{ |
45 |
|
✗ |
gtk_widget_init_template (GTK_WIDGET (self)); |
46 |
|
✗ |
} |
47 |
|
|
|
48 |
|
|
CcOutputTestWindow * |
49 |
|
✗ |
cc_output_test_window_new (GvcMixerStream *stream) |
50 |
|
|
{ |
51 |
|
|
CcOutputTestWindow *self; |
52 |
|
|
|
53 |
|
✗ |
self = g_object_new (CC_TYPE_OUTPUT_TEST_WINDOW, NULL); |
54 |
|
|
|
55 |
|
✗ |
cc_output_test_wheel_set_stream (self->wheel, stream); |
56 |
|
|
|
57 |
|
✗ |
return self; |
58 |
|
|
} |
59 |
|
|
|