Exemple #1
0
int main(void) {
  window_open();

  glutils_init();

  Settings settings;
  settings.first_run = true;
  Level level;

  bool leave = false;
  while(!leave) {
    if(!menu_run(&settings)) {
      leave = true;
      break;
    }

    theme_load(settings.theme);
    level_load(settings.level_set, settings.level, &level);

    level_run(&level, &settings);
  }

  /*
   * unload the last used theme
   * if we loaded several themes one after another,
   * they have been automatically freed by theme_load
   */
  theme_unload();

  return EXIT_SUCCESS;
}
Exemple #2
0
void enkf_tui_ranking_menu(void * arg) {
    
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  {
    menu_type * menu = menu_alloc("Ranking of results" , "Back" , "bB");
    menu_item_type * obs_item;
    {
      arg_pack_type * arg_pack = arg_pack_alloc();
      arg_pack_append_ptr( arg_pack , enkf_main );
      menu_add_item(menu , "Create/update misfit table" , "cC"  , enkf_tui_ranking_make_misfit_ensemble   , arg_pack , arg_pack_free__);
      menu_add_separator( menu );
      obs_item = menu_add_item(menu , "New observation based ranking" , "nN" , enkf_tui_ranking_create_obs  , enkf_main , NULL);
      arg_pack_append_ptr( arg_pack , obs_item );
    }
    menu_add_item(menu , "New data based ranking (Sort: increasing)" , "iI" , enkf_tui_ranking_create_data_increasing , enkf_main , NULL);
    menu_add_item(menu , "New data based ranking (Sort: decreasing)" , "dD" , enkf_tui_ranking_create_data_decreasing , enkf_main , NULL);
    menu_add_item(menu , "Show ranking" , "sS" , enkf_tui_ranking_display , enkf_main , NULL);
    {
      enkf_fs_type * fs = enkf_main_get_fs( enkf_main );
      misfit_ensemble_type * misfit_ensemble = enkf_fs_get_misfit_ensemble( fs );
      if (!misfit_ensemble_initialized( misfit_ensemble ))
        menu_item_disable( obs_item );
    }
    menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_rank , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
  
}
Exemple #3
0
void enkf_tui_analysis_menu(void * arg) {
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );
  menu_type       * menu = menu_alloc( "Analysis menu" , "Back" , "bB");

  arg_pack_type * arg_pack = arg_pack_alloc();
  arg_pack_append_ptr( arg_pack , enkf_main );
  arg_pack_append_ptr( arg_pack , menu );

  {
    enkf_tui_analysis_update_title(enkf_main, menu);

    if (enkf_main_have_obs(enkf_main)) {
      menu_add_item(menu, "Global scaling of uncertainty", "gG", enkf_tui_analysis_scale_observation_std__, enkf_main, NULL);
      menu_add_separator(menu);
    }

    menu_add_item(menu, "Select analysis module", "sS", enkf_tui_analysis_select_module__, arg_pack, NULL);
    menu_add_item(menu, "List available modules", "lL", enkf_tui_analysis_list_modules__, enkf_main, NULL);
    menu_add_item(menu, "Modify analysis module parameters", "mM", enkf_tui_analysis_update_module__, enkf_main, NULL);
    menu_add_item(menu, "Reload current module (external only)", "rR", enkf_tui_analysis_reload_module__, enkf_main, NULL);
  }
  menu_run(menu);
  menu_free(menu);
  arg_pack_free(arg_pack);
}
static bool lcd_settings_menu(void)
{
    int m;
    bool result;

    static const struct menu_item items[] = {
#ifdef CONFIG_BACKLIGHT
        { ID2P(LANG_BACKLIGHT),       backlight_timer },
#ifdef HAVE_CHARGING
        { ID2P(LANG_BACKLIGHT_ON_WHEN_CHARGING), backlight_on_when_charging },
#endif
        { ID2P(LANG_CAPTION_BACKLIGHT), caption_backlight },
#if CONFIG_BACKLIGHT == BL_IRIVER
        { ID2P(LANG_BACKLIGHT_FADE_IN), backlight_fade_in },
        { ID2P(LANG_BACKLIGHT_FADE_OUT), backlight_fade_out },
#endif
#endif /* CONFIG_BACKLIGHT */
        { ID2P(LANG_CONTRAST),        contrast },
#ifdef HAVE_LCD_BITMAP
        { ID2P(LANG_INVERT),          invert },
        { ID2P(LANG_FLIP_DISPLAY),    flip_display },
        { ID2P(LANG_INVERT_CURSOR),   invert_cursor },
#endif
    };

    m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
                 NULL, NULL, NULL);
    result = menu_run(m);
    menu_exit(m);
    return result;
}
static bool display_settings_menu(void)
{
    int m;
    bool result;

    static const struct menu_item items[] = {
#ifdef HAVE_LCD_BITMAP
        { ID2P(LANG_CUSTOM_FONT),     font_browse },
#endif
        { ID2P(LANG_WHILE_PLAYING),   custom_wps_browse },
        { ID2P(LANG_LCD_MENU),        lcd_settings_menu },
#ifdef HAVE_REMOTE_LCD
        { ID2P(LANG_LCD_REMOTE_MENU), lcd_remote_settings_menu },
#endif
        { ID2P(LANG_SCROLL_MENU),     scroll_settings_menu },
#ifdef HAVE_LCD_BITMAP
        { ID2P(LANG_BARS_MENU),       bars_settings_menu },
        { ID2P(LANG_PM_MENU),         peak_meter_menu },
        { ID2P(LANG_BIDI_SUPPORT),    bidi_support },
#endif
    };

    m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
                 NULL, NULL, NULL);
    result = menu_run(m);
    menu_exit(m);
    return result;
}
static bool system_settings_menu(void)
{
    int m;
    bool result;

    static const struct menu_item items[] = {
        { ID2P(LANG_BATTERY_MENU),     battery_settings_menu },
#ifndef HAVE_MMC
        { ID2P(LANG_DISK_MENU),        disk_settings_menu     },
#endif
#ifdef HAVE_RTC
        { ID2P(LANG_TIME_MENU),        time_settings_menu     },
#endif
        { ID2P(LANG_POWEROFF_IDLE),    poweroff_idle_timer    },
        { ID2P(LANG_SLEEP_TIMER),      sleeptimer_screen      },
#ifdef HAVE_ALARM_MOD
        { ID2P(LANG_ALARM_MOD_ALARM_MENU), alarm_screen       },
#endif
        { ID2P(LANG_LIMITS_MENU),      limits_settings_menu   },
#if CONFIG_CODEC == MAS3507D
        { ID2P(LANG_LINE_IN),          line_in                },
#endif
#ifdef HAVE_CHARGING
        { ID2P(LANG_CAR_ADAPTER_MODE), car_adapter_mode       },
#endif
    };

    m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
                 NULL, NULL, NULL);
    result = menu_run(m);
    menu_exit(m);
    return result;
}
Exemple #7
0
/******************************************************************************
 **函数名称: main 
 **功    能: 监控主程序
 **输入参数: NONE
 **输出参数: NONE
 **返    回: 0:成功 !0:失败
 **实现描述: 
 **     1. 初始化菜单环境
 **     2. 加载子菜单
 **     3. 启动菜单功能
 **注意事项: 
 **作    者: # Qifeng.zou # 2014.12.27 #
 ******************************************************************************/
int main(int argc, char *argv[])
{
    mon_opt_t opt;
    mon_cntx_t *ctx;

    memset(&opt, 0, sizeof(opt));

    umask(0);
    mem_ref_init();
    set_fd_limit(65535);
    signal(SIGPIPE, SIG_IGN);

    /* > 解析输入参数 */
    if (mon_getopt(argc, argv, &opt)) {
        return mon_usage(argv[0]);
    }

    /* > 初始化全局信息 */
    ctx = mon_init(opt.conf_path);
    if (NULL == ctx) {
        fprintf(stderr, "Initialize monitor failed!\n");
        return -1;
    }

    /* > 启动菜单模块 */
    if (menu_run(ctx->menu)) {
        fprintf(stderr, "Startup menu failed!\n");
        return -1;
    }

    return 0;
}
bool sound_menu(void)
{
    int m;
    bool result;
    static const struct menu_item items[] = {
        { ID2P(LANG_VOLUME), volume },
        { ID2P(LANG_BASS), bass },
        { ID2P(LANG_TREBLE), treble },
        { ID2P(LANG_BALANCE), balance },
        { ID2P(LANG_CHANNEL_MENU), chanconf },
        { ID2P(LANG_STEREO_WIDTH), stereo_width },
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
        { ID2P(LANG_LOUDNESS), loudness },
        { ID2P(LANG_AUTOVOL), avc },
        { ID2P(LANG_SUPERBASS), superbass },
        { ID2P(LANG_MDB_ENABLE), mdb_enable },
        { ID2P(LANG_MDB_STRENGTH), mdb_strength },
        { ID2P(LANG_MDB_HARMONICS), mdb_harmonics },
        { ID2P(LANG_MDB_CENTER), mdb_center },
        { ID2P(LANG_MDB_SHAPE), mdb_shape },
#endif
    };
    
    m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
                 NULL, NULL, NULL);
    result = menu_run(m);
    menu_exit(m);

    return result;
}
Exemple #9
0
int32 main(void)
{
    // Platform Initialization
	if(platform_init(NULL) != RET_OK) 
		goto FAIL_TRAP;
    
    // Network Initialization
	if(network_init(0, NULL, NULL) != RET_OK) {
		ERR("network_init fail");
		goto FAIL_TRAP;
	}
    
	NL1;
	LOG("-----------------------------------");
	LOG(" WIZlib Project - SNTP Example     ");
	LOG("-----------------------------------");
	NL2;
	
	// ToDo: Modules Initialization
	// Ex) dhcp_auto_start();
	//     atc_init();  
    
    // NTP Initialization   
    set_ntp_default();
    set_ntp_client_msg(TIMESERVER1);
        
    Delay_tick(2000);	// prevent first send fail
    
    LOG(">>> SNTP Example Start >>>");
    
    // Serial Terminal Menu Initialization
    {
        menu_init();	    	
        menu_add("NTP : Display Time Info", 0, mn_disp_ntp);
        menu_add("NTP : Get Time Data from Timeserver", 0, mn_get_timedata);    
    }
    
	while(1) {
	
		// ToDo: Modules Run
		// Ex) atc_run();
		//     alarm_run();
		//     sockwatch_run();
        
        // Configuration menu
        alarm_run();
        menu_run();
        
        //LOGF(".");

		wizpf_led_flicker(WIZ_LED1, 1000);	// check loop is running
	}

FAIL_TRAP:
	wizpf_led_trap(1);
	return 0;
}
Exemple #10
0
int32 main(void)
{
#define TCP_LISTEN_PORT	5000
#define UDP_LISTEN_PORT	5000

	int8 ret, root;
	uint32 tick = 0;

	ret = platform_init();
	if(ret != RET_OK) {
		goto FAIL_TRAP;
	}

	ret = network_init(SOCK_DHCP, NULL, NULL);
	if(ret != RET_OK) {
		ERRA("network_init fail - ret(%d)", ret);
		goto FAIL_TRAP;
	}

	printf("\r\n-----------------------------------\r\n");
	printf("SMTP Client using W5200\r\n");
	printf("-----------------------------------\r\n\r\n");

	Delay_tick(2000);

	menu_init();
	root = menu_add("Network setting", 0, NULL);
	menu_add("Show", root, mn_show_network);
	menu_add("Static Set", root, mn_set_network);
	menu_add("Loopback", 0, mn_loopback);
	menu_add("LED Test", 0, mn_set_led);
	root = menu_add("App Test", 0, NULL);
	menu_add("DNS", root, mn_dns);
	menu_add("BASE64", root, mn_base64);
	menu_add("eMail", root, mn_email);
	menu_print_tree();

	dhcp_alarm_start(NULL);

	while(1) {

		alarm_run();
		menu_run();

		if(lb_tcp) loopback_tcps(7, (uint16)TCP_LISTEN_PORT);
		if(lb_udp) loopback_udp(7, (uint16)UDP_LISTEN_PORT);

		if(wizpf_tick_elapse(tick) > 1000) {	// running check
			wizpf_led_set(WIZ_LED3, VAL_TOG);
			tick = wizpf_get_systick();
		}
	}

FAIL_TRAP:
	wizpf_led_trap(1);
	return 0;
}
Exemple #11
0
void enkf_tui_help_menu_cases(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Manage cases" , "Back" , "bB");
  menu_add_helptext(menu , "Use this menu to navgate between cases and to initialize cases. A case has to be initialized before it can be used.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_cases , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
Exemple #12
0
void enkf_tui_help_menu_simple(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Simple menu" , "Back" , "bB");
  menu_add_helptext(menu , "The top four options in the simple menu will run eclipse simulations. Option s: Sensitivity run: No data conditioning, will initialize all parameters and run one eclipse simulation for each set of different parameters. e: Assimilation run: EnKF updates, will initialize all parameters and run one eclipse simulation for each set of different parameters. The eclipse simulations will run until the first data time step is encountered and condition on data before continuing. a: Assimilation run: Smoother update, will do one pass of the sensitivity run, then condition the parameters to all the data and rerun all experiments. i: Assimilation run: Iterated smoother [RML-EnKF] will iterate the smoother run several times.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_main , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
}
Exemple #13
0
void enkf_tui_help_menu_misc(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Miscellanous" , "Back" , "bB");
  menu_add_helptext(menu , "This option contains miscellaneous options.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_misc , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
Exemple #14
0
void enkf_tui_help_menu_export(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Export results" , "Back" , "bB");
  menu_add_helptext(menu , "Use this option to export results after the case has been run.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_export , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
Exemple #15
0
void enkf_tui_help_menu_table(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Table of results" , "Back" , "bB");
  menu_add_helptext(menu , "This option can generate a table of results after the case has been run.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_table , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
Exemple #16
0
void enkf_tui_help_menu_run(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  menu_type * menu = menu_alloc("Help: Run menu" , "Back" , "bB");
  menu_add_helptext(menu , "This menu is used to do the main work in ERT. The first option, x: Ensemble run: history, will just run the case without any data conditioning. Options r and s will initiate classical enkf runs. The two options i and t invokes the ensemble kalman smoother.");
  menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_run , enkf_main , NULL);
  menu_run(menu);
  menu_free(menu);
}
int main()
{

    cli();
    //unsigned char csr = MCUCSR;
    MCUCSR = 0;

#if USE_WDOG
    wdt_disable();
#endif

    init_devices();
    flash_led2_once();

    lcd_clear();
    lcd_gotoxy( 0, 0 );
    lcd_puts("Load EEPROM:");
    lcd_gotoxy( 0, 1 );

    load_eeprom_settings();
    flash_led1_once();

#if USE_WDOG
    wdt_enable(WDTO_2S);
#endif

    for (;;)
    {
        modbus_process_rx();
#if 1
        menu_run();
#else
        lcd_gotoxy( 0, 0 );

        int i;

        i = adc_value[6] >> 5;
        lcd_puts("vr1=");
        lcd_puti(i);
        i = adc_value[7] >> 5;
        lcd_puts(" vr2=");
        lcd_puti(i);
        lcd_puts("  ");
#endif

#if USE_WDOG
        wdt_reset();
#endif
    }


    while(1)
        ; // die here

    return 1;
}
Exemple #18
0
void enkf_tui_help_menu_main(void * arg) {
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );
  {
    menu_type * menu = menu_alloc("Help: Main menu" , "Back" , "bB");
    menu_add_helptext(menu , "Choose the different options from the main menu to read more about the different options.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_main , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}
Exemple #19
0
void enkf_tui_workflow_menu(void * arg) {
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );
  menu_type       * menu  = menu_alloc("Workflows" , "Back" , "bB");
  
  menu_add_item(menu , "Run workflow"  , "rR" , enkf_tui_workflow_run , enkf_main , NULL );
  menu_add_item(menu , "Load workflow" , "lL" , enkf_tui_workflow_load , enkf_main , NULL );
  menu_add_item(menu , "List available workflows" , "iI" , enkf_tui_workflow_list , enkf_main , NULL );
  
  menu_add_item(menu , "Help" , "hH" , enkf_tui_help_menu_run   , enkf_main , NULL); 
  menu_run(menu);
  menu_free(menu);

}
Exemple #20
0
void enkf_tui_init_menu(void * arg) {
  enkf_main_type * enkf_main = enkf_main_safe_cast(arg);

  menu_type * menu = menu_alloc("Initialize from scratch" , "Back" , "bB");
  menu_add_item(menu , "Initialize all members/all parameters"                  , "1" , enkf_tui_init1 , enkf_main , NULL);
  menu_add_item(menu , "Initialize all members/one  parameter"                  , "2" , enkf_tui_init2 , enkf_main , NULL);
  menu_add_item(menu , "Initialize one member/all parameters"                   , "3" , enkf_tui_init3 , enkf_main , NULL);
  menu_add_item(menu , "Initialize one member/one parameter"                    , "4" , enkf_tui_init4 , enkf_main , NULL);
  menu_add_item(menu , "Initialize interval of ensemble members/all parameters" , "5" , enkf_tui_init5 , enkf_main , NULL);
  menu_add_item(menu , "Initialize interval of ensemble members/one parameter"  , "6" , enkf_tui_init6 , enkf_main , NULL);  
  menu_run(menu);
  menu_free(menu);

}
Exemple #21
0
int32 main(void)
{
	if(platform_init(NULL) != RET_OK) 
		goto FAIL_TRAP;

	if(network_init(SOCK_DHCP, NULL, NULL) != RET_OK) {
		ERR("network_init fail");
		goto FAIL_TRAP;
	}

	printf("\r\n-----------------------------------\r\n");
	printf("SMTP Client\r\n");
	printf("-----------------------------------\r\n\r\n");

	Delay_tick(2000);

	{
	int8 root;

	menu_init();
	root = menu_add("Network setting", 0, NULL);
	menu_add("Show", root, mn_show_network);
	menu_add("Static Set", root, mn_set_network);
	menu_add("Loopback", 0, mn_loopback);
	menu_add("LED Test", 0, mn_set_led);
	root = menu_add("App Test", 0, NULL);
	menu_add("DNS", root, mn_dns);
	menu_add("BASE64", root, mn_base64);
	menu_add("eMail", root, mn_email);
	//menu_print_tree();		// For Debug
	}

	dhcp_auto_start();

	while(1) {

		alarm_run();
		menu_run();

		if(lb_tcp) loopback_tcps(7, (uint16)TCP_LISTEN_PORT);
		if(lb_udp) loopback_udp(7, (uint16)UDP_LISTEN_PORT);

		wizpf_led_flicker(WIZ_LED1, 1000);	// check loop is running
	}

FAIL_TRAP:
	wizpf_led_trap(1);
	return 0;
}
static bool playback_settings_menu(void)
{
    int m;
    bool result;

    static const struct menu_item items[] = {
        { ID2P(LANG_SHUFFLE), shuffle },
        { ID2P(LANG_REPEAT), repeat_mode },
        { ID2P(LANG_PLAY_SELECTED), play_selected },
        { ID2P(LANG_RESUME), resume },
        { ID2P(LANG_WIND_MENU), ff_rewind_settings_menu },
        { ID2P(LANG_MP3BUFFER_MARGIN), buffer_margin },
        { ID2P(LANG_FADE_ON_STOP), set_fade_on_stop },
#if CONFIG_CODEC == SWCODEC
        { ID2P(LANG_CROSSFADE), crossfade },
        { ID2P(LANG_CROSSFADE_DURATION), crossfade_duration },
        { ID2P(LANG_REPLAYGAIN), replaygain_settings_menu },
        { ID2P(LANG_BEEP), beep },
#endif
#ifdef HAVE_SPDIF_POWER
        { ID2P(LANG_SPDIF_ENABLE), spdif },
#endif
        { ID2P(LANG_ID3_ORDER), id3_order },
        { ID2P(LANG_NEXT_FOLDER), next_folder },
        { ID2P(LANG_RUNTIMEDB_ACTIVE), runtimedb },
    };

    bool old_shuffle = global_settings.playlist_shuffle;

    m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
                 NULL, NULL, NULL);
    result = menu_run(m);
    menu_exit(m);

    if ((old_shuffle != global_settings.playlist_shuffle) 
        && (audio_status() & AUDIO_STATUS_PLAY))
    {
        if (global_settings.playlist_shuffle)
        {
            playlist_randomise(NULL, current_tick, true);
        }
        else
        {
            playlist_sort(NULL, true);
        }
    }
    return result;
}
static bool limits_settings_menu(void)
{
    int m;
    bool result;

    static const struct menu_item items[] = {
        { ID2P(LANG_MAX_FILES_IN_DIR),    max_files_in_dir        },
        { ID2P(LANG_MAX_FILES_IN_PLAYLIST),    max_files_in_playlist        },
    };

    m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
                 NULL, NULL, NULL);
    result = menu_run(m);
    menu_exit(m);
    return result;
}
static bool time_settings_menu(void)
{
    int m;
    bool result;

    static const struct menu_item items[] = {
        { ID2P(LANG_TIME),        timedate_set    },
        { ID2P(LANG_TIMEFORMAT),  timeformat_set  },
    };

    m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
                 NULL, NULL, NULL);
    result = menu_run(m);
    menu_exit(m);
    return result;
}
Exemple #25
0
void enkf_tui_help_menu_table(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
  {
    const char * plot_path  =  plot_config_get_path( plot_config );
    util_make_path( plot_path );
  }
  
  {
    menu_type * menu = menu_alloc("Help: Table of results" , "Back" , "bB");
    menu_add_helptext(menu , "This option can generate a table of results after the case has been run.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_table , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}
static bool ff_rewind_settings_menu(void)
{
    int m;
    bool result;

    static const struct menu_item items[] = {
        { ID2P(LANG_FFRW_STEP), ff_rewind_min_step },
        { ID2P(LANG_FFRW_ACCEL), ff_rewind_accel },
    };

    m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
                 NULL, NULL, NULL);
    result = menu_run(m);
    menu_exit(m);

    return result;
}
static bool voice_menu(void)
{
    int m;
    bool result;

    static const struct menu_item items[] = {
        { ID2P(LANG_VOICE_MENU), voice_menus },
        { ID2P(LANG_VOICE_DIR),  voice_dirs  },
        { ID2P(LANG_VOICE_FILE),  voice_files }
    };

    m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
                 NULL, NULL, NULL);
    result = menu_run(m);
    menu_exit(m);
    return result;
}
Exemple #28
0
void enkf_tui_help_menu_cases(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
  {
    const char * plot_path  =  plot_config_get_path( plot_config );
    util_make_path( plot_path );
  }
  
  {
    menu_type * menu = menu_alloc("Help: Manage cases" , "Back" , "bB");
    menu_add_helptext(menu , "Use this menu to navgate between cases and to initialize cases. A case has to be initialized before it can be used.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_cases , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}
Exemple #29
0
void enkf_tui_help_menu_main(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
  {
    const char * plot_path  =  plot_config_get_path( plot_config );
    util_make_path( plot_path );
  }
  
  {
    menu_type * menu = menu_alloc("Help: Main menu" , "Back" , "bB");
    menu_add_helptext(menu , "Choose the different options from the main menu to read more about the different options.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_main , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}
Exemple #30
0
void enkf_tui_help_menu_misc(void * arg) {
  
  enkf_main_type  * enkf_main  = enkf_main_safe_cast( arg );  
  plot_config_type * plot_config = enkf_main_get_plot_config( enkf_main );
  {
    const char * plot_path  =  plot_config_get_path( plot_config );
    util_make_path( plot_path );
  }
  
  {
    menu_type * menu = menu_alloc("Help: Miscellanous" , "Back" , "bB");
    menu_add_helptext(menu , "This option contains miscellaneous options.");
    menu_add_item(menu , "Open manual (firefox)"    , "mM"  , enkf_tui_help_manual_misc , enkf_main , NULL);
    menu_run(menu);
    menu_free(menu);
  }
}