Mercurial > pidgin
comparison libpurple/pounce.h @ 32672:3828a61c44da
A boring and large patch so I can merge heads.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 23 Dec 2011 08:21:58 +0000 |
parents | d7be95afe03a |
children |
comparison
equal
deleted
inserted
replaced
32671:0e69949b3e61 | 32672:3828a61c44da |
---|---|
57 } PurplePounceOption; | 57 } PurplePounceOption; |
58 | 58 |
59 /** A pounce callback. */ | 59 /** A pounce callback. */ |
60 typedef void (*PurplePounceCb)(PurplePounce *, PurplePounceEvent, void *); | 60 typedef void (*PurplePounceCb)(PurplePounce *, PurplePounceEvent, void *); |
61 | 61 |
62 /** | |
63 * A buddy pounce structure. | |
64 * | |
65 * Buddy pounces are actions triggered by a buddy-related event. For | |
66 * example, a sound can be played or an IM window opened when a buddy | |
67 * signs on or returns from away. Such responses are handled in the | |
68 * UI. The events themselves are done in the core. | |
69 */ | |
70 struct _PurplePounce | |
71 { | |
72 char *ui_type; /**< The type of UI. */ | |
73 | |
74 PurplePounceEvent events; /**< The event(s) to pounce on. */ | |
75 PurplePounceOption options; /**< The pounce options */ | |
76 PurpleAccount *pouncer; /**< The user who is pouncing. */ | |
77 | |
78 char *pouncee; /**< The buddy to pounce on. */ | |
79 | |
80 GHashTable *actions; /**< The registered actions. */ | |
81 | |
82 gboolean save; /**< Whether or not the pounce should | |
83 be saved after activation. */ | |
84 void *data; /**< Pounce-specific data. */ | |
85 }; | |
86 | |
87 #ifdef __cplusplus | 62 #ifdef __cplusplus |
88 extern "C" { | 63 extern "C" { |
89 #endif | 64 #endif |
90 | 65 |
91 /**************************************************************************/ | 66 /**************************************************************************/ |
124 | 99 |
125 /** | 100 /** |
126 * Destroys all buddy pounces for a buddy | 101 * Destroys all buddy pounces for a buddy |
127 * | 102 * |
128 * @param buddy The buddy whose pounces are to be removed | 103 * @param buddy The buddy whose pounces are to be removed |
129 * | |
130 * @since 2.8.0 | |
131 */ | 104 */ |
132 void purple_pounce_destroy_all_by_buddy(PurpleBuddy *buddy); | 105 void purple_pounce_destroy_all_by_buddy(PurpleBuddy *buddy); |
133 | 106 |
134 /** | 107 /** |
135 * Sets the events a pounce should watch for. | 108 * Sets the events a pounce should watch for. |
357 * | 330 * |
358 * @param ui The ID of the UI using the core. | 331 * @param ui The ID of the UI using the core. |
359 * | 332 * |
360 * @return The list of buddy pounces. The list should be freed by | 333 * @return The list of buddy pounces. The list should be freed by |
361 * the caller when it's no longer used. | 334 * the caller when it's no longer used. |
362 * @since 2.1.0 | |
363 */ | 335 */ |
364 GList *purple_pounces_get_all_for_ui(const char *ui); | 336 GList *purple_pounces_get_all_for_ui(const char *ui); |
365 | 337 |
366 /** | 338 /** |
367 * Returns the buddy pounce subsystem handle. | 339 * Returns the buddy pounce subsystem handle. |