| 1 | /* |
|---|
| 2 | * THIS FILE IS FOR DECLARATION/LISTING OF EXPORTED TO MODULES SYMBOLS |
|---|
| 3 | * |
|---|
| 4 | * CHDK-FLAT Module System. Sergey Taranenko aka tsvstar |
|---|
| 5 | */ |
|---|
| 6 | |
|---|
| 7 | #include "module_exportlist.h" |
|---|
| 8 | #include "lang.h" |
|---|
| 9 | #include "platform.h" |
|---|
| 10 | #include "stdlib.h" |
|---|
| 11 | #include "stdlib_unified.h" |
|---|
| 12 | #include "keyboard.h" |
|---|
| 13 | |
|---|
| 14 | #include "gui.h" |
|---|
| 15 | #include "gui_draw.h" |
|---|
| 16 | #include "gui_batt.h" |
|---|
| 17 | #include "gui_space.h" |
|---|
| 18 | #include "gui_menu.h" |
|---|
| 19 | #include "gui_osd.h" |
|---|
| 20 | #include "gui_mbox.h" |
|---|
| 21 | #include "gui_mpopup.h" |
|---|
| 22 | #include "conf.h" |
|---|
| 23 | #include "raw.h" |
|---|
| 24 | #include "bitvector.h" |
|---|
| 25 | #include "font.h" |
|---|
| 26 | |
|---|
| 27 | #include "modules.h" |
|---|
| 28 | #include "module_load.h" |
|---|
| 29 | #include "raw.h" |
|---|
| 30 | #include "action_stack.h" |
|---|
| 31 | #include "console.h" |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | extern int fselect_sort_nothumb(const void* v1, const void* v2); |
|---|
| 35 | extern short shooting_get_ev_correction1(); |
|---|
| 36 | |
|---|
| 37 | extern long shutter_open_time; // defined in platform/generic/capt_seq.c |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | // ATTENTION: DO NOT USE BRACES OR OWN /**/-STYLE COMMENTS ANYWHERE IN THIS FILE TO AVOID AUTO PARSING MISTAKES |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | // ** SECTION 1: DEFINE UNDECLARED EXPORTED ITEMS |
|---|
| 45 | |
|---|
| 46 | #ifndef CAM_FIRMWARE_MEMINFO |
|---|
| 47 | #define GetMemInfo 0 |
|---|
| 48 | #endif |
|---|
| 49 | #if !defined(OPT_EXMEM_MALLOC) |
|---|
| 50 | #define GetExMemInfo 0 |
|---|
| 51 | #endif |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | // ** SECTION 2: IMPLEMENTATION OF EXPORTED #define VALUES |
|---|
| 55 | // 1. PLEASE DO NOT CHANGE START AND FINAL COMMENTS TO CORRECT AUTOPARSING |
|---|
| 56 | |
|---|
| 57 | /* EXPORTED_DEFINES_BEGIN */ |
|---|
| 58 | |
|---|
| 59 | char SCREEN__EXPORTEDSYM_COLOR = SCREEN_COLOR ; |
|---|
| 60 | char COLOR__EXPORTEDSYM_WHITE = COLOR_WHITE ; |
|---|
| 61 | char COLOR__EXPORTEDSYM_RED = COLOR_RED ; |
|---|
| 62 | char COLOR__EXPORTEDSYM_GREY = COLOR_GREY ; |
|---|
| 63 | char COLOR__EXPORTEDSYM_GREEN = COLOR_GREEN ; |
|---|
| 64 | char COLOR__EXPORTEDSYM_BLUE_LT = COLOR_BLUE_LT ; |
|---|
| 65 | char COLOR__EXPORTEDSYM_BLUE = COLOR_BLUE ; |
|---|
| 66 | char COLOR__EXPORTEDSYM_YELLOW = COLOR_YELLOW ; |
|---|
| 67 | char COLOR__EXPORTEDSYM_BG = COLOR_BG ; |
|---|
| 68 | char COLOR__EXPORTEDSYM_FG = COLOR_FG ; |
|---|
| 69 | char COLOR__EXPORTEDSYM_SELECTED_BG = COLOR_SELECTED_BG ; |
|---|
| 70 | char COLOR__EXPORTEDSYM_SELECTED_FG = COLOR_SELECTED_FG ; |
|---|
| 71 | char COLOR__EXPORTEDSYM_ALT_BG = COLOR_ALT_BG ; |
|---|
| 72 | char COLOR__EXPORTEDSYM_SPLASH_RED = COLOR_SPLASH_RED ; |
|---|
| 73 | char COLOR__EXPORTEDSYM_SPLASH_PINK = COLOR_SPLASH_PINK ; |
|---|
| 74 | char COLOR__EXPORTEDSYM_SPLASH_GREY = COLOR_SPLASH_GREY ; |
|---|
| 75 | char COLOR__EXPORTEDSYM_HISTO_R = COLOR_HISTO_R ; |
|---|
| 76 | char COLOR__EXPORTEDSYM_HISTO_R_PLAY = COLOR_HISTO_R_PLAY ; |
|---|
| 77 | char COLOR__EXPORTEDSYM_HISTO_B = COLOR_HISTO_B ; |
|---|
| 78 | char COLOR__EXPORTEDSYM_HISTO_G = COLOR_HISTO_G ; |
|---|
| 79 | char COLOR__EXPORTEDSYM_HISTO_G_PLAY = COLOR_HISTO_G_PLAY ; |
|---|
| 80 | char COLOR__EXPORTEDSYM_HISTO_BG = COLOR_HISTO_BG ; |
|---|
| 81 | char COLOR__EXPORTEDSYM_HISTO_RG = COLOR_HISTO_RG ; |
|---|
| 82 | char COLOR__EXPORTEDSYM_HISTO_RB = COLOR_HISTO_RB ; |
|---|
| 83 | char COLOR__EXPORTEDSYM_HISTO_RB_PLAY = COLOR_HISTO_RB_PLAY ; |
|---|
| 84 | char COLOR__EXPORTEDSYM_HISTO_B_PLAY = COLOR_HISTO_B_PLAY ; |
|---|
| 85 | char COLOR__EXPORTEDSYM_HISTO_BG_PLAY = COLOR_HISTO_BG_PLAY ; |
|---|
| 86 | char COLOR__EXPORTEDSYM_HISTO_RG_PLAY = COLOR_HISTO_RG_PLAY ; |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | /* EXPORTED_DEFINES_END */ |
|---|
| 90 | |
|---|
| 91 | // ** SECTION 3: LIST OF EXPORTED SYMBOLS (pointer to function/variable) |
|---|
| 92 | // 1. DO NOT CHANGE ORDER AND DO NOT DELETE EXISTED ENTRIES |
|---|
| 93 | // 2. VARIABLE conf SHOULDN'T EXIST IN THE LIST TO KEEP ISOLATION. USE set|get_chdk_conf|get_chdk_conf_ptr INSTEAD |
|---|
| 94 | // STOPLIST: conf, open, opendir, closedir, rewinddir, readdir, stat |
|---|
| 95 | |
|---|
| 96 | void* CHDK_EXPORT_LIST[] = { |
|---|
| 97 | (void*)EXPORTLIST_MAGIC_NUMBER, |
|---|
| 98 | (void*)EXPORTLIST_LAST_IDX, |
|---|
| 99 | |
|---|
| 100 | module_async_unload, |
|---|
| 101 | module_set_flags, |
|---|
| 102 | module_run, |
|---|
| 103 | module_get_adr, |
|---|
| 104 | module_async_unload_allrunned, |
|---|
| 105 | module_rawop_load, |
|---|
| 106 | module_rawop_unload, |
|---|
| 107 | module_mpopup_init, |
|---|
| 108 | module_convert_dng_to_chdk_raw, |
|---|
| 109 | module_fselect_init, |
|---|
| 110 | module_fselect_init_w_mode, |
|---|
| 111 | module_grids_load, |
|---|
| 112 | |
|---|
| 113 | &altGuiHandler, |
|---|
| 114 | &camera_info, |
|---|
| 115 | &camera_screen, |
|---|
| 116 | &camera_sensor, |
|---|
| 117 | &gui_version, |
|---|
| 118 | &conf, |
|---|
| 119 | |
|---|
| 120 | malloc, |
|---|
| 121 | free, |
|---|
| 122 | umalloc, |
|---|
| 123 | ufree, |
|---|
| 124 | |
|---|
| 125 | write, |
|---|
| 126 | lseek, |
|---|
| 127 | safe_open, |
|---|
| 128 | close, |
|---|
| 129 | read, |
|---|
| 130 | remove, |
|---|
| 131 | rename, |
|---|
| 132 | safe_stat, |
|---|
| 133 | safe_opendir, |
|---|
| 134 | safe_readdir, |
|---|
| 135 | safe_closedir, |
|---|
| 136 | mkdir, |
|---|
| 137 | |
|---|
| 138 | fopen, |
|---|
| 139 | fclose, |
|---|
| 140 | fseek, |
|---|
| 141 | fread, |
|---|
| 142 | fwrite, |
|---|
| 143 | |
|---|
| 144 | get_tick_count, |
|---|
| 145 | time, |
|---|
| 146 | utime, |
|---|
| 147 | localtime, |
|---|
| 148 | rand, |
|---|
| 149 | srand, |
|---|
| 150 | qsort, |
|---|
| 151 | msleep, |
|---|
| 152 | |
|---|
| 153 | lang_str, |
|---|
| 154 | sprintf, |
|---|
| 155 | strlen, |
|---|
| 156 | strcpy, |
|---|
| 157 | strncmp, |
|---|
| 158 | strpbrk, |
|---|
| 159 | strchr, |
|---|
| 160 | strcmp, |
|---|
| 161 | strtol, |
|---|
| 162 | strrchr, |
|---|
| 163 | strncpy, |
|---|
| 164 | memcpy, |
|---|
| 165 | memset, |
|---|
| 166 | |
|---|
| 167 | draw_txt_string, |
|---|
| 168 | draw_string, |
|---|
| 169 | draw_rect, |
|---|
| 170 | draw_filled_rect, |
|---|
| 171 | draw_filled_ellipse, |
|---|
| 172 | draw_filled_round_rect, |
|---|
| 173 | draw_line, |
|---|
| 174 | draw_char, |
|---|
| 175 | draw_get_pixel, |
|---|
| 176 | draw_pixel, |
|---|
| 177 | draw_restore, |
|---|
| 178 | draw_txt_char, |
|---|
| 179 | draw_rect_thick, |
|---|
| 180 | draw_filled_rect_thick, |
|---|
| 181 | draw_rect_shadow, |
|---|
| 182 | draw_ellipse, |
|---|
| 183 | draw_clear, |
|---|
| 184 | draw_set_draw_proc, |
|---|
| 185 | |
|---|
| 186 | gui_get_mode, |
|---|
| 187 | gui_set_mode, |
|---|
| 188 | gui_default_kbd_process_menu_btn, |
|---|
| 189 | get_batt_perc, |
|---|
| 190 | gui_osd_draw_clock, |
|---|
| 191 | gui_mbox_init, |
|---|
| 192 | gui_browser_progress_show, |
|---|
| 193 | gui_activate_sub_menu, |
|---|
| 194 | gui_enum_value_change, |
|---|
| 195 | gui_force_restore, |
|---|
| 196 | gui_menu_run_fltmodule, |
|---|
| 197 | |
|---|
| 198 | gui_osd_calc_dof, |
|---|
| 199 | gui_osd_draw_dof, |
|---|
| 200 | gui_batt_draw_osd, |
|---|
| 201 | gui_space_draw_osd, |
|---|
| 202 | gui_osd_draw_state, |
|---|
| 203 | gui_osd_draw_raw_info, |
|---|
| 204 | gui_osd_draw_values, |
|---|
| 205 | gui_osd_draw_temp, |
|---|
| 206 | gui_osd_draw_histo, |
|---|
| 207 | |
|---|
| 208 | vid_get_bitmap_fb, |
|---|
| 209 | vid_get_viewport_fb, |
|---|
| 210 | vid_get_viewport_fb_d, |
|---|
| 211 | vid_get_viewport_live_fb, |
|---|
| 212 | vid_get_viewport_height, |
|---|
| 213 | vid_get_viewport_width, |
|---|
| 214 | vid_get_viewport_byte_width, |
|---|
| 215 | vid_get_viewport_xoffset, |
|---|
| 216 | vid_get_viewport_yoffset, |
|---|
| 217 | vid_get_viewport_image_offset, |
|---|
| 218 | vid_get_viewport_row_offset, |
|---|
| 219 | vid_get_viewport_yscale, |
|---|
| 220 | |
|---|
| 221 | get_raw_image_addr, |
|---|
| 222 | hook_raw_image_addr, |
|---|
| 223 | hook_raw_size, |
|---|
| 224 | raw_prepare_develop, |
|---|
| 225 | |
|---|
| 226 | kbd_get_autoclicked_key, |
|---|
| 227 | kbd_is_key_pressed, |
|---|
| 228 | kbd_key_press, |
|---|
| 229 | kbd_get_clicked_key, |
|---|
| 230 | kbd_reset_autoclicked_key, |
|---|
| 231 | get_jogdial_direction, |
|---|
| 232 | |
|---|
| 233 | // for rawop.flt |
|---|
| 234 | GetFreeCardSpaceKb, |
|---|
| 235 | debug_led, |
|---|
| 236 | |
|---|
| 237 | mode_get, |
|---|
| 238 | shooting_get_zoom, |
|---|
| 239 | shooting_set_zoom, |
|---|
| 240 | |
|---|
| 241 | // for txtread.flt |
|---|
| 242 | current_font, |
|---|
| 243 | rbf_char_width, |
|---|
| 244 | rbf_font_height, |
|---|
| 245 | rbf_draw_char, |
|---|
| 246 | rbf_load, |
|---|
| 247 | rbf_load_from_8x16, |
|---|
| 248 | rbf_set_codepage, |
|---|
| 249 | rbf_draw_string_len, |
|---|
| 250 | rbf_draw_menu_header, |
|---|
| 251 | |
|---|
| 252 | // for modinsp.flt |
|---|
| 253 | GetMemInfo, |
|---|
| 254 | GetExMemInfo, |
|---|
| 255 | |
|---|
| 256 | // for fselect.flt |
|---|
| 257 | img_prefixes, |
|---|
| 258 | img_exts, |
|---|
| 259 | GetTotalCardSpaceKb, |
|---|
| 260 | |
|---|
| 261 | // tetris.flt |
|---|
| 262 | TurnOnBackLight, |
|---|
| 263 | TurnOffBackLight, |
|---|
| 264 | |
|---|
| 265 | // modmenu.flt |
|---|
| 266 | load_from_file, |
|---|
| 267 | |
|---|
| 268 | action_stack_create, |
|---|
| 269 | action_pop, |
|---|
| 270 | action_push, |
|---|
| 271 | action_push_delay, |
|---|
| 272 | action_push_release, |
|---|
| 273 | action_stack_standard, |
|---|
| 274 | console_clear, |
|---|
| 275 | console_add_line, |
|---|
| 276 | |
|---|
| 277 | shooting_set_tv96_direct, |
|---|
| 278 | shooting_get_iso_market, |
|---|
| 279 | shooting_get_ev_correction1, |
|---|
| 280 | |
|---|
| 281 | get_focal_length, |
|---|
| 282 | get_effective_focal_length, |
|---|
| 283 | get_parameter_data, |
|---|
| 284 | get_property_case, |
|---|
| 285 | |
|---|
| 286 | &shutter_open_time, |
|---|
| 287 | &state_shooting_progress, |
|---|
| 288 | get_raw_pixel, |
|---|
| 289 | patch_bad_pixel, |
|---|
| 290 | |
|---|
| 291 | pow_calc, |
|---|
| 292 | pow_calc_2, |
|---|
| 293 | |
|---|
| 294 | // export palette |
|---|
| 295 | &SCREEN__EXPORTEDSYM_COLOR , |
|---|
| 296 | &COLOR__EXPORTEDSYM_WHITE , |
|---|
| 297 | &COLOR__EXPORTEDSYM_RED , |
|---|
| 298 | &COLOR__EXPORTEDSYM_GREY , |
|---|
| 299 | &COLOR__EXPORTEDSYM_GREEN , |
|---|
| 300 | &COLOR__EXPORTEDSYM_BLUE_LT , |
|---|
| 301 | &COLOR__EXPORTEDSYM_BLUE , |
|---|
| 302 | &COLOR__EXPORTEDSYM_YELLOW , |
|---|
| 303 | &COLOR__EXPORTEDSYM_BG , |
|---|
| 304 | &COLOR__EXPORTEDSYM_FG , |
|---|
| 305 | &COLOR__EXPORTEDSYM_SELECTED_BG , |
|---|
| 306 | &COLOR__EXPORTEDSYM_SELECTED_FG , |
|---|
| 307 | &COLOR__EXPORTEDSYM_ALT_BG , |
|---|
| 308 | &COLOR__EXPORTEDSYM_SPLASH_RED , |
|---|
| 309 | &COLOR__EXPORTEDSYM_SPLASH_PINK , |
|---|
| 310 | &COLOR__EXPORTEDSYM_SPLASH_GREY , |
|---|
| 311 | &COLOR__EXPORTEDSYM_HISTO_R , |
|---|
| 312 | &COLOR__EXPORTEDSYM_HISTO_R_PLAY , |
|---|
| 313 | &COLOR__EXPORTEDSYM_HISTO_B , |
|---|
| 314 | &COLOR__EXPORTEDSYM_HISTO_G , |
|---|
| 315 | &COLOR__EXPORTEDSYM_HISTO_G_PLAY , |
|---|
| 316 | &COLOR__EXPORTEDSYM_HISTO_BG , |
|---|
| 317 | &COLOR__EXPORTEDSYM_HISTO_RG , |
|---|
| 318 | &COLOR__EXPORTEDSYM_HISTO_RB , |
|---|
| 319 | &COLOR__EXPORTEDSYM_HISTO_RB_PLAY, |
|---|
| 320 | &COLOR__EXPORTEDSYM_HISTO_B_PLAY , |
|---|
| 321 | &COLOR__EXPORTEDSYM_HISTO_BG_PLAY, |
|---|
| 322 | &COLOR__EXPORTEDSYM_HISTO_RG_PLAY, |
|---|
| 323 | |
|---|
| 324 | 0 |
|---|
| 325 | }; |
|---|