dialoglib_h

/*
**	Copyright 1993-2017, Fermi Research Alliance, LLC.  All rights reserved.
*/
/******************************************************************************/
/* dialoglib.h
**  
**	prototypes and defined constants for argument values for
**	dialog library routines
**
*/
/******************************************************************************/

#ifndef DIALOGLIB_DEFINED			/* do this only once */
#define	DIALOGLIB_DEFINED

#include "cbslib.h"

/******************************************************************************/
/* 
**	macros
*/
/******************************************************************************/

/******************************************************************************/
/* 
**	defined constants for argument values and structure definitions
*/
/******************************************************************************/

#define	DIALOG_TIMER_EVENTS	1			/* display reference events only */
#define	DIALOG_TIMER_DELAY	2			/* display delay only */
#define	DIALOG_TIMER_BOTH	(DIALOG_TIMER_EVENTS | DIALOG_TIMER_DELAY)	/* display both reference events and delay */

#define	DIALOG_NO_SETTINGS	0			/* don't allow settings */
#define	DIALOG_ALLOW_SETTINGS	1			/* allow settings */
#define	DIALOG_CAUTION_SETTINGS	2			/* allow settings, but with caution dialog */

#define	DIALOG_ALL_SLOTS	0x80			/* all console slots */

#define	DIALOGLIB_OPT_NONE	0			/* no options requested */
#define	DIALOGLIB_OPT_FIT_WINDOW	1		/* resize the background window if necessary to fit the dialog window */
#define	DIALOGLIB_OPT_CLOSE_ON_ACTION	0x100		/* close dialog window on action */
#define	DIALOGLIB_OPT_ALLOW_REPLACEMENT	0x200		/* close dialog window when another modal dialog requests to open */

#define	CNV_EXT_NODE_FE_ALL	(CNV_NODE_FRONTEND_ALL)	/* extended front end node data type */

#define	FE_ALL_NODES		0			/* all front end nodes */

#define	PASA_MENU_PAS_AND_SAS	1			/* include both PAs and SAs */
#define	PASA_MENU_PAS_ONLY	0			/* only include PAs */
#define	PASA_MENU_SAS_ONLY	2			/* only include SAs */

/******************************************************************************/
/* 
**	data structures
*/
/******************************************************************************/


/******************************************************************************/
/*
**	function prototypes
*/
/******************************************************************************/
extern "C" {
int console_redirection_menu_c(char *title, int top_row, int left_column,
			       unsigned char *redirect_slot,
			       int cursor_handling, int console_number,
			       int menu_text_type, char *redirect_text);
int create_datime_data_type_c(int *data_type_id, int *data_length,
			      int *field_width);
int create_ext_node_data_type_c(int type, int *data_type_id,
				int *data_length, int *field_width);
int device_control_window_c(int top_row, int left_column,
			    int device_index,
			    int array_index = 0,
			    unsigned int options = DIALOGLIB_OPT_NONE,
			    HELP_CALLBACK_DATA * help_data = NULL);
int graphic_window_menu_c(char *title, int top_row, int left_column,
			  int *console_window, int cursor_handling,
			  int console_number, int menu_text_type);
int input_device_c(int row, int col, char *prompts, int prompt_length,
		   int *devices, int num_devices);
int pa_menu_c(char *title, int top_row, int left_column, unsigned char *slot,
	      int cursor_handling, int console_number);
int pasa_slot_menu_c(char *title, int top_row, int left_column,
		     unsigned char *pasa_slot, int cursor_handling,
		     int console_number, int menu_type, int menu_text_type);
int sa_menu_c(char *title, int top_row, int left_column, unsigned char *slot,
	      int cursor_handling, int console_number);
int sa_program_menu_c(char *generic_name, char *title, int top_row,
		      int left_column, char *task_name, unsigned char *sa_slot,
		      int cursor_handling, int console_number,
		      int menu_text_type);
int sda_dir_select_register_c(int *select_id, char *label,
			      int label_length);
int setting_window_c(int top_row, int left_column, int device_index,
    int array_index = 0, unsigned int options = DIALOGLIB_OPT_NONE,
    HELP_CALLBACK_DATA* help_info = NULL);
int timer_list_window_c(int top_row, int left_column, int *device_indices,
			int num_timers, int allow_settings,
			unsigned int options, HELP_CALLBACK_DATA *help_info,
			int *set_status=(int *) NULL);
int timer_window_c(int top_row, int left_column, int device_index,
		   int data_type, int allow_settings,
		   unsigned int options = DIALOGLIB_OPT_NONE,
		   HELP_CALLBACK_DATA * help_data = NULL);
int tv_window_menu_c(char *title, int top_row, int left_column,
		     int *console_window, int cursor_handling,
		     int console_number, int menu_text_type);
int wn_device_control_window_c(double x, double y, int coordinate_type,
			       int device_index, int array_index=0,
			       unsigned int options=DIALOGLIB_OPT_NONE,
			       HELP_CALLBACK_DATA * help_data=(HELP_CALLBACK_DATA *) NULL);
int wn_pasa_slot_menu_c(double x, double y, int coordinate_type,
			char const *title, unsigned char *pasa_slot,
			int console_number, int menu_type, int menu_text_type);
int wn_setting_window_c(double x, double y, int coordinate_type,
			int device_index, int array_index=0,
			unsigned int options=DIALOGLIB_OPT_NONE,
			HELP_CALLBACK_DATA *help_data=(HELP_CALLBACK_DATA *) NULL);
int wn_timer_window_c(double x, double y, int coordinate_type, int device_index,
		      int data_type, int allow_settings,
		      unsigned int options=DIALOGLIB_OPT_NONE,
		      HELP_CALLBACK_DATA * help_data=(HELP_CALLBACK_DATA *) NULL);
}

/******************************************************************************/
/*
**	equivalent name definitions
*/
/******************************************************************************/

#define	CONSOLE_REDIRECTION_MENU_C	console_redirection_menu_c
#define	CREATE_DATIME_DATA_TYPE_C	create_datime_data_type_c
#define	CREATE_EXT_NODE_DATA_TYPE_C	create_ext_node_data_type_c
#define	DEVICE_CONTROL_WINDOW_C		device_control_window_c
#define	GRAPHIC_WINDOW_MENU_C		graphic_window_menu_c
#define	INPUT_DEVICE_C			input_device_c
#define	PA_MENU_C			pa_menu_c
#define	PASA_SLOT_MENU_C		pasa_slot_menu_c
#define	SA_MENU_C			sa_menu_c
#define	SA_PROGRAM_MENU_C		sa_program_menu_c
#define	SDA_DIR_SELECT_REGISTER_C	sda_dir_select_register_c
#define	SETTING_WINDOW_C		setting_window_c
#define	TIMER_LIST_WINDOW_C		timer_list_window_c
#define	TIMER_WINDOW_C			timer_window_c
#define	TV_WINDOW_MENU_C		tv_window_menu_c
#define	WN_DEVICE_CONTROL_WINDOW_C	wn_device_control_window_c
#define	WN_PASA_SLOT_MENU_C		wn_pasa_slot_menu_c
#define	WN_SETTING_WINDOW_C		wn_setting_window_c
#define	WN_TIMER_WINDOW_C		wn_timer_window_c

#endif