Mercurial > pidgin
annotate plugins/perl/common/PluginPref.xs @ 13253:87a7c3077c19
[gaim-migrate @ 15619]
More cleaning up of oscar. Renamed some functions to be more clear.
Got rid of some stuff that wasn't used. Inlined some small things
in conn.c that were only used once.
The goals of all this are
1. Non-blocking I/O for all connections
2. p2p stuff won't use the same struct as oscar connections, because
that's stupid
3. The oscar PRPL should be less scary
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Sun, 12 Feb 2006 21:27:04 +0000 |
| parents | a0a4b44239e8 |
| children |
| 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 | |
|
13106
a0a4b44239e8
[gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents:
12807
diff
changeset
|
35 const char *label |
| 12364 | 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 |
|
13106
a0a4b44239e8
[gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents:
12807
diff
changeset
|
59 const char * |
| 11118 | 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 | |
|
13106
a0a4b44239e8
[gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents:
12807
diff
changeset
|
71 const char * |
| 11118 | 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) |
|
13106
a0a4b44239e8
[gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents:
12807
diff
changeset
|
85 const char *label |
| 12364 | 86 C_ARGS: |
| 87 label | |
| 11118 | 88 |
| 89 Gaim::PluginPref | |
| 12364 | 90 gaim_plugin_pref_new_with_name(class, name) |
|
13106
a0a4b44239e8
[gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents:
12807
diff
changeset
|
91 const 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) |
|
13106
a0a4b44239e8
[gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents:
12807
diff
changeset
|
97 const char *name |
|
a0a4b44239e8
[gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents:
12807
diff
changeset
|
98 const 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 | |
|
13106
a0a4b44239e8
[gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents:
12807
diff
changeset
|
111 const char *label |
| 11118 | 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 | |
|
13106
a0a4b44239e8
[gaim-migrate @ 15468]
Richard Laager <rlaager@wiktel.com>
parents:
12807
diff
changeset
|
126 const char *name |
| 11118 | 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); |
