![]() |
![]() |
![]() |
libempathy-gtk Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum EmpathySound; gboolean empathy_sound_play (GtkWidget *widget, EmpathySound sound_id); void empathy_sound_stop (EmpathySound sound_id); gboolean empathy_sound_start_playing (GtkWidget *widget, EmpathySound sound_id, guint timeout_before_replay); gboolean empathy_sound_play_full (GtkWidget *widget, EmpathySound sound_id, ca_finish_callback_t callback, gpointer user_data);
typedef enum { EMPATHY_SOUND_MESSAGE_INCOMING = 0, EMPATHY_SOUND_MESSAGE_OUTGOING, EMPATHY_SOUND_CONVERSATION_NEW, EMPATHY_SOUND_CONTACT_CONNECTED, EMPATHY_SOUND_CONTACT_DISCONNECTED, EMPATHY_SOUND_ACCOUNT_CONNECTED, EMPATHY_SOUND_ACCOUNT_DISCONNECTED, EMPATHY_SOUND_PHONE_INCOMING, EMPATHY_SOUND_PHONE_OUTGOING, EMPATHY_SOUND_PHONE_HANGUP, LAST_EMPATHY_SOUND, } EmpathySound;
gboolean empathy_sound_play (GtkWidget *widget, EmpathySound sound_id);
Plays a sound. See empathy_sound_play_full
for details.'
|
The GtkWidget from which the sound is originating. |
|
The EmpathySound to play. |
Returns : |
TRUE if the sound has successfully started playing, FALSE
otherwise.
|
void empathy_sound_stop (EmpathySound sound_id);
Stop playing a sound. If it has been stated in loop with
empathy_sound_start_playing()
, it will also stop replaying.
|
The EmpathySound to stop playing. |
gboolean empathy_sound_start_playing (GtkWidget *widget, EmpathySound sound_id, guint timeout_before_replay);
Start playing a sound in loop. To stop the sound, call empathy_call_stop()
by passing it the same sound_id
. Note that if you start playing a sound
multiple times, you'll have to call empathy_sound_stop
the same number of
times.
|
The GtkWidget from which the sound is originating. |
|
The EmpathySound to play. |
|
The amount of time, in milliseconds, between two consecutive play. |
Returns : |
TRUE if the sound has successfully started playing.
|
gboolean empathy_sound_play_full (GtkWidget *widget, EmpathySound sound_id, ca_finish_callback_t callback, gpointer user_data);
Plays a sound.
Returns TRUE
if the sound has successfully started playing, otherwise
returning FALSE
and callback
won't be called.
This function returns FALSE
if the sound is already playing in loop using
empathy_sound_start_playing
.
This function returns FALSE
if the sound is disabled in empathy preferences.
|
The GtkWidget from which the sound is originating. |
|
The EmpathySound to play. |
|
The ca_finish_callback_t function that will be called when the sound has stopped playing. |
|
user data to pass to the function. |
Returns : |
TRUE if the sound has successfully started playing, FALSE
otherwise.
|