]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-sound.h
Merge commit 'staz/dnd'
[empathy.git] / libempathy-gtk / empathy-sound.h
1 /*
2  * empathy-sound.h - Various sound related utility functions.
3  * Copyright (C) 2009 Collabora Ltd.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19
20
21 #ifndef __EMPATHY_SOUND_H__
22 #define __EMPATHY_SOUND_H__
23
24 #include <gtk/gtk.h>
25
26 #include <canberra-gtk.h>
27
28 G_BEGIN_DECLS
29
30 /* NOTE: Keep this sync with sound_entries in empathy-sound.c */
31 typedef enum {
32         EMPATHY_SOUND_MESSAGE_INCOMING = 0,
33         EMPATHY_SOUND_MESSAGE_OUTGOING,
34         EMPATHY_SOUND_CONVERSATION_NEW,
35         EMPATHY_SOUND_CONTACT_CONNECTED,
36         EMPATHY_SOUND_CONTACT_DISCONNECTED,
37         EMPATHY_SOUND_ACCOUNT_CONNECTED,
38         EMPATHY_SOUND_ACCOUNT_DISCONNECTED,
39         EMPATHY_SOUND_PHONE_INCOMING,
40         EMPATHY_SOUND_PHONE_OUTGOING,
41         EMPATHY_SOUND_PHONE_HANGUP,
42         LAST_EMPATHY_SOUND,
43 } EmpathySound;
44
45 gboolean empathy_sound_play (GtkWidget *widget, EmpathySound sound_id);
46 void empathy_sound_stop (EmpathySound sound_id);
47
48 gboolean empathy_sound_start_playing (GtkWidget *widget, EmpathySound sound_id,
49     guint timeout_before_replay);
50
51 gboolean empathy_sound_play_full (GtkWidget *widget, EmpathySound sound_id,
52     ca_finish_callback_t callback, gpointer user_data);
53
54 G_END_DECLS
55
56 #endif /* #ifndef __EMPATHY_SOUND_H__*/