Mercurial > pidgin.yaz
annotate src/sound.h @ 6837:f098765ac919
[gaim-migrate @ 7382]
The pounces subsystem now registers signal callbacks for all the pounce
types. The calls to pounce code in server.c, and therefore in all the rest
of gaim, have been removed. The pounce code is now more like its own
separate island.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 14 Sep 2003 21:05:11 +0000 |
parents | 158196b2db19 |
children | feb3d21a7794 |
rev | line source |
---|---|
4561 | 1 /** |
2 * @file sound.h Sound API | |
3 * | |
4 * gaim | |
5 * | |
6 * Copyright (C) 2003, Nathan Walp <faceprint@faceprint.com> | |
7 * | |
8 * This program is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
22 | |
4581 | 23 #ifndef _GAIM_SOUND_H_ |
24 #define _GAIM_SOUND_H_ | |
4561 | 25 |
26 /**************************************************************************/ | |
27 /** Data Structures */ | |
28 /**************************************************************************/ | |
29 | |
30 | |
31 /** | |
5684 | 32 * A type of sound. |
4561 | 33 */ |
34 | |
35 typedef enum _GaimSoundEventID | |
36 { | |
37 GAIM_SOUND_BUDDY_ARRIVE = 0, /**< Buddy signs on. */ | |
38 GAIM_SOUND_BUDDY_LEAVE, /**< Buddy signs off. */ | |
39 GAIM_SOUND_RECEIVE, /**< Receive an IM. */ | |
40 GAIM_SOUND_FIRST_RECEIVE, /**< Receive an IM that starts a conv. */ | |
41 GAIM_SOUND_SEND, /**< Send an IM. */ | |
42 GAIM_SOUND_CHAT_JOIN, /**< Someone joins a chat. */ | |
43 GAIM_SOUND_CHAT_LEAVE, /**< Someone leaves a chat. */ | |
44 GAIM_SOUND_CHAT_YOU_SAY, /**< You say something in a chat. */ | |
45 GAIM_SOUND_CHAT_SAY, /**< Someone else says somthing in a chat. */ | |
46 GAIM_SOUND_POUNCE_DEFAULT, /**< Default sound for a buddy pounce. */ | |
47 GAIM_SOUND_CHAT_NICK, /**< Someone says your name in a chat. */ | |
48 GAIM_NUM_SOUNDS /**< Total number of sounds. */ | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
49 |
4561 | 50 } GaimSoundEventID; |
51 | |
5684 | 52 typedef struct _GaimSoundUiOps |
53 { | |
54 void (*init)(void); | |
55 void (*shutdown)(void); | |
56 void (*play_file)(const char *filename); | |
57 void (*play_event)(GaimSoundEventID event); | |
58 | |
59 } GaimSoundUiOps; | |
60 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
61 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
62 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
63 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
64 |
4561 | 65 /**************************************************************************/ |
66 /** @name Sound API */ | |
67 /**************************************************************************/ | |
68 /*@{*/ | |
69 | |
70 /** | |
5684 | 71 * Sets the UI sound operations |
72 * | |
73 * @param ops The UI sound operations structure. | |
4561 | 74 */ |
5684 | 75 void gaim_set_sound_ui_ops(GaimSoundUiOps *ops); |
4561 | 76 |
77 /** | |
5684 | 78 * Gets the UI sound operations |
79 * | |
80 * @return The UI sound operations structure. | |
4561 | 81 */ |
5684 | 82 GaimSoundUiOps *gaim_get_sound_ui_ops(void); |
83 | |
84 /** | |
85 * Initializes the sound subsystem | |
86 */ | |
87 void gaim_sound_init(void); | |
88 | |
89 /** | |
90 * Shuts down the sound subsystem | |
91 */ | |
92 void gaim_sound_shutdown(void); | |
4561 | 93 |
94 /** | |
95 * Plays the specified sound file. | |
96 * | |
97 * @param filename The file to play. | |
98 */ | |
5684 | 99 void gaim_sound_play_file(const char *filename); |
4561 | 100 |
101 /** | |
102 * Plays the sound associated with the specified event. | |
103 * | |
104 * @param event The event. | |
105 */ | |
106 void gaim_sound_play_event(GaimSoundEventID event); | |
107 | |
108 /*@}*/ | |
109 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
110 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
111 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
112 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
113 |
4581 | 114 #endif /* _GAIM_SOUND_H_ */ |