Tue, 30 Sep 2003 18:41:28 +0000
[gaim-migrate @ 7643]
robot101 gave us images in notify_formatted windows. very cool. This lets what I committed earlier (which was support for images in jabber vcards) to work.
| 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
f19df037ac58
[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
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
61 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
62 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
63 | #endif |
|
f19df037ac58
[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 | */ |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
75 | void gaim_sound_set_ui_ops(GaimSoundUiOps *ops); |
| 4561 | 76 | |
| 77 | /** | |
| 5684 | 78 | * Gets the UI sound operations |
| 79 | * | |
| 80 | * @return The UI sound operations structure. | |
| 4561 | 81 | */ |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
82 | GaimSoundUiOps *gaim_sound_get_ui_ops(void); |
| 5684 | 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
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
110 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
111 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
112 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5684
diff
changeset
|
113 | |
| 4581 | 114 | #endif /* _GAIM_SOUND_H_ */ |