comparison src/gtkpounce.h @ 5857:2fa4aa9c1885

[gaim-migrate @ 6288] Renamed the pounce structures and typedefs to be in sync with the rest of the API. Also added some g_return_*_if_fail() checks in place of the if statements we had. I'll try to get pounces working again. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 13 Jun 2003 23:04:26 +0000
parents 9eb5b13fd412
children 417b1001d2b1
comparison
equal deleted inserted replaced
5856:a479e218c54b 5857:2fa4aa9c1885
40 } GaimGtkPounceAction; 40 } GaimGtkPounceAction;
41 41
42 /** 42 /**
43 * GTK+ pounce-specific data. 43 * GTK+ pounce-specific data.
44 */ 44 */
45 struct gaim_gtkpounce_data 45 typedef struct
46 { 46 {
47 GaimGtkPounceAction actions; /**< The action(s) for this pounce. */ 47 GaimGtkPounceAction actions; /**< The action(s) for this pounce. */
48 48
49 char *message; /**< The message to send, if 49 char *message; /**< The message to send, if
50 GAIM_GTKPOUNCE_SEND_MSG is in actions. */ 50 GAIM_GTKPOUNCE_SEND_MSG is in actions. */
53 char *sound; /**< The sound file to play, if 53 char *sound; /**< The sound file to play, if
54 GAIM_GTKPOUNCE_PLAY_SOUND is in actions. */ 54 GAIM_GTKPOUNCE_PLAY_SOUND is in actions. */
55 55
56 gboolean save; /**< If TRUE, the pounce should be saved after 56 gboolean save; /**< If TRUE, the pounce should be saved after
57 activation. */ 57 activation. */
58 }; 58
59 } GaimGtkPounceData;
59 60
60 #define GAIM_GTKPOUNCE(pounce) \ 61 #define GAIM_GTKPOUNCE(pounce) \
61 ((struct gaim_gtkpounce_data *)gaim_pounce_get_data(pounce)) 62 ((GaimGtkPounceData *)gaim_pounce_get_data(pounce))
62
63 /**
64 * The pounce dialog.
65 *
66 * The structure is opaque, as nobody should be touching anything inside of
67 * it.
68 */
69 struct gaim_gtkpounce_dialog;
70 63
71 /** 64 /**
72 * Creates a GTK-specific pounce. 65 * Creates a GTK-specific pounce.
73 * 66 *
74 * @param pouncer The account that will pounce. 67 * @param pouncer The account that will pounce.
80 * @param sound The optional sound to play. 73 * @param sound The optional sound to play.
81 * @param save Whether or not to save the data. 74 * @param save Whether or not to save the data.
82 * 75 *
83 * @return The new buddy pounce. 76 * @return The new buddy pounce.
84 */ 77 */
85 struct gaim_pounce *gaim_gtkpounce_new(GaimAccount *pouncer, 78 GaimPounce *gaim_gtkpounce_new(GaimAccount *pouncer, const char *pouncee,
86 const char *pouncee, 79 GaimPounceEvent events,
87 GaimPounceEvent events, 80 GaimGtkPounceAction actions,
88 GaimGtkPounceAction actions, 81 const char *message, const char *command,
89 const char *message, 82 const char *sound, gboolean save);
90 const char *command,
91 const char *sound,
92 gboolean save);
93 83
94 /** 84 /**
95 * Displays a New Buddy Pounce or Edit Buddy Pounce dialog. 85 * Displays a New Buddy Pounce or Edit Buddy Pounce dialog.
96 * 86 *
97 * @param buddy The optional buddy to pounce on. 87 * @param buddy The optional buddy to pounce on.
98 * @param cur_pounce The current buddy pounce, if editting an existing one. 88 * @param cur_pounce The current buddy pounce, if editting an existing one.
99 */ 89 */
100 void gaim_gtkpounce_dialog_show(struct buddy *buddy, 90 void gaim_gtkpounce_dialog_show(struct buddy *buddy, GaimPounce *cur_pounce);
101 struct gaim_pounce *cur_pounce);
102 91
103 /** 92 /**
104 * Displays all registered buddy pounces in a menu. 93 * Displays all registered buddy pounces in a menu.
105 * 94 *
106 * @param menu The menu to add to. 95 * @param menu The menu to add to.