#ifndef	__CALLBACKS_H__
#define	__CALLBACKS_H__

#include <gtk/gtk.h>
#include <cdaudio.h>


#define	 POLL_CD	if (-1 == cd_poll(cd, &cdstatu))  g_print("Couldn't poll cd !\n")
#define	 STAT_CD	if (-1 == cd_stat(cd, &cdinf))  g_print("Couldn't stat cd !\n")
#define	 STOP_CD	if (-1 == cd_stop(cd))  g_print("Couldn't stop cd !\n")
#define	 PAUSE_CD	if (-1 == cd_pause(cd))  g_print("Couldn't pause cd !\n")
#define	 PLAY_CD(x) 	if (-1 == cd_play(cd, x))  g_print("Couldn't pause cd !\n")

#define	 BEBO_VIEW_TRACK_INFO(x)  gtk_list_select_item (GTK_LIST \
		((GTK_COMBO (lookup_widget (bebocd, "combo1")))->list), x)

extern GtkWidget *bebocd, *aboutdlg;

extern gint cd;
extern struct disc_info cdinf;
extern struct disc_status cdstatu;

/* NASTY... will fix it soon */
static gboolean aboutdlg_is_shown = FALSE;
static gboolean dont_change_song = FALSE;

void
bebo_prev_track                        (GtkButton       *button,
                                        gpointer         user_data);

void
bebo_pause_cd                          (GtkButton       *button,
                                        gpointer         user_data);

void
bebo_play_cd                           (GtkButton       *button,
                                        gpointer         user_data);

void
bebo_stop_cd                           (GtkButton       *button,
                                        gpointer         user_data);

void
bebo_next_track                        (GtkButton       *button,
                                        gpointer         user_data);

void
bebo_eject_cd                          (GtkButton       *button,
                                        gpointer         user_data);

gboolean
bebo_cd_quit                           (GtkWidget       *widget,
                                        GdkEvent        *event,
                                        gpointer         user_data);

gint
loop_action				(gpointer 	data);


void
bebo_comboentry_activate               (GtkEditable     *editable,
                                        gpointer         user_data);

void
bebo_show_aboutdlg                     (GtkButton       *button,
                                        gpointer         user_data);

gboolean
bebo_hide_aboutdlg                     (GtkWidget       *widget,
                                        GdkEvent        *event,
                                        gpointer         user_data);

void
bebo_set_mixer                         (GtkRange        *range,
                                        gpointer         user_data);

void
bebo_get_current_cdvolume		(void);


gchar
*bebo_to_utf				(gchar *str);


#endif  /* __CALLBACKS_H__  */
