1 
2 /*
3  * The Real SoundTracker - GUI configuration dialog (header)
4  *
5  * Copyright (C) 1999-2019 Michael Krause
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef _ST_GUI_SETTINGS_H
23 #define _ST_GUI_SETTINGS_H
24 
25 #include <gtk/gtk.h>
26 #include "sample-display.h"
27 #include "track-editor.h"
28 
29 typedef struct gui_prefs {
30     gchar* tracker_line_format;
31     gchar* tracker_font;
32     gboolean tracker_hexmode;
33     gboolean tracker_upcase;
34     gboolean tracker_ft2_volume;
35     gboolean tracker_ft2_wide;
36     gboolean tracker_ft2_tpm;
37     gboolean tracker_vol_dec;
38     gboolean highlight_rows;
39     int highlight_rows_n;
40     int highlight_rows_minor_n;
41     gboolean clavier_colors_gtk;
42     const gchar* clavier_font;
43 
44     gboolean advance_cursor_in_fx_columns;
45     gboolean asynchronous_editing;
46     gboolean try_polyphony;
47     gboolean repeat_same_note;
48     gboolean insert_noteoff;
49     gboolean precise_timing;
50     gboolean looped;
51 
52     gboolean tempo_bpm_update;
53     gboolean rxx_bug_emu;
54     gboolean use_filter;
55     gboolean auto_switch;
56     gboolean add_extension;
57 
58     gboolean gui_display_scopes;
59     gboolean gui_disable_splash;
60     gboolean gui_use_backing_store;
61 
62     gboolean save_geometry;
63     gboolean save_settings_on_exit;
64 
65     gboolean sharp;
66     gboolean bh;
67 
68     int tracker_update_freq;
69     int scopes_update_freq;
70     int scopes_buffer_size;
71     gdouble delay_comp;
72 
73     int st_window_x;
74     int st_window_y;
75     int st_window_w;
76     int st_window_h;
77 
78     gboolean store_perm;
79     guint32 permanent_channels;
80     gint undo_size;
81 
82     SampleDisplayMode scopes_mode, editor_mode, sampling_mode;
83     SelectionMode selection_mode;
84 
85     gchar* loadmod_path;
86     gchar* savemod_path;
87     gchar* savemodaswav_path;
88     gchar* savesongasxm_path;
89     gchar* loadsmpl_path;
90     gchar* savesmpl_path;
91     gchar* loadinstr_path;
92     gchar* saveinstr_path;
93     gchar* loadpat_path;
94     gchar* savepat_path;
95 
96     gchar* rm_path;
97     gchar* unzip_path;
98     gchar* lha_path;
99     gchar* gz_path;
100     gchar* bz2_path;
101 
102     guint file_out_channels;
103     guint file_out_mixfreq;
104     guint file_out_resolution;
105 } gui_prefs;
106 
107 extern gui_prefs gui_settings;
108 
109 void gui_settings_dialog(void);
110 
111 void gui_settings_load_config(void);
112 void gui_settings_save_config(void);
113 void gui_settings_save_config_always(void);
114 
115 void gui_settings_highlight_rows_changed(GtkSpinButton* spin);
116 void gui_settings_highlight_rows_minor_changed(GtkSpinButton* spin);
117 
118 void gui_settings_make_path(const gchar* fn,
119     gchar** store);
120 #define ASYNCEDIT (gui_settings.asynchronous_editing)
121 
122 #endif /* _ST_GUI_SETTINGS_H */
123