| 1 | #ifndef CONF_H |
|---|
| 2 | #define CONF_H |
|---|
| 3 | |
|---|
| 4 | #include "gui.h" |
|---|
| 5 | #include "script.h" |
|---|
| 6 | |
|---|
| 7 | #define USER_MENU_ITEMS 14 |
|---|
| 8 | |
|---|
| 9 | typedef struct { |
|---|
| 10 | unsigned short x, y; |
|---|
| 11 | } OSD_pos; |
|---|
| 12 | |
|---|
| 13 | typedef struct { |
|---|
| 14 | int save_raw; |
|---|
| 15 | int save_raw_in_video; |
|---|
| 16 | int save_raw_in_sports; |
|---|
| 17 | int save_raw_in_burst; |
|---|
| 18 | int save_raw_in_edgeoverlay; |
|---|
| 19 | int save_raw_in_auto; |
|---|
| 20 | int save_raw_in_ev_bracketing; |
|---|
| 21 | int save_raw_in_timer; |
|---|
| 22 | int raw_exceptions_warn; |
|---|
| 23 | int raw_in_dir; |
|---|
| 24 | int raw_prefix; |
|---|
| 25 | int raw_ext; |
|---|
| 26 | int raw_save_first_only; //for series shooting |
|---|
| 27 | int raw_nr; |
|---|
| 28 | int sub_batch_prefix; // output of batch subtracts |
|---|
| 29 | int sub_batch_ext; |
|---|
| 30 | int sub_in_dark_value; // values <= to this are not subtracted, i.e. the dark value of your darkframe |
|---|
| 31 | int sub_out_dark_value; // minimum value to output from subtract, i.e. dark value of your final image |
|---|
| 32 | int raw_cache; |
|---|
| 33 | int dng_raw; |
|---|
| 34 | int raw_timer; |
|---|
| 35 | int raw_dng_ext; |
|---|
| 36 | int dng_usb_ext; |
|---|
| 37 | |
|---|
| 38 | int show_osd; |
|---|
| 39 | int hide_osd; |
|---|
| 40 | int show_osd_in_review; |
|---|
| 41 | int script_shoot_delay; |
|---|
| 42 | int show_histo; |
|---|
| 43 | int ubasic_vars[SCRIPT_NUM_PARAMS]; |
|---|
| 44 | char script_file[100]; |
|---|
| 45 | |
|---|
| 46 | int show_dof; |
|---|
| 47 | int batt_volts_max; |
|---|
| 48 | int batt_volts_min; |
|---|
| 49 | int batt_step_25; |
|---|
| 50 | int batt_perc_show; |
|---|
| 51 | int batt_volts_show; |
|---|
| 52 | int batt_icon_show; |
|---|
| 53 | int space_bar_show; |
|---|
| 54 | int space_bar_size; |
|---|
| 55 | int space_bar_width; |
|---|
| 56 | int space_icon_show; |
|---|
| 57 | int show_clock; |
|---|
| 58 | int show_temp; |
|---|
| 59 | int temperature_unit; |
|---|
| 60 | int clock_format; |
|---|
| 61 | int clock_indicator; |
|---|
| 62 | int clock_halfpress; |
|---|
| 63 | int space_perc_show; |
|---|
| 64 | int space_mb_show; |
|---|
| 65 | int space_perc_warn; |
|---|
| 66 | int space_mb_warn; |
|---|
| 67 | int space_warn_type; |
|---|
| 68 | int show_movie_time; |
|---|
| 69 | int show_movie_refresh; |
|---|
| 70 | |
|---|
| 71 | int zoom_value; |
|---|
| 72 | |
|---|
| 73 | int show_state; |
|---|
| 74 | int show_remaining_raw; |
|---|
| 75 | int remaining_raw_treshold; |
|---|
| 76 | int show_raw_state; |
|---|
| 77 | int show_values; |
|---|
| 78 | int show_values_in_video; |
|---|
| 79 | int show_overexp; |
|---|
| 80 | |
|---|
| 81 | int histo_mode; |
|---|
| 82 | int histo_auto_ajust; |
|---|
| 83 | int histo_ignore_boundary; |
|---|
| 84 | int histo_layout; |
|---|
| 85 | int histo_show_ev_grid; |
|---|
| 86 | |
|---|
| 87 | int zebra_draw; |
|---|
| 88 | int zebra_mode; |
|---|
| 89 | int zebra_restore_screen; |
|---|
| 90 | int zebra_restore_osd; |
|---|
| 91 | int zebra_over; |
|---|
| 92 | int zebra_under; |
|---|
| 93 | int zebra_draw_osd; |
|---|
| 94 | int zebra_multichannel; |
|---|
| 95 | |
|---|
| 96 | OSD_pos histo_pos; |
|---|
| 97 | OSD_pos dof_pos; |
|---|
| 98 | OSD_pos batt_icon_pos; |
|---|
| 99 | OSD_pos space_icon_pos; |
|---|
| 100 | OSD_pos space_hor_pos; |
|---|
| 101 | OSD_pos space_ver_pos; |
|---|
| 102 | OSD_pos batt_txt_pos; |
|---|
| 103 | OSD_pos space_txt_pos; |
|---|
| 104 | OSD_pos mode_state_pos; |
|---|
| 105 | OSD_pos mode_raw_pos; |
|---|
| 106 | OSD_pos values_pos; |
|---|
| 107 | OSD_pos clock_pos; |
|---|
| 108 | OSD_pos mode_video_pos; |
|---|
| 109 | OSD_pos mode_ev_pos; |
|---|
| 110 | OSD_pos temp_pos; |
|---|
| 111 | OSD_pos ev_video_pos; |
|---|
| 112 | |
|---|
| 113 | color histo_color; |
|---|
| 114 | color histo_color2; // markers/border |
|---|
| 115 | color osd_color; |
|---|
| 116 | color osd_color_warn; |
|---|
| 117 | color batt_icon_color; |
|---|
| 118 | color space_color; |
|---|
| 119 | color menu_color; |
|---|
| 120 | color menu_title_color; |
|---|
| 121 | color menu_cursor_color; |
|---|
| 122 | color menu_symbol_color; |
|---|
| 123 | int menu_center; |
|---|
| 124 | int menu_select_first_entry; |
|---|
| 125 | int menu_symbol_enable; |
|---|
| 126 | color reader_color; |
|---|
| 127 | color zebra_color; // under/over |
|---|
| 128 | color grid_color; |
|---|
| 129 | color osd_color_override; |
|---|
| 130 | |
|---|
| 131 | int font_cp; |
|---|
| 132 | char menu_rbf_file[100]; |
|---|
| 133 | char menu_symbol_rbf_file[100]; |
|---|
| 134 | |
|---|
| 135 | char lang_file[100]; |
|---|
| 136 | |
|---|
| 137 | char reader_file[100]; |
|---|
| 138 | int reader_pos; |
|---|
| 139 | int reader_autoscroll; |
|---|
| 140 | int reader_autoscroll_delay; |
|---|
| 141 | char reader_rbf_file[100]; |
|---|
| 142 | int reader_codepage; |
|---|
| 143 | int reader_wrap_by_words; |
|---|
| 144 | |
|---|
| 145 | int sokoban_level; |
|---|
| 146 | |
|---|
| 147 | int flashlight; |
|---|
| 148 | int fast_ev; |
|---|
| 149 | int fast_ev_step; |
|---|
| 150 | int fast_image_quality; |
|---|
| 151 | int fast_movie_control; |
|---|
| 152 | int fast_movie_quality_control; |
|---|
| 153 | int splash_show; |
|---|
| 154 | int start_sound; |
|---|
| 155 | int platformid; |
|---|
| 156 | |
|---|
| 157 | int use_zoom_mf; |
|---|
| 158 | long alt_mode_button; // for S-series |
|---|
| 159 | int alt_prevent_shutdown; |
|---|
| 160 | |
|---|
| 161 | int show_grid_lines; |
|---|
| 162 | char grid_lines_file[100]; |
|---|
| 163 | int grid_force_color; |
|---|
| 164 | |
|---|
| 165 | int video_mode; |
|---|
| 166 | int video_quality; |
|---|
| 167 | int video_bitrate; |
|---|
| 168 | |
|---|
| 169 | int tv_bracket_value; |
|---|
| 170 | int av_bracket_value; |
|---|
| 171 | int iso_bracket_value; |
|---|
| 172 | int iso_bracket_koef; |
|---|
| 173 | int subj_dist_bracket_value; |
|---|
| 174 | int subj_dist_bracket_koef; |
|---|
| 175 | int bracket_type; |
|---|
| 176 | int bracketing_add_raw_suffix; |
|---|
| 177 | int clear_bracket; |
|---|
| 178 | int clear_video; |
|---|
| 179 | int override_disable; |
|---|
| 180 | int override_disable_all; |
|---|
| 181 | |
|---|
| 182 | int tv_override_value; |
|---|
| 183 | int tv_override_koef; |
|---|
| 184 | int tv_enum_type; |
|---|
| 185 | int av_override_value; |
|---|
| 186 | |
|---|
| 187 | int nd_filter_state; |
|---|
| 188 | |
|---|
| 189 | int iso_override_value; |
|---|
| 190 | int iso_override_koef; |
|---|
| 191 | int zoom_override_value; |
|---|
| 192 | int zoom_override; |
|---|
| 193 | int subj_dist_override_value; |
|---|
| 194 | int subj_dist_override_koef; |
|---|
| 195 | int clear_override; |
|---|
| 196 | int clear_zoom_override; |
|---|
| 197 | |
|---|
| 198 | int autoiso_enable; |
|---|
| 199 | int autoiso_shutter; |
|---|
| 200 | int autoiso_user_factor; |
|---|
| 201 | int autoiso_is_factor; |
|---|
| 202 | int autoiso_max_iso_hi; |
|---|
| 203 | int autoiso_max_iso_auto; |
|---|
| 204 | int autoiso_min_iso; |
|---|
| 205 | |
|---|
| 206 | int recalc_exposure; |
|---|
| 207 | int tv_exposure_order; |
|---|
| 208 | int av_exposure_order; |
|---|
| 209 | int iso_exposure_order; |
|---|
| 210 | |
|---|
| 211 | int dof_subj_dist_as_near_limit; |
|---|
| 212 | int dof_use_exif_subj_dist; |
|---|
| 213 | int dof_subj_dist_in_misc; |
|---|
| 214 | int dof_near_limit_in_misc; |
|---|
| 215 | int dof_far_limit_in_misc; |
|---|
| 216 | int dof_hyperfocal_in_misc; |
|---|
| 217 | int dof_depth_in_misc; |
|---|
| 218 | int dof_dist_from_lens; |
|---|
| 219 | |
|---|
| 220 | int values_show_in_review; |
|---|
| 221 | int values_show_zoom; |
|---|
| 222 | int values_show_real_aperture; |
|---|
| 223 | int values_show_real_iso; |
|---|
| 224 | int values_show_market_iso; |
|---|
| 225 | int values_show_iso_only_in_autoiso_mode; |
|---|
| 226 | int values_show_ev_seted; |
|---|
| 227 | int values_show_ev_measured; |
|---|
| 228 | int values_show_bv_measured; |
|---|
| 229 | int values_show_bv_seted; |
|---|
| 230 | int values_show_overexposure; |
|---|
| 231 | int values_show_canon_overexposure; |
|---|
| 232 | int values_show_luminance; |
|---|
| 233 | |
|---|
| 234 | int debug_shortcut_action; // 0=none, 1=dump, 2=page display |
|---|
| 235 | int debug_display; // 0=none, 1=props, 2=flash param, 3=tasks |
|---|
| 236 | int debug_propcase_page; // save propcase page |
|---|
| 237 | int debug_lua_restart_on_error; // 0=no, 1=yes |
|---|
| 238 | int debug_misc_vals_show; // 0=no, 1=yes |
|---|
| 239 | |
|---|
| 240 | int script_startup; // remote autostart |
|---|
| 241 | int remote_enable; // remote enable |
|---|
| 242 | int user_menu_enable; |
|---|
| 243 | int user_menu_vars[USER_MENU_ITEMS]; |
|---|
| 244 | int user_menu_as_root; |
|---|
| 245 | int zoom_scale; |
|---|
| 246 | int unlock_optical_zoom_for_video; |
|---|
| 247 | int mute_on_zoom; |
|---|
| 248 | int bad_pixel_removal; |
|---|
| 249 | int video_af_key; |
|---|
| 250 | |
|---|
| 251 | char curve_file[100]; |
|---|
| 252 | int curve_enable; |
|---|
| 253 | |
|---|
| 254 | int edge_overlay_enable; |
|---|
| 255 | int edge_overlay_filter; |
|---|
| 256 | int edge_overlay_thresh; |
|---|
| 257 | int edge_overlay_zoom; // shall zoom be set when *edg file is loaded? |
|---|
| 258 | int edge_overlay_pano; // whether a full press changes back to live mode |
|---|
| 259 | int edge_overlay_pano_overlap; // overlap in % in pano mode |
|---|
| 260 | int edge_overlay_show; // whether to show overlay even when no button is pressed |
|---|
| 261 | int edge_overlay_play; // whether edge overlay is switched on also for play mode |
|---|
| 262 | color edge_overlay_color; |
|---|
| 263 | |
|---|
| 264 | int synch_enable; |
|---|
| 265 | int ricoh_ca1_mode; |
|---|
| 266 | int synch_delay_enable; |
|---|
| 267 | int synch_delay_value; |
|---|
| 268 | int synch_delay_coarse_value; |
|---|
| 269 | int remote_zoom_enable; |
|---|
| 270 | int zoom_timeout; |
|---|
| 271 | |
|---|
| 272 | int script_param_set; |
|---|
| 273 | int script_param_save; |
|---|
| 274 | |
|---|
| 275 | long mem_view_addr_init; |
|---|
| 276 | int flash_sync_curtain; |
|---|
| 277 | int flash_video_override; |
|---|
| 278 | int flash_manual_override; |
|---|
| 279 | int flash_video_override_power; |
|---|
| 280 | } Conf; |
|---|
| 281 | |
|---|
| 282 | extern Conf conf; |
|---|
| 283 | |
|---|
| 284 | #define ALT_PREVENT_SHUTDOWN_NO 0 |
|---|
| 285 | #define ALT_PREVENT_SHUTDOWN_ALT 1 |
|---|
| 286 | #define ALT_PREVENT_SHUTDOWN_ALT_SCRIPT 2 |
|---|
| 287 | #define ALT_PREVENT_SHUTDOWN_ALWAYS 3 |
|---|
| 288 | |
|---|
| 289 | #define SHOOTING_PROGRESS_NONE 0 |
|---|
| 290 | #define SHOOTING_PROGRESS_STARTED 1 |
|---|
| 291 | #define SHOOTING_PROGRESS_PROCESSING 2 |
|---|
| 292 | #define SHOOTING_PROGRESS_DONE 3 |
|---|
| 293 | |
|---|
| 294 | // video quality defaults. Ideally, these should match the camera default settings |
|---|
| 295 | #define VIDEO_DEFAULT_QUALITY 84 // ? where does 84 come from |
|---|
| 296 | #define VIDEO_MAX_QUALITY 99 |
|---|
| 297 | #define VIDEO_DEFAULT_BITRATE 3 // should be 1 for all cams |
|---|
| 298 | |
|---|
| 299 | extern int state_kbd_script_run; |
|---|
| 300 | extern int state_shooting_progress; |
|---|
| 301 | extern int state_save_raw_nth_only; |
|---|
| 302 | extern int state_expos_recalculated; |
|---|
| 303 | extern int state_expos_under; |
|---|
| 304 | extern int state_expos_over; |
|---|
| 305 | |
|---|
| 306 | extern void script_autostart(); // remote autostart |
|---|
| 307 | extern void conf_save(); |
|---|
| 308 | extern void conf_restore(); |
|---|
| 309 | extern void conf_load_defaults(); |
|---|
| 310 | extern int shutter_int; |
|---|
| 311 | extern void conf_change_dng(void); |
|---|
| 312 | extern void conf_update_prevent_shutdown(void); |
|---|
| 313 | |
|---|
| 314 | // reyalp: putting these in conf, since the conf values are lookups for them |
|---|
| 315 | // prefixes and extentions available for raw images (index with conf.raw_prefix etc) |
|---|
| 316 | #define NUM_IMG_PREFIXES 3 // IMG_ CRW_ SND_ (could add ETC_ SDR_ AUT_ MVI_ MRK_) |
|---|
| 317 | #define NUM_IMG_EXTS 5 // .JPG .CRW .CR2 .THM .WAV (could add .AVI .MRK) |
|---|
| 318 | extern const char* img_prefixes[NUM_IMG_PREFIXES]; |
|---|
| 319 | extern const char* img_exts[NUM_IMG_EXTS]; |
|---|
| 320 | // ugh, but various things need it |
|---|
| 321 | #define VIDEO_BITRATE_STEPS 10 |
|---|
| 322 | extern const char *video_bitrate_strings[VIDEO_BITRATE_STEPS]; |
|---|
| 323 | |
|---|
| 324 | extern int is_raw_enabled(); |
|---|
| 325 | |
|---|
| 326 | #endif |
|---|