CHDK_DE Vorschauversion  Trunk Rev. 5272
 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-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, int arg)
 
static const char * gui_USB_control_modes_enum (int change, int arg)
 
static void gui_draw_read_selected (const char *fn)
 
static void gui_draw_read (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 (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 (int arg)
 
static void gui_tools_menu (int arg)
 
static void gui_menuproc_mkbootdisk (int arg)
 
static void gui_delete_module_log_callback (unsigned int btn)
 
static void gui_delete_module_log (int arg)
 
static void gui_draw_fselect (int arg)
 
static void gui_show_build_info (int arg)
 
static void gui_show_memory_info (int arg)
 
static void lua_native_call_warning (unsigned int btn)
 
static void gui_lua_native_call_warning ()
 
static void gui_console_clear (int arg)
 
static void gui_console_show (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, int arg)
 
const char * gui_tv_override_value_enum (int change, int arg)
 
static const char * gui_tv_enum_type_enum (int change, int arg)
 
const char * gui_subj_dist_override_value_enum (int change, int arg)
 
const char * gui_subj_dist_override_koef_enum (int change, 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, int arg)
 
const char * gui_flash_exp_comp_modes_enum (int change, 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 (int arg)
 
static void gui_menuproc_edge_load (int arg)
 
static void gui_grid_lines_load_selected (const char *fn)
 
static void gui_grid_lines_load (int arg)
 
static void gui_menu_run_palette (int arg)
 
static void gui_menu_test_palette (int arg)
 
static void gui_menu_reset_colors_selected (unsigned int btn)
 
static void gui_menu_reset_colors (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, int arg)
 
static const char * gui_dng_crop_size (int change, int arg)
 
static void gui_menuproc_badpixel_create (int arg)
 
static void raw_fselect_cb (const char *filename)
 
static void gui_raw_develop (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 (int arg)
 
static const char * gui_font_enum (int change, int arg)
 
static void gui_draw_menu_rbf_selected (const char *fn)
 
static void gui_draw_load_menu_rbf (int arg)
 
static void gui_draw_symbol_rbf_selected (const char *fn)
 
static void gui_draw_load_symbol_rbf (int arg)
 
static void gui_menuproc_reset_files (int arg)
 
static const char * gui_user_menu_show_enum (int change, int arg)
 
static const char * gui_raw_toggle_enum (int change, int arg)
 
static const char * gui_alt_power_enum (int change, int arg)
 
static void gui_menuproc_reset_selected (unsigned int btn)
 
static void gui_menuproc_reset (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_mode_t gui_get_mode ()
 
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 const char * gui_video_mode_modes [] = { "Bitrate", "Quality"}
 
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_handlergui_mode =0
 
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 898 der Datei gui.c.

#define LOGO_HEIGHT   74

Definiert in Zeile 2274 der Datei gui.c.

#define LOGO_WIDTH   169

Definiert in Zeile 2273 der Datei gui.c.

#define SPLASH_TIME   20

Definiert in Zeile 32 der Datei gui.c.

#define STR (   x)    _XSTR(x)

Definiert in Zeile 899 der Datei gui.c.

#define TEXT_COUNT   4

Definiert in Zeile 917 der Datei gui.c.

Dokumentation der Funktionen

static int alt_mode_script_run ( )
static

Definiert in Zeile 2774 der Datei gui.c.

2775 {
2776  int remote_script_start_ready = 0;
2777 
2778  // 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
2780  remote_script_start_ready=1;
2781 
2782  // Start a script if the shutter button pressed in <ALT> mode (kdb_blocked) or USB remote sequence not running
2783  // or if script start on <ALT> enabled and this is the first pass through <ALT> mode
2784  if ( kbd_is_key_clicked(KEY_SHOOT_FULL) || remote_script_start_ready || script_run_on_alt_flag )
2785  {
2787  script_start_gui(0);
2788  return 1;
2789  }
2790 
2791  return 0;
2792 }
static void cb_batt_max ( )
static

Definiert in Zeile 1032 der Datei gui.c.

1033 {
1036 }
static void cb_batt_min ( )
static

Definiert in Zeile 1038 der Datei gui.c.

1039 {
1042 }
static void cb_change_dng ( )
static

Definiert in Zeile 1837 der Datei gui.c.

static void cb_change_flash_exp_comp ( )
static

Definiert in Zeile 1470 der Datei gui.c.

1471 {
1473 }
static void cb_change_flash_power ( )
static

Definiert in Zeile 1465 der Datei gui.c.

1466 {
1468 }
static void cb_change_rotate_osd ( )
static

Definiert in Zeile 1750 der Datei gui.c.

1751 {
1752  update_draw_proc();
1754 }
static void cb_change_save_raw ( )
static

Definiert in Zeile 1844 der Datei gui.c.

1845 {
1846  if ( conf.enable_raw_shortcut )
1847  {
1849  cb_change_dng();
1852  }
1853 }
static void cb_perc ( )
static

Definiert in Zeile 1022 der Datei gui.c.

1023 {
1025 }
void cb_space_mb ( )

Definiert in Zeile 1064 der Datei gui.c.

1065 {
1067 }
void cb_space_perc ( )

Definiert in Zeile 1059 der Datei gui.c.

1060 {
1061  conf.space_mb_show=0;
1062 }
static void cb_volts ( )
static

Definiert in Zeile 1027 der Datei gui.c.

1028 {
1029  conf.batt_perc_show=0;
1030 }
void cb_zebra_restore_osd ( )

Definiert in Zeile 1935 der Datei gui.c.

1936 {
1937  if (conf.zebra_restore_osd)
1939 }
void cb_zebra_restore_screen ( )

Definiert in Zeile 1929 der Datei gui.c.

1930 {
1932  conf.zebra_restore_osd = 0;
1933 }
static CMenuItem* create_module_menu ( int  mtype,
char  symbol 
)
static

Definiert in Zeile 703 der Datei gui.c.

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

Definiert in Zeile 3048 der Datei gui.c.

3049 {
3051 
3052  switch (gui_current_alt_state)
3053  {
3054  case ALT_MODE_ENTER:
3055 
3057  gui_set_mode(&scriptGuiHandler);
3058  else
3060 
3062 
3064 
3065  // If user menu set to start automatically when <ALT> mode entered
3066  // then enter user menu mode, unless a script was paused by exiting
3067  // <ALT> mode when the script was running.
3068  gui_user_menu_flag = 0;
3072  gui_user_menu_flag = 1;
3073  }
3074  break;
3075 
3076  case ALT_MODE_LEAVE:
3077  conf_save();
3078 
3079  // Unload all modules which are marked as safe to unload, or loaded for menus
3080  module_exit_alt();
3081 
3085 
3087  break;
3088  }
3089 
3090  // Reset to stable state
3092 }
static const char* gui_alt_power_enum ( int  change,
int  arg 
)
static

Definiert in Zeile 2140 der Datei gui.c.

2141 {
2142 // Script option is retained even if scripting is disabled, otherwise conf values will change
2143 // Equivalent to ALT
2144  static const char* modes[]={ "Never", "Alt", "Script", "Always" };
2145 
2146  gui_enum_value_change(&conf.alt_prevent_shutdown,change,sizeof(modes)/sizeof(modes[0]));
2147 
2148  return modes[conf.alt_prevent_shutdown];
2149 }
void gui_cancel_need_restore ( )

Definiert in Zeile 2414 der Datei gui.c.

2415 {
2418 }
const char* gui_change_enum2 ( const CMenuItem menu_item,
int  change 
)

Definiert in Zeile 84 der Datei gui.c.

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

Definiert in Zeile 79 der Datei gui.c.

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

Definiert in Zeile 2654 der Datei gui.c.

2655 {
2656  static int clear_for_title = 1;
2657 
2658 #ifdef CAM_DISP_ALT_TEXT
2659  gui_draw_alt_helper();
2660 #else
2661  gui_draw_osd();
2662 #endif
2663 
2665  {
2666  int w = camera_screen.disp_width;
2667 #ifdef CAM_DISP_ALT_TEXT
2671 #endif
2672 
2674  {
2675  // Draw script title (up to <ALT> text, if shown)
2677  }
2678  clear_for_title = 1;
2679  }
2680  else if (clear_for_title)
2681  {
2682  clear_for_title = 0;
2683  }
2684 
2685  console_draw(force_redraw);
2686 }
int gui_chdk_kbd_process ( )

Definiert in Zeile 2796 der Datei gui.c.

2797 {
2798  if (alt_mode_script_run()) return 0;
2799 
2800  // Process Shutter Half Press + BUTTON shortcuts
2802  if (camera_info.state.is_shutter_half_press) return 0;
2803 
2804  int reset_helper = 0;
2805 
2806 #if !CAM_HAS_ERASE_BUTTON // ALT RAW toggle kbd processing if camera has SD override but no erase button
2808  {
2809  if (conf.debug_shortcut_action > 0)
2810  {
2812  }
2813  // Check in manual focus mode
2814  else if (!shooting_get_common_focus_mode())
2815  {
2816  // Not manual focus mode so just update RAW save setting
2818  }
2819  else
2820  {
2821  // In manual focus mode so update shooting distance
2822 #if CAM_HAS_ZOOM_LEVER
2825 #else
2827 #endif
2828  reset_helper = 1;
2829  }
2830  }
2831 #else // ALT RAW toggle kbd processing if can't SD override or has erase button
2833  {
2834  if (conf.debug_shortcut_action > 0)
2835  {
2837  }
2838  else
2839  {
2840  // Change RAW save state
2842  }
2843  }
2844 #endif
2845  else if (kbd_is_key_clicked(KEY_SET))
2846  {
2849  }
2850  else
2851  {
2852 #if !CAM_HAS_MANUAL_FOCUS
2853  if (kbd_is_key_clicked(SHORTCUT_MF_TOGGLE)) // Camera does not have manual focus
2854  {
2858  reset_helper = 1;
2859  }
2860  else
2861 #endif
2862  if (shooting_get_common_focus_mode()) // Check in manual focus mode
2863  {
2864 #if CAM_HAS_ZOOM_LEVER // Camera has zoom lever, use left & right to change factor,up to set infinity
2866  {
2867  sd_override_koef(1);
2868  reset_helper = 1;
2869  }
2870  else if (kbd_is_key_clicked(KEY_LEFT))
2871  {
2872  sd_override_koef(-1);
2873  reset_helper = 1;
2874  }
2876  {
2879  reset_helper = 1;
2880  }
2881  else
2882 #endif
2883  if (kbd_is_key_clicked(SHORTCUT_SET_HYPERFOCAL)) // Set hyperfocal distance if down pressed
2884  {
2889  reset_helper = 1;
2890  }
2891  else
2892  {
2893  switch (kbd_get_autoclicked_key())
2894  {
2895 #if CAM_HAS_ZOOM_LEVER
2896  case KEY_ZOOM_IN:
2897 #else
2898  case KEY_RIGHT:
2899 #endif
2900  sd_override(1);
2901  reset_helper = 1;
2902  break;
2903 #if CAM_HAS_ZOOM_LEVER
2904  case KEY_ZOOM_OUT:
2905 #else
2906  case KEY_LEFT:
2907 #endif
2908  sd_override(-1);
2909  reset_helper = 1;
2910  break;
2911  }
2912  }
2913  }
2914  }
2915 
2916  if (reset_helper)
2917  {
2919 #ifdef CAM_DISP_ALT_TEXT
2921 #endif
2922  }
2923 
2924  return 0;
2925 }
void gui_chdk_kbd_process_menu_btn ( )

Definiert in Zeile 2939 der Datei gui.c.

static void gui_console_clear ( int  arg)
static

Definiert in Zeile 966 der Datei gui.c.

static void gui_console_show ( int  arg)
static

Definiert in Zeile 972 der Datei gui.c.

973 {
974  void display_console();
975  display_console();
976 }
static void gui_debug_shortcut ( void  )
static

Definiert in Zeile 2689 der Datei gui.c.

2690 {
2691 #ifdef OPT_DEBUGGING
2692  static int lastcall = -1;
2693  int t=get_tick_count();
2694  if ( lastcall != -1) {
2695  if (t-lastcall <= 400)
2696  debug_display_direction = -debug_display_direction;
2697  }
2698  lastcall=t;
2699  switch(conf.debug_shortcut_action) {
2700  case 1:
2701  schedule_memdump();
2702  break;
2703  case 2:
2705  break;
2706  case 3:
2707  gui_compare_props(0); // compare properties
2708  break;
2709  case 4:
2710  gui_compare_props(1); // compare UI properties
2711  break;
2712  }
2713 #endif
2714 }
const char* gui_decimal_enum ( int  change,
int  arg 
)

Definiert in Zeile 1387 der Datei gui.c.

1388 {
1389  int *v = (int*)arg;
1390 
1391  *v += change;
1392  if (*v < 0) *v = 0;
1393  if (*v > 999999) *v = 999999;
1394 
1395  sprintf(buf, "%01d.%05d", (int)(*v / 100000), (int)(*v % 100000));
1396 
1397  return buf;
1398 }
void gui_default_kbd_process_menu_btn ( )

Definiert in Zeile 2718 der Datei gui.c.

2719 {
2721 }
static void gui_delete_module_log ( int  arg)
static
static void gui_delete_module_log_callback ( unsigned int  btn)
static

Definiert in Zeile 870 der Datei gui.c.

871 {
872  if (btn == MBOX_BTN_YES)
874 }
static const char* gui_dng_crop_size ( int  change,
int  arg 
)
static

Definiert in Zeile 1865 der Datei gui.c.

1866 {
1867  static const char* modes[]={ "JPEG", "Active", "Full" };
1868 
1869  gui_enum_value_change(&conf.dng_crop_size,change,sizeof(modes)/sizeof(modes[0]));
1870 
1871  return modes[conf.dng_crop_size];
1872 }
static const char* gui_dng_version ( int  change,
int  arg 
)
static

Definiert in Zeile 1855 der Datei gui.c.

1856 {
1857  static const char* modes[]={ "1.3", "1.1" };
1858 
1859  gui_enum_value_change(&conf.dng_version,change,sizeof(modes)/sizeof(modes[0]));
1860  cb_change_dng();
1861 
1862  return modes[conf.dng_version];
1863 }
static void gui_draw_fselect ( int  arg)
static

Definiert in Zeile 893 der Datei gui.c.

894 {
896 }
static void gui_draw_lang_selected ( const char *  fn)
static

Definiert in Zeile 1961 der Datei gui.c.

1962 {
1963  if (fn) {
1964  strcpy(conf.lang_file, fn);
1967  }
1968 }
static void gui_draw_load_lang ( int  arg)
static

Definiert in Zeile 1970 der Datei gui.c.

static void gui_draw_load_menu_rbf ( int  arg)
static

Definiert in Zeile 2000 der Datei gui.c.

static void gui_draw_load_rbf ( int  arg)
static

Definiert in Zeile 670 der Datei gui.c.

static void gui_draw_load_symbol_rbf ( int  arg)
static

Definiert in Zeile 2014 der Datei gui.c.

static void gui_draw_menu_rbf_selected ( const char *  fn)
static

Definiert in Zeile 1991 der Datei gui.c.

1992 {
1993  if (fn) {
1997  }
1998 }
void gui_draw_no_module_warning ( )

Definiert in Zeile 2929 der Datei gui.c.

static void gui_draw_rbf_selected ( const char *  fn)
static

Definiert in Zeile 663 der Datei gui.c.

664 {
665  if (fn) {
667  }
668 }
static void gui_draw_read ( int  arg)
static

Definiert in Zeile 650 der Datei gui.c.

static void gui_draw_read_last ( int  arg)
static

Definiert in Zeile 655 der Datei gui.c.

656 {
657  if (stat(conf.reader_file,0) == 0)
659  else
660  gui_draw_read(arg);
661 }
static void gui_draw_read_selected ( const char *  fn)
static

Definiert in Zeile 642 der Datei gui.c.

643 {
644  if (fn)
645  {
647  }
648 }
static void gui_draw_splash ( )
static

Definiert in Zeile 2316 der Datei gui.c.

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

Definiert in Zeile 2005 der Datei gui.c.

2006 {
2007  if (fn) {
2011  }
2012 }
void gui_enum_value_change ( int *  value,
int  change,
unsigned  num_items 
)

Definiert in Zeile 71 der Datei gui.c.

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

Definiert in Zeile 1458 der Datei gui.c.

1459 {
1460  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" };
1461  const char *rv = gui_change_simple_enum(&conf.flash_exp_comp,change,modes,sizeof(modes)/sizeof(modes[0]));
1462  return rv;
1463 }
const char* gui_flash_power_modes_enum ( int  change,
int  arg 
)

Definiert in Zeile 1451 der Datei gui.c.

1452 {
1453  static const char* modes[] = { "Min", "Med", "Max" };
1454  const char *rv = gui_change_simple_enum(&conf.flash_video_override_power,change,modes,sizeof(modes)/sizeof(modes[0]));
1455  return rv;
1456 }
static const char* gui_font_enum ( int  change,
int  arg 
)
static

Definiert in Zeile 1975 der Datei gui.c.

1976 {
1977  extern int num_codepages;
1978  extern char* codepage_names[];
1979 
1980  gui_enum_value_change(&conf.font_cp,change,num_codepages);
1981 
1982  if (change != 0) {
1986  }
1987 
1988  return codepage_names[conf.font_cp];
1989 }
static void gui_games_menu ( int  arg)
static

Definiert in Zeile 792 der Datei gui.c.

793 {
795 }
gui_mode_t gui_get_mode ( )

Definiert in Zeile 2443 der Datei gui.c.

2443 { return gui_mode->mode; }
static void gui_grid_lines_load ( int  arg)
static

Definiert in Zeile 1638 der Datei gui.c.

static void gui_grid_lines_load_selected ( const char *  fn)
static

Definiert in Zeile 1630 der Datei gui.c.

1631 {
1632  if (fn)
1633  {
1635  }
1636 }
static void gui_handle_splash ( int  force_redraw)
static

Definiert in Zeile 2382 der Datei gui.c.

2383 {
2384  if (gui_splash)
2385  {
2387  if (force_redraw || (gui_splash == SPLASH_TIME))
2388  gui_draw_splash();
2389 
2390  if (--gui_splash == 0)
2391  {
2394  if (logo)
2395  free(logo);
2396  logo = NULL;
2397  }
2398  }
2399 }
const char* gui_hhmss_enum ( int  change,
int  arg 
)

Definiert in Zeile 1402 der Datei gui.c.

1403 {
1404  int *v = (int*)arg;
1405 
1406  int h, m, s;
1407  h = *v / 3600;
1408  m = (*v % 3600) / 60;
1409  s = *v % 60;
1410 
1411  switch (change)
1412  {
1413  case 1:
1414  case -1:
1415  s += change;
1416  if (s < 0) s = 59;
1417  if (s > 59) s = 0;
1418  break;
1419  case 10:
1420  case -10:
1421  m += change / 10;
1422  if (m < 0) m = 59;
1423  if (m > 59) m = 0;
1424  break;
1425  default:
1426  h += change /100;
1427  if (h < 0) h = 1;
1428  if (h > 1) h = 0;
1429  break;
1430  }
1431  *v = (h * 3600) + (m * 60) + s;
1432 
1433  sprintf(buf, "%1d:%02d:%02d", h, m, s);
1434 
1435  return buf;
1436 }
void gui_init ( )

Definiert in Zeile 2426 der Datei gui.c.

2427 {
2429  if (conf.start_sound > 0)
2430  {
2431  play_sound(4);
2432  }
2433 
2434  init_splash();
2435 
2436  draw_init();
2437 
2438  process_file( "A/CHDK/badpixel", make_pixel_list, 1 );
2439  process_file( "A/CHDK/badpixel.txt", make_pixel_list, 1 );
2440 }
int gui_kbd_process ( )

Definiert in Zeile 3010 der Datei gui.c.

3011 {
3012  if (gui_mode)
3013  {
3014  // Call menu button handler if menu button pressed
3016  {
3018  {
3020  return 0;
3021  }
3022  }
3023 
3024  // Call mode handler for other buttons
3025  if (gui_mode->kbd_process) return gui_mode->kbd_process();
3026  }
3027  return 0;
3028 }
static void gui_load_edge_selected ( const char *  fn)
static

Definiert in Zeile 1594 der Datei gui.c.

1595 {
1596  if (fn)
1598 }
static void gui_lua_native_call_warning ( )
static
static void gui_menu_reset_colors ( int  arg)
static
static void gui_menu_reset_colors_selected ( unsigned int  btn)
static

Definiert in Zeile 1670 der Datei gui.c.

1671 {
1672  if (btn==MBOX_BTN_YES)
1673  resetColors();
1674 }
static void gui_menu_run_palette ( int  arg)
static

Definiert in Zeile 1660 der Datei gui.c.

1661 {
1663 }
static void gui_menu_test_palette ( int  arg)
static

Definiert in Zeile 1665 der Datei gui.c.

1666 {
1668 }
static void gui_menuproc_badpixel_create ( int  arg)
static

Definiert in Zeile 1874 der Datei gui.c.

1875 {
1877 }
static void gui_menuproc_edge_load ( int  arg)
static

Definiert in Zeile 1605 der Datei gui.c.

static void gui_menuproc_edge_save ( int  arg)
static

Definiert in Zeile 1600 der Datei gui.c.

1601 {
1603 }
static void gui_menuproc_mkbootdisk ( int  arg)
static
static void gui_menuproc_reset ( int  arg)
static
static void gui_menuproc_reset_files ( int  arg)
static

Definiert in Zeile 2019 der Datei gui.c.

static void gui_menuproc_reset_selected ( unsigned int  btn)
static

Definiert in Zeile 2151 der Datei gui.c.

2152 {
2153  if (btn==MBOX_BTN_YES)
2155 }
static void gui_module_menu ( CMenu m,
int  type 
)
static

Definiert in Zeile 785 der Datei gui.c.

786 {
787  if (m->menu == 0)
788  m->menu = create_module_menu(type, m->symbol);
790 }
const char* gui_on_off_enum ( int  change,
int *  conf_val 
)

Definiert in Zeile 2240 der Datei gui.c.

2241 {
2242  static const char* modes[]={ "Off", "On"};
2243  return gui_change_simple_enum(conf_val,change,modes,sizeof(modes)/sizeof(modes[0]));
2244 }
static void gui_raw_develop ( int  arg)
static

Definiert in Zeile 1884 der Datei gui.c.

1885 {
1887 }
static const char* gui_raw_toggle_enum ( int  change,
int  arg 
)
static

Definiert in Zeile 2131 der Datei gui.c.

2132 {
2133  static const char* raw_toggle[]={ "Off", "On", "On+OSD" };
2134 
2135  gui_enum_value_change(&conf.enable_raw_shortcut,change,sizeof(raw_toggle)/sizeof(raw_toggle[0]));
2136 
2137  return raw_toggle[conf.enable_raw_shortcut];
2138 }
void gui_redraw ( int  flag_gui_enforce_redraw)

Definiert in Zeile 2957 der Datei gui.c.

2958 {
2959  if (!draw_test_guard() && (!camera_info.state.gui_mode_none || gui_splash)) // Attempt to detect screen erase in <Alt> mode, redraw if needed
2960  {
2961  draw_set_guard();
2962  flag_gui_enforce_redraw = 1;
2963 #ifdef CAM_TOUCHSCREEN_UI
2964  redraw_buttons = 1;
2965 #endif
2966  }
2967 
2968 #ifdef CAM_TOUCHSCREEN_UI
2969  extern void virtual_buttons();
2970  virtual_buttons();
2971 #endif
2972 
2973  // Erase screen if needed
2975  {
2976  draw_restore();
2978  flag_gui_enforce_redraw = 1;
2979  }
2980 
2981  // Force mode redraw if needed
2983  {
2985  flag_gui_enforce_redraw = 1;
2986  }
2987 
2988 #ifdef OPT_EXPIRE_TEST
2989  do_expire_check();
2990 #endif
2991 
2992  gui_handle_splash(flag_gui_enforce_redraw);
2993 
2994  // visible warning if modules missing
2996 
2997 // DEBUG: uncomment if you want debug values always on top
2998 //gui_draw_debug_vals_osd();
2999 
3000  // Call redraw handler
3001  if (gui_mode->redraw)
3002  gui_mode->redraw(flag_gui_enforce_redraw);
3003 }
void gui_set_alt_mode_state ( int  new_state)

Definiert in Zeile 3042 der Datei gui.c.

3043 {
3044  gui_current_alt_state = new_state;
3045 }
gui_handler* gui_set_mode ( gui_handler mode)

Definiert in Zeile 2447 der Datei gui.c.

2448 {
2449  // Set up gui mode & state variables
2450  camera_info.state.gui_mode = mode->mode;
2453 
2454  if ( gui_mode == mode )
2455  return gui_mode;
2456 
2457 #ifdef CAM_TOUCHSCREEN_UI
2458  if (((gui_mode->mode == GUI_MODE_NONE) != (mode->mode == GUI_MODE_NONE)) || // Change from GUI_MODE_NONE to any other or vice-versa
2459  ((gui_mode->mode > GUI_MODE_MENU) != (mode->mode > GUI_MODE_MENU))) // Switch in & out of menu mode
2460  redraw_buttons = 1;
2461 #endif
2462 
2464 
2466  gui_mode = mode;
2467 
2469 
2470  // Flag for screen erase/redraw unless mode is marked not to (e.g. menu box popup)
2472  ((old_mode->flags & GUI_MODE_FLAG_NORESTORE_ON_SWITCH) == 0))
2474  // 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)
2475  if ((old_mode->flags & (GUI_MODE_FLAG_NORESTORE_ON_SWITCH)) != 0)
2477 
2478 #ifdef CAM_DISP_ALT_TEXT
2481 #endif
2482 
2483  return old_mode;
2484 }
void gui_set_need_redraw ( )

Definiert in Zeile 2420 der Datei gui.c.

2421 {
2423 }
void gui_set_need_restore ( )

Definiert in Zeile 2409 der Datei gui.c.

2410 {
2412 }
static void gui_show_build_info ( int  arg)
static
static void gui_show_memory_info ( int  arg)
static
const char* gui_subj_dist_override_koef_enum ( int  change,
int  arg 
)

Definiert in Zeile 1340 der Datei gui.c.

1341 {
1342  static const char* modes[] = { "Off", "On", "Inf" };
1343  const char *rv = gui_change_simple_enum(&conf.subj_dist_override_koef,change,modes,sizeof(modes)/sizeof(modes[0]));
1344  return rv;
1345 }
const char* gui_subj_dist_override_value_enum ( int  change,
int  arg 
)

koef

Definiert in Zeile 1317 der Datei gui.c.

1318 {
1319  static char buf[9];
1320 
1321  if (conf.subj_dist_override_koef == SD_OVERRIDE_INFINITY) // Infinity selected
1322  strcpy(buf," Inf.");
1323  else
1324  {
1325  // Increment / decrement the SD value, wrapping around from CAMERA_MIN_DIST to CAMERA_MAX_DIST
1326  conf.subj_dist_override_value += (change);
1331  // philmoz 19/6/2014 - if SD override is < distance from sensor to front of lens (for current zoom) then adjust SD override
1335  }
1336 
1337  return buf;
1338 }
static void gui_tools_menu ( int  arg)
static

Definiert in Zeile 797 der Datei gui.c.

798 {
800 }
int gui_touch_process ( int  x,
int  y 
)

Definiert in Zeile 3031 der Datei gui.c.

3032 {
3034  return gui_mode->touch_handler(x, y);
3035  return 0;
3036 }
static const char* gui_tv_enum_type_enum ( int  change,
int  arg 
)
static

Definiert in Zeile 1287 der Datei gui.c.

1288 {
1289 #ifdef CAM_EXT_TV_RANGE
1290  static const char* modes[ ]= { "Ev Step", "ShrtExp", "LongExp" };
1291 #else
1292  static const char* modes[ ]= { "Ev Step", "ShrtExp" };
1293 #endif
1294 
1295  gui_enum_value_change(&conf.tv_enum_type,change,sizeof(modes)/sizeof(modes[0]));
1296  if (change)
1297  {
1298  void set_tv_override_menu(CMenu *menu);
1300  }
1301  return modes[conf.tv_enum_type];
1302 }
const char* gui_tv_override_value_enum ( int  change,
int  arg 
)

Definiert in Zeile 1281 der Datei gui.c.

1282 {
1285 }
static const char* gui_USB_control_modes_enum ( int  change,
int  arg 
)
static

Definiert in Zeile 132 der Datei gui.c.

133 {
134  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
135  gui_enum_value_change(&conf.remote_control_mode,change,sizeof(modes)/sizeof(modes[0]));
136 
137  if (change) set_usb_remote_state();
138 
139  return modes[conf.remote_control_mode];
140 }
static const char* gui_USB_switch_types_enum ( int  change,
int  arg 
)
static

Definiert in Zeile 122 der Datei gui.c.

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

Definiert in Zeile 2046 der Datei gui.c.

2047 {
2048  static const char* modes[]={ "Off", "On", "On Direct" };
2049 
2050  void set_usermenu_state();
2052 
2053  return gui_change_simple_enum(&conf.user_menu_enable,change,modes,sizeof(modes)/sizeof(modes[0]));
2054 }
const char* gui_video_bitrate_enum ( int  change,
int  arg 
)

Definiert in Zeile 1161 der Datei gui.c.

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

Definiert in Zeile 2281 der Datei gui.c.

2282 {
2283  int i = 0, index = 0;
2284  while (index < sizeof(text_raw))
2285  {
2286  text[i++] = &text_raw[index];
2287  while (text_raw[index++]) ;
2288  }
2289 
2291 
2292  if (gui_splash)
2293  {
2294 #if defined(VER_CHDK)
2295  const char *logo_name="A/CHDK/DATA/logo.dat";
2296 #else // CHDK-DE
2297  const char *logo_name="A/CHDK/DATA/logo_de.dat";
2298 #endif
2299  logo = load_file(logo_name, &logo_size, 0);
2300 
2302  logo_text_width = 0;
2303 
2304  int i;
2305  for (i=0; i<logo_text_height; ++i)
2306  {
2307  int l = strlen(text[i]);
2308  if (l > logo_text_width) logo_text_width = l;
2309  }
2310 
2312  logo_text_height = logo_text_height * FONT_HEIGHT + 8;
2313  }
2314 }
static void lua_native_call_warning ( unsigned int  btn)
static

Definiert in Zeile 936 der Datei gui.c.

937 {
938  if (btn==MBOX_BTN_NO)
940 }
static void raw_fselect_cb ( const char *  filename)
static

Definiert in Zeile 1879 der Datei gui.c.

1880 {
1881  raw_prepare_develop(filename, 1);
1882 }
void schedule_memdump ( )

Definiert in Zeile 34 der Datei main.c.

35 {
37 }
static void sd_override ( int  direction)
static
void set_tv_override_menu ( CMenu menu)

Definiert in Zeile 1567 der Datei gui.c.

1568 {
1570  if (mi)
1571  {
1572  switch (conf.tv_enum_type)
1573  {
1574  case 0: // Ev Step
1575  mi->value = (int*)(&tv_override_evstep);
1576  mi->arg = 1;
1577  break;
1578  case 1: // Short exposure
1579  mi->value = (int*)(&tv_override_short_exp);
1580  mi->arg = 100;
1581  break;
1582 #ifdef CAM_EXT_TV_RANGE
1583  case 2: // Long exposure
1584  mi->value = (int*)(&tv_override_long_exp);
1585  mi->arg = 1;
1586  break;
1587 #endif
1588  }
1589  }
1590 }
void set_usermenu_state ( )

Definiert in Zeile 2222 der Datei gui.c.

2223 {
2224  int i;
2225  for (i=0; root_menu_items[i].symbol != 0; i++)
2226  {
2227  if (root_menu_items[i].value == (int*)&user_submenu)
2228  {
2229  if (conf.user_menu_enable)
2230  root_menu_items[i].text = LANG_MENU_USER_MENU; // Enable user menu option in root menu
2231  else
2232  root_menu_items[i].text = 0; // Disable user menu option in root menu
2233  return;
2234  }
2235  }
2236 }
int submenu_sort ( const void *  v1,
const void *  v2 
)

Definiert in Zeile 695 der Datei gui.c.

696 {
697  CMenuItem *mi1 = (CMenuItem*)v1;
698  CMenuItem *mi2 = (CMenuItem*)v2;
699 
700  return strcmp(lang_str(mi1->text), lang_str(mi2->text));
701 }

Variablen-Dokumentation

const char _end
const char _start

Definiert in Zeile 2953 der Datei gui.c.

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

Definiert in Zeile 235 der Datei gui.c.

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

Definiert in Zeile 1055 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 119 der Datei gui.c.

char buf[256]
static

Definiert in Zeile 58 der Datei gui.c.

CMenu chdk_settings_menu = {0x20,LANG_MENU_CHDK_SETTINGS, chdk_settings_menu_items }

Definiert in Zeile 2198 der Datei gui.c.

CMenuItem chdk_settings_menu_items[]
static

Definiert in Zeile 2164 der Datei gui.c.

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

Definiert in Zeile 1156 der Datei gui.c.

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

Definiert in Zeile 987 der Datei gui.c.

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

Definiert in Zeile 1110 der Datei gui.c.

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

Definiert in Zeile 1626 der Datei gui.c.

CMenuItem fast_ev_switch[2]
static
Initialisierung:

Definiert in Zeile 1497 der Datei gui.c.

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

Definiert in Zeile 692 der Datei gui.c.

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

Definiert in Zeile 1656 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 203 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 201 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 1889 der Datei gui.c.

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

Definiert in Zeile 94 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 93 der Datei gui.c.

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

Definiert in Zeile 1143 der Datei gui.c.

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

Definiert in Zeile 1145 der Datei gui.c.

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

Definiert in Zeile 1144 der Datei gui.c.

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

Definiert in Zeile 964 der Datei gui.c.

int gui_current_alt_state = ALT_MODE_NORMAL
static

Definiert in Zeile 3039 der Datei gui.c.

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

Definiert in Zeile 1095 der Datei gui.c.

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

Definiert in Zeile 1610 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 1442 der Datei gui.c.

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

Definiert in Zeile 1761 der Datei gui.c.

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

Definiert in Zeile 1791 der Datei gui.c.

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

Definiert in Zeile 1793 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 1792 der Datei gui.c.

gui_handler* gui_mode =0
static

Definiert in Zeile 2402 der Datei gui.c.

int gui_mode_need_redraw = 0
static

Definiert in Zeile 2405 der Datei gui.c.

int gui_osd_need_restore = 0
static

Definiert in Zeile 2404 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 206 der Datei gui.c.

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

Definiert in Zeile 1438 der Datei gui.c.

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

Definiert in Zeile 1524 der Datei gui.c.

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

Definiert in Zeile 675 der Datei gui.c.

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

Definiert in Zeile 1142 der Datei gui.c.

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

Definiert in Zeile 1208 der Datei gui.c.

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

Definiert in Zeile 1762 der Datei gui.c.

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

Definiert in Zeile 1115 der Datei gui.c.

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

Definiert in Zeile 1069 der Datei gui.c.

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

Definiert in Zeile 1070 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 1071 der Datei gui.c.

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

Definiert in Zeile 1072 der Datei gui.c.

int gui_splash
static

Definiert in Zeile 2277 der Datei gui.c.

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

Definiert in Zeile 1759 der Datei gui.c.

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

Definiert in Zeile 2028 der Datei gui.c.

int gui_user_menu_flag

Definiert in Zeile 56 der Datei gui.c.

const char* gui_video_mode_modes[] = { "Bitrate", "Quality"}
static

Definiert in Zeile 1211 der Datei gui.c.

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

Definiert in Zeile 1942 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 1941 der Datei gui.c.

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

Definiert in Zeile 1114 der Datei gui.c.

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

Definiert in Zeile 1807 der Datei gui.c.

CMenuItem iso_bracket[2]
static
Initialisierung:

Definiert in Zeile 101 der Datei gui.c.

CMenuItem iso_override_items[2]
static
Initialisierung:

Definiert in Zeile 1492 der Datei gui.c.

char* logo = NULL
static

Definiert in Zeile 2278 der Datei gui.c.

int logo_size
static

Definiert in Zeile 2279 der Datei gui.c.

int logo_text_height
static

Definiert in Zeile 2279 der Datei gui.c.

int logo_text_width
static

Definiert in Zeile 2279 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 2042 der Datei gui.c.

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

Definiert in Zeile 2069 der Datei gui.c.

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

Definiert in Zeile 1018 der Datei gui.c.

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

Definiert in Zeile 889 der Datei gui.c.

CMenuItem module_submenu_items[]
static
int no_modules_flag

Definiert in Zeile 27 der Datei main.c.

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

Definiert in Zeile 1565 der Datei gui.c.

CMenuItem operation_submenu_items[]
static

Definiert in Zeile 1526 der Datei gui.c.

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

Definiert in Zeile 1787 der Datei gui.c.

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

Definiert in Zeile 1833 der Datei gui.c.

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

Definiert in Zeile 1730 der Datei gui.c.

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

Definiert in Zeile 1925 der Datei gui.c.

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

Definiert in Zeile 1895 der Datei gui.c.

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

Definiert in Zeile 688 der Datei gui.c.

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

Definiert in Zeile 197 der Datei gui.c.

CMenu root_menu = {0x20,LANG_MENU_MAIN_TITLE, root_menu_items }

Definiert in Zeile 2218 der Datei gui.c.

int script_run_on_alt_flag

Definiert in Zeile 54 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 96 der Datei gui.c.

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

Definiert in Zeile 866 der Datei gui.c.

CMenuItem sdcard_submenu_items[]
static
Initialisierung:

Definiert in Zeile 856 der Datei gui.c.

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

Definiert in Zeile 1091 der Datei gui.c.

CMenuItem synch_delay[2]
static
Initialisierung:

Definiert in Zeile 174 der Datei gui.c.

const char* text[TEXT_COUNT]
static

Definiert in Zeile 919 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 901 der Datei gui.c.

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

Definiert in Zeile 693 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 1268 der Datei gui.c.

CMenuItem tv_override_evstep[2]
static
Initialisierung:

Definiert in Zeile 1475 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 1138 der Datei gui.c.

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

Definiert in Zeile 1117 der Datei gui.c.

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

Definiert in Zeile 1263 der Datei gui.c.

CMenuItem video_submenu_items[]
static

Definiert in Zeile 1223 der Datei gui.c.

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

Definiert in Zeile 1718 der Datei gui.c.

CMenuItem visual_submenu_items[]
static

Definiert in Zeile 1683 der Datei gui.c.

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

Definiert in Zeile 1957 der Datei gui.c.