2313
|
1 /* Audacious - Cross-platform multimedia player
|
|
2 * Copyright (C) 2005-2007 Audacious development team
|
|
3 *
|
|
4 * Based on BMP:
|
|
5 * Copyright (C) 2003-2004 BMP development team
|
|
6 *
|
|
7 * Based on XMMS:
|
|
8 * Copyright (C) 1998-2003 XMMS development team
|
|
9 *
|
|
10 * This program is free software; you can redistribute it and/or modify
|
|
11 * it under the terms of the GNU General Public License as published by
|
|
12 * the Free Software Foundation; under version 2 of the License.
|
|
13 *
|
|
14 * This program is distributed in the hope that it will be useful,
|
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17 * GNU General Public License for more details.
|
|
18 *
|
|
19 * You should have received a copy of the GNU General Public License
|
|
20 * along with this program; if not, write to the Free Software
|
|
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
22 */
|
|
23
|
2386
|
24 #ifndef AUD_MAIN_H
|
|
25 #define AUD_MAIN_H
|
2313
|
26
|
|
27 #ifdef _AUDACIOUS_CORE
|
|
28 # include "widgets/widgetcore.h"
|
|
29 # include "ui_main.h"
|
|
30 #endif
|
|
31
|
|
32 #include <sys/types.h>
|
|
33 #include <sys/stat.h>
|
|
34
|
|
35 G_BEGIN_DECLS
|
|
36
|
|
37 #define PLAYER_HEIGHT \
|
|
38 ((cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : MAINWIN_HEIGHT) * (cfg.doublesize + 1))
|
|
39 #define PLAYER_WIDTH \
|
|
40 (MAINWIN_WIDTH * (cfg.doublesize + 1))
|
|
41
|
|
42 struct _BmpConfig {
|
|
43 gint player_x, player_y;
|
|
44 gint equalizer_x, equalizer_y;
|
|
45 gint playlist_x, playlist_y;
|
|
46 gint playlist_width, playlist_height;
|
|
47 gint snap_distance;
|
|
48 gboolean use_realtime;
|
|
49 gboolean shuffle, repeat;
|
|
50 gboolean doublesize, autoscroll;
|
|
51 gboolean analyzer_peaks, equalizer_autoload, easy_move, equalizer_active;
|
|
52 gboolean playlist_visible, equalizer_visible, player_visible;
|
|
53 gboolean player_shaded, playlist_shaded, equalizer_shaded;
|
|
54 gboolean allow_multiple_instances, always_show_cb;
|
|
55 gboolean convert_underscore, convert_twenty, convert_slash;
|
|
56 gboolean show_numbers_in_pl;
|
|
57 gboolean snap_windows, save_window_position;
|
|
58 gboolean dim_titlebar;
|
|
59 gboolean get_info_on_load, get_info_on_demand;
|
|
60 gboolean eq_doublesize_linked;
|
|
61 gboolean sort_jump_to_file;
|
|
62 gboolean use_eplugins;
|
|
63 gboolean always_on_top, sticky;
|
|
64 gboolean no_playlist_advance;
|
|
65 gboolean stopaftersong;
|
|
66 gboolean refresh_file_list;
|
|
67 gboolean smooth_title_scroll;
|
|
68 gboolean use_pl_metadata;
|
|
69 gboolean warn_about_unplayables;
|
|
70 gboolean use_backslash_as_dir_delimiter;
|
|
71 gboolean random_skin_on_play;
|
|
72 gboolean use_fontsets;
|
|
73 gboolean mainwin_use_xfont;
|
|
74 gboolean custom_cursors;
|
|
75 gboolean close_dialog_open;
|
|
76 gboolean close_dialog_add;
|
|
77 gfloat equalizer_preamp, equalizer_bands[10];
|
|
78 gchar *skin;
|
|
79 gchar *outputplugin;
|
|
80 gchar *filesel_path;
|
|
81 gchar *playlist_path;
|
|
82 gchar *playlist_font, *mainwin_font;
|
|
83 gchar *disabled_iplugins;
|
|
84 gchar *enabled_gplugins, *enabled_vplugins, *enabled_eplugins;
|
|
85 gchar *eqpreset_default_file, *eqpreset_extension;
|
|
86 GList *url_history;
|
|
87 gint timer_mode;
|
|
88 gint vis_type;
|
|
89 gint analyzer_mode, analyzer_type;
|
|
90 gint scope_mode;
|
|
91 gint voiceprint_mode;
|
|
92 gint vu_mode, vis_refresh;
|
|
93 gint analyzer_falloff, peaks_falloff;
|
|
94 gint playlist_position;
|
|
95 gint pause_between_songs_time;
|
|
96 gboolean pause_between_songs;
|
|
97 gboolean show_wm_decorations;
|
|
98 gint mouse_change;
|
|
99 gboolean playlist_transparent;
|
|
100 gint titlestring_preset;
|
|
101 gchar *gentitle_format;
|
|
102 gboolean softvolume_enable;
|
|
103 gboolean xmms_compat_mode;
|
|
104 gboolean eq_extra_filtering;
|
|
105 gint scroll_pl_by;
|
|
106 gboolean resume_playback_on_startup;
|
|
107 gint resume_playback_on_startup_time;
|
|
108 gboolean show_separator_in_pl;
|
|
109 gchar *chardet_detector;
|
|
110 gchar *chardet_fallback;
|
|
111 gint output_buffer_size;
|
|
112 gboolean playlist_detect;
|
|
113 gboolean show_filepopup_for_tuple;
|
|
114 gchar *cover_name_include, *cover_name_exclude;
|
|
115 gboolean recurse_for_cover;
|
|
116 gint recurse_for_cover_depth;
|
|
117 gchar *session_uri_base;
|
|
118 gint filepopup_pixelsize;
|
|
119 gint filepopup_delay;
|
|
120 gboolean use_file_cover;
|
|
121 gboolean use_xmms_style_fileselector;
|
|
122 gboolean use_extension_probing;
|
|
123 gint colorize_r; gint colorize_g; gint colorize_b;
|
|
124 gboolean terminate;
|
2405
|
125 gboolean filepopup_showprogressbar;
|
2313
|
126 };
|
|
127
|
|
128 typedef struct _BmpConfig BmpConfig;
|
|
129
|
|
130 enum {
|
|
131 VOLSET_STARTUP,
|
|
132 VOLSET_UPDATE,
|
|
133 VOLUME_ADJUSTED,
|
|
134 VOLUME_SET
|
|
135 };
|
|
136
|
|
137 enum {
|
|
138 BMP_PATH_LOG_FILE,
|
|
139 BMP_PATH_USER_DIR,
|
|
140 BMP_PATH_USER_PLUGIN_DIR,
|
|
141 BMP_PATH_USER_SKIN_DIR,
|
|
142 BMP_PATH_SKIN_THUMB_DIR,
|
|
143 BMP_PATH_ACCEL_FILE,
|
|
144 BMP_PATH_CONFIG_FILE,
|
|
145 BMP_PATH_PLAYLIST_FILE,
|
2463
|
146 BMP_PATH_GTKRC_FILE,
|
2313
|
147 BMP_PATH_COUNT
|
|
148 };
|
|
149
|
|
150 extern BmpConfig cfg;
|
|
151 extern BmpConfig bmp_default_config;
|
|
152
|
|
153 extern gchar *bmp_paths[];
|
|
154
|
|
155 extern const gchar *bmp_titlestring_presets[];
|
|
156 extern const guint n_titlestring_presets;
|
|
157
|
|
158 extern const gchar *chardet_detector_presets[];
|
|
159 extern const guint n_chardet_detector_presets;
|
|
160
|
|
161 extern GList *dock_window_list;
|
|
162 extern gboolean pposition_broken;
|
|
163
|
|
164 extern gboolean starting_up;
|
|
165
|
|
166 extern gboolean has_x11_connection;
|
|
167
|
|
168 void bmp_config_save(void);
|
|
169 void bmp_config_load(void);
|
|
170 void make_directory(const gchar * path, mode_t mode);
|
|
171 void report_error(const gchar *error_text);
|
|
172
|
|
173 extern GCond *cond_scan;
|
|
174 extern GMutex *mutex_scan;
|
|
175
|
|
176 G_END_DECLS
|
|
177
|
|
178 #endif
|