⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu.h

📁 操作系统SunOS 4.1.3版本的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
 *					 1 -> answer was valid *					 0 -> answer was not valid, try again *					-1 -> return with error condition *		fyn_yesarg	- argument for yes function *		fyn_next	- pointer to next yes/no */struct form_yesno_t {	int		m_type;	int (*		m_help)();	char		fyn_active;	char *		fyn_name;	menu_string *	fyn_mstrings;	char		fyn_answer;	char *		fyn_answerp;	menu_coord	fyn_x;	menu_coord	fyn_y;	int (*		fyn_prefunc)();	pointer		fyn_prearg;	int (*		fyn_nofunc)();	pointer		fyn_noarg;	int (*		fyn_yesfunc)();	pointer		fyn_yesarg;	form_yesno *	fyn_next;};/* *	Definition of a menu: * *		m_type		- type of menu object *		m_help		- pointer to the help function *		m_active	- is this menu active? *		m_name		- name of this menu *		m_mstrings	- menu strings associated with this menu *		m_files		- files associated with this menu *		m_items		- items associated with this menu *		m_selected	- ptr to currently selected item *		m_ptr		- pointer to the current item *		m_finish	- ptr to finish object */struct menu_t {	int		m_type;	int (*		m_help)();	int		m_active;	char *		m_name;	menu_string *	m_mstrings;	menu_file *	m_files;	menu_item *	m_items;	menu_item *	m_selected;	menu_item *	m_ptr;	form_yesno *	m_finish;};/* *	Definition of a menu file: * *		m_type		- type of menu object *		m_help		- pointer to the help function *		mf_active	- is this menu file active? *		mf_name		- name of this menu file *		mf_mstrings	- menu strings associated with this file *		mf_begin_y	- beginning y-coordinate *		mf_begin_x	- beginning x-coordinate *		mf_end_y	- ending y-coordinate *		mf_end_x	- ending x-coordinate *		mf_gap		- inter-column gap *		mf_path		- path to file to display */struct menu_file_t {	int		m_type;	int (*		m_help)();	int		mf_active;	char *		mf_name;	menu_string *	mf_mstrings;	menu_coord	mf_begin_y;	menu_coord	mf_begin_x;	menu_coord	mf_end_y;	menu_coord	mf_end_x;	menu_coord	mf_gap;	char *		mf_path;	menu_file *	mf_next;};/* *	Definition of a menu item: * *		m_type		- type of menu object *		m_help		- pointer to the help function *		mi_active	- is this menu item active? *		mi_name		- name of this menu item *		mi_mstrings	- menu strings associated with this menu item *		mi_x		- starting x-coordinate of this menu item *		mi_y		- starting y-coordinate of this menu item *		mi_prefunc	- pointer to pre-function.  The following *				  return values are expected: *					 1 -> proceed with getting item *					 0 -> return with out getting item *					-1 -> return with error condition *		mi_prearg	- argument for pre-function *		mi_func		- pointer to post-function *					 1 -> item is valid *					 0 -> item is invalid try again *					-1 -> return with error condition *		mi_arg		- argument for post-function *		mi_chkfunc	- pointer to check-function *					 1 -> item is valid *					 0 -> item is invalid try again *					-1 -> return with error condition *		mi_chkarg	- argument for check-function *		mi_chkvalue	- value from mi_chkfunc *		mi_prev		- pointer to previous item *		mi_next		- pointer to next item *		mi_menu		- pointer to the parent menu */struct menu_item_t {	int		m_type;	int (*		m_help)();	char		mi_active;	char *		mi_name;	menu_string *	mi_mstrings;	menu_coord	mi_x;	menu_coord	mi_y;	int (*		mi_prefunc)();	pointer		mi_prearg;	int (*		mi_func)();	pointer		mi_arg;	int (*		mi_chkfunc)();	pointer		mi_chkarg;	int		mi_chkvalue;	menu_item *	mi_prev;	menu_item *	mi_next;	menu *		mi_menu;};/* *	Definition of a menu string: * *		ms_active	- is this menu string active? *		ms_x		- starting x-coordinate of this menu string *		ms_y		- starting y-coordinate of this menu string *		ms_attribute	- display attribute for this menu string *		ms_data		- the string to display *		ms_next		- pointer to next menu string */struct menu_string_t {	char		ms_active;	menu_coord	ms_x;	menu_coord	ms_y;	unsigned int	ms_attribute;	char *		ms_data;	menu_string *	ms_next;};/* *	Function return types: */extern	form_yesno *	add_confirm_obj();extern	form_yesno *	add_finish_obj();extern	form_button *	add_form_button();extern	form_field *	add_form_field();extern	form_noecho *	add_form_noecho();extern	form_radio *	add_form_radio();extern	form_yesno *	add_form_yesno();extern	menu_file *	add_menu_file();extern	menu_item *	add_menu_item();extern	menu_string *	add_menu_string();extern	int		ckf_abspath();extern	int		ckf_empty();extern	int		ckf_ether_aton();extern	int		ckf_inet_addr();extern	int		ckf_int();extern	int		ckf_long();extern	int		ckf_netabs();extern	int		ckf_netpath();extern	int		ckf_octal();extern	int		ckf_relpath();extern	int		ckf_uint();extern	void		clear_form();extern	void		clear_form_button();extern	void		clear_form_field();extern	void		clear_form_noecho();extern	void		clear_form_radio();extern	void		clear_form_yesno();extern	void		clear_menu();extern	void		clear_menu_file();extern	void		clear_menu_item();extern	void		clear_menu_string();extern	form *		create_form();extern	menu *		create_menu();extern	void		display_form();extern	void		display_form_button();extern	void		display_form_field();extern	void		display_form_noecho();extern	void		display_form_radio();extern	void		display_form_yesno();extern	void		display_item_status();extern	void		display_menu();extern	void		display_menu_file();extern	void		display_menu_item();extern	void		display_menu_string();extern	void		end_menu();extern	form_button *	find_form_button();extern	form_field *	find_form_field();extern	form_noecho *	find_form_noecho();extern	form_radio *	find_form_radio();extern	form_yesno *	find_form_yesno();extern	menu_file *	find_menu_file();extern	menu_item *	find_menu_item();extern	void		form_help_screen();extern	void		free_form();extern	void		free_form_button();extern	void		free_form_field();extern	void		free_form_map();extern	void		free_form_noecho();extern	void		free_form_radio();extern	void		free_form_yesno();extern	void		free_menu();extern	void		free_menu_file();extern	void		free_menu_item();extern	void		free_menu_string();extern	int		get_form_field();extern	int		get_form_noecho();extern	int		get_form_radio();extern	int		get_form_yesno();extern	int		get_menu_item();extern	void		help_screen_off();extern	void		help_screen_on();extern	void		init_menu();extern	int		is_help_screen();extern	int		lex_no_ws();extern	void		menu_abort();extern	void		menu_ack();extern	char		menu_ask_num();extern	int *		menu_alloc();extern	int		menu_ask_yesno();extern	menu_coord	menu_cols();extern	int		menu_confirm_func();extern	void		menu_flash_off();extern	void		menu_flash_on();extern	int		menu_goto_obj();extern	void		menu_help_screen();extern	int		menu_ignore_obj();extern	menu_coord	menu_lines();extern	void		menu_log();extern	void		menu_mesg();extern	int		menu_print();extern	int		menu_repeat_obj();extern	void		menu_sig_trap();extern	int		menu_skip_io();extern	void		off_form();extern	void		off_form_button();extern	void		off_form_field();extern	void		off_form_noecho();extern	void		off_form_radio();extern	void		off_form_shared();extern	void		off_form_yesno();extern	void		off_menu();extern	void		off_menu_file();extern	void		off_menu_item();extern	void		off_menu_string();extern	void		on_form();extern	void		on_form_button();extern	void		on_form_field();extern	void		on_form_noecho();extern	void		on_form_radio();extern	void		on_form_shared();extern	void		on_form_yesno();extern	void		on_menu();extern	void		on_menu_file();extern	void		on_menu_item();extern	void		on_menu_string();extern	void		paint_menu();extern	char		read_menu_char();extern	void		redisplay();extern	void		set_form_map();extern	void		set_menu_item();extern	void		set_menu_log();extern	void		set_menu_term();extern	int		use_form();extern	int		use_menu();extern	void		_menu_mesg();/* *	Global variable declarations: */extern	pointer		_current_fm;		/* ptr to current form/menu */extern	pointer		_current_obj;		/* pointer to current object */extern	int		_menu_backward;		/* backward char pressed? */extern	int		_menu_forward;		/* forward char pressed? */extern	int		_menu_init_done;	/* was menu init done? */#ifdef MENU_SIGNALSextern	void (*		_menu_signals[])();	/* saved signal values */#endif#endif _MENU_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -