Sun, 30 Oct 2005 23:00:47 +0000
[gaim-migrate @ 14198]
sf patch #1342817, from Evan Schoenberg
"As discussed in #gaim, this patch removes idle.c and replaces it
with gtkidle.c and gtkidle.h. The attached diff removes the idle
management from its various hiding places in connection.c, server.c,
and gaim.h. The plugins Changelog.API is appropriately updated.
The new gtkidle files are attached; idle.c should be removed from
CVS."
committer: Mark Doliner <markdoliner@pidgin.im>
| 11118 | 1 | #include "module.h" |
| 2 | ||
| 3 | MODULE = Gaim::Pref PACKAGE = Gaim::Pref PREFIX = gaim_plugin_pref_ | |
| 4 | PROTOTYPES: ENABLE | |
| 5 | ||
| 6 | void | |
| 7 | gaim_plugin_pref_add_choice(pref, label, choice) | |
| 8 | Gaim::PluginPref pref | |
| 9 | char *label | |
| 10 | gpointer choice | |
| 11 | ||
| 12 | void | |
| 13 | gaim_plugin_pref_destroy(pref) | |
| 14 | Gaim::PluginPref pref | |
| 15 | ||
| 16 | void | |
| 17 | gaim_plugin_pref_frame_add(frame, pref) | |
| 18 | Gaim::PluginPrefFrame frame | |
| 19 | Gaim::PluginPref pref | |
| 20 | ||
| 21 | void | |
| 22 | gaim_plugin_pref_frame_destroy(frame) | |
| 23 | Gaim::PluginPrefFrame frame | |
| 24 | ||
| 25 | void | |
| 26 | gaim_plugin_pref_frame_get_prefs(frame) | |
| 27 | Gaim::PluginPrefFrame frame | |
| 28 | PREINIT: | |
| 29 | GList *l; | |
| 30 | PPCODE: | |
| 31 | for (l = gaim_plugin_pref_frame_get_prefs(frame); l != NULL; l = l->next) { | |
| 32 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem"))); | |
| 33 | } | |
| 34 | ||
| 35 | Gaim::PluginPrefFrame | |
| 36 | gaim_plugin_pref_frame_new() | |
| 37 | ||
| 38 | ||
| 39 | void | |
| 40 | gaim_plugin_pref_get_bounds(pref, min, max) | |
| 41 | Gaim::PluginPref pref | |
| 42 | int *min | |
| 43 | int *max | |
| 44 | ||
| 45 | void | |
| 46 | gaim_plugin_pref_get_choices(pref) | |
| 47 | Gaim::PluginPref pref | |
| 48 | PREINIT: | |
| 49 | GList *l; | |
| 50 | PPCODE: | |
| 51 | for (l = gaim_plugin_pref_get_choices(pref); l != NULL; l = l->next) { | |
| 52 | XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem"))); | |
| 53 | } | |
| 54 | ||
| 55 | char * | |
| 56 | gaim_plugin_pref_get_label(pref) | |
| 57 | Gaim::PluginPref pref | |
| 58 | ||
| 59 | gboolean | |
| 60 | gaim_plugin_pref_get_masked(pref) | |
| 61 | Gaim::PluginPref pref | |
| 62 | ||
| 63 | unsigned int | |
| 64 | gaim_plugin_pref_get_max_length(pref) | |
| 65 | Gaim::PluginPref pref | |
| 66 | ||
| 67 | char * | |
| 68 | gaim_plugin_pref_get_name(pref) | |
| 69 | Gaim::PluginPref pref | |
| 70 | ||
| 71 | Gaim::PluginPrefType | |
| 72 | gaim_plugin_pref_get_type(pref) | |
| 73 | Gaim::PluginPref pref | |
| 74 | ||
| 75 | Gaim::PluginPref | |
| 76 | gaim_plugin_pref_new() | |
| 77 | ||
| 78 | ||
| 79 | Gaim::PluginPref | |
| 80 | gaim_plugin_pref_new_with_label(label) | |
| 81 | char *label | |
| 82 | ||
| 83 | Gaim::PluginPref | |
| 84 | gaim_plugin_pref_new_with_name(name) | |
| 85 | char *name | |
| 86 | ||
| 87 | Gaim::PluginPref | |
| 88 | gaim_plugin_pref_new_with_name_and_label(name, label) | |
| 89 | char *name | |
| 90 | char *label | |
| 91 | ||
| 92 | void | |
| 93 | gaim_plugin_pref_set_bounds(pref, min, max) | |
| 94 | Gaim::PluginPref pref | |
| 95 | int min | |
| 96 | int max | |
| 97 | ||
| 98 | void | |
| 99 | gaim_plugin_pref_set_label(pref, label) | |
| 100 | Gaim::PluginPref pref | |
| 101 | char *label | |
| 102 | ||
| 103 | void | |
| 104 | gaim_plugin_pref_set_masked(pref, mask) | |
| 105 | Gaim::PluginPref pref | |
| 106 | gboolean mask | |
| 107 | ||
| 108 | void | |
| 109 | gaim_plugin_pref_set_max_length(pref, max_length) | |
| 110 | Gaim::PluginPref pref | |
| 111 | unsigned int max_length | |
| 112 | ||
| 113 | void | |
| 114 | gaim_plugin_pref_set_name(pref, name) | |
| 115 | Gaim::PluginPref pref | |
| 116 | char *name | |
| 117 | ||
| 118 | void | |
| 119 | gaim_plugin_pref_set_type(pref, type) | |
| 120 | Gaim::PluginPref pref | |
| 121 | Gaim::PluginPrefType type | |
| 122 | CODE: | |
| 11170 | 123 | GaimPluginPrefType gpp_type = GAIM_PLUGIN_PREF_NONE; |
| 11118 | 124 | |
| 11170 | 125 | if (type == 1) { |
| 126 | gpp_type = GAIM_PLUGIN_PREF_CHOICE; | |
| 127 | } else if (type == 2) { | |
| 128 | gpp_type = GAIM_PLUGIN_PREF_INFO; | |
| 129 | } | |
| 130 | gaim_plugin_pref_set_type(pref, gpp_type); | |
| 131 |