Mercurial > pidgin.yaz
annotate src/sound.h @ 5632:b88734ca07b2
[gaim-migrate @ 6039]
those silly brits
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 01 Jun 2003 06:02:52 +0000 |
parents | 7a64114641c3 |
children | b61520e71679 |
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 /** | |
32 * A type of conversation. | |
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. */ | |
49 } GaimSoundEventID; | |
50 | |
51 /**************************************************************************/ | |
52 /** @name Sound API */ | |
53 /**************************************************************************/ | |
54 /*@{*/ | |
55 | |
56 /** | |
4581 | 57 * Lets the sound subsystem know when the sound output method has changed. |
4561 | 58 */ |
4581 | 59 void gaim_sound_change_output_method(); |
4561 | 60 |
61 /** | |
62 * Properly shuts down the sound system. | |
63 */ | |
64 void gaim_sound_quit(); | |
65 | |
66 /** | |
67 * Plays the specified sound file. | |
68 * | |
69 * @param filename The file to play. | |
70 */ | |
71 void gaim_sound_play_file(char *filename); | |
72 | |
73 /** | |
74 * Plays the sound associated with the specified event. | |
75 * | |
76 * @param event The event. | |
77 */ | |
78 void gaim_sound_play_event(GaimSoundEventID event); | |
79 | |
80 /** | |
81 * Mutes or un-mutes sounds. | |
82 * | |
83 * @param mute The mute state. | |
84 */ | |
85 void gaim_sound_set_mute(gboolean mute); | |
86 | |
87 /** | |
88 * Gets mute state for sounds. | |
89 * | |
90 * @return The mute state. | |
91 */ | |
92 gboolean gaim_sound_get_mute(); | |
93 | |
94 /** | |
95 * Mutes or un-mutes login sounds. | |
96 * | |
97 * @param mute The mute state. | |
98 */ | |
99 void gaim_sound_set_login_mute(gboolean mute); | |
100 | |
101 /** | |
102 * Set sound file for an event. | |
103 * | |
104 * @param event The event. | |
105 * @param filename The sound file. | |
106 */ | |
107 void gaim_sound_set_event_file(GaimSoundEventID event, const char *filename); | |
108 | |
109 /** Get sound file for an event. | |
110 * | |
111 * @param event The event. | |
112 * @return The filename if set, otherwise @c NULL. | |
113 */ | |
114 char *gaim_sound_get_event_file(GaimSoundEventID event); | |
115 | |
116 /** | |
117 * Get the prefs option for an event. | |
118 * | |
119 * @param event The event. | |
120 * @return The option. | |
121 */ | |
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5034
diff
changeset
|
122 const char *gaim_sound_get_event_option(GaimSoundEventID event); |
4561 | 123 |
124 /** | |
125 * Get the label for an event. | |
126 * | |
127 * @param event The event. | |
128 * @return The label. | |
129 */ | |
130 char *gaim_sound_get_event_label(GaimSoundEventID event); | |
131 | |
132 /** | |
133 * Set sound command for command mode. | |
134 * | |
135 * @param cmd The command. | |
136 */ | |
137 void gaim_sound_set_command(const char *cmd); | |
138 | |
139 /** | |
140 * Get sound command for command mode. | |
141 * | |
142 * @return The command if set, otherwise @c NULL. | |
143 */ | |
144 char *gaim_sound_get_command(); | |
145 | |
146 /*@}*/ | |
147 | |
4581 | 148 #endif /* _GAIM_SOUND_H_ */ |