annotate finch/gntsound.h @ 19160:fbecc35c23bb

Profiles now work with the new layout
author Eric Polino <aluink@pidgin.im>
date Thu, 12 Jul 2007 23:37:35 +0000
parents 01d574f529e0
children 19a4594e939c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19100
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
1 /**
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
2 * @file gntsound.h GNT Sound API
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
3 * @ingroup finch
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
4 *
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
5 * finch
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
6 *
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
7 * Finch is the legal property of its developers, whose names are too numerous
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
9 * source distribution.
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
10 *
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
14 * (at your option) any later version.
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
15 *
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
19 * GNU General Public License for more details.
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
20 *
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
24 */
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
25 #ifndef _GNT_SOUND_H
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
26 #define _GNT_SOUND_H
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
27
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
28 #include "sound.h"
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
29
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
30 /**********************************************************************/
19160
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
31 /** @name GNT Sound API */
19100
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
32 /**********************************************************************/
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
33 /*@{*/
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
34
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
35 /**
19160
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
36 * Get the prefs option for an event.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
37 *
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
38 * @param event The event.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
39 * @return The option.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
40 */
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
41 const char *finch_sound_get_event_option(PurpleSoundEventID event);
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
42
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
43 /**
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
44 * Get the label for an event.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
45 *
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
46 * @param event The event.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
47 * @return The label.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
48 */
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
49 const char *finch_sound_get_event_label(PurpleSoundEventID event);
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
50
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
51 /*
19146
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
52 * Get the name of the active sound profile.
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
53 *
19160
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
54 * @return the name
19146
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
55 */
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
56 const char *finch_sound_get_active_profile(void);
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
57
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
58 /**
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
59 * Set the active profile. If the profile doesn't exist, nothing is changed.
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
60 *
19160
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
61 *
19146
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
62 */
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
63 void finch_sound_set_active_profile(const char *name);
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
64
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
65 /**
19160
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
66 * Returns whether a profile exists or not.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
67 *
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
68 * @parame name The name of the profile to check for
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
69 * return Existance value
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
70 *
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
71 */
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
72 gboolean finch_sound_profile_exists(const char *name);
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
73
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
74
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
75 /**
19146
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
76 * Get a list of available sound profiles.
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
77 *
19160
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
78 * @return A list of strings denoting sound profile names. Free this list when you're done with it.
19146
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
79 */
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
80 GList *finch_sound_get_profiles(void);
5ff1231993af Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 19117
diff changeset
81
19100
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
82 /**
19160
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
83 * Gets GNT sound UI ops.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
84 *
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
85 * @return The UI operations structure.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
86 */
19100
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
87 PurpleSoundUiOps *finch_sound_get_ui_ops(void);
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
88
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
89 /**
19117
907c41608ada Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 19100
diff changeset
90 * Show the sound settings dialog.
907c41608ada Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 19100
diff changeset
91 */
907c41608ada Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 19100
diff changeset
92 void finch_sounds_show_all(void);
907c41608ada Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 19100
diff changeset
93
19160
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
94 /**
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
95 * Get the handle for the GNT sound system.
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
96 *
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
97 * @return The handle to the sound system
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
98 */
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
99 void *finch_sound_get_handle(void);
fbecc35c23bb Profiles now work with the new layout
Eric Polino <aluink@pidgin.im>
parents: 19154
diff changeset
100
19100
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
101 /*@}*/
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
102
68a3b83795c6 Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
103 #endif