pidgin/pidginkeypad.h

Sun, 28 Aug 2022 21:53:47 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Sun, 28 Aug 2022 21:53:47 -0500
branch
gtk4
changeset 41613
4be49932c288
parent 41478
27d70d93355d
child 42465
b7d530551c1b
permissions
-rw-r--r--

Set volume on audio test pipeline at startup

If you change the volume slider in prefs, then the Test Audio button does not respect that initially. If you move the slider around with the test playing, then the volume jumps to whatever you have. But stopping and starting the test again goes to full volume.

Testing Done:
Opened prefs, set to test source, made volume really low, and hit Test Audio. Output volume was low immediately.

Reviewed at https://reviews.imfreedom.org/r/1670/

41478
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
1 /*
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
2 * Pidgin - Internet Messenger
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
4 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
7 * source distribution.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
8 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
12 * (at your option) any later version.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
13 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
17 * GNU General Public License for more details.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
18 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
21 */
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
22
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
23 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
24 # error "only <pidgin.h> may be included directly"
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
25 #endif
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
26
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
27 #ifndef PIDGIN_KEYPAD_H
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
28 #define PIDGIN_KEYPAD_H
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
29
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
30 #include <gtk/gtk.h>
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
31
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
32 #include <purple.h>
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
33
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
34 /**
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
35 * PidginKeypad:
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
36 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
37 * #PidginKeypad is a widget that displays a DTMF keypad, with the digits 0-9,
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
38 * an asterisk, and a number sign.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
39 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
40 * Since: 3.0.0
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
41 */
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
42
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
43 G_BEGIN_DECLS
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
44
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
45 #define PIDGIN_TYPE_KEYPAD pidgin_keypad_get_type()
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
46 G_DECLARE_FINAL_TYPE(PidginKeypad, pidgin_keypad, PIDGIN, KEYPAD, GtkGrid)
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
47
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
48 /**
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
49 * pidgin_keypad_new:
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
50 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
51 * Creates a new #PidginKeypad.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
52 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
53 * Returns: (transfer full): The new instance.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
54 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
55 * Since: 3.0.0
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
56 */
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
57 GtkWidget *pidgin_keypad_new(void);
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
58
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
59 /**
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
60 * pidgin_keypad_set_key_capture_widget:
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
61 * @keypad: The keypad.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
62 * @widget: A widget to capture keys from.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
63 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
64 * Sets @widget as the widget that @keypad will capture key events from.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
65 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
66 * If key events are handled by the keypad, the DTMF digits will be captured
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
67 * and trigger the pressed signal on @keypad.
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
68 *
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
69 * Since: 3.0.0
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
70 */
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
71 void pidgin_keypad_set_key_capture_widget(PidginKeypad *keypad, GtkWidget *widget);
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
72
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
73 G_END_DECLS
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
74
27d70d93355d Split keypad into its own widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff changeset
75 #endif /* PIDGIN_KEYPAD_H */

mercurial