Mon, 19 Mar 2007 19:06:57 +0000
merge of e171f61e7083d597d600624755c8543cac7012c1
and 90dc3adee5d20876eb1622470eb5c19406b6f0f1
| 11118 | 1 | #include "module.h" |
| 2 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
3 | MODULE = Purple::PluginPref PACKAGE = Purple::PluginPref::Frame PREFIX = purple_plugin_pref_frame_ |
| 11118 | 4 | PROTOTYPES: ENABLE |
| 5 | ||
| 12364 | 6 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
7 | purple_plugin_pref_frame_add(frame, pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
8 | Purple::PluginPref::Frame frame |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
9 | Purple::PluginPref pref |
| 11118 | 10 | |
| 12807 | 11 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
12 | purple_plugin_pref_frame_destroy(frame) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
13 | Purple::PluginPref::Frame frame |
| 11118 | 14 | |
| 15 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
16 | purple_plugin_pref_frame_get_prefs(frame) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
17 | Purple::PluginPref::Frame frame |
| 11118 | 18 | PREINIT: |
| 19 | GList *l; | |
| 20 | PPCODE: | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
21 | for (l = purple_plugin_pref_frame_get_prefs(frame); l != NULL; l = l->next) { |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
22 | XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::PluginPref"))); |
| 11118 | 23 | } |
| 12807 | 24 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
25 | Purple::PluginPref::Frame |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
26 | purple_plugin_pref_frame_new(class) |
| 12364 | 27 | C_ARGS: /* void */ |
| 11118 | 28 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
29 | MODULE = Purple::PluginPref PACKAGE = Purple::PluginPref PREFIX = purple_plugin_pref_ |
| 12364 | 30 | PROTOTYPES: ENABLE |
| 31 | ||
| 32 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
33 | purple_plugin_pref_add_choice(pref, label, choice) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
34 | Purple::PluginPref pref |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
35 | const char *label |
|
15127
5fc0e97f117d
[gaim-migrate @ 17849]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
36 | # Do the appropriate conversion based on the perl type specified. |
|
5fc0e97f117d
[gaim-migrate @ 17849]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
37 | # Currently only Strings and Ints will work. |
|
5fc0e97f117d
[gaim-migrate @ 17849]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
38 | gpointer choice = (SvPOKp($arg) ? SvPV($arg, PL_na) : (SvIOKp($arg) ? GINT_TO_POINTER(SvIV($arg)) : NULL)); |
| 12364 | 39 | |
| 40 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
41 | purple_plugin_pref_destroy(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
42 | Purple::PluginPref pref |
| 12364 | 43 | |
| 44 | ||
| 45 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
46 | purple_plugin_pref_get_bounds(pref, min, max) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
47 | Purple::PluginPref pref |
| 11118 | 48 | int *min |
| 49 | int *max | |
| 50 | ||
| 51 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
52 | purple_plugin_pref_get_choices(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
53 | Purple::PluginPref pref |
| 11118 | 54 | PREINIT: |
| 55 | GList *l; | |
| 56 | PPCODE: | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
57 | for (l = purple_plugin_pref_get_choices(pref); l != NULL; l = l->next) { |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
58 | XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::ListItem"))); |
| 11118 | 59 | } |
| 12807 | 60 | |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
61 | const char * |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
62 | purple_plugin_pref_get_label(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
63 | Purple::PluginPref pref |
| 11118 | 64 | |
| 12807 | 65 | gboolean |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
66 | purple_plugin_pref_get_masked(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
67 | Purple::PluginPref pref |
| 11118 | 68 | |
| 12807 | 69 | unsigned int |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
70 | purple_plugin_pref_get_max_length(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
71 | Purple::PluginPref pref |
| 11118 | 72 | |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
73 | const char * |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
74 | purple_plugin_pref_get_name(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
75 | Purple::PluginPref pref |
| 11118 | 76 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
77 | Purple::PluginPrefType |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
78 | purple_plugin_pref_get_type(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
79 | Purple::PluginPref pref |
| 11118 | 80 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
81 | Purple::PluginPref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
82 | purple_plugin_pref_new(class) |
| 12364 | 83 | C_ARGS: /* void */ |
| 11118 | 84 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
85 | Purple::PluginPref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
86 | purple_plugin_pref_new_with_label(class, label) |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
87 | const char *label |
| 12364 | 88 | C_ARGS: |
| 89 | label | |
| 11118 | 90 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
91 | Purple::PluginPref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
92 | purple_plugin_pref_new_with_name(class, name) |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
93 | const char *name |
| 12364 | 94 | C_ARGS: |
| 95 | name | |
| 11118 | 96 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
97 | Purple::PluginPref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
98 | purple_plugin_pref_new_with_name_and_label(class, name, label) |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
99 | const char *name |
|
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
100 | const char *label |
| 12364 | 101 | C_ARGS: |
| 102 | name, label | |
| 11118 | 103 | |
| 12807 | 104 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
105 | purple_plugin_pref_set_bounds(pref, min, max) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
106 | Purple::PluginPref pref |
| 11118 | 107 | int min |
| 108 | int max | |
| 109 | ||
| 12807 | 110 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
111 | purple_plugin_pref_set_label(pref, label) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
112 | Purple::PluginPref pref |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
113 | const char *label |
| 11118 | 114 | |
| 12807 | 115 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
116 | purple_plugin_pref_set_masked(pref, mask) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
117 | Purple::PluginPref pref |
| 11118 | 118 | gboolean mask |
| 119 | ||
| 12807 | 120 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
121 | purple_plugin_pref_set_max_length(pref, max_length) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
122 | Purple::PluginPref pref |
| 11118 | 123 | unsigned int max_length |
| 124 | ||
| 12807 | 125 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
126 | purple_plugin_pref_set_name(pref, name) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
127 | Purple::PluginPref pref |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
128 | const char *name |
| 11118 | 129 | |
| 12807 | 130 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
131 | purple_plugin_pref_set_type(pref, type) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
132 | Purple::PluginPref pref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
133 | Purple::PluginPrefType type |
| 12807 | 134 | PREINIT: |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
135 | PurplePluginPrefType gpp_type; |
| 11118 | 136 | CODE: |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
137 | gpp_type = PURPLE_PLUGIN_PREF_NONE; |
| 11118 | 138 | |
| 11170 | 139 | if (type == 1) { |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
140 | gpp_type = PURPLE_PLUGIN_PREF_CHOICE; |
| 11170 | 141 | } else if (type == 2) { |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
142 | gpp_type = PURPLE_PLUGIN_PREF_INFO; |
| 11170 | 143 | } |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
144 | purple_plugin_pref_set_type(pref, gpp_type); |