Mercurial > pidgin.yaz
annotate plugins/perl/common/PluginPref.xs @ 12807:d6df6eb13ecf
[gaim-migrate @ 15154]
More whitespace and returned object class stuff.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Tue, 10 Jan 2006 05:49:48 +0000 |
parents | 6fd82071a7b8 |
children | a0a4b44239e8 |
rev | line source |
---|---|
11118 | 1 #include "module.h" |
2 | |
12364 | 3 MODULE = Gaim::PluginPref PACKAGE = Gaim::PluginPref::Frame PREFIX = gaim_plugin_pref_frame_ |
11118 | 4 PROTOTYPES: ENABLE |
5 | |
12364 | 6 void |
11118 | 7 gaim_plugin_pref_frame_add(frame, pref) |
12364 | 8 Gaim::PluginPref::Frame frame |
11118 | 9 Gaim::PluginPref pref |
10 | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
11 void |
11118 | 12 gaim_plugin_pref_frame_destroy(frame) |
12364 | 13 Gaim::PluginPref::Frame frame |
11118 | 14 |
15 void | |
16 gaim_plugin_pref_frame_get_prefs(frame) | |
12364 | 17 Gaim::PluginPref::Frame frame |
11118 | 18 PREINIT: |
19 GList *l; | |
20 PPCODE: | |
21 for (l = gaim_plugin_pref_frame_get_prefs(frame); l != NULL; l = l->next) { | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
22 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::PluginPref"))); |
11118 | 23 } |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
24 |
12364 | 25 Gaim::PluginPref::Frame |
26 gaim_plugin_pref_frame_new(class) | |
27 C_ARGS: /* void */ | |
11118 | 28 |
12364 | 29 MODULE = Gaim::PluginPref PACKAGE = Gaim::PluginPref PREFIX = gaim_plugin_pref_ |
30 PROTOTYPES: ENABLE | |
31 | |
32 void | |
33 gaim_plugin_pref_add_choice(pref, label, choice) | |
34 Gaim::PluginPref pref | |
35 char *label | |
36 gpointer choice | |
37 | |
38 void | |
39 gaim_plugin_pref_destroy(pref) | |
40 Gaim::PluginPref pref | |
41 | |
42 | |
43 void | |
11118 | 44 gaim_plugin_pref_get_bounds(pref, min, max) |
45 Gaim::PluginPref pref | |
46 int *min | |
47 int *max | |
48 | |
49 void | |
50 gaim_plugin_pref_get_choices(pref) | |
51 Gaim::PluginPref pref | |
52 PREINIT: | |
53 GList *l; | |
54 PPCODE: | |
55 for (l = gaim_plugin_pref_get_choices(pref); l != NULL; l = l->next) { | |
56 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem"))); | |
57 } | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
58 |
11118 | 59 char * |
60 gaim_plugin_pref_get_label(pref) | |
61 Gaim::PluginPref pref | |
62 | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
63 gboolean |
11118 | 64 gaim_plugin_pref_get_masked(pref) |
65 Gaim::PluginPref pref | |
66 | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
67 unsigned int |
11118 | 68 gaim_plugin_pref_get_max_length(pref) |
69 Gaim::PluginPref pref | |
70 | |
71 char * | |
72 gaim_plugin_pref_get_name(pref) | |
73 Gaim::PluginPref pref | |
74 | |
75 Gaim::PluginPrefType | |
76 gaim_plugin_pref_get_type(pref) | |
77 Gaim::PluginPref pref | |
78 | |
79 Gaim::PluginPref | |
12364 | 80 gaim_plugin_pref_new(class) |
81 C_ARGS: /* void */ | |
11118 | 82 |
83 Gaim::PluginPref | |
12364 | 84 gaim_plugin_pref_new_with_label(class, label) |
11118 | 85 char *label |
12364 | 86 C_ARGS: |
87 label | |
11118 | 88 |
89 Gaim::PluginPref | |
12364 | 90 gaim_plugin_pref_new_with_name(class, name) |
11118 | 91 char *name |
12364 | 92 C_ARGS: |
93 name | |
11118 | 94 |
95 Gaim::PluginPref | |
12364 | 96 gaim_plugin_pref_new_with_name_and_label(class, name, label) |
11118 | 97 char *name |
98 char *label | |
12364 | 99 C_ARGS: |
100 name, label | |
11118 | 101 |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
102 void |
11118 | 103 gaim_plugin_pref_set_bounds(pref, min, max) |
104 Gaim::PluginPref pref | |
105 int min | |
106 int max | |
107 | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
108 void |
11118 | 109 gaim_plugin_pref_set_label(pref, label) |
110 Gaim::PluginPref pref | |
111 char *label | |
112 | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
113 void |
11118 | 114 gaim_plugin_pref_set_masked(pref, mask) |
115 Gaim::PluginPref pref | |
116 gboolean mask | |
117 | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
118 void |
11118 | 119 gaim_plugin_pref_set_max_length(pref, max_length) |
120 Gaim::PluginPref pref | |
121 unsigned int max_length | |
122 | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
123 void |
11118 | 124 gaim_plugin_pref_set_name(pref, name) |
125 Gaim::PluginPref pref | |
126 char *name | |
127 | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
128 void |
11118 | 129 gaim_plugin_pref_set_type(pref, type) |
130 Gaim::PluginPref pref | |
131 Gaim::PluginPrefType type | |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
132 PREINIT: |
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
133 GaimPluginPrefType gpp_type; |
11118 | 134 CODE: |
12807
d6df6eb13ecf
[gaim-migrate @ 15154]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
135 gpp_type = GAIM_PLUGIN_PREF_NONE; |
11118 | 136 |
11170 | 137 if (type == 1) { |
138 gpp_type = GAIM_PLUGIN_PREF_CHOICE; | |
139 } else if (type == 2) { | |
140 gpp_type = GAIM_PLUGIN_PREF_INFO; | |
141 } | |
142 gaim_plugin_pref_set_type(pref, gpp_type); |