pidgin/pidginkeypad.h

Thu, 25 Aug 2022 22:30:30 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 25 Aug 2022 22:30:30 -0500
branch
gtk4
changeset 41594
30ad4d17661f
parent 41478
27d70d93355d
child 42465
b7d530551c1b
permissions
-rw-r--r--

Remove the use of the removed popup-menu signal and fix the popup menu not displaying

Testing Done:
Double clicked a buddy to open a conversation and right clicked a buddy to make sure the contact menu came up.

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

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