/*****************************************************************************/

/*
 *      gtk_callbacks.h -- REALmagic simple windowing application in GTK
 *
 *      Copyright (C) 2001 Sigma Designs
 *                    written by Pascal Cannenterre <pascal_cannenterre@sdesigns.com>
 *
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*****************************************************************************/
#ifndef __GTK_CALLBACKS_H__
#define __GTK_CALLBACKS_H__

#include "handlemsg.h"
#include "optionswincb.h"
#include "dvdoptionswincb.h"
#include "keypadcb.h"
#include "playlistcb.h"

#ifdef _VOD_
#include "rtspwincb.h"
#endif

#define HANDLE_REPEAT 0xbead
#define HANDLE_REPEATAB 0xfabe

gboolean loadconfig(FMPOVERLAYVDO *ovl);

void set_playlist_size_and_position_cb(GtkWidget *);

gboolean window_move_toplevel (GtkWidget * , GdkEventConfigure * , gpointer );

gboolean window_move_drawingarea (GtkWidget * , GdkEventConfigure * , gpointer );

void file_ok_sel( GtkWidget *, GtkFileSelection * );

gboolean playfile(gchar *);

void startDisplayUp(FMPOVERLAYVDO *);
void autocalibrateAndStartPlaying(FMPOVERLAYVDO *);
gboolean checkFile(char *);
gboolean getMpegFileProperties(INFO * info);
gboolean checkFileValidity(INFO *, gchar *);

void print_hello( GtkWidget *, gpointer );

void prev_cb (GtkWidget *, gpointer);
void next_cb (GtkWidget *, gpointer);
void frewind_cb (GtkWidget * , gpointer );
void fforward_cb (GtkWidget * , gpointer );
void close_cb (GtkWidget * , gpointer );
void eject_cb (GtkWidget *, gpointer);
void play_cb (GtkWidget * , gpointer );
void stop_cb (GtkWidget * , gpointer );
void pause_cb (GtkWidget * , gpointer );

gboolean deal_with_pointer_cb(GtkWidget *, GdkEvent*, gpointer);
void fullscreen_on_cb (GtkWidget * , GdkEvent*, gpointer);
gboolean fullscreen_off_cb(GtkWidget *, GdkEvent *, gpointer);

void switch_overlay_back(FMPOVERLAYVDO *);
void switch_overlay_on(FMPOVERLAYVDO *);

gint refresh_timer_timeout_cb(gpointer data);
void refresh_seek_bar_current_time(DWORD);
void refresh_seek_bar_upper_bound();

gboolean time_search_cb(GtkAdjustment *, gpointer);
gboolean time_searching_cb(GtkWidget *, GdkEvent *, gpointer);

void dvd_menu_call_cb(GtkWidget *, guint, gpointer);
void dvd_navigation_cb(GtkWidget *, guint, gpointer);
void dvd_change_langage_cb(GtkWidget *, guint, gpointer);
void dvd_change_subtitles_cb(GtkWidget *, guint, gpointer);
void dvd_change_angle_cb(GtkWidget *, guint, gpointer);

void set_gui_element_visible_cb(GtkWidget *, guint, gpointer);
void set_check_item_state();

gboolean change_player_mode_cb(GtkWidget *, gpointer);
void toggle_player_mode(DWORD);
void help_about_cb(GtkWidget *, gpointer);
gboolean repeat_mode_cb(GtkWidget *, gpointer);

void alert(gchar*, gchar*);


#endif /* CALLBACKS */
