mp3splt-gtk: src/player_window.h Source File

mp3splt-gtk 0.9.3.1519

Loading...
Searching...
No Matches
player_window.h
1/**********************************************************
2 *
3 * mp3splt-gtk -- utility based on mp3splt,
4 * for mp3/ogg splitting without decoding
5 *
6 * Copyright (c) 2005-2014 Alexandru Munteanu - m@ioalex.net
7 *
8 * http://mp3splt.sourceforge.net/
9 *
10 *********************************************************/
11
12/**********************************************************
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
27 * USA.
28 *
29 *********************************************************/
30
31/**********************************************************
32 * Filename: player_window.h
33 *
34 * header of player_window.c
35 *
36 *********************************************************/
37
38#ifndef PLAYER_WINDOW_H
39
40#define PLAYER_WINDOW_H
41
42#include "all_includes.h"
43
44#define ICON_EXT ".svg"
45
46#define DEFAULT_TIMEOUT_VALUE 200
47
48#define DEFAULT_GSTREAMER_STOP_BEFORE_END_VALUE 200
49
50#define DEFAULT_SMALL_SEEK_JUMP_VALUE 300
51#define DEFAULT_SEEK_JUMP_VALUE 0
52#define DEFAULT_BIG_SEEK_JUMP_VALUE 0
53
54#define DEFAULT_SILENCE_WAVE_NUMBER_OF_POINTS_THRESHOLD 4000
55
56//float comparison
57#define DELTA 5
58
59#define HUNDR_SECONDS 1
60#define TENS_OF_SECONDS 10
61#define SECONDS 100
62#define TEN_SECONDS 1000
63#define MINUTES 6000
64#define TEN_MINUTES 60000
65#define HOURS 360000
66
67void player_quick_preview(gint splitpoint_to_preview, ui_state *ui);
68void check_update_down_progress_bar(ui_state *ui);
69void cancel_quick_preview_all(ui_state *ui);
70void cancel_quick_preview(gui_status *status);
71void enable_player_buttons(ui_state *ui);
72void connect_to_player_with_song(gint i, ui_state *ui);
73void connect_button_event(GtkWidget *widget, ui_state *ui);
74void disconnect_button_event(GtkWidget *widget, ui_state *ui);
75void pause_event(GtkWidget *widget, ui_state *ui);
76void refresh_drawing_area(gui_state *gui, ui_infos *infos);
77gfloat get_right_drawing_time(gfloat current_time, gfloat total_time, gfloat zoom_coeff);
78gfloat get_left_drawing_time(gfloat current_time, gfloat total_time, gfloat zoom_coeff);
79
80GtkWidget *create_player_control_frame(ui_state *ui);
81
82void file_chooser_ok_event(const gchar *fname, ui_state *ui);
83
84void change_current_filename(const gchar *fname, ui_state *ui);
85GtkWidget *create_player_playlist_frame(ui_state *ui);
86
87void hide_connect_button(gui_state *gui);
88void show_connect_button(gui_state *gui);
89
90void restart_player_timer(ui_state *ui);
91
92void compute_douglas_peucker_filters(ui_state *ui);
93
94gint draw_silence_wave(gint left_mark, gint right_mark,
95 gint interpolation_text_x, gint interpolation_text_y,
96 gfloat draw_time, gint width_drawing_area, gint y_margin,
97 gfloat current_time, gfloat total_time, gfloat zoom_coeff,
98 GtkWidget *da, cairo_t *gc, ui_state *ui);
99
100void get_current_splitpoints_time_left_right(gint *time_left, gint *time_right,
101 gint *splitpoint_left, ui_state *ui);
102void player_key_actions_set_sensitivity(gboolean sensitivity, gui_state *gui);
103void adjust_zoom_coeff(ui_infos *infos);
104
105void add_playlist_file(const gchar *name, ui_state *ui);
106
107void set_preview_start_position_safe(gint value, ui_state *ui);
108gint get_preview_start_position_safe(ui_state *ui);
109
110void set_quick_preview_end_splitpoint_safe(gint value, ui_state *ui);
111gint get_quick_preview_end_splitpoint_safe(ui_state *ui);
112
113void set_currently_scanning_for_silence_safe(gint value, ui_state *ui);
114gint get_currently_scanning_for_silence_safe(ui_state *ui);
115
116void clear_previous_distances(ui_state *ui);
117
118#endif
119
get_left_drawing_time
gfloat get_left_drawing_time(gfloat current_time, gfloat total_time, gfloat zoom_coeff)
returns the value of the left drawing area
Definition player_window.c:1437
show_connect_button
void show_connect_button(gui_state *gui)
Show the connect button.
Definition player_window.c:427
get_right_drawing_time
gfloat get_right_drawing_time(gfloat current_time, gfloat total_time, gfloat zoom_coeff)
returns the value of the right drawing area
Definition player_window.c:1428
change_current_filename
void change_current_filename(const gchar *fname, ui_state *ui)
Change the name of the song that is to be cut and played.
Definition player_window.c:261
create_player_playlist_frame
GtkWidget * create_player_playlist_frame(ui_state *ui)
creates the playlist of the player
Definition player_window.c:3259
enable_player_buttons
void enable_player_buttons(ui_state *ui)
enables the buttons of the player
Definition player_window.c:341
create_player_control_frame
GtkWidget * create_player_control_frame(ui_state *ui)
creates the control player frame, stop button, play button, etc.
Definition player_window.c:3045
player_quick_preview
void player_quick_preview(gint splitpoint_to_preview, ui_state *ui)
makes a preview of the song
Definition player_window.c:2661
disconnect_button_event
void disconnect_button_event(GtkWidget *widget, ui_state *ui)
disconnect button event
Definition player_window.c:637
pause_event
void pause_event(GtkWidget *widget, ui_state *ui)
pause button event
Definition player_window.c:749
check_update_down_progress_bar
void check_update_down_progress_bar(ui_state *ui)
updates bottom progress bar
Definition player_window.c:1094
add_playlist_file
void add_playlist_file(const gchar *name, ui_state *ui)
add a row to the table
Definition player_window.c:3080
hide_connect_button
void hide_connect_button(gui_state *gui)
Hide the connect button.
Definition player_window.c:403
draw_silence_wave
gint draw_silence_wave(gint left_mark, gint right_mark, gint interpolation_text_x, gint interpolation_text_y, gfloat draw_time, gint width_drawing_area, gint y_margin, gfloat current_time, gfloat total_time, gfloat zoom_coeff, GtkWidget *da, cairo_t *gc, ui_state *ui)
Draws the silence wave.
Definition player_window.c:1963
connect_button_event
void connect_button_event(GtkWidget *widget, ui_state *ui)
play button event
Definition player_window.c:533
cancel_quick_preview
void cancel_quick_preview(gui_status *status)
cancels preview
Definition player_window.c:1656
cancel_quick_preview_all
void cancel_quick_preview_all(ui_state *ui)
full cancel of the preview
Definition player_window.c:1648
connect_to_player_with_song
void connect_to_player_with_song(gint i, ui_state *ui)
connects to player with the song from the filename entry
Definition player_window.c:527
gui_state
Definition ui_types.h:227
gui_status
Definition ui_types.h:439
ui_infos
Definition ui_types.h:104
ui_state
Definition ui_types.h:509