libpurple/plugins/perl/common/PluginPref.xs

Thu, 07 Aug 2008 01:41:44 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Thu, 07 Aug 2008 01:41:44 +0000
changeset 23980
a38cbb35eecf
parent 21641
a0d410a35eb8
child 23981
4dcc884ffee0
permissions
-rw-r--r--

Some cleanup and a couple leak fixes.

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
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
73 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
74 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
75 int *min
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
76 int *max
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
77
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
78 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
79 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
80 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
81 PREINIT:
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
82 GList *l;
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
83 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
84 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
85 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
86 }
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
87
13107
704041197f4d [gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents: 12807
diff changeset
88 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
89 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
90 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
91
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
92 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
93 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
94 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
95
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
96 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
97 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
98 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
99
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
100 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
101 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
102 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
103
13107
704041197f4d [gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents: 12807
diff changeset
104 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
105 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
106 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
107
15894
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::PluginPrefType
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
109 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
110 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
111
15894
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
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
113 purple_plugin_pref_new(class)
12364
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
114 C_ARGS: /* void */
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
115
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::PluginPref
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_plugin_pref_new_with_label(class, label)
13107
704041197f4d [gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents: 12807
diff changeset
118 const char *label
12364
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
119 C_ARGS:
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
120 label
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_name(class, name)
13107
704041197f4d [gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents: 12807
diff changeset
124 const char *name
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 name
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_and_label(class, name, label)
13107
704041197f4d [gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents: 12807
diff changeset
130 const char *name
704041197f4d [gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents: 12807
diff changeset
131 const char *label
12364
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
132 C_ARGS:
42b44fed7423 [gaim-migrate @ 14668]
Will Thompson <resiak@pidgin.im>
parents: 11290
diff changeset
133 name, label
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
134
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
135 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
136 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
137 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
138 int min
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
139 int max
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_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
143 Purple::PluginPref pref
13107
704041197f4d [gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents: 12807
diff changeset
144 const char *label
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
145
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
146 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
147 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
148 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
149 gboolean mask
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
150
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
151 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
152 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
153 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
154 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
155
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
156 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
157 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
158 Purple::PluginPref pref
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
159 unsigned int max_length
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
160
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
161 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
162 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
163 Purple::PluginPref pref
13107
704041197f4d [gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents: 12807
diff changeset
164 const char *name
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
165
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
166 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
167 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
168 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
169 Purple::PluginPrefType type
12807
6d1183fe53b2 [gaim-migrate @ 15154]
Etan Reisner <deryni@pidgin.im>
parents: 12364
diff changeset
170 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
171 PurplePluginPrefType gpp_type;
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
172 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
173 gpp_type = PURPLE_PLUGIN_PREF_NONE;
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
174
11170
d8941580d87f [gaim-migrate @ 13271]
John H. Kelm <johnkelm@gmail.com>
parents: 11131
diff changeset
175 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
176 gpp_type = PURPLE_PLUGIN_PREF_CHOICE;
11170
d8941580d87f [gaim-migrate @ 13271]
John H. Kelm <johnkelm@gmail.com>
parents: 11131
diff changeset
177 } 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
178 gpp_type = PURPLE_PLUGIN_PREF_INFO;
11170
d8941580d87f [gaim-migrate @ 13271]
John H. Kelm <johnkelm@gmail.com>
parents: 11131
diff changeset
179 }
15894
765ec644ac47 Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents: 15435
diff changeset
180 purple_plugin_pref_set_type(pref, gpp_type);

mercurial