Mercurial > pidgin
annotate plugins/perl/common/Prefs.xs @ 12780:c886fc7e3f24
[gaim-migrate @ 15127]
Some more whitespace. I promise I'll get to real commits sooner or later.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Mon, 09 Jan 2006 06:45:16 +0000 |
parents | b284c703d398 |
children |
rev | line source |
---|---|
11118 | 1 #include "module.h" |
2 | |
3 MODULE = Gaim::Prefs PACKAGE = Gaim::Prefs PREFIX = gaim_prefs_ | |
4 PROTOTYPES: ENABLE | |
5 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
6 void |
11118 | 7 gaim_prefs_add_bool(name, value) |
8 const char *name | |
9 gboolean value | |
10 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
11 void |
11118 | 12 gaim_prefs_add_int(name, value) |
13 const char *name | |
14 int value | |
15 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
16 void |
11118 | 17 gaim_prefs_add_none(name) |
18 const char *name | |
19 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
20 void |
11118 | 21 gaim_prefs_add_string(name, value) |
22 const char *name | |
23 const char *value | |
24 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
25 void |
11118 | 26 gaim_prefs_add_string_list(name, value) |
27 const char *name | |
28 SV *value | |
29 PREINIT: | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
30 GList *t_GL; |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
31 int i, t_len; |
11118 | 32 PPCODE: |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
33 t_GL = NULL; |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
34 t_len = av_len((AV *)SvRV(value)); |
11118 | 35 |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
36 for (i = 0; i < t_len; i++) { |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
37 STRLEN t_sl; |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
38 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(value), i, 0), t_sl)); |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
39 } |
11118 | 40 gaim_prefs_add_string_list(name, t_GL); |
41 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
42 void |
11118 | 43 gaim_prefs_destroy() |
44 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
45 void |
11118 | 46 gaim_prefs_disconnect_by_handle(handle) |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
47 void * handle |
11118 | 48 |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
49 void |
11118 | 50 gaim_prefs_disconnect_callback(callback_id) |
51 guint callback_id | |
52 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
53 gboolean |
11118 | 54 gaim_prefs_exists(name) |
55 const char *name | |
56 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
57 gboolean |
11118 | 58 gaim_prefs_get_bool(name) |
59 const char *name | |
60 | |
61 void * | |
62 gaim_prefs_get_handle() | |
63 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
64 int |
11118 | 65 gaim_prefs_get_int(name) |
66 const char *name | |
67 | |
68 const char * | |
69 gaim_prefs_get_string(name) | |
70 const char *name | |
71 | |
72 void | |
73 gaim_prefs_get_string_list(name) | |
74 const char *name | |
75 PREINIT: | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
76 GList *l; |
11118 | 77 PPCODE: |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
78 for (l = gaim_prefs_get_string_list(name); l != NULL; l = l->next) { |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
79 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::PrefValue"))); |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
80 } |
11118 | 81 |
82 Gaim::PrefType | |
83 gaim_prefs_get_type(name) | |
84 const char *name | |
85 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
86 void |
11118 | 87 gaim_prefs_init() |
88 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
89 gboolean |
11118 | 90 gaim_prefs_load() |
91 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
92 void |
11118 | 93 gaim_prefs_remove(name) |
94 const char *name | |
95 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
96 void |
11118 | 97 gaim_prefs_rename(oldname, newname) |
98 const char *oldname | |
99 const char *newname | |
100 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
101 void |
11118 | 102 gaim_prefs_rename_boolean_toggle(oldname, newname) |
103 const char *oldname | |
104 const char *newname | |
105 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
106 void |
11118 | 107 gaim_prefs_set_bool(name, value) |
108 const char *name | |
109 gboolean value | |
110 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
111 void |
11118 | 112 gaim_prefs_set_generic(name, value) |
113 const char *name | |
114 gpointer value | |
115 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
116 void |
11118 | 117 gaim_prefs_set_int(name, value) |
118 const char *name | |
119 int value | |
120 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
121 void |
11118 | 122 gaim_prefs_set_string(name, value) |
123 const char *name | |
124 const char *value | |
125 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
126 void |
11118 | 127 gaim_prefs_set_string_list(name, value) |
128 const char *name | |
129 SV *value | |
130 PREINIT: | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
131 GList *t_GL; |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
132 int i, t_len; |
11118 | 133 PPCODE: |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
134 t_GL = NULL; |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
135 t_len = av_len((AV *)SvRV(value)); |
11118 | 136 |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
137 for (i = 0; i < t_len; i++) { |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
138 STRLEN t_sl; |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
139 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(value), i, 0), t_sl)); |
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
140 } |
11118 | 141 gaim_prefs_set_string_list(name, t_GL); |
142 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
143 void |
11118 | 144 gaim_prefs_trigger_callback(name) |
145 const char *name | |
146 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
147 void |
11118 | 148 gaim_prefs_uninit() |
149 | |
12780
c886fc7e3f24
[gaim-migrate @ 15127]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11290
diff
changeset
|
150 void |
11118 | 151 gaim_prefs_update_old() |