#include "camera_info.h"
#include "conf.h"
#include "gui.h"
#include "gui_lang.h"
#include "gui_menu.h"
#include "fileutil.h"
#include "ctype.h"
#include "script_api.h"
#include "gui_fselect.h"
gehe zum Quellcode dieser Datei
|
static void | gui_update_script_submenu () |
|
sc_param * | find_param (char *name) |
|
sc_param * | new_param (char *name) |
|
const char * | skip_whitespace (const char *p) |
|
const char * | skip_to_token (const char *p) |
|
const char * | skip_token (const char *p) |
|
const char * | skip_toeol (const char *p) |
|
const char * | skip_eol (const char *p) |
|
const char * | skip_tochar (const char *p, char end) |
|
const char * | get_token (const char *p, char *buf, int maxlen) |
|
const char * | get_name (const char *p, int maxlen, sc_param **sp, int create) |
|
const char * | get_script_filename () |
|
static void | process_title (const char *ptr) |
|
static void | process_subtitle (const char *ptr) |
|
static int | check_param (const char *ptr) |
|
static void | process_param (const char *ptr) |
|
static const char * | get_default (sc_param *p, const char *ptr, int isScript) |
|
static void | process_default (const char *ptr, int isScript) |
|
static const char * | get_range (sc_param *p, const char *ptr, char end) |
|
static void | process_range (const char *ptr) |
|
static const char * | get_values (sc_param *p, const char *ptr, char end) |
|
static void | process_values (const char *ptr) |
|
static int | process_single (const char *ptr) |
|
static void | script_scan () |
|
static char * | make_param_filename (enum FilenameMakeModeEnum mode) |
|
static void | get_last_paramset_num () |
|
static int | load_params_values () |
|
static void | do_save_param_file () |
|
void | save_params_values (int enforce) |
|
void | script_reset_to_default_params_values () |
|
void | script_load (const char *fn) |
|
static const char * | gui_script_param_set_enum (int change, __attribute__((unused)) int arg) |
|
static void | gui_load_script_selected (const char *fn) |
|
static void | gui_load_script (__attribute__((unused)) int arg) |
|
static void | gui_load_script_default (__attribute__((unused)) int arg) |
|
static void | cb_change_param_save_enum () |
|
#define DEFAULT_PARAM_SET 10 |
#define IS_EOL |
( |
|
p) | |
((*p == '\n') || (*p == '\r')) |
#define IS_SPACE |
( |
|
p) | |
((*p == ' ') || (*p == '\t')) |
#define MAX_PARAM_NAME_LEN 64 |
#define SCRIPT_DATA_PATH "A/CHDK/DATA/" |
#define SCRIPT_DEFAULT_FILENAME "A/CHDK/SCRIPTS/DEFAULT.LUA" |
#define SCRIPT_SUBMENU_BOTTOM_IDX 34 |
#define SCRIPT_SUBMENU_PARAMS_IDX 8 |
Aufzählungswerte |
---|
MAKE_PARAMSETNUM_FILENAME |
|
MAKE_PARAM_FILENAME |
|
MAKE_PARAM_FILENAME_V2 |
|
Definiert in Zeile 21 der Datei gui_script.c.
static void cb_change_param_save_enum |
( |
) | |
|
|
static |
static int check_param |
( |
const char * |
ptr) | |
|
|
static |
static void do_save_param_file |
( |
) | |
|
|
static |
static void get_last_paramset_num |
( |
) | |
|
|
static |
Definiert in Zeile 112 der Datei gui_script.c.
121 if ((*sp == 0) && create)
Definiert in Zeile 252 der Datei gui_script.c.
265 else if ((min >= 0) && (max >= 0))
const char* get_script_filename |
( |
) | |
|
const char* get_token |
( |
const char * |
p, |
|
|
char * |
buf, |
|
|
int |
maxlen |
|
) |
| |
static void gui_load_script_default |
( |
__attribute__((unused)) int |
arg) | |
|
|
static |
static void gui_load_script_selected |
( |
const char * |
fn) | |
|
|
static |
static const char* gui_script_param_set_enum |
( |
int |
change, |
|
|
__attribute__((unused)) int |
arg |
|
) |
| |
|
static |
Definiert in Zeile 752 der Datei gui_script.c.
754 static const char* modes[]={
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"Default" };
static void gui_update_script_submenu |
( |
) | |
|
|
static |
Definiert in Zeile 848 der Datei gui_script.c.
889 static char warning[50];
913 if (p->option_count != 0)
static int load_params_values |
( |
) | |
|
|
static |
Definiert in Zeile 558 der Datei gui_script.c.
586 while (ptr[0] && valid)
591 if (
strncmp(
"@param", ptr, 6) == 0)
597 else if (ptr[0] ==
'#')
617 if (
strncmp(
"@default", ptr, 8)==0)
622 else if (ptr[0] ==
'#')
Definiert in Zeile 494 der Datei gui_script.c.
497 static char tgt_buf[100];
506 char*
s = tgt_buf +
strlen(tgt_buf);
512 if (!s) s = tgt_buf +
strlen(tgt_buf);
static void process_default |
( |
const char * |
ptr, |
|
|
int |
isScript |
|
) |
| |
|
static |
static void process_param |
( |
const char * |
ptr) | |
|
|
static |
static void process_range |
( |
const char * |
ptr) | |
|
|
static |
static int process_single |
( |
const char * |
ptr) | |
|
|
static |
static void process_subtitle |
( |
const char * |
ptr) | |
|
|
static |
static void process_title |
( |
const char * |
ptr) | |
|
|
static |
static void process_values |
( |
const char * |
ptr) | |
|
|
static |
void save_params_values |
( |
int |
enforce) | |
|
void script_load |
( |
const char * |
fn) | |
|
void script_reset_to_default_params_values |
( |
) | |
|
static void script_scan |
( |
) | |
|
|
static |
Definiert in Zeile 402 der Datei gui_script.c.
447 if (
strncmp(
"@title", ptr, 6)==0)
451 else if (
strncmp(
"@subtitle", ptr, 9)==0)
455 else if (
strncmp(
"@param", ptr, 6)==0)
459 else if (
strncmp(
"@default", ptr, 8)==0)
463 else if (
strncmp(
"@range", ptr, 6)==0)
467 else if (
strncmp(
"@values", ptr, 7)==0)
471 else if (
strncmp(
"@chdk_version", ptr, 13)==0)
478 else if (ptr[0] ==
'#')
Definiert in Zeile 90 der Datei gui_script.c.
90 { p =
skip_toeol(p);
if (*p ==
'\r') p++;
if (*p ==
'\n') p++;
return p; }
const char* skip_tochar |
( |
const char * |
p, |
|
|
char |
end |
|
) |
| |
const char* gui_script_autostart_modes[] = { "Off", "On", "Once", "ALT"} |
|
static |
int last_script_param_set = -1 |
|
static |
int script_has_version = 0 |
CMenu script_submenu = {0x27,LANG_MENU_SCRIPT_TITLE, 0 } |
int script_submenu_count = 0 |