libpurple/plugins/perl/common/PluginPref.xs

Wed, 13 May 2009 20:29:03 +0000

author
Marcus Lundblad <malu@pidgin.im>
date
Wed, 13 May 2009 20:29:03 +0000
changeset 27110
05ca719b901b
parent 25380
7f73ff8b8b81
child 35378
5d9e2581005b
permissions
-rw-r--r--

Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.

11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
1 #include "module.h"
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
4 PROTOTYPES: ENABLE
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
37
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
41
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
45 PREINIT:
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
46 GList *l;
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
50 }
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
54 C_ARGS: /* void */
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
57 PROTOTYPES: ENABLE
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
58
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
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
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
66
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
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
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
70
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
71
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
83
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
87 PREINIT:
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
88 GList *l;
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
92 }
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
97
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
120 C_ARGS: /* void */
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
125 C_ARGS:
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
126 label
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
131 C_ARGS:
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
132 name
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
138 C_ARGS:
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
139 name, label
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
140
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
144 int min
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
145 int max
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
146
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
151
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
155 gboolean mask
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
156
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
165 unsigned int max_length
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
166
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
171
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
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
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
180
11170
d8941580d87f [gaim-migrate @ 13271]
John H. Kelm <johnkelm@gmail.com>
parents: 11131
diff changeset
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
d8941580d87f [gaim-migrate @ 13271]
John H. Kelm <johnkelm@gmail.com>
parents: 11131
diff changeset
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
d8941580d87f [gaim-migrate @ 13271]
John H. Kelm <johnkelm@gmail.com>
parents: 11131
diff changeset
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);

mercurial