#ifndef _GUI_H #define _GUI_H /* Masks for toolbar sensitive set */ #define GSE_NO_FILE_OPEN 0x00 #define GSE_FILE_OPEN 0x01 #define GSE_FILE_OPEN_MICRODVD 0x02 #define GSE_FILE_OPEN_SUBRIP 0x04 /* Misc functions (gui.c) */ void gse_exit_program (GtkWidget *wgt, gpointer data); gboolean gse_fname_is_directory (gchar *fname); int gse_delete_main_window (GtkWidget *win, gpointer data); gboolean gse_clist_is_empty (GtkWidget *clist); gdouble gse_frame_to_time (gdouble fps, gint last_frame); gint gse_parse_time (gdouble in_sec, gint *hr, gint *min, gint *sec, gint *msec); gint gse_add_to_time (gdouble add_sec, gint *hr, gint *min, gint *sec, gint *msec); gint gse_str_to_time (const gchar *str, gint *hr, gint *min, gint *sec, gint *msec); gchar *gse_time_to_str (gint hr, gint min, gint sec, gint msec); gdouble gse_time_to_frame (gdouble fps, gint hr, gint min, gint sec, gint msec); glong gse_frame_rate_convert (gint frame, gdouble src_fps, gdouble dest_fps); int gse_create_main_window (void); void gse_about (GtkWidget *wgt, gpointer data); void gse_menu_file_open (void); void gse_set_title_changed (gboolean changed); void gse_set_menu_toolbar_state (gint state); gboolean gse_str_only_digits (gchar *str); gboolean gse_str_only_spaces (gchar *str); void gse_str_remove_empty_lines (gchar **str); gboolean gse_ask_user_really_quit (void); void gse_update_toolbar_style (void); void gse_mwin_clist_update_index (void); void gse_init_colors (void); void gse_gui_set_infobox_values (void); /* Functions used to create the main gui (gui.c) */ GtkWidget *gse_create_frame_modes (void); GtkWidget *gse_create_vbox_edit_entry (void); GtkWidget *gse_create_vbox_bottom_left (void); /* Misc funcions used by callback functions (callback.c) */ void gse_clist_move_line (gint direction); gint gse_get_file_format_from_user (gchar *filename); gint gse_ask_user_save_changes (gchar *filename); gchar *gse_check_entry_for_errors (gchar *str); /* Callbacks from the gui (callbacks.c) */ void gse_cb_open_subtitle (GtkWidget *wgt, GtkWidget *selector); void gse_cb_save_subtitle (GtkWidget *wgt, GtkWidget *selector); void gse_cb_get_filename_from_user (GtkWidget *wgt, gpointer data); void gse_cb_radio_mode_clicked (GtkWidget *btn, gpointer data); void gse_cb_combolang_changed (GtkWidget *entry, gpointer data); void gse_cb_mpl_btn_click (GtkWidget *btn, gpointer data); void gse_cb_btn_clicked (GtkWidget *btn, gpointer data); void gse_cb_clist_select_row (GtkWidget *clist, gpointer data); void gse_cb_clist_key_press_event (GtkWidget *clist, GdkEventKey *event, gpointer data); void gse_cb_text_edit_key_press_event (GtkWidget *clist, GdkEventKey *event, gpointer data); void gse_cb_text_edit_focus_out_event (GtkWidget *entry, GdkEventFocus *event, gpointer data); void gse_cb_clist_mouse_press_event (GtkWidget *clist, GdkEventButton *event, gpointer data); void gse_cb_clist_jump_to_line (GtkWidget *wgt, gpointer data); void gse_cb_clist_reindex (GtkWidget *wgt, gpointer data); void gse_cb_update_edit_changes (GtkWidget *btn, gpointer data); void gse_cb_displace_frames (GtkWidget *wgt, gdouble *data); void gse_cb_save_subtitle_same_file (GtkWidget *wgt, gpointer data); void gse_cb_convert_framrate (GtkWidget *wgt, gpointer data); void gse_cb_rm_hearing_impaired (GtkWidget *wgt, gpointer data); void gse_cb_join_files (GtkWidget *wgt, gpointer data); void gse_cb_split_file (GtkWidget *wgt, gpointer data); void gse_cb_toolbar_open_file (GtkWidget *wgt); void gse_cb_close_file (GtkWidget *wgt, gpointer data); void gse_cb_clist_delete_line (GtkWidget *wgt, gpointer data); void gse_cb_clist_insert_line (GtkWidget *wgt, gpointer data); void gse_cb_clist_move_up (GtkWidget *wgt, gpointer data); void gse_cb_clist_move_down (GtkWidget *wgt, gpointer data); void gse_cb_calc_fps (GtkWidget *wgt, gpointer data); void gse_cb_mwin_drop_recieved (GtkWidget *wgt, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint tm, gpointer user_data); /* Misc callbacks from dialogs (callbacks.c) */ void gse_cb_chk_save_after_conv_clicked (GtkWidget *wgt, gpointer data); void gse_cb_chk_hearing_impaired_click (GtkWidget *wgt, gpointer data); #endif /* _GUI_H */