Mercurial > pidgin
annotate src/sound.h @ 6631:f80e23e66de0
[gaim-migrate @ 7155]
A patch from Bjoern Voigt that allows the languages in the about window
to be i10ned. Bjoern, I was having some problems emailing you earlier.
I just wanted to say that I've been rather busy and wasn't sure when I
would be able to commit this. Thanks for the patch, it looks nice. I
hand applied it because I'm a freak, and I think there may have been some
other changes to that code since the patch was made. Anyhoo, you might
just want to double check everything.
Fixed some compile warnings:
util.c: In function `_parse_font_tag':
util.c:313: warning: suggest explicit braces to avoid ambiguous `else'
util.c: In function `yahoo_html_to_codes':
util.c:456: warning: unused variable `m'
util.c:456: warning: unused variable `n'
util.c:456: warning: unused variable `vstart'
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 26 Aug 2003 02:55:29 +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_ */ |