pidgin/prefs/pidginprefsinternal.h

changeset 41366
789f96848a43
child 41381
acedeb1e8804
equal deleted inserted replaced
41365:90af2c22145c 41366:789f96848a43
1 /*
2 * Pidgin - Internet Messenger
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
4 *
5 * Pidgin is the legal property of its developers, whose names are too numerous
6 * to list here. Please refer to the COPYRIGHT file distributed with this
7 * source distribution.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
21 */
22
23 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
24 # error "only <pidgin.h> may be included directly"
25 #endif
26
27 #ifndef PIDGIN_PREFS_INTERNAL_H
28 #define PIDGIN_PREFS_INTERNAL_H
29
30 #include <purple.h>
31
32 typedef struct _PidginPrefCombo PidginPrefCombo;
33
34 typedef void (*PidginPrefsBindDropdownCallback)(GtkComboBox *combo_box,
35 PidginPrefCombo *combo);
36
37 struct _PidginPrefCombo {
38 GtkWidget *combo;
39 PurplePrefType type;
40 const gchar *key;
41 union {
42 const char *string;
43 int integer;
44 gboolean boolean;
45 } value;
46 gint previously_active;
47 gint current_active;
48 PidginPrefsBindDropdownCallback cb;
49 };
50
51 G_BEGIN_DECLS
52
53 G_GNUC_INTERNAL
54 void pidgin_prefs_bind_checkbox(const char *key, GtkWidget *button);
55
56 G_GNUC_INTERNAL
57 void pidgin_prefs_bind_dropdown(PidginPrefCombo *combo);
58
59 G_GNUC_INTERNAL
60 void pidgin_prefs_bind_dropdown_from_list(PidginPrefCombo *combo, GList *menuitems);
61
62 G_GNUC_INTERNAL
63 void pidgin_prefs_bind_entry(const char *key, GtkWidget *entry);
64
65 G_GNUC_INTERNAL
66 void pidgin_prefs_bind_spin_button(const char *key, GtkWidget *spin);
67
68 G_END_DECLS
69
70 #endif /* PIDGIN_PREFS_INTERNAL_H */

mercurial