Wed, 26 Jun 2013 03:08:58 +0530
Begun adding GObject code to conversation sources
| 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 | ||
|
16773
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
6 | BOOT: |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
7 | { |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
8 | HV *string_format_stash = gv_stashpv("Purple::String::Format::Type", 1); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
9 | HV *plugin_pref_stash = gv_stashpv("Purple::PluginPref::Type", 1); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
10 | |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
11 | static const constiv *civ, string_format_const_iv[] = { |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
12 | #define const_iv(name) {#name, (IV)PURPLE_STRING_FORMAT_TYPE_##name} |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
13 | const_iv(NONE), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
14 | const_iv(MULTILINE), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
15 | const_iv(HTML), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
16 | }; |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
17 | static const constiv plugin_pref_const_iv[] = { |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
18 | #undef const_iv |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
19 | #define const_iv(name) {#name, (IV)PURPLE_PLUGIN_PREF_##name} |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
20 | const_iv(NONE), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
21 | const_iv(CHOICE), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
22 | const_iv(INFO), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
23 | const_iv(STRING_FORMAT), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
24 | }; |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
25 | |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
26 | for (civ = string_format_const_iv + sizeof(string_format_const_iv) / sizeof(string_format_const_iv[0]); civ-- > string_format_const_iv; ) |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
27 | newCONSTSUB(string_format_stash, (char *)civ->name, newSViv(civ->iv)); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
28 | |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
29 | for (civ = plugin_pref_const_iv + sizeof(plugin_pref_const_iv) / sizeof(plugin_pref_const_iv[0]); civ-- > plugin_pref_const_iv; ) |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
30 | newCONSTSUB(plugin_pref_stash, (char *)civ->name, newSViv(civ->iv)); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
31 | } |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
32 | |
| 12364 | 33 | 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
|
34 | 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
|
35 | 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
|
36 | Purple::PluginPref pref |
| 11118 | 37 | |
| 12807 | 38 | 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
|
39 | 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
|
40 | Purple::PluginPref::Frame frame |
| 11118 | 41 | |
| 42 | 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
|
43 | 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
|
44 | Purple::PluginPref::Frame frame |
| 11118 | 45 | PREINIT: |
| 46 | GList *l; | |
| 47 | 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
|
48 | 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
|
49 | XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::PluginPref"))); |
| 11118 | 50 | } |
| 12807 | 51 | |
|
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::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
|
53 | purple_plugin_pref_frame_new(class) |
| 12364 | 54 | C_ARGS: /* void */ |
| 11118 | 55 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
56 | MODULE = Purple::PluginPref PACKAGE = Purple::PluginPref PREFIX = purple_plugin_pref_ |
| 12364 | 57 | PROTOTYPES: ENABLE |
| 58 | ||
| 59 | 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
|
60 | 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
|
61 | Purple::PluginPref pref |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
62 | const char *label |
|
15127
5fc0e97f117d
[gaim-migrate @ 17849]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
63 | # Do the appropriate conversion based on the perl type specified. |
|
5fc0e97f117d
[gaim-migrate @ 17849]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
64 | # Currently only Strings and Ints will work. |
|
23980
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
21641
diff
changeset
|
65 | gpointer choice = (SvPOKp($arg) ? SvPVutf8_nolen($arg) : (SvIOKp($arg) ? GINT_TO_POINTER(SvIV($arg)) : NULL)); |
| 12364 | 66 | |
| 67 | 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
|
68 | 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
|
69 | Purple::PluginPref pref |
| 12364 | 70 | |
| 71 | ||
| 72 | void | |
|
25380
7f73ff8b8b81
Make Purple::PluginPref->get_bounds be more perl-like.
Etan Reisner <deryni@pidgin.im>
parents:
23981
diff
changeset
|
73 | purple_plugin_pref_get_bounds(pref, OUTLIST int min, OUTLIST int max) |
|
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::PluginPref pref |
|
25380
7f73ff8b8b81
Make Purple::PluginPref->get_bounds be more perl-like.
Etan Reisner <deryni@pidgin.im>
parents:
23981
diff
changeset
|
75 | # According to the perlxs manual page we shouldn't need to specify a |
|
7f73ff8b8b81
Make Purple::PluginPref->get_bounds be more perl-like.
Etan Reisner <deryni@pidgin.im>
parents:
23981
diff
changeset
|
76 | # prototype here because "[p]arameters preceded by OUTLIST keyword do |
|
7f73ff8b8b81
Make Purple::PluginPref->get_bounds be more perl-like.
Etan Reisner <deryni@pidgin.im>
parents:
23981
diff
changeset
|
77 | # not appear in the usage signature of the generated Perl function." |
|
7f73ff8b8b81
Make Purple::PluginPref->get_bounds be more perl-like.
Etan Reisner <deryni@pidgin.im>
parents:
23981
diff
changeset
|
78 | # however that appears to only work for the usage error message and |
|
7f73ff8b8b81
Make Purple::PluginPref->get_bounds be more perl-like.
Etan Reisner <deryni@pidgin.im>
parents:
23981
diff
changeset
|
79 | # not for the call to newXSproto. Since I can't find any documentation |
|
7f73ff8b8b81
Make Purple::PluginPref->get_bounds be more perl-like.
Etan Reisner <deryni@pidgin.im>
parents:
23981
diff
changeset
|
80 | # for newXSproto at the moment I have no idea if that matters so |
|
7f73ff8b8b81
Make Purple::PluginPref->get_bounds be more perl-like.
Etan Reisner <deryni@pidgin.im>
parents:
23981
diff
changeset
|
81 | # override the prototype here. |
|
7f73ff8b8b81
Make Purple::PluginPref->get_bounds be more perl-like.
Etan Reisner <deryni@pidgin.im>
parents:
23981
diff
changeset
|
82 | PROTOTYPE: $ |
| 11118 | 83 | |
| 84 | 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
|
85 | 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
|
86 | Purple::PluginPref pref |
| 11118 | 87 | PREINIT: |
| 88 | GList *l; | |
| 89 | 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
|
90 | 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
|
91 | XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::ListItem"))); |
| 11118 | 92 | } |
| 12807 | 93 | |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
94 | 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
|
95 | 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
|
96 | Purple::PluginPref pref |
| 11118 | 97 | |
| 12807 | 98 | 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
|
99 | 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
|
100 | Purple::PluginPref pref |
| 11118 | 101 | |
|
21641
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
102 | Purple::String::Format::Type |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
103 | purple_plugin_pref_get_format_type(pref) |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
104 | Purple::PluginPref pref |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
105 | |
| 12807 | 106 | 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
|
107 | 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
|
108 | Purple::PluginPref pref |
| 11118 | 109 | |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
110 | 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
|
111 | 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
|
112 | Purple::PluginPref pref |
| 11118 | 113 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
114 | 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
|
115 | 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
|
116 | Purple::PluginPref pref |
| 11118 | 117 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
118 | 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
|
119 | purple_plugin_pref_new(class) |
| 12364 | 120 | C_ARGS: /* void */ |
| 11118 | 121 | |
|
15894
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 |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
123 | purple_plugin_pref_new_with_label(class, label) |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
124 | const char *label |
| 12364 | 125 | C_ARGS: |
| 126 | label | |
| 11118 | 127 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
128 | 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
|
129 | purple_plugin_pref_new_with_name(class, name) |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
130 | const char *name |
| 12364 | 131 | C_ARGS: |
| 132 | name | |
| 11118 | 133 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
134 | 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
|
135 | 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
|
136 | const char *name |
|
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
137 | const char *label |
| 12364 | 138 | C_ARGS: |
| 139 | name, label | |
| 11118 | 140 | |
| 12807 | 141 | 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
|
142 | 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
|
143 | Purple::PluginPref pref |
| 11118 | 144 | int min |
| 145 | int max | |
| 146 | ||
| 12807 | 147 | 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
|
148 | 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
|
149 | Purple::PluginPref pref |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
150 | const char *label |
| 11118 | 151 | |
| 12807 | 152 | 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
|
153 | 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
|
154 | Purple::PluginPref pref |
| 11118 | 155 | gboolean mask |
| 156 | ||
| 12807 | 157 | void |
|
21641
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
158 | purple_plugin_pref_set_format_type(pref, format) |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
159 | Purple::PluginPref pref |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
160 | Purple::String::Format::Type format |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
161 | |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
162 | 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
|
163 | 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
|
164 | Purple::PluginPref pref |
| 11118 | 165 | unsigned int max_length |
| 166 | ||
| 12807 | 167 | 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
|
168 | 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
|
169 | Purple::PluginPref pref |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
170 | const char *name |
| 11118 | 171 | |
| 12807 | 172 | 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
|
173 | 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
|
174 | 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
|
175 | Purple::PluginPrefType type |
| 12807 | 176 | 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
|
177 | PurplePluginPrefType gpp_type; |
| 11118 | 178 | 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
|
179 | gpp_type = PURPLE_PLUGIN_PREF_NONE; |
| 11118 | 180 | |
| 11170 | 181 | 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
|
182 | gpp_type = PURPLE_PLUGIN_PREF_CHOICE; |
| 11170 | 183 | } 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
|
184 | gpp_type = PURPLE_PLUGIN_PREF_INFO; |
|
23981
4dcc884ffee0
Patch from John Hanauer to enable formatted string entry field in perl plugins.
Daniel Atallah <datallah@pidgin.im>
parents:
23980
diff
changeset
|
185 | } else if (type == 3) { |
|
4dcc884ffee0
Patch from John Hanauer to enable formatted string entry field in perl plugins.
Daniel Atallah <datallah@pidgin.im>
parents:
23980
diff
changeset
|
186 | gpp_type = PURPLE_PLUGIN_PREF_STRING_FORMAT; |
| 11170 | 187 | } |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
188 | purple_plugin_pref_set_type(pref, gpp_type); |