| 134 typedef GtkTreeIter (*gaim_gtk_blist_sort_function)(GaimBlistNode *new, struct gaim_buddy_list *blist, GtkTreeIter group, GtkTreeIter *cur); |
134 typedef GtkTreeIter (*gaim_gtk_blist_sort_function)(GaimBlistNode *new, struct gaim_buddy_list *blist, GtkTreeIter group, GtkTreeIter *cur); |
| 135 |
135 |
| 136 extern GSList *gaim_gtk_blist_sort_methods; |
136 extern GSList *gaim_gtk_blist_sort_methods; |
| 137 |
137 |
| 138 struct gaim_gtk_blist_sort_method { |
138 struct gaim_gtk_blist_sort_method { |
| |
139 char *id; |
| 139 char *name; |
140 char *name; |
| 140 gaim_gtk_blist_sort_function func; |
141 gaim_gtk_blist_sort_function func; |
| 141 }; |
142 }; |
| 142 |
143 |
| 143 /** |
144 /** |
| 144 * Registers a buddy list sorting method. |
145 * Registers a buddy list sorting method. |
| 145 * |
146 * |
| |
147 * @param id The unique ID of the sorting method |
| 146 * @param name The method's name. |
148 * @param name The method's name. |
| 147 * @param func A pointer to the function. |
149 * @param func A pointer to the function. |
| 148 * |
150 * |
| 149 */ |
151 */ |
| 150 void gaim_gtk_blist_sort_method_reg(const char *name, gaim_gtk_blist_sort_function func); |
152 void gaim_gtk_blist_sort_method_reg(const char *id, const char *name, gaim_gtk_blist_sort_function func); |
| 151 |
153 |
| 152 /** |
154 /** |
| 153 * Unregisters a buddy list sorting method. |
155 * Unregisters a buddy list sorting method. |
| 154 * |
156 * |
| 155 * @param name The method's name |
157 * @param id The method's id |
| 156 */ |
158 */ |
| 157 void gaim_gtk_blist_sort_method_unreg(const char *name); |
159 void gaim_gtk_blist_sort_method_unreg(const char *id); |
| 158 |
160 |
| 159 /** |
161 /** |
| 160 * Sets a buddy list sorting method. |
162 * Sets a buddy list sorting method. |
| 161 * |
163 * |
| 162 * @param name The method's name. |
164 * @param id The method's id. |
| 163 */ |
165 */ |
| 164 void gaim_gtk_blist_sort_method_set(const char *name); |
166 void gaim_gtk_blist_sort_method_set(const char *id); |
| 165 |
167 |
| 166 /** |
168 /** |
| 167 * Sets up the programs default sort methods |
169 * Sets up the programs default sort methods |
| 168 */ |
170 */ |
| 169 void gaim_gtk_blist_setup_sort_methods(); |
171 void gaim_gtk_blist_setup_sort_methods(); |