CHDK_DE Vorschauversion  Trunk Rev. 5779
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
gui.c-Dateireferenz
#include "platform.h"
#include "touchscreen.h"
#include "conf.h"
#include "font.h"
#include "lang.h"
#include "fileutil.h"
#include "gui.h"
#include "gui_lang.h"
#include "gui_draw.h"
#include "gui_menu.h"
#include "gui_user_menu.h"
#include "gui_mbox.h"
#include "gui_hexbox.h"
#include "gui_osd.h"
#include "console.h"
#include "raw.h"
#include "modules.h"
#include "levent.h"
#include "callfunc.h"
#include "usb_remote.h"
#include "module_load.h"
#include "clock.h"
#include "dirent.h"
+ Include-Abhängigkeitsdiagramm für gui.c:

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define SPLASH_TIME   20
 
#define _XSTR(x)   #x
 
#define STR(x)   _XSTR(x)
 
#define TEXT_COUNT   4
 
#define LOGO_WIDTH   169
 
#define LOGO_HEIGHT   74
 

Funktionen

void schedule_memdump ()
 
void gui_enum_value_change (int *value, int change, unsigned num_items)
 
static const char * gui_change_simple_enum (int *value, int change, const char **items, unsigned num_items)
 
const char * gui_change_enum2 (const CMenuItem *menu_item, int change)
 
static const char * gui_USB_switch_types_enum (int change, __attribute__((unused)) int arg)
 
static const char * gui_USB_control_modes_enum (int change, __attribute__((unused)) int arg)
 
static void gui_draw_read_selected (const char *fn)
 
static void gui_draw_read (__attribute__((unused)) int arg)
 
static void gui_draw_read_last (int arg)
 
static void gui_draw_rbf_selected (const char *fn)
 
static void gui_draw_load_rbf (__attribute__((unused)) int arg)
 
int submenu_sort (const void *v1, const void *v2)
 
static CMenuItemcreate_module_menu (int mtype, char symbol)
 
static void gui_module_menu (CMenu *m, int type)
 
static void gui_games_menu (__attribute__((unused)) int arg)
 
static void gui_tools_menu (__attribute__((unused)) int arg)
 
static void gui_menuproc_mkbootdisk (__attribute__((unused)) int arg)
 
static void gui_delete_module_log_callback (unsigned int btn)
 
static void gui_delete_module_log (__attribute__((unused)) int arg)
 
static void gui_draw_fselect (__attribute__((unused)) int arg)
 
static void gui_show_build_info (__attribute__((unused)) int arg)
 
static void gui_show_memory_info (__attribute__((unused)) int arg)
 
static void lua_native_call_warning (unsigned int btn)
 
static void gui_lua_native_call_warning ()
 
static void gui_console_clear (__attribute__((unused)) int arg)
 
static void gui_console_show (__attribute__((unused)) int arg)
 
static void cb_perc ()
 
static void cb_volts ()
 
static void cb_batt_max ()
 
static void cb_batt_min ()
 
void cb_space_perc ()
 
void cb_space_mb ()
 
const char * gui_video_bitrate_enum (int change, __attribute__((unused)) int arg)
 
const char * gui_tv_override_value_enum (int change, __attribute__((unused)) int arg)
 
static const char * gui_tv_enum_type_enum (int change, __attribute__((unused)) int arg)
 
const char * gui_subj_dist_override_value_enum (int change, __attribute__((unused)) int arg)
 
const char * gui_subj_dist_override_koef_enum (int change, __attribute__((unused)) int arg)
 
const char * gui_decimal_enum (int change, int arg)
 
const char * gui_hhmss_enum (int change, int arg)
 
const char * gui_flash_power_modes_enum (int change, __attribute__((unused)) int arg)
 
const char * gui_flash_exp_comp_modes_enum (int change, __attribute__((unused)) int arg)
 
static void cb_change_flash_power ()
 
static void cb_change_flash_exp_comp ()
 
void set_tv_override_menu (CMenu *menu)
 
static void gui_load_edge_selected (const char *fn)
 
static void gui_menuproc_edge_save (__attribute__((unused)) int arg)
 
static void gui_menuproc_edge_load (__attribute__((unused)) int arg)
 
static void gui_grid_lines_load_selected (const char *fn)
 
static void gui_grid_lines_load (__attribute__((unused)) int arg)
 
static void gui_menu_run_palette (__attribute__((unused)) int arg)
 
static void gui_menu_test_palette (__attribute__((unused)) int arg)
 
static void gui_menu_reset_colors_selected (unsigned int btn)
 
static void gui_menu_reset_colors (__attribute__((unused)) int arg)
 
static void cb_change_rotate_osd ()
 
static void cb_change_dng ()
 
static void cb_change_save_raw ()
 
static const char * gui_dng_version (int change, __attribute__((unused)) int arg)
 
static const char * gui_dng_crop_size (int change, __attribute__((unused)) int arg)
 
static void gui_menuproc_badpixel_create (__attribute__((unused)) int arg)
 
static void raw_fselect_cb (const char *filename)
 
static void gui_raw_develop (__attribute__((unused)) int arg)
 
void cb_zebra_restore_screen ()
 
void cb_zebra_restore_osd ()
 
static void gui_draw_lang_selected (const char *fn)
 
static void gui_draw_load_lang (__attribute__((unused)) int arg)
 
static const char * gui_font_enum (int change, __attribute__((unused)) int arg)
 
static void gui_draw_menu_rbf_selected (const char *fn)
 
static void gui_draw_load_menu_rbf (__attribute__((unused)) int arg)
 
static void gui_draw_symbol_rbf_selected (const char *fn)
 
static void gui_draw_load_symbol_rbf (__attribute__((unused)) int arg)
 
static void gui_menuproc_reset_files (__attribute__((unused)) int arg)
 
static const char * gui_user_menu_show_enum (int change, __attribute__((unused)) int arg)
 
static const char * gui_raw_toggle_enum (int change, __attribute__((unused)) int arg)
 
static const char * gui_alt_power_enum (int change, __attribute__((unused)) int arg)
 
static void gui_menuproc_reset_selected (unsigned int btn)
 
static void gui_menuproc_reset (__attribute__((unused)) int arg)
 
void set_usermenu_state ()
 
const char * gui_on_off_enum (int change, int *conf_val)
 
static void init_splash ()
 
static void gui_draw_splash ()
 
static void gui_handle_splash (int force_redraw)
 
void gui_set_need_restore ()
 
void gui_cancel_need_restore ()
 
void gui_set_need_redraw ()
 
void gui_init ()
 
gui_handlergui_set_mode (gui_handler *mode)
 
void gui_chdk_draw (int force_redraw)
 
static void gui_debug_shortcut (void)
 
void gui_default_kbd_process_menu_btn ()
 
static void sd_override (int direction)
 
static int alt_mode_script_run ()
 
int gui_chdk_kbd_process ()
 
void gui_draw_no_module_warning ()
 
void gui_chdk_kbd_process_menu_btn ()
 
void gui_redraw (int flag_gui_enforce_redraw)
 
int gui_kbd_process ()
 
int gui_touch_process (int x, int y)
 
void gui_set_alt_mode_state (int new_state)
 
void gui_activate_alt_mode ()
 

Variablen

const char _start
 
const char _end
 
int script_run_on_alt_flag
 
int gui_user_menu_flag
 
static char buf [256]
 
static const char * gui_bracket_values_modes [] = { "Off", "1/3 Ev","2/3 Ev", "1 Ev", "1 1/3Ev", "1 2/3Ev", "2 Ev", "2 1/3Ev", "2 2/3Ev", "3 Ev", "3 1/3Ev", "3 2/3Ev", "4 Ev" }
 
static const char * gui_bracket_type_modes [] = { "+/-", "-", "+", "-/+" }
 
static CMenuItem sd_bracket [2]
 
static CMenuItem iso_bracket [2]
 
static CMenuItem bracketing_in_continuous_submenu_items []
 
static CMenu bracketing_in_continuous_submenu = {0x2c,LANG_MENU_BRACKET_IN_CONTINUOUS_TITLE, bracketing_in_continuous_submenu_items }
 
static CMenuItem synch_delay [2]
 
static CMenuItem remote_submenu_items []
 
static CMenu remote_submenu = {0x86,LANG_MENU_REMOTE_PARAM_TITLE, remote_submenu_items }
 
static const char * gui_autoiso_shutter_modes [] = { "Auto", "1/2", "1/4", "1/6", "1/8", "1/15", "1/30", "1/60", "1/125", "1/250", "1/500", "1/1000", "1/2000" }
 
static const char * gui_autoiso2_shutter_modes []
 
static const char * gui_overexp_ev_modes [] = { "Off", "-1/3 Ev", "-2/3 Ev", "-1 Ev", "-1 1/3Ev", "-1 2/3Ev", "-2 Ev" }
 
static CMenuItem autoiso_submenu_items []
 
static CMenu autoiso_submenu = {0x2d,LANG_MENU_AUTOISO_TITLE, autoiso_submenu_items }
 
static const char * gui_reader_codepage_cps [] = { "Win1251", "DOS"}
 
static CMenuItem reader_submenu_items []
 
static CMenu reader_submenu = {0x37,LANG_MENU_READ_TITLE, reader_submenu_items }
 
static CMenu games_submenu = {0x38,LANG_MENU_MISC_GAMES, 0 }
 
static CMenu tools_submenu = {0x28,LANG_MENU_MISC_TOOLS, 0 }
 
static CMenuItem sdcard_submenu_items []
 
static CMenu sdcard_submenu = {0x33,LANG_SD_CARD, sdcard_submenu_items }
 
static CMenuItem module_submenu_items []
 
static CMenu module_submenu = {0x28,LANG_MENU_MODULES, module_submenu_items }
 
static const char text_raw []
 
static const char * text [TEXT_COUNT]
 
static const char * gui_console_show_enum [] ={ "ALT", "Always" }
 
static CMenuItem console_settings_submenu_items []
 
static CMenu console_settings_submenu = {0x28,LANG_MENU_CONSOLE_SETTINGS, console_settings_submenu_items }
 
static CMenuItem misc_submenu_items []
 
static CMenu misc_submenu = {0x29,LANG_MENU_MISC_TITLE, misc_submenu_items }
 
static CMenuItem battery_submenu_items []
 
static CMenu battery_submenu = {0x32,LANG_MENU_BATT_TITLE, battery_submenu_items }
 
static const char * gui_space_bar_modes [] = { "Don't", "Horizontal", "Vertical"}
 
static const char * gui_space_bar_size_modes [] = { "1/4", "1/2", "1"}
 
static const char * gui_space_bar_width_modes [] = { "1", "2", "3","4","5","6","7","8","9","10"}
 
static const char * gui_space_warn_type_modes [] = { "Percent", "MB", "Don't"}
 
static CMenuItem space_submenu_items []
 
static CMenu space_submenu = {0x33,LANG_MENU_OSD_SPACE_PARAMS_TITLE, space_submenu_items}
 
static const char * gui_dof_show_value_modes [] = { "Don't", "Separate", "+Separate", "In Misc", "+In Misc" }
 
static CMenuItem dof_submenu_items []
 
static CMenu dof_submenu = {0x31,LANG_MENU_DOF_TITLE, dof_submenu_items }
 
static const char * gui_zoom_value_modes [] = { "X", "FL", "EFL" }
 
static const char * gui_show_values_modes [] = { "Don't", "Always", "Shoot" }
 
static CMenuItem values_submenu_items []
 
static CMenu values_submenu = {0x28,LANG_MENU_OSD_VALUES_TITLE, values_submenu_items }
 
static const char * gui_show_clock_modes [] = { "Don't", "Normal", "Seconds"}
 
static const char * gui_clock_format_modes [] = { "24h", "12h"}
 
static const char * gui_clock_indicator_modes [] = { "PM", "P", "."}
 
static const char * gui_clock_halfpress_modes [] = { "Full", "Seconds", "Don't"}
 
static CMenuItem clock_submenu_items []
 
static CMenu clock_submenu = {0x34,LANG_MENU_OSD_CLOCK_PARAMS_TITLE, clock_submenu_items }
 
static const char * gui_show_movie_time_modes [] = { "Don't", "hh:mm:ss", "KB/s","both"}
 
static CMenuItem video_submenu_items []
 
static CMenu video_submenu = {0x23,LANG_MENU_VIDEO_PARAM_TITLE, video_submenu_items }
 
static const char * tv_override []
 
static const char * gui_override_disable_modes [] = { "No", "Yes" }
 
static const char * gui_fast_ev_step_modes [] = { "1/6 Ev","1/3 Ev","1/2 Ev", "2/3 Ev","5/6 Ev","1 Ev","1 1/6Ev","1 1/3Ev","1 1/2Ev", "1 2/3Ev","1 5/6Ev","2 Ev","2 1/6Ev","2 1/3Ev","2 1/2Ev", "2 2/3Ev","2 5/6Ev","3 Ev","3 1/6Ev","3 1/3Ev","3 1/2Ev", "3 2/3Ev","3 5/6Ev","4 Ev"}
 
static CMenuItem tv_override_evstep [2]
 
static CMenuItem tv_override_short_exp [2]
 
static CMenuItem iso_override_items [2]
 
static CMenuItem fast_ev_switch [2]
 
static CMenuItem manual_flash [2]
 
static CMenuItem flash_exp_comp [2]
 
static CMenuItem sd_override_items [2]
 
static const char * gui_raw_nr_modes [] = { "Auto", "Off", "On"}
 
static CMenuItem operation_submenu_items []
 
static CMenu operation_submenu = {0x21,LANG_MENU_OPERATION_PARAM_TITLE, operation_submenu_items }
 
static const char * gui_edge_pano_modes [] = { "Off", "Right", "Down", "Left", "Up", "Free" }
 
static CMenuItem edge_overlay_submenu_items []
 
static CMenu edge_overlay_submenu = {0x7f,LANG_MENU_EDGE_OVERLAY_TITLE, edge_overlay_submenu_items }
 
static CMenuItem grid_submenu_items []
 
static CMenu grid_submenu = {0x2f,LANG_MENU_GRID_TITLE, grid_submenu_items }
 
static CMenuItem visual_submenu_items []
 
static CMenu visual_submenu = {0x28,LANG_MENU_VIS_TITLE, visual_submenu_items }
 
static CMenuItem raw_state_submenu_items []
 
static CMenu raw_state_submenu = {0x24,LANG_MENU_OSD_RAW_STATE_PARAMS_TITLE, raw_state_submenu_items }
 
static const char * gui_temp_mode_modes [] = { "Off", "Optical", "CCD", "Battery", "all" }
 
static const char * gui_hide_osd_modes [] = { "Don't", "In Playback", "On Disp Press", "Both" }
 
static const char * gui_show_usb_info_modes [] = { "Off", "Icon", "Text" }
 
static CMenuItem osd_submenu_items []
 
static CMenu osd_submenu = {0x22,LANG_MENU_OSD_TITLE, osd_submenu_items }
 
static const char * gui_histo_show_modes [] = { "Don't", "Always", "Rec", "Shoot" }
 
static const char * gui_histo_view_modes [] ={ "RGB", "Y", "RGB Y", "R G B", "RGB all", "Y all", "Blend", "Blend Y"}
 
static const char * gui_histo_transform_modes [] ={ "Linear", "Log" }
 
static CMenuItem histo_submenu_items []
 
static CMenu histo_submenu = {0x25,LANG_MENU_HISTO_TITLE, histo_submenu_items }
 
static CMenuItem raw_exceptions_submenu_items []
 
static CMenu raw_exceptions_submenu = {0x59,LANG_MENU_OSD_RAW_EXCEPTIONS_PARAMS_TITLE, raw_exceptions_submenu_items }
 
const char * gui_bad_pixel_removal_modes [] = { (char*)LANG_MENU_BAD_PIXEL_OFF, (char*)LANG_MENU_BAD_PIXEL_INTERPOLATION, (char*)LANG_MENU_BAD_PIXEL_RAW_CONVERTER}
 
static CMenuItem raw_submenu_items []
 
static CMenu raw_submenu = {0x24,LANG_MENU_RAW_TITLE, raw_submenu_items }
 
static const char * gui_zebra_mode_modes [] = { "Blink 1", "Blink 2", "Blink 3", "Solid", "Zebra 1", "Zebra 2" }
 
static const char * gui_zebra_draw_osd_modes [] = { "Nothing", "Histo", "OSD" }
 
static CMenuItem zebra_submenu_items []
 
static CMenu zebra_submenu = {0x26,LANG_MENU_ZEBRA_TITLE, zebra_submenu_items }
 
static const char * gui_text_box_charmap [] = { "Default", "German", "Russian" }
 
static CMenuItem menu_font_submenu_items []
 
static CMenu menu_font_submenu = {0x28,LANG_MENU_FONT_SETTINGS, menu_font_submenu_items }
 
static CMenuItem menu_settings_submenu_items []
 
static CMenu menu_settings_submenu = {0x28,LANG_MENU_MENU_SETTINGS, menu_settings_submenu_items }
 
static CMenuItem chdk_settings_menu_items []
 
CMenu chdk_settings_menu = {0x20,LANG_MENU_CHDK_SETTINGS, chdk_settings_menu_items }
 
CMenu script_submenu
 
static CMenuItem root_menu_items []
 
CMenu root_menu = {0x20,LANG_MENU_MAIN_TITLE, root_menu_items }
 
static int gui_splash
 
static char * logo = NULL
 
static int logo_size
 
static int logo_text_width
 
static int logo_text_height
 
static gui_handler startupGuiHandler = { GUI_MODE_STARTUP, 0, 0, 0, 0, GUI_MODE_FLAG_NODRAWRESTORE | GUI_MODE_FLAG_NORESTORE_ON_SWITCH }
 
static gui_handlergui_mode = &startupGuiHandler
 
static int gui_osd_need_restore = 0
 
static int gui_mode_need_redraw = 0
 
int no_modules_flag
 
gui_handler altGuiHandler = { GUI_MODE_ALT, gui_chdk_draw, gui_chdk_kbd_process, gui_chdk_kbd_process_menu_btn, 0, 0, }
 
static int gui_current_alt_state = ALT_MODE_NORMAL
 

Makro-Dokumentation

#define _XSTR (   x)    #x

Definiert in Zeile 903 der Datei gui.c.

#define LOGO_HEIGHT   74

Definiert in Zeile 2284 der Datei gui.c.

#define LOGO_WIDTH   169

Definiert in Zeile 2283 der Datei gui.c.

#define SPLASH_TIME   20

Definiert in Zeile 33 der Datei gui.c.

#define STR (   x)    _XSTR(x)

Definiert in Zeile 904 der Datei gui.c.

#define TEXT_COUNT   4

Definiert in Zeile 922 der Datei gui.c.

Dokumentation der Funktionen

static int alt_mode_script_run ( )
static

Definiert in Zeile 2788 der Datei gui.c.

2789 {
2790  int remote_script_start_ready = 0;
2791 
2792  // Start the current script if script_start is enabled, we are in <ALT> mode and there is a pulse longer than 100mSec on USB port
2794  remote_script_start_ready=1;
2795 
2796  // Start a script if the shutter button pressed in <ALT> mode (kdb_blocked) or USB remote sequence not running
2797  // or if script start on <ALT> enabled and this is the first pass through <ALT> mode
2798  if ( kbd_is_key_clicked(KEY_SHOOT_FULL) || remote_script_start_ready || script_run_on_alt_flag )
2799  {
2801  script_start_gui(0);
2802  return 1;
2803  }
2804 
2805  return 0;
2806 }
static void cb_batt_max ( )
static

Definiert in Zeile 1037 der Datei gui.c.

1038 {
1041 }
static void cb_batt_min ( )
static

Definiert in Zeile 1043 der Datei gui.c.

1044 {
1047 }
static void cb_change_dng ( )
static

Definiert in Zeile 1847 der Datei gui.c.

static void cb_change_flash_exp_comp ( )
static

Definiert in Zeile 1480 der Datei gui.c.

1481 {
1483 }
static void cb_change_flash_power ( )
static

Definiert in Zeile 1475 der Datei gui.c.

1476 {
1478 }
static void cb_change_rotate_osd ( )
static

Definiert in Zeile 1760 der Datei gui.c.

1761 {
1762  update_draw_proc();
1764 }
static void cb_change_save_raw ( )
static

Definiert in Zeile 1854 der Datei gui.c.

1855 {
1856  if ( conf.enable_raw_shortcut )
1857  {
1859  cb_change_dng();
1862  }
1863 }
static void cb_perc ( )
static

Definiert in Zeile 1027 der Datei gui.c.

1028 {
1030 }
void cb_space_mb ( )

Definiert in Zeile 1069 der Datei gui.c.

1070 {
1072 }
void cb_space_perc ( )

Definiert in Zeile 1064 der Datei gui.c.

1065 {
1066  conf.space_mb_show=0;
1067 }
static void cb_volts ( )
static

Definiert in Zeile 1032 der Datei gui.c.

1033 {
1034  conf.batt_perc_show=0;
1035 }
void cb_zebra_restore_osd ( )

Definiert in Zeile 1945 der Datei gui.c.

1946 {
1947  if (conf.zebra_restore_osd)
1949 }
void cb_zebra_restore_screen ( )

Definiert in Zeile 1939 der Datei gui.c.

1940 {
1942  conf.zebra_restore_osd = 0;
1943 }
static CMenuItem* create_module_menu ( int  mtype,
char  symbol 
)
static

Definiert in Zeile 708 der Datei gui.c.

709 {
710  DIR *d;
711  struct dirent *de;
712  int mcnt = 0;
713  ModuleInfo mi;
714  char modName[33];
715  char *nm;
716 
717  // Open directory & count # of modules matching mtype
718  d = opendir("A/CHDK/MODULES");
719 
720  if (d)
721  {
722  while ((de = readdir(d)))
723  {
724  if ((de->d_name[0] != 0xE5) && (strcmp(de->d_name,".") != 0) && (strcmp(de->d_name,"..") != 0))
725  {
726  get_module_info(de->d_name, &mi, 0, 0);
727  if ((mi.moduleType & MTYPE_MASK) == mtype)
728  mcnt++;
729  }
730  }
731 
732  closedir(d);
733  }
734 
735  // Allocate memory for menu
736  CMenuItem *submenu = malloc((mcnt+2) * sizeof(CMenuItem));
737  memset(submenu, 0, (mcnt+2) * sizeof(CMenuItem));
738 
739  // Re-open directory & create game menu
740  d = opendir("A/CHDK/MODULES");
741 
742  if (d)
743  {
744  mcnt = 0;
745  while ((de = readdir(d)))
746  {
747  if ((de->d_name[0] != 0xE5) && (strcmp(de->d_name,".") != 0) && (strcmp(de->d_name,"..") != 0))
748  {
749  get_module_info(de->d_name, &mi, modName, 33);
750  if ((mi.moduleType & MTYPE_MASK) == mtype)
751  {
752  submenu[mcnt].symbol = (mi.symbol != 0) ? mi.symbol : symbol;
754  submenu[mcnt].type = MENUITEM_SUBMENU_PROC;
755  else
756  submenu[mcnt].type = MENUITEM_PROC;
757  if (mi.moduleName < 0)
758  submenu[mcnt].text = -mi.moduleName; // LANG string
759  else
760  {
761  nm = malloc(strlen(modName)+1);
762  strcpy(nm, modName);
763  submenu[mcnt].text = (int)nm;
764  }
765  submenu[mcnt].value = (int*)module_run;
766  nm = malloc(strlen(de->d_name)+1);
767  strcpy(nm, de->d_name);
768  submenu[mcnt].arg = (int)nm;
769  mcnt++;
770  }
771  }
772  }
773 
774  closedir(d);
775 
776  submenu[mcnt].symbol = 0x51;
777  submenu[mcnt].type = MENUITEM_UP;
778  submenu[mcnt].text = LANG_MENU_BACK;
779  }
780 
781  if (mcnt > 0)
782  {
783  extern int submenu_sort_arm(const void* v1, const void* v2);
784  qsort(submenu, mcnt, sizeof(CMenuItem), submenu_sort_arm);
785  }
786 
787  return submenu;
788 }
void gui_activate_alt_mode ( )

Definiert in Zeile 3062 der Datei gui.c.

3063 {
3065 
3066  switch (gui_current_alt_state)
3067  {
3068  case ALT_MODE_ENTER:
3069  case ALT_MODE_ENTER_SCRIPT:
3070 
3072 
3074 
3076 
3077  // If user menu set to start automatically when <ALT> mode entered
3078  // then enter user menu mode, unless a script was paused by exiting
3079  // <ALT> mode when the script was running.
3080  gui_user_menu_flag = 0;
3084  gui_user_menu_flag = 1;
3085  }
3086  break;
3087 
3088  case ALT_MODE_LEAVE:
3089  conf_save();
3090 
3091  // Unload all modules which are marked as safe to unload, or loaded for menus
3092  module_exit_alt();
3093 
3097 
3099  break;
3100  }
3101 
3102  // Reset to stable state
3104 }
static const char* gui_alt_power_enum ( int  change,
__attribute__((unused)) int  arg 
)
static

Definiert in Zeile 2150 der Datei gui.c.

2151 {
2152 // Script option is retained even if scripting is disabled, otherwise conf values will change
2153 // Equivalent to ALT
2154  static const char* modes[]={ "Never", "Alt", "Script", "Always" };
2155 
2156  gui_enum_value_change(&conf.alt_prevent_shutdown,change,sizeof(modes)/sizeof(modes[0]));
2157 
2158  return modes[conf.alt_prevent_shutdown];
2159 }
void gui_cancel_need_restore ( )

Definiert in Zeile 2431 der Datei gui.c.

2432 {
2435 }
const char* gui_change_enum2 ( const CMenuItem menu_item,
int  change 
)

Definiert in Zeile 85 der Datei gui.c.

86 {
87  const char** items = (const char**)menu_item->arg;
88  gui_enum_value_change(menu_item->value, change, menu_item->opt_len);
89  return (const char*)lang_str((int)items[*menu_item->value]);
90 }
static const char* gui_change_simple_enum ( int *  value,
int  change,
const char **  items,
unsigned  num_items 
)
static

Definiert in Zeile 80 der Datei gui.c.

80  {
81  gui_enum_value_change(value, change, num_items);
82  return (const char*)lang_str((int)items[*value]);
83 }
void gui_chdk_draw ( int  force_redraw)

Definiert in Zeile 2668 der Datei gui.c.

2669 {
2670  static int clear_for_title = 1;
2671 
2672 #ifdef CAM_DISP_ALT_TEXT
2673  gui_draw_alt_helper();
2674 #else
2675  gui_draw_osd();
2676 #endif
2677 
2679  {
2680  int w = camera_screen.disp_width;
2681 #ifdef CAM_DISP_ALT_TEXT
2685 #endif
2686 
2688  {
2689  // Draw script title (up to <ALT> text, if shown)
2691  }
2692  clear_for_title = 1;
2693  }
2694  else if (clear_for_title)
2695  {
2696  clear_for_title = 0;
2697  }
2698 
2699  console_draw(force_redraw);
2700 }
int gui_chdk_kbd_process ( )

Definiert in Zeile 2810 der Datei gui.c.

2811 {
2812  if (alt_mode_script_run()) return 0;
2813 
2814  // Process Shutter Half Press + BUTTON shortcuts
2816  if (camera_info.state.is_shutter_half_press) return 0;
2817 
2818  int reset_helper = 0;
2819 
2820 #if !CAM_HAS_ERASE_BUTTON // ALT RAW toggle kbd processing if camera has SD override but no erase button
2822  {
2823  if (conf.debug_shortcut_action > 0)
2824  {
2826  }
2827  // Check in manual focus mode
2828  else if (!shooting_get_common_focus_mode())
2829  {
2830  // Not manual focus mode so just update RAW save setting
2832  }
2833  else
2834  {
2835  // In manual focus mode so update shooting distance
2836 #if CAM_HAS_ZOOM_LEVER
2839 #else
2841 #endif
2842  reset_helper = 1;
2843  }
2844  }
2845 #else // ALT RAW toggle kbd processing if can't SD override or has erase button
2847  {
2848  if (conf.debug_shortcut_action > 0)
2849  {
2851  }
2852  else
2853  {
2854  // Change RAW save state
2856  }
2857  }
2858 #endif
2859  else if (kbd_is_key_clicked(KEY_SET))
2860  {
2863  }
2864  else
2865  {
2866 #if !CAM_HAS_MANUAL_FOCUS
2867  if (kbd_is_key_clicked(SHORTCUT_MF_TOGGLE)) // Camera does not have manual focus
2868  {
2872  reset_helper = 1;
2873  }
2874  else
2875 #endif
2876  if (shooting_get_common_focus_mode()) // Check in manual focus mode
2877  {
2878 #if CAM_HAS_ZOOM_LEVER // Camera has zoom lever, use left & right to change factor,up to set infinity
2880  {
2881  sd_override_koef(1);
2882  reset_helper = 1;
2883  }
2884  else if (kbd_is_key_clicked(KEY_LEFT))
2885  {
2886  sd_override_koef(-1);
2887  reset_helper = 1;
2888  }
2890  {
2893  reset_helper = 1;
2894  }
2895  else
2896 #endif
2897  if (kbd_is_key_clicked(SHORTCUT_SET_HYPERFOCAL)) // Set hyperfocal distance if down pressed
2898  {
2903  reset_helper = 1;
2904  }
2905  else
2906  {
2907  switch (kbd_get_autoclicked_key())
2908  {
2909 #if CAM_HAS_ZOOM_LEVER
2910  case KEY_ZOOM_IN:
2911 #else
2912  case KEY_RIGHT:
2913 #endif
2914  sd_override(1);
2915  reset_helper = 1;
2916  break;
2917 #if CAM_HAS_ZOOM_LEVER
2918  case KEY_ZOOM_OUT:
2919 #else
2920  case KEY_LEFT:
2921 #endif
2922  sd_override(-1);
2923  reset_helper = 1;
2924  break;
2925  }
2926  }
2927  }
2928  }
2929 
2930  if (reset_helper)
2931  {
2933 #ifdef CAM_DISP_ALT_TEXT
2935 #endif
2936  }
2937 
2938  return 0;
2939 }
void gui_chdk_kbd_process_menu_btn ( )

Definiert in Zeile 2953 der Datei gui.c.

static void gui_console_clear ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 971 der Datei gui.c.

static void gui_console_show ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 977 der Datei gui.c.

978 {
979  void display_console();
980  display_console();
981 }
static void gui_debug_shortcut ( void  )
static

Definiert in Zeile 2703 der Datei gui.c.

2704 {
2705 #ifdef OPT_DEBUGGING
2706  static int lastcall = -1;
2707  int t=get_tick_count();
2708  if ( lastcall != -1) {
2709  if (t-lastcall <= 400)
2710  debug_display_direction = -debug_display_direction;
2711  }
2712  lastcall=t;
2713  switch(conf.debug_shortcut_action) {
2714  case 1:
2715  schedule_memdump();
2716  break;
2717  case 2:
2719  break;
2720  case 3:
2721  gui_compare_props(0); // compare properties
2722  break;
2723  case 4:
2724  gui_compare_props(1); // compare UI properties
2725  break;
2726  }
2727 #endif
2728 }
const char* gui_decimal_enum ( int  change,
int  arg 
)

Definiert in Zeile 1397 der Datei gui.c.

1398 {
1399  int *v = (int*)arg;
1400 
1401  *v += change;
1402  if (*v < 0) *v = 0;
1403  if (*v > 999999) *v = 999999;
1404 
1405  sprintf(buf, "%01d.%05d", (int)(*v / 100000), (int)(*v % 100000));
1406 
1407  return buf;
1408 }
void gui_default_kbd_process_menu_btn ( )

Definiert in Zeile 2732 der Datei gui.c.

2733 {
2735 }
static void gui_delete_module_log ( __attribute__((unused)) int  arg)
static
static void gui_delete_module_log_callback ( unsigned int  btn)
static

Definiert in Zeile 875 der Datei gui.c.

876 {
877  if (btn == MBOX_BTN_YES)
879 }
static const char* gui_dng_crop_size ( int  change,
__attribute__((unused)) int  arg 
)
static

Definiert in Zeile 1875 der Datei gui.c.

1876 {
1877  static const char* modes[]={ "JPEG", "Active", "Full" };
1878 
1879  gui_enum_value_change(&conf.dng_crop_size,change,sizeof(modes)/sizeof(modes[0]));
1880 
1881  return modes[conf.dng_crop_size];
1882 }
static const char* gui_dng_version ( int  change,
__attribute__((unused)) int  arg 
)
static

Definiert in Zeile 1865 der Datei gui.c.

1866 {
1867  static const char* modes[]={ "1.3", "1.1" };
1868 
1869  gui_enum_value_change(&conf.dng_version,change,sizeof(modes)/sizeof(modes[0]));
1870  cb_change_dng();
1871 
1872  return modes[conf.dng_version];
1873 }
static void gui_draw_fselect ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 898 der Datei gui.c.

899 {
901 }
static void gui_draw_lang_selected ( const char *  fn)
static

Definiert in Zeile 1971 der Datei gui.c.

1972 {
1973  if (fn) {
1974  strcpy(conf.lang_file, fn);
1977  }
1978 }
static void gui_draw_load_lang ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 1980 der Datei gui.c.

static void gui_draw_load_menu_rbf ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 2010 der Datei gui.c.

static void gui_draw_load_rbf ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 675 der Datei gui.c.

static void gui_draw_load_symbol_rbf ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 2024 der Datei gui.c.

static void gui_draw_menu_rbf_selected ( const char *  fn)
static

Definiert in Zeile 2001 der Datei gui.c.

2002 {
2003  if (fn) {
2007  }
2008 }
void gui_draw_no_module_warning ( )

Definiert in Zeile 2943 der Datei gui.c.

static void gui_draw_rbf_selected ( const char *  fn)
static

Definiert in Zeile 668 der Datei gui.c.

669 {
670  if (fn) {
672  }
673 }
static void gui_draw_read ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 655 der Datei gui.c.

static void gui_draw_read_last ( int  arg)
static

Definiert in Zeile 660 der Datei gui.c.

661 {
662  if (stat(conf.reader_file,0) == 0)
664  else
665  gui_draw_read(arg);
666 }
static void gui_draw_read_selected ( const char *  fn)
static

Definiert in Zeile 647 der Datei gui.c.

648 {
649  if (fn)
650  {
652  }
653 }
static void gui_draw_splash ( )
static

Definiert in Zeile 2326 der Datei gui.c.

2327 {
2328  coord x, y;
2329  int i;
2331 
2332  const color logo_colors[8] =
2333  {
2334  COLOR_BLACK,
2335  COLOR_RED_DK,
2336  COLOR_RED,
2337  COLOR_GREY,
2338  COLOR_GREY_LT,
2339  COLOR_RED_LT,
2341  COLOR_WHITE
2342  };
2343 
2345  y = ((camera_screen.height-logo_text_height)>>1) + 20;
2346 
2348  for (i=0; i<TEXT_COUNT-1; ++i)
2349  {
2350  draw_string(x+((logo_text_width-strlen(text[i])*FONT_WIDTH)>>1), y+i*FONT_HEIGHT+4, text[i], cl);
2351  }
2352 
2353 #if OPT_EXPIRE_TEST
2354  do_expire_splash(x+((logo_text_width)>>1),y+(i+1)*FONT_HEIGHT+4);
2355 #endif
2356 
2357  if (logo)
2358  {
2359  int pos;
2360  int mx = 0;
2361  int my = 0;
2362  int offset_x = (camera_screen.width-LOGO_WIDTH)>>1;
2363 #ifdef THUMB_FW
2364  int offset_y = ((camera_screen.height-LOGO_HEIGHT)>>1) - 66 ;
2365 #else
2366  int offset_y = ((camera_screen.height-LOGO_HEIGHT)>>1) - 42 ;
2367 #endif
2368  for (pos=0; pos<logo_size; pos++)
2369  {
2370  char data = logo[pos];
2371  color c = logo_colors[(data>>5) & 0x07];
2372  for (i=0; i<(data&0x1F)+1; i++)
2373  {
2374  if (c!=0x00)
2375  {
2376  draw_pixel(offset_x+mx,offset_y+my,c);
2377  }
2378  if (mx == LOGO_WIDTH)
2379  {
2380  mx = 0;
2381  my++;
2382  }
2383  else
2384  {
2385  mx++;
2386  }
2387  }
2388  }
2389  }
2390 }
static void gui_draw_symbol_rbf_selected ( const char *  fn)
static

Definiert in Zeile 2015 der Datei gui.c.

2016 {
2017  if (fn) {
2021  }
2022 }
void gui_enum_value_change ( int *  value,
int  change,
unsigned  num_items 
)

Definiert in Zeile 72 der Datei gui.c.

72  {
73  *value+=change;
74  if (*value<0)
75  *value = num_items-1;
76  else if (*value>=(int)num_items)
77  *value = 0;
78 }
const char* gui_flash_exp_comp_modes_enum ( int  change,
__attribute__((unused)) int  arg 
)

Definiert in Zeile 1468 der Datei gui.c.

1469 {
1470  static const char* modes[] = { "-3", "-2.6", "-2.3", "-2", "-1.6", "-1.3", "-1", "-2/3", "-1/3", "0", "+1/3", "+2/3", "+1", "+1.3", "+1.6", "+2", "+2.3", "+2.6", "+3" };
1471  const char *rv = gui_change_simple_enum(&conf.flash_exp_comp,change,modes,sizeof(modes)/sizeof(modes[0]));
1472  return rv;
1473 }
const char* gui_flash_power_modes_enum ( int  change,
__attribute__((unused)) int  arg 
)

Definiert in Zeile 1461 der Datei gui.c.

1462 {
1463  static const char* modes[] = { "Min", "Med", "Max" };
1464  const char *rv = gui_change_simple_enum(&conf.flash_video_override_power,change,modes,sizeof(modes)/sizeof(modes[0]));
1465  return rv;
1466 }
static const char* gui_font_enum ( int  change,
__attribute__((unused)) int  arg 
)
static

Definiert in Zeile 1985 der Datei gui.c.

1986 {
1987  extern int num_codepages;
1988  extern char* codepage_names[];
1989 
1990  gui_enum_value_change(&conf.font_cp,change,num_codepages);
1991 
1992  if (change != 0) {
1996  }
1997 
1998  return codepage_names[conf.font_cp];
1999 }
static void gui_games_menu ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 797 der Datei gui.c.

798 {
800 }
static void gui_grid_lines_load ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 1648 der Datei gui.c.

static void gui_grid_lines_load_selected ( const char *  fn)
static

Definiert in Zeile 1640 der Datei gui.c.

1641 {
1642  if (fn)
1643  {
1645  }
1646 }
static void gui_handle_splash ( int  force_redraw)
static

Definiert in Zeile 2392 der Datei gui.c.

2393 {
2394  if (gui_splash)
2395  {
2397  if (force_redraw || (gui_splash == SPLASH_TIME))
2398  gui_draw_splash();
2399 
2400  // on half shoot, cancel splash screen
2402  gui_splash = 1;
2403  }
2404  if (--gui_splash == 0)
2405  {
2408  if (logo)
2409  free(logo);
2410  logo = NULL;
2411  }
2412  }
2413 }
const char* gui_hhmss_enum ( int  change,
int  arg 
)

Definiert in Zeile 1412 der Datei gui.c.

1413 {
1414  int *v = (int*)arg;
1415 
1416  int h, m, s;
1417  h = *v / 3600;
1418  m = (*v % 3600) / 60;
1419  s = *v % 60;
1420 
1421  switch (change)
1422  {
1423  case 1:
1424  case -1:
1425  s += change;
1426  if (s < 0) s = 59;
1427  if (s > 59) s = 0;
1428  break;
1429  case 10:
1430  case -10:
1431  m += change / 10;
1432  if (m < 0) m = 59;
1433  if (m > 59) m = 0;
1434  break;
1435  default:
1436  h += change /100;
1437  if (h < 0) h = 1;
1438  if (h > 1) h = 0;
1439  break;
1440  }
1441  *v = (h * 3600) + (m * 60) + s;
1442 
1443  sprintf(buf, "%1d:%02d:%02d", h, m, s);
1444 
1445  return buf;
1446 }
void gui_init ( )

Definiert in Zeile 2443 der Datei gui.c.

2444 {
2446  if (conf.start_sound > 0)
2447  {
2448  play_sound(4);
2449  }
2450 
2451  init_splash();
2452 
2453  draw_init();
2454 
2455  process_file( "A/CHDK/badpixel", make_pixel_list, 1 );
2456  process_file( "A/CHDK/badpixel.txt", make_pixel_list, 1 );
2457 }
int gui_kbd_process ( )

Definiert in Zeile 3024 der Datei gui.c.

3025 {
3026  if (gui_mode)
3027  {
3028  // Call menu button handler if menu button pressed
3030  {
3032  {
3034  return 0;
3035  }
3036  }
3037 
3038  // Call mode handler for other buttons
3039  if (gui_mode->kbd_process) return gui_mode->kbd_process();
3040  }
3041  return 0;
3042 }
static void gui_load_edge_selected ( const char *  fn)
static

Definiert in Zeile 1604 der Datei gui.c.

1605 {
1606  if (fn)
1608 }
static void gui_lua_native_call_warning ( )
static
static void gui_menu_reset_colors ( __attribute__((unused)) int  arg)
static
static void gui_menu_reset_colors_selected ( unsigned int  btn)
static

Definiert in Zeile 1680 der Datei gui.c.

1681 {
1682  if (btn==MBOX_BTN_YES)
1683  resetColors();
1684 }
static void gui_menu_run_palette ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 1670 der Datei gui.c.

1671 {
1673 }
static void gui_menu_test_palette ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 1675 der Datei gui.c.

1676 {
1678 }
static void gui_menuproc_badpixel_create ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 1884 der Datei gui.c.

1885 {
1887 }
static void gui_menuproc_edge_load ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 1615 der Datei gui.c.

static void gui_menuproc_edge_save ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 1610 der Datei gui.c.

1611 {
1613 }
static void gui_menuproc_mkbootdisk ( __attribute__((unused)) int  arg)
static
static void gui_menuproc_reset ( __attribute__((unused)) int  arg)
static
static void gui_menuproc_reset_files ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 2029 der Datei gui.c.

static void gui_menuproc_reset_selected ( unsigned int  btn)
static

Definiert in Zeile 2161 der Datei gui.c.

2162 {
2163  if (btn==MBOX_BTN_YES)
2165 }
static void gui_module_menu ( CMenu m,
int  type 
)
static

Definiert in Zeile 790 der Datei gui.c.

791 {
792  if (m->menu == 0)
793  m->menu = create_module_menu(type, m->symbol);
795 }
const char* gui_on_off_enum ( int  change,
int *  conf_val 
)

Definiert in Zeile 2250 der Datei gui.c.

2251 {
2252  static const char* modes[]={ "Off", "On"};
2253  return gui_change_simple_enum(conf_val,change,modes,sizeof(modes)/sizeof(modes[0]));
2254 }
static void gui_raw_develop ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 1894 der Datei gui.c.

1895 {
1897 }
static const char* gui_raw_toggle_enum ( int  change,
__attribute__((unused)) int  arg 
)
static

Definiert in Zeile 2141 der Datei gui.c.

2142 {
2143  static const char* raw_toggle[]={ "Off", "On", "On+OSD" };
2144 
2145  gui_enum_value_change(&conf.enable_raw_shortcut,change,sizeof(raw_toggle)/sizeof(raw_toggle[0]));
2146 
2147  return raw_toggle[conf.enable_raw_shortcut];
2148 }
void gui_redraw ( int  flag_gui_enforce_redraw)

Definiert in Zeile 2971 der Datei gui.c.

2972 {
2973  if (!draw_test_guard() && (!camera_info.state.gui_mode_none || gui_splash)) // Attempt to detect screen erase in <Alt> mode, redraw if needed
2974  {
2975  draw_set_guard();
2976  flag_gui_enforce_redraw = 1;
2977 #ifdef CAM_TOUCHSCREEN_UI
2978  redraw_buttons = 1;
2979 #endif
2980  }
2981 
2982 #ifdef CAM_TOUCHSCREEN_UI
2983  extern void virtual_buttons();
2984  virtual_buttons();
2985 #endif
2986 
2987  // Erase screen if needed
2989  {
2990  draw_restore();
2992  flag_gui_enforce_redraw = 1;
2993  }
2994 
2995  // Force mode redraw if needed
2997  {
2999  flag_gui_enforce_redraw = 1;
3000  }
3001 
3002 #ifdef OPT_EXPIRE_TEST
3003  do_expire_check();
3004 #endif
3005 
3006  gui_handle_splash(flag_gui_enforce_redraw);
3007 
3008  // visible warning if modules missing
3010 
3011 // DEBUG: uncomment if you want debug values always on top
3012 //gui_draw_debug_vals_osd();
3013 
3014  // Call redraw handler
3015  if (gui_mode->redraw)
3016  gui_mode->redraw(flag_gui_enforce_redraw);
3017 }
void gui_set_alt_mode_state ( int  new_state)

Definiert in Zeile 3056 der Datei gui.c.

3057 {
3058  gui_current_alt_state = new_state;
3059 }
gui_handler* gui_set_mode ( gui_handler mode)

Definiert in Zeile 2461 der Datei gui.c.

2462 {
2463  // Set up gui mode & state variables
2464  camera_info.state.gui_mode = mode->mode;
2467 
2468  if ( gui_mode == mode )
2469  return gui_mode;
2470 
2471 #ifdef CAM_TOUCHSCREEN_UI
2472  if (((gui_mode->mode == GUI_MODE_NONE) != (mode->mode == GUI_MODE_NONE)) || // Change from GUI_MODE_NONE to any other or vice-versa
2473  ((gui_mode->mode > GUI_MODE_MENU) != (mode->mode > GUI_MODE_MENU))) // Switch in & out of menu mode
2474  redraw_buttons = 1;
2475 #endif
2476 
2478 
2480  gui_mode = mode;
2481 
2483 
2484  // Flag for screen erase/redraw unless mode is marked not to (e.g. menu box popup)
2486  ((old_mode->flags & GUI_MODE_FLAG_NORESTORE_ON_SWITCH) == 0))
2488  // If old mode did not erase screen on exit then force current mode to redraw itself (e.g. exit menu popup back to file select)
2489  if ((old_mode->flags & (GUI_MODE_FLAG_NORESTORE_ON_SWITCH)) != 0)
2491 
2492 #ifdef CAM_DISP_ALT_TEXT
2495 #endif
2496 
2497  return old_mode;
2498 }
void gui_set_need_redraw ( )

Definiert in Zeile 2437 der Datei gui.c.

2438 {
2440 }
void gui_set_need_restore ( )

Definiert in Zeile 2426 der Datei gui.c.

2427 {
2429 }
static void gui_show_build_info ( __attribute__((unused)) int  arg)
static
static void gui_show_memory_info ( __attribute__((unused)) int  arg)
static
const char* gui_subj_dist_override_koef_enum ( int  change,
__attribute__((unused)) int  arg 
)

Definiert in Zeile 1350 der Datei gui.c.

1351 {
1352  static const char* modes[] = { "Off", "On", "Inf" };
1353  const char *rv = gui_change_simple_enum(&conf.subj_dist_override_koef,change,modes,sizeof(modes)/sizeof(modes[0]));
1354  return rv;
1355 }
const char* gui_subj_dist_override_value_enum ( int  change,
__attribute__((unused)) int  arg 
)

koef

Definiert in Zeile 1327 der Datei gui.c.

1328 {
1329  static char buf[9];
1330 
1331  if (conf.subj_dist_override_koef == SD_OVERRIDE_INFINITY) // Infinity selected
1332  strcpy(buf," Inf.");
1333  else
1334  {
1335  // Increment / decrement the SD value, wrapping around from CAMERA_MIN_DIST to CAMERA_MAX_DIST
1336  conf.subj_dist_override_value += (change);
1341  // philmoz 19/6/2014 - if SD override is < distance from sensor to front of lens (for current zoom) then adjust SD override
1345  }
1346 
1347  return buf;
1348 }
static void gui_tools_menu ( __attribute__((unused)) int  arg)
static

Definiert in Zeile 802 der Datei gui.c.

803 {
805 }
int gui_touch_process ( int  x,
int  y 
)

Definiert in Zeile 3045 der Datei gui.c.

3046 {
3048  return gui_mode->touch_handler(x, y);
3049  return 0;
3050 }
static const char* gui_tv_enum_type_enum ( int  change,
__attribute__((unused)) int  arg 
)
static

Definiert in Zeile 1297 der Datei gui.c.

1298 {
1299 #ifdef CAM_EXT_TV_RANGE
1300  static const char* modes[ ]= { "Ev Step", "ShrtExp", "LongExp" };
1301 #else
1302  static const char* modes[ ]= { "Ev Step", "ShrtExp" };
1303 #endif
1304 
1305  gui_enum_value_change(&conf.tv_enum_type,change,sizeof(modes)/sizeof(modes[0]));
1306  if (change)
1307  {
1308  void set_tv_override_menu(CMenu *menu);
1310  }
1311  return modes[conf.tv_enum_type];
1312 }
const char* gui_tv_override_value_enum ( int  change,
__attribute__((unused)) int  arg 
)

Definiert in Zeile 1291 der Datei gui.c.

1292 {
1295 }
static const char* gui_USB_control_modes_enum ( int  change,
__attribute__((unused)) int  arg 
)
static

Definiert in Zeile 133 der Datei gui.c.

134 {
135  static const char* modes[] = { "None", "Normal", "Quick", "Burst", "Bracket","Zoom", "Video" }; // note : make sure # of entries less than NUM_USB_MODULES in usb_remote.c
136  gui_enum_value_change(&conf.remote_control_mode,change,sizeof(modes)/sizeof(modes[0]));
137 
138  if (change) set_usb_remote_state();
139 
140  return modes[conf.remote_control_mode];
141 }
static const char* gui_USB_switch_types_enum ( int  change,
__attribute__((unused)) int  arg 
)
static

Definiert in Zeile 123 der Datei gui.c.

124 {
125  static const char* modes[] = { "None","OnePush", "TwoPush", "CA-1" }; // note : make sure # of entries less than NUM_USB_INPUT_DRV in usb_remote.c
126  gui_enum_value_change(&conf.remote_switch_type,change,sizeof(modes)/sizeof(modes[0]));
127 
128  if (change) set_usb_remote_state();
129 
130  return modes[conf.remote_switch_type];
131 }
static const char* gui_user_menu_show_enum ( int  change,
__attribute__((unused)) int  arg 
)
static

Definiert in Zeile 2056 der Datei gui.c.

2057 {
2058  static const char* modes[]={ "Off", "On", "On Direct" };
2059 
2060  void set_usermenu_state();
2062 
2063  return gui_change_simple_enum(&conf.user_menu_enable,change,modes,sizeof(modes)/sizeof(modes[0]));
2064 }
const char* gui_video_bitrate_enum ( int  change,
__attribute__((unused)) int  arg 
)

Definiert in Zeile 1166 der Datei gui.c.

1167 {
1168  static const char *modes[]={ "0.25x", "0.5x","0.75x", "1x", "1.25x", "1.5x", "1.75x", "2x", "2.5x", "3x"};
1169  gui_enum_value_change(&conf.video_bitrate,change,sizeof(modes)/sizeof(modes[0]));
1170 
1171  if (change)
1173 
1174  return modes[conf.video_bitrate];
1175 }
static void init_splash ( )
static

Definiert in Zeile 2291 der Datei gui.c.

2292 {
2293  int i = 0, index = 0;
2294  while (index < (int)sizeof(text_raw))
2295  {
2296  text[i++] = &text_raw[index];
2297  while (text_raw[index++]) ;
2298  }
2299 
2301 
2302  if (gui_splash)
2303  {
2304 #if defined(VER_CHDK)
2305  const char *logo_name="A/CHDK/DATA/logo.dat";
2306 #else // CHDK-DE
2307  const char *logo_name="A/CHDK/DATA/logo_de.dat";
2308 #endif
2309  logo = load_file(logo_name, &logo_size, 0);
2310 
2312  logo_text_width = 0;
2313 
2314  int i;
2315  for (i=0; i<logo_text_height; ++i)
2316  {
2317  int l = strlen(text[i]);
2318  if (l > logo_text_width) logo_text_width = l;
2319  }
2320 
2322  logo_text_height = logo_text_height * FONT_HEIGHT + 8;
2323  }
2324 }
static void lua_native_call_warning ( unsigned int  btn)
static

Definiert in Zeile 941 der Datei gui.c.

942 {
943  if (btn==MBOX_BTN_NO)
945 }
static void raw_fselect_cb ( const char *  filename)
static

Definiert in Zeile 1889 der Datei gui.c.

1890 {
1891  raw_prepare_develop(filename, 1);
1892 }
void schedule_memdump ( )

Definiert in Zeile 35 der Datei main.c.

36 {
38 }
static void sd_override ( int  direction)
static
void set_tv_override_menu ( CMenu menu)

Definiert in Zeile 1577 der Datei gui.c.

1578 {
1580  if (mi)
1581  {
1582  switch (conf.tv_enum_type)
1583  {
1584  case 0: // Ev Step
1585  mi->value = (int*)(&tv_override_evstep);
1586  mi->arg = 1;
1587  break;
1588  case 1: // Short exposure
1589  mi->value = (int*)(&tv_override_short_exp);
1590  mi->arg = 100;
1591  break;
1592 #ifdef CAM_EXT_TV_RANGE
1593  case 2: // Long exposure
1594  mi->value = (int*)(&tv_override_long_exp);
1595  mi->arg = 1;
1596  break;
1597 #endif
1598  }
1599  }
1600 }
void set_usermenu_state ( )

Definiert in Zeile 2232 der Datei gui.c.

2233 {
2234  int i;
2235  for (i=0; root_menu_items[i].symbol != 0; i++)
2236  {
2237  if (root_menu_items[i].value == (int*)&user_submenu)
2238  {
2239  if (conf.user_menu_enable)
2240  root_menu_items[i].text = LANG_MENU_USER_MENU; // Enable user menu option in root menu
2241  else
2242  root_menu_items[i].text = 0; // Disable user menu option in root menu
2243  return;
2244  }
2245  }
2246 }
int submenu_sort ( const void *  v1,
const void *  v2 
)

Definiert in Zeile 700 der Datei gui.c.

701 {
702  CMenuItem *mi1 = (CMenuItem*)v1;
703  CMenuItem *mi2 = (CMenuItem*)v2;
704 
705  return strcmp(lang_str(mi1->text), lang_str(mi2->text));
706 }

Variablen-Dokumentation

const char _end
const char _start

Definiert in Zeile 2967 der Datei gui.c.

CMenu autoiso_submenu = {0x2d,LANG_MENU_AUTOISO_TITLE, autoiso_submenu_items }
static

Definiert in Zeile 236 der Datei gui.c.

CMenu battery_submenu = {0x32,LANG_MENU_BATT_TITLE, battery_submenu_items }
static

Definiert in Zeile 1060 der Datei gui.c.

CMenu bracketing_in_continuous_submenu = {0x2c,LANG_MENU_BRACKET_IN_CONTINUOUS_TITLE, bracketing_in_continuous_submenu_items }
static

Definiert in Zeile 120 der Datei gui.c.

char buf[256]
static

Definiert in Zeile 59 der Datei gui.c.

CMenu chdk_settings_menu = {0x20,LANG_MENU_CHDK_SETTINGS, chdk_settings_menu_items }

Definiert in Zeile 2208 der Datei gui.c.

CMenuItem chdk_settings_menu_items[]
static

Definiert in Zeile 2174 der Datei gui.c.

CMenu clock_submenu = {0x34,LANG_MENU_OSD_CLOCK_PARAMS_TITLE, clock_submenu_items }
static

Definiert in Zeile 1161 der Datei gui.c.

CMenu console_settings_submenu = {0x28,LANG_MENU_CONSOLE_SETTINGS, console_settings_submenu_items }
static

Definiert in Zeile 992 der Datei gui.c.

CMenu dof_submenu = {0x31,LANG_MENU_DOF_TITLE, dof_submenu_items }
static

Definiert in Zeile 1115 der Datei gui.c.

CMenu edge_overlay_submenu = {0x7f,LANG_MENU_EDGE_OVERLAY_TITLE, edge_overlay_submenu_items }
static

Definiert in Zeile 1636 der Datei gui.c.

CMenuItem fast_ev_switch[2]
static
Initialisierung:

Definiert in Zeile 1507 der Datei gui.c.

CMenuItem flash_exp_comp[2]
static
CMenu games_submenu = {0x38,LANG_MENU_MISC_GAMES, 0 }
static

Definiert in Zeile 697 der Datei gui.c.

CMenu grid_submenu = {0x2f,LANG_MENU_GRID_TITLE, grid_submenu_items }
static

Definiert in Zeile 1666 der Datei gui.c.

const char* gui_autoiso2_shutter_modes[]
static
Initialisierung:
= { "Off", "1", "1/2","1/4", "1/6", "1/8", "1/12", "1/15", "1/20", "1/25", "1/30",
"1/40", "1/50", "1/60", "1/80", "1/100", "1/125", "1/160", "1/250", "1/500", "1/1000", "1/2000" }

Definiert in Zeile 204 der Datei gui.c.

const char* gui_autoiso_shutter_modes[] = { "Auto", "1/2", "1/4", "1/6", "1/8", "1/15", "1/30", "1/60", "1/125", "1/250", "1/500", "1/1000", "1/2000" }
static

Definiert in Zeile 202 der Datei gui.c.

const char* gui_bad_pixel_removal_modes[] = { (char*)LANG_MENU_BAD_PIXEL_OFF, (char*)LANG_MENU_BAD_PIXEL_INTERPOLATION, (char*)LANG_MENU_BAD_PIXEL_RAW_CONVERTER}

Definiert in Zeile 1899 der Datei gui.c.

const char* gui_bracket_type_modes[] = { "+/-", "-", "+", "-/+" }
static

Definiert in Zeile 95 der Datei gui.c.

const char* gui_bracket_values_modes[] = { "Off", "1/3 Ev","2/3 Ev", "1 Ev", "1 1/3Ev", "1 2/3Ev", "2 Ev", "2 1/3Ev", "2 2/3Ev", "3 Ev", "3 1/3Ev", "3 2/3Ev", "4 Ev" }
static

Definiert in Zeile 94 der Datei gui.c.

const char* gui_clock_format_modes[] = { "24h", "12h"}
static

Definiert in Zeile 1148 der Datei gui.c.

const char* gui_clock_halfpress_modes[] = { "Full", "Seconds", "Don't"}
static

Definiert in Zeile 1150 der Datei gui.c.

const char* gui_clock_indicator_modes[] = { "PM", "P", "."}
static

Definiert in Zeile 1149 der Datei gui.c.

const char* gui_console_show_enum[] ={ "ALT", "Always" }
static

Definiert in Zeile 969 der Datei gui.c.

int gui_current_alt_state = ALT_MODE_NORMAL
static

Definiert in Zeile 3053 der Datei gui.c.

const char* gui_dof_show_value_modes[] = { "Don't", "Separate", "+Separate", "In Misc", "+In Misc" }
static

Definiert in Zeile 1100 der Datei gui.c.

const char* gui_edge_pano_modes[] = { "Off", "Right", "Down", "Left", "Up", "Free" }
static

Definiert in Zeile 1620 der Datei gui.c.

const char* gui_fast_ev_step_modes[] = { "1/6 Ev","1/3 Ev","1/2 Ev", "2/3 Ev","5/6 Ev","1 Ev","1 1/6Ev","1 1/3Ev","1 1/2Ev", "1 2/3Ev","1 5/6Ev","2 Ev","2 1/6Ev","2 1/3Ev","2 1/2Ev", "2 2/3Ev","2 5/6Ev","3 Ev","3 1/6Ev","3 1/3Ev","3 1/2Ev", "3 2/3Ev","3 5/6Ev","4 Ev"}
static

Definiert in Zeile 1452 der Datei gui.c.

const char* gui_hide_osd_modes[] = { "Don't", "In Playback", "On Disp Press", "Both" }
static

Definiert in Zeile 1771 der Datei gui.c.

const char* gui_histo_show_modes[] = { "Don't", "Always", "Rec", "Shoot" }
static

Definiert in Zeile 1801 der Datei gui.c.

const char* gui_histo_transform_modes[] ={ "Linear", "Log" }
static

Definiert in Zeile 1803 der Datei gui.c.

const char* gui_histo_view_modes[] ={ "RGB", "Y", "RGB Y", "R G B", "RGB all", "Y all", "Blend", "Blend Y"}
static

Definiert in Zeile 1802 der Datei gui.c.

gui_handler* gui_mode = &startupGuiHandler
static

Definiert in Zeile 2419 der Datei gui.c.

int gui_mode_need_redraw = 0
static

Definiert in Zeile 2422 der Datei gui.c.

int gui_osd_need_restore = 0
static

Definiert in Zeile 2421 der Datei gui.c.

const char* gui_overexp_ev_modes[] = { "Off", "-1/3 Ev", "-2/3 Ev", "-1 Ev", "-1 1/3Ev", "-1 2/3Ev", "-2 Ev" }
static

Definiert in Zeile 207 der Datei gui.c.

const char* gui_override_disable_modes[] = { "No", "Yes" }
static

Definiert in Zeile 1448 der Datei gui.c.

const char* gui_raw_nr_modes[] = { "Auto", "Off", "On"}
static

Definiert in Zeile 1534 der Datei gui.c.

const char* gui_reader_codepage_cps[] = { "Win1251", "DOS"}
static

Definiert in Zeile 680 der Datei gui.c.

const char* gui_show_clock_modes[] = { "Don't", "Normal", "Seconds"}
static

Definiert in Zeile 1147 der Datei gui.c.

const char* gui_show_movie_time_modes[] = { "Don't", "hh:mm:ss", "KB/s","both"}
static

Definiert in Zeile 1213 der Datei gui.c.

const char* gui_show_usb_info_modes[] = { "Off", "Icon", "Text" }
static

Definiert in Zeile 1772 der Datei gui.c.

const char* gui_show_values_modes[] = { "Don't", "Always", "Shoot" }
static

Definiert in Zeile 1120 der Datei gui.c.

const char* gui_space_bar_modes[] = { "Don't", "Horizontal", "Vertical"}
static

Definiert in Zeile 1074 der Datei gui.c.

const char* gui_space_bar_size_modes[] = { "1/4", "1/2", "1"}
static

Definiert in Zeile 1075 der Datei gui.c.

const char* gui_space_bar_width_modes[] = { "1", "2", "3","4","5","6","7","8","9","10"}
static

Definiert in Zeile 1076 der Datei gui.c.

const char* gui_space_warn_type_modes[] = { "Percent", "MB", "Don't"}
static

Definiert in Zeile 1077 der Datei gui.c.

int gui_splash
static

Definiert in Zeile 2287 der Datei gui.c.

const char* gui_temp_mode_modes[] = { "Off", "Optical", "CCD", "Battery", "all" }
static

Definiert in Zeile 1769 der Datei gui.c.

const char* gui_text_box_charmap[] = { "Default", "German", "Russian" }
static

Definiert in Zeile 2038 der Datei gui.c.

int gui_user_menu_flag

Definiert in Zeile 57 der Datei gui.c.

const char* gui_zebra_draw_osd_modes[] = { "Nothing", "Histo", "OSD" }
static

Definiert in Zeile 1952 der Datei gui.c.

const char* gui_zebra_mode_modes[] = { "Blink 1", "Blink 2", "Blink 3", "Solid", "Zebra 1", "Zebra 2" }
static

Definiert in Zeile 1951 der Datei gui.c.

const char* gui_zoom_value_modes[] = { "X", "FL", "EFL" }
static

Definiert in Zeile 1119 der Datei gui.c.

CMenu histo_submenu = {0x25,LANG_MENU_HISTO_TITLE, histo_submenu_items }
static

Definiert in Zeile 1817 der Datei gui.c.

CMenuItem iso_bracket[2]
static
Initialisierung:

Definiert in Zeile 102 der Datei gui.c.

CMenuItem iso_override_items[2]
static
Initialisierung:

Definiert in Zeile 1502 der Datei gui.c.

char* logo = NULL
static

Definiert in Zeile 2288 der Datei gui.c.

int logo_size
static

Definiert in Zeile 2289 der Datei gui.c.

int logo_text_height
static

Definiert in Zeile 2289 der Datei gui.c.

int logo_text_width
static

Definiert in Zeile 2289 der Datei gui.c.

CMenuItem manual_flash[2]
static
CMenu menu_font_submenu = {0x28,LANG_MENU_FONT_SETTINGS, menu_font_submenu_items }
static

Definiert in Zeile 2052 der Datei gui.c.

CMenu menu_settings_submenu = {0x28,LANG_MENU_MENU_SETTINGS, menu_settings_submenu_items }
static

Definiert in Zeile 2079 der Datei gui.c.

CMenu misc_submenu = {0x29,LANG_MENU_MISC_TITLE, misc_submenu_items }
static

Definiert in Zeile 1023 der Datei gui.c.

CMenu module_submenu = {0x28,LANG_MENU_MODULES, module_submenu_items }
static

Definiert in Zeile 894 der Datei gui.c.

CMenuItem module_submenu_items[]
static
int no_modules_flag

Definiert in Zeile 28 der Datei main.c.

CMenu operation_submenu = {0x21,LANG_MENU_OPERATION_PARAM_TITLE, operation_submenu_items }
static

Definiert in Zeile 1575 der Datei gui.c.

CMenuItem operation_submenu_items[]
static

Definiert in Zeile 1536 der Datei gui.c.

CMenu osd_submenu = {0x22,LANG_MENU_OSD_TITLE, osd_submenu_items }
static

Definiert in Zeile 1797 der Datei gui.c.

CMenu raw_exceptions_submenu = {0x59,LANG_MENU_OSD_RAW_EXCEPTIONS_PARAMS_TITLE, raw_exceptions_submenu_items }
static

Definiert in Zeile 1843 der Datei gui.c.

CMenu raw_state_submenu = {0x24,LANG_MENU_OSD_RAW_STATE_PARAMS_TITLE, raw_state_submenu_items }
static

Definiert in Zeile 1740 der Datei gui.c.

CMenu raw_submenu = {0x24,LANG_MENU_RAW_TITLE, raw_submenu_items }
static

Definiert in Zeile 1935 der Datei gui.c.

CMenuItem raw_submenu_items[]
static
Initialisierung:
= {
MENU_ITEM (0x0 ,(int)"DNG", MENUITEM_SEPARATOR, 0, 0 ),
{0}
}

Definiert in Zeile 1905 der Datei gui.c.

CMenu reader_submenu = {0x37,LANG_MENU_READ_TITLE, reader_submenu_items }
static

Definiert in Zeile 693 der Datei gui.c.

CMenu remote_submenu = {0x86,LANG_MENU_REMOTE_PARAM_TITLE, remote_submenu_items }
static

Definiert in Zeile 198 der Datei gui.c.

CMenu root_menu = {0x20,LANG_MENU_MAIN_TITLE, root_menu_items }

Definiert in Zeile 2228 der Datei gui.c.

int script_run_on_alt_flag

Definiert in Zeile 55 der Datei gui.c.

CMenu script_submenu

Definiert in Zeile 846 der Datei gui_script.c.

CMenuItem sd_bracket[2]
static
Initialisierung:

Definiert in Zeile 97 der Datei gui.c.

CMenuItem sd_override_items[2]
static
CMenu sdcard_submenu = {0x33,LANG_SD_CARD, sdcard_submenu_items }
static

Definiert in Zeile 871 der Datei gui.c.

CMenuItem sdcard_submenu_items[]
static
Initialisierung:

Definiert in Zeile 861 der Datei gui.c.

CMenu space_submenu = {0x33,LANG_MENU_OSD_SPACE_PARAMS_TITLE, space_submenu_items}
static

Definiert in Zeile 1096 der Datei gui.c.

Definiert in Zeile 2417 der Datei gui.c.

CMenuItem synch_delay[2]
static
Initialisierung:

Definiert in Zeile 175 der Datei gui.c.

const char* text[TEXT_COUNT]
static

Definiert in Zeile 924 der Datei gui.c.

const char text_raw[]
static
Initialisierung:
=
{
"CHDK Version '" HDK_VERSION " " BUILD_NUMBER "-" BUILD_SVNREV "'\0"
"Build: " __DATE__ " " __TIME__ "\0"
"Camera: " PLATFORM " - " PLATFORMSUB "\0"
"UNKNOWN"
}

Definiert in Zeile 906 der Datei gui.c.

CMenu tools_submenu = {0x28,LANG_MENU_MISC_TOOLS, 0 }
static

Definiert in Zeile 698 der Datei gui.c.

const char* tv_override[]
static
Initialisierung:
={
"64","50.8", "40.3", "32", "25.4","20","16", "12.7", "10","8", "6.3","5","4","3.2", "2.5","2",
"1.6", "1.3", "1", "0.8", "0.6", "0.5", "0.4", "0.3", "1/4", "1/5", "1/6", "1/8", "1/10", "1/13",
"1/15", "1/20", "1/25", "1/30", "1/40", "1/50", "1/60", "1/80", "1/100", "1/125", "1/160", "1/200",
"1/250", "1/320", "1/400", "1/500", "1/640","1/800", "1/1000", "1/1250", "1/1600","1/2000","1/2500",
"1/3200","1/4000", "1/5000", "1/6400", "1/8000", "1/10000", "1/12500", "1/16000", "1/20000", "1/25000",
"1/32000", "1/40000", "1/50000", "1/64000","1/80000", "1/100k"
}

Definiert in Zeile 1278 der Datei gui.c.

CMenuItem tv_override_evstep[2]
static
Initialisierung:

Definiert in Zeile 1485 der Datei gui.c.

CMenuItem tv_override_short_exp[2]
static
CMenu values_submenu = {0x28,LANG_MENU_OSD_VALUES_TITLE, values_submenu_items }
static

Definiert in Zeile 1143 der Datei gui.c.

CMenuItem values_submenu_items[]
static
Initialisierung:
= {
{0}
}

Definiert in Zeile 1122 der Datei gui.c.

CMenu video_submenu = {0x23,LANG_MENU_VIDEO_PARAM_TITLE, video_submenu_items }
static

Definiert in Zeile 1273 der Datei gui.c.

CMenuItem video_submenu_items[]
static

Definiert in Zeile 1230 der Datei gui.c.

CMenu visual_submenu = {0x28,LANG_MENU_VIS_TITLE, visual_submenu_items }
static

Definiert in Zeile 1728 der Datei gui.c.

CMenuItem visual_submenu_items[]
static

Definiert in Zeile 1693 der Datei gui.c.

CMenu zebra_submenu = {0x26,LANG_MENU_ZEBRA_TITLE, zebra_submenu_items }
static

Definiert in Zeile 1967 der Datei gui.c.