comparison src/gtkpounce.h @ 5864:417b1001d2b1

[gaim-migrate @ 6295] Rewrote the pounce API again. Now it's even MORE core/UI-split, and will allow for loading/saving. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 14 Jun 2003 11:14:49 +0000
parents 2fa4aa9c1885
children 448f2f4ca3ec
comparison
equal deleted inserted replaced
5863:98ec3e394f59 5864:417b1001d2b1
1 /** 1 /**
2 * @file gtkpounce.h GTK+ buddy pounce API 2 * @file gtkpounce.h GTK+ Buddy Pounce API
3 * @ingroup gtkui 3 * @ingroup gtkui
4 * 4 *
5 * gaim 5 * gaim
6 * 6 *
7 * Copyright (C) 2003, Christian Hammond <chipx86@gnupdate.org> 7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 12 * (at your option) any later version.
24 #define _GAIM_GTK_POUNCE_H_ 24 #define _GAIM_GTK_POUNCE_H_
25 25
26 #include "pounce.h" 26 #include "pounce.h"
27 27
28 /** 28 /**
29 * Types of actions that gaim's GTK+ interface supports.
30 */
31 typedef enum
32 {
33 GAIM_GTKPOUNCE_NONE = 0x00, /**< No action. */
34 GAIM_GTKPOUNCE_OPEN_WIN = 0x01, /**< Open an IM window. */
35 GAIM_GTKPOUNCE_POPUP = 0x02, /**< Popup notification. */
36 GAIM_GTKPOUNCE_SEND_MSG = 0x04, /**< Send a message. */
37 GAIM_GTKPOUNCE_EXEC_CMD = 0x08, /**< Execute a command. */
38 GAIM_GTKPOUNCE_PLAY_SOUND = 0x10 /**< Play a sound. */
39
40 } GaimGtkPounceAction;
41
42 /**
43 * GTK+ pounce-specific data.
44 */
45 typedef struct
46 {
47 GaimGtkPounceAction actions; /**< The action(s) for this pounce. */
48
49 char *message; /**< The message to send, if
50 GAIM_GTKPOUNCE_SEND_MSG is in actions. */
51 char *command; /**< The command to execute, if
52 GAIM_GTKPOUNCE_EXEC_CMD is in actions. */
53 char *sound; /**< The sound file to play, if
54 GAIM_GTKPOUNCE_PLAY_SOUND is in actions. */
55
56 gboolean save; /**< If TRUE, the pounce should be saved after
57 activation. */
58
59 } GaimGtkPounceData;
60
61 #define GAIM_GTKPOUNCE(pounce) \
62 ((GaimGtkPounceData *)gaim_pounce_get_data(pounce))
63
64 /**
65 * Creates a GTK-specific pounce. 29 * Creates a GTK-specific pounce.
66 * 30 *
67 * @param pouncer The account that will pounce. 31 * @param pouncer The account that will pounce.
68 * @param pouncee The buddy to pounce on. 32 * @param pouncee The buddy to pounce on.
69 * @param events The event(s) to pounce on. 33 * @param events The event(s) to pounce on.
70 * @param actions The actions.
71 * @param message The optional message to send.
72 * @param command The optional command to execute.
73 * @param sound The optional sound to play.
74 * @param save Whether or not to save the data.
75 * 34 *
76 * @return The new buddy pounce. 35 * @return The new buddy pounce.
77 */ 36 */
78 GaimPounce *gaim_gtkpounce_new(GaimAccount *pouncer, const char *pouncee, 37 GaimPounce *gaim_gtkpounce_new(GaimAccount *pouncer, const char *pouncee,
79 GaimPounceEvent events, 38 GaimPounceEvent events);
80 GaimGtkPounceAction actions,
81 const char *message, const char *command,
82 const char *sound, gboolean save);
83 39
84 /** 40 /**
85 * Displays a New Buddy Pounce or Edit Buddy Pounce dialog. 41 * Displays a New Buddy Pounce or Edit Buddy Pounce dialog.
86 * 42 *
87 * @param buddy The optional buddy to pounce on. 43 * @param buddy The optional buddy to pounce on.