Mercurial > pidgin
comparison src/pounce.h @ 5875:448f2f4ca3ec
[gaim-migrate @ 6307]
Rewrote the pounce framework.. yes, again. But now it saves! OOhh!! Neato.
Things are cleaner too. AND I CHANGED THE OK BUTTON TO SAVE!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 15 Jun 2003 02:03:23 +0000 |
parents | d6b5cab288bb |
children | 158196b2db19 |
comparison
equal
deleted
inserted
replaced
5874:964e4f94fc56 | 5875:448f2f4ca3ec |
---|---|
67 | 67 |
68 GHashTable *actions; /**< The registered actions. */ | 68 GHashTable *actions; /**< The registered actions. */ |
69 | 69 |
70 gboolean save; /**< Whether or not the pounce should | 70 gboolean save; /**< Whether or not the pounce should |
71 be saved after activation. */ | 71 be saved after activation. */ |
72 GaimPounceCb callback; /**< The callback function to call when the | |
73 event is triggered. */ | |
74 void (*free)(void *data); /**< The data free function. */ | |
75 void *data; /**< Pounce-specific data. */ | 72 void *data; /**< Pounce-specific data. */ |
76 }; | 73 }; |
77 | 74 |
78 /** | 75 /** |
79 * Creates a new buddy pounce. | 76 * Creates a new buddy pounce. |
80 * | 77 * |
81 * @param ui_type The type of UI the pounce is for. | 78 * @param ui_type The type of UI the pounce is for. |
82 * @param pouncer The account that will pounce. | 79 * @param pouncer The account that will pounce. |
83 * @param pouncee The buddy to pounce on. | 80 * @param pouncee The buddy to pounce on. |
84 * @param event The event(s) to pounce on. | 81 * @param event The event(s) to pounce on. |
85 * @param cb The callback function to call when the pounce is triggered. | |
86 * @param data Pounce-specific data. | |
87 * @param free The function to free the pounce-specific data. | |
88 * | 82 * |
89 * @return The new buddy pounce structure. | 83 * @return The new buddy pounce structure. |
90 */ | 84 */ |
91 GaimPounce *gaim_pounce_new(const char *ui_type, | 85 GaimPounce *gaim_pounce_new(const char *ui_type, GaimAccount *pouncer, |
92 GaimAccount *pouncer, const char *pouncee, | 86 const char *pouncee, GaimPounceEvent event); |
93 GaimPounceEvent event, GaimPounceCb cb, | |
94 void *data, void (*free)(void *)); | |
95 | 87 |
96 /** | 88 /** |
97 * Destroys a buddy pounce. | 89 * Destroys a buddy pounce. |
98 * | 90 * |
99 * @param pounce The buddy pounce. | 91 * @param pounce The buddy pounce. |
261 * @return The pounce if found, or @c NULL otherwise. | 253 * @return The pounce if found, or @c NULL otherwise. |
262 */ | 254 */ |
263 GaimPounce *gaim_find_pounce(const GaimAccount *pouncer, | 255 GaimPounce *gaim_find_pounce(const GaimAccount *pouncer, |
264 const char *pouncee, GaimPounceEvent events); | 256 const char *pouncee, GaimPounceEvent events); |
265 | 257 |
258 | |
259 /** | |
260 * Initializes the pounces subsystem. | |
261 */ | |
262 void gaim_pounces_init(void); | |
263 | |
266 /** | 264 /** |
267 * Loads the pounces. | 265 * Loads the pounces. |
268 */ | 266 */ |
269 gboolean gaim_pounces_load(void); | 267 gboolean gaim_pounces_load(void); |
270 | 268 |
272 * Force an immediate write of pounces. | 270 * Force an immediate write of pounces. |
273 */ | 271 */ |
274 void gaim_pounces_sync(void); | 272 void gaim_pounces_sync(void); |
275 | 273 |
276 /** | 274 /** |
275 * Registers a pounce handler for a UI. | |
276 * | |
277 * @param ui The UI name. | |
278 * @param cb The callback function. | |
279 * @param new_pounce The function called when a pounce is created. | |
280 * @param free_pounce The function called when a pounce is freed. | |
281 */ | |
282 void gaim_pounces_register_handler(const char *ui, GaimPounceCb cb, | |
283 void (*new_pounce)(GaimPounce *pounce), | |
284 void (*free_pounce)(GaimPounce *pounce)); | |
285 | |
286 /** | |
287 * Unregisters a pounce handle for a UI. | |
288 * | |
289 * @param ui The UI name. | |
290 */ | |
291 void gaim_pounces_unregister_handler(const char *ui); | |
292 | |
293 /** | |
277 * Returns a list of all registered buddy pounces. | 294 * Returns a list of all registered buddy pounces. |
278 * | 295 * |
279 * @return The list of buddy pounces. | 296 * @return The list of buddy pounces. |
280 */ | 297 */ |
281 GList *gaim_pounces_get_all(void); | 298 GList *gaim_pounces_get_all(void); |