00001 00002 #ifndef _SIC_STRUCTURES_H_ 00003 #define _SIC_STRUCTURES_H_ 00004 00005 /* 00006 don't define on WIN32 00007 #define SIZE 1024*1024 00008 */ 00009 #define CHAINLENGTH 128 00010 #define SICVLN 64 00011 #define LABELLENGTH 80 00012 #define COMMANDLENGTH 256 00013 #define FILTERLENGTH 80 00014 #define TITLELENGTH 256 /* Was 32 on X-Window before */ 00015 #define TEXTLENGTH 256 00016 #define HLPFILELNGTH 256 00017 #define X_CHOLEN 32 00018 #define M_CHOICES 128 00019 #define NSTRUCT 256 /* 256=M_COMMANDS */ 00020 #define SEPARATOR 1 00021 #define LOGIC 2 00022 #define BROWSER 3 00023 #define CHOICE 4 00024 #define SLIDER 5 00025 #define CHAIN 6 00026 #define SHOW 7 00027 #define BUTTON 8 00028 00029 typedef struct { 00030 int type; /* Pointer on input types */ 00031 int window_id; /* Pointer on window id */ 00032 char label[LABELLENGTH]; /* Pointer on titles */ 00033 char variable[SICVLN]; /* Name of variable */ 00034 } generic_struct; 00035 00036 typedef struct { 00037 int type; /* Pointer on input types */ 00038 int window_id; /* Pointer on window id */ 00039 char label[LABELLENGTH]; /* Pointer on titles (ignored) */ 00040 char variable[SICVLN]; /* Name of variable (ignored) */ 00041 /* end generic*/ 00042 char text[TEXTLENGTH]; /* Pointer on show item text */ 00043 } show_struct; 00044 00045 typedef struct { 00046 int type; /* Pointer on input types */ 00047 int window_id; /* Pointer on window id */ 00048 char label[LABELLENGTH]; /* Pointer on label */ 00049 char variable[SICVLN]; /* Name of variable */ 00050 /* end generic*/ 00051 char userchain[CHAINLENGTH]; 00052 char *chain; /* Pointer on character chains */ 00053 size_t length; /* Pointer on character lenghts */ 00054 int editable; /* Static or dynamic chain */ 00055 } chain_struct; 00056 00057 typedef struct { 00058 int type; /* Pointer on input type */ 00059 int window_id; /* Pointer on window id */ 00060 char label[LABELLENGTH]; /* Pointer on label (text on the left) */ 00061 char variable[SICVLN]; /* Name of variable : ignored */ 00062 /* end generic*/ 00063 char command[COMMANDLENGTH]; /* Command returned when pressing button (or GO) */ 00064 char title[TITLELENGTH]; /* Title written on the Button */ 00065 int showlength; /* if not 0, indicates the presence of a submenu */ 00066 char moretxt[TITLELENGTH]; /* if present, add a submenu button (moreoption). 00067 This is the texte written on the button */ 00068 char helptxt[HLPFILELNGTH]; /* Name of submenu help file (if any) */ 00069 } button_struct; 00070 00071 typedef struct { 00072 int type; /* Pointer on input type */ 00073 int window_id; /* Pointer on window id */ 00074 char label[LABELLENGTH]; /* Pointer on logic label */ 00075 char variable[SICVLN]; /* Name of variable */ 00076 /* end generic*/ 00077 int *logic; /* Pointer on returned logic */ 00078 int userlogic; /* Working logic in shared memory */ 00079 } logic_struct; 00080 00081 typedef struct { 00082 int type; /* Pointer on input type */ 00083 int window_id; /* Pointer on window id */ 00084 char label[LABELLENGTH]; /* Pointer on file label */ 00085 char variable[SICVLN]; /* Name of variable */ 00086 /* end generic*/ 00087 char *chain; /* Pointer on returned file chain */ 00088 char userchain[CHAINLENGTH]; /* Working file chain in shared memory */ 00089 size_t length; /* Pointer on file chain length */ 00090 char filter[FILTERLENGTH]; /* Pointer on file filter */ 00091 } file_struct ; 00092 00093 typedef struct { 00094 int type; /* Pointer on input type */ 00095 int window_id; /* Pointer on window id */ 00096 char label[LABELLENGTH]; /* Pointer on choice label */ 00097 char variable[SICVLN]; /* Name of variable */ 00098 /* end generic*/ 00099 char *choice; /* Pointer on return choice */ 00100 char userchoice[CHAINLENGTH]; /* Working choice in shared memory */ 00101 size_t length; /* Pointer on choice lenght */ 00102 char choices[M_CHOICES][X_CHOLEN]; /* Pointer on choices */ 00103 int nchoices; /* Pointer on number of choices */ 00104 int mode; /* editable, non editable or index mode */ 00105 } choice_struct; 00106 00107 typedef struct { 00108 int type; /* Pointer on input types */ 00109 int window_id; /* Pointer on window id */ 00110 char label[LABELLENGTH]; /* slider label */ 00111 char variable[SICVLN]; /* Name of variable */ 00112 /* end generic*/ 00113 float *value; /* Pointer on slider pointed values */ 00114 float uservalue; 00115 float width; /* Pointer on slider widths */ 00116 float min; /* Pointer on slider minimums */ 00117 } slider_struct; 00118 00119 typedef union { 00120 generic_struct generic; 00121 chain_struct chain; 00122 show_struct show; 00123 button_struct button; 00124 logic_struct logic; 00125 file_struct file; 00126 choice_struct choice; 00127 slider_struct slider; 00128 } global_struct; 00129 00130 #endif /* _SIC_STRUCTURES_H_ */ 00131
1.5.1