/* * inc/gks_tab.h * Include file with description tables and state lists declarations * Microsoft C 5.0 - Turbo C 2.0 - VAX C 3.0 - GNU C 3.7 * Grupo de Tecnologia em Computacao Grafica - PUC/RIO * 23 Ago 91 */ #ifndef _GKS_TAB_ #define _GKS_TAB_ #include Stdio /* FILE */ #ifndef _GKS_TYPE_ #include Gks_type #endif /***************************************/ /** **/ /** Workstation Description Table **/ /** **/ /***************************************/ /* Gwdt_outin - description table for workstations INPUT, OUTPUT e OUTIN */ typedef struct { Gdspsize disp_size; /* display size */ } Gwdt_outin; /* Gwdt_out - description table for workstations OUTPUT e OUTIN */ typedef struct { Gwsclass class; /* workstation classification */ Gmodws modws; /* dynamic modification of workstation attributes */ Gdefer defer; /* default deferral state */ Glnfac lnfac; /* polyline facilities */ Glnbundl *lnbundl; /* predefined polyline bundle table */ Gmkfac mkfac; /* polymarker facilities */ Gmkbundl *mkbundl; /* predefined polymarker bundle table */ Gtxfac txfac; /* text facilities */ Gtxbundl *txbundl; /* predefined text bundle table */ Gflfac flfac; /* fill area facilities */ Gflbundl *flbundl; /* predefined fill area bundle table */ Gptfac ptfac; /* pattern facilities */ Gptbundl *ptbundl; /* predefined patter bundle */ Gcofac cofac; /* colour facilities */ Gcobundl *cobundl; /* predefined colour bundle table */ Gerror (**gdp)(); /* list of available GDP's */ Ggdpfac *gdpfac; /* list of GDP's facilities */ Gwstables wstables; /* legth of workstation tables */ Gint segprior; /* number of segment priorities supported */ Gmodseg modseg; /* dynamic modification of segment attributes */ } Gwdt_out; /* Gwdt_in - description table for workstations INPUT e OUTIN */ typedef struct { Gnumdev numdev; /* number of input devices */ Gdefloc **defloc; /* list of default locator data */ Gdefstroke **defstroke; /* list of default stroke data */ Gdefval **defval; /* list of default valuator data */ Gdefchoice **defchoice; /* list of default choice data */ Gdefpick **defpick; /* list of default pick data */ Gdefstring **defstring; /* list of default string data */ } Gwdt_in; /* Gfunctions - driver function table */ typedef struct _Gfunctions Gfunctions; /* Gwdt - Workstation Description Table */ typedef struct { Gchar *type; /* workstation type */ Gwscat wscat; /* workstation category */ Gwdt_outin *outin; /* description table for OUTPUT, INPUT and OUTIN */ Gwdt_out *out; /* description table for OUTPUT and OUTIN */ Gwdt_in *in; /* description table for INPUT and OUTIN */ Gfunctions *func; /* driver functions table */ } Gwdt; /********************************/ /** **/ /** Workstation State List **/ /** **/ /********************************/ /* Gwsl_outmow - state list for workstation OUTPUT, OUTIN, MO and WISS */ typedef struct { Gwsstate wstate; /* workstation state */ Gseg *seg; /* set of stored segments for this workstations */ } Gwsl_outmow; /* Gwsl_outmo - state list for workstation OUTPUT, OUTIN and MO */ typedef struct { Gwsdus wsdus; /* workstation deferral and update state */ Gbii lnbii; /* polyline bundle index information */ Glnbundl *lnbundl; /* polyline bundle table */ Gbii mkbii; /* polymarker bundle index information */ Gmkbundl *mkbundl; /* polymarker bundle table */ Gbii txbii; /* text bundle index information */ Gtxbundl *txbundl; /* text bundle table */ Gbii flbii; /* fill area bundle index information */ Gflbundl *flbundl; /* fill area bundle table */ Gbii ptbii; /* pattern bundle index information */ Gptbundl *ptbundl; /* pattern bundle table */ Gbii cobii; /* colour bundle index information */ Gcobundl *cobundl; /* colour bundle table */ Gwsti wsti; /* workstation transformation */ } Gwsl_outmo; /* Gwsl_in - state list for workstation INPUT and OUTIN */ typedef struct { Glocst *locst; /* list of current locator data */ Gstrokest *strokest; /* list of current stroke data */ Gvalst *valst; /* list of current valuator data */ Gchoicest *choicest; /* list of current choice data */ Gpickst *pickst; /* list of current pick data */ Gstringst *stringst; /* list of current string data */ } Gwsl_in; /* Glocal - pointer to local variables */ typedef void *Glocal; /* Gparam - parametros de mapeamento ndc/dc */ typedef struct { Gscale sx; /* escala x */ Gscale sy; /* escala y */ Gdc tx; /* translacao x */ Gdc ty; /* translacao y */ } Gparam; /* Gwkclip - retangulo de clipping da workstation */ typedef struct { Gnlimit cliprec; /* interseccao viewport/workstation window (ndc) */ Gipoint llrec, urrec; /* cliprec em coordenadas raster */ Gtoggle vazio; /* interseccao vazia */ Gipoint ll, ur; /* espaco de enderecamento do dispositivo */ } Gwkclip; /* Gindices - actual bundle indices */ typedef struct { Gindex lnindex; /* polyline index */ Gindex mkindex; /* polymarker index */ Gindex txindex; /* text index */ Gindex flindex; /* fill area index */ } Gindices; /* Gstatus - current attributes */ typedef struct { Glntype lntype; /* line type */ Gscale lnwid; /* line width scale factor */ Gcolour lncolour; /* polyline colour index */ Gmktype mktype; /* marker type */ Gscale mksize; /* marker size scale factor */ Gcolour mkcolour; /* polymarker colour index */ Gtxfp txfp; /* text font and precision */ Gchrexp chrexp; /* character expansion factor */ Gchrsp chrsp; /* character spacing */ Gcolour txcolour; /* text colour index */ Gflinter flinter; /* fill area interior style */ Gflstyle flstyle; /* fill area style index */ Gcolour flcolour; /* fill area colour index */ } Gstatus; /* Gst_out - current attributes out of bundles */ typedef struct { Gnpoint chrup; /* character up vector */ Gnpoint chrbase; /* character base vector */ Gtxpath txpath; /* text path */ Gtxalign txalign; /* text alignment */ Gnpoint ptwid; /* pattern width vector */ Gnpoint ptht; /* pattern height vector */ Gnpoint ptrf; /* pattern reference point */ Gpickid pickid; /* current pick identifier */ } Gst_out; /* Gwsl - Workstation State List */ typedef struct { Gws ws; /* workstation identifier */ Gwsct wsct; /* workstation connection and type */ Gwsl_outmow *outmow; /* state list for OUTPUT, OUTIN, MO and WISS */ Gwsl_outmo *outmo; /* state list for OUTPUT, OUTIN and MO */ Gwsl_in *in; /* state list for INPUT and OUTIN */ Gasfs asfs; /* list of aspect source flag */ Gstatus *virtual; /* current attributes */ Gstatus *actual; /* actual attributes */ Gindices *indices; /* actual bundle indices */ Gst_out *st_out; /* current attributes out of bundles */ Glocal local; /* local variables */ Gwdt *wdt; /* workstation description table */ Gparam param; /* parametros de mapeamento */ Gwkclip wkclip; /* retangulo de clipping da workstation */ } Gwsl; /********************************/ /** **/ /** Driver Functions Table **/ /** **/ /********************************/ #include Parametr struct _Gfunctions { Gerror (*proconid)(Gwsl *, const Gchar *, Gchar ** ); Gerror (*open )(Gwsl * ); Gerror (*close )(Gwsl * ); Gerror (*clear )(Gwsl *, Gclrflag ); Gerror (*redseg )(Gwsl * ); Gerror (*update )(Gwsl *, Gregen ); Gerror (*setdefst)(Gwsl *, Gdefmode, Girgmode ); Gerror (*message )(Gwsl *, const Gchar * ); Gerror (*polyline)(Gwsl *, const Gpar_plpmfl * ); Gerror (*polymark)(Gwsl *, const Gpar_plpmfl * ); Gerror (*text )(Gwsl *, const Gpar_text * ); Gerror (*fillarea)(Gwsl *, const Gpar_plpmfl * ); Gerror (*cellarra)(Gwsl *, const Gpar_ca * ); Gerror (*lnindex )(Gwsl *, const Gindex *); Gerror (*lntype )(Gwsl *, const Glntype *); Gerror (*lnwid )(Gwsl *, const Gscale *); Gerror (*lncolour)(Gwsl *, const Gcolour *); Gerror (*mkindex )(Gwsl *, const Gindex *); Gerror (*mktype )(Gwsl *, const Gmktype *); Gerror (*mksize )(Gwsl *, const Gscale *); Gerror (*mkcolour)(Gwsl *, const Gcolour *); Gerror (*txindex )(Gwsl *, const Gindex *); Gerror (*txfp )(Gwsl *, const Gtxfp *); Gerror (*chrexp )(Gwsl *, const Gchrexp *); Gerror (*chrspc )(Gwsl *, const Gchrsp *); Gerror (*txcolour)(Gwsl *, const Gcolour *); Gerror (*chrvect )(Gwsl *, const Gpar_vect *); Gerror (*txpath )(Gwsl *, const Gtxpath *); Gerror (*txalign )(Gwsl *, const Gtxalign *); Gerror (*flindex )(Gwsl *, const Gindex *); Gerror (*flinter )(Gwsl *, const Gflinter *); Gerror (*flstyle )(Gwsl *, const Gflstyle *); Gerror (*flcolour)(Gwsl *, const Gcolour *); Gerror (*ptvect )(Gwsl *, const Gpar_vect *); Gerror (*ptrefp )(Gwsl *, const Gnpoint *); Gerror (*asf )(Gwsl *, const Gasfs *); Gerror (*pickid )(Gwsl *, const Gpickid *); Gerror (*plrep )(Gwsl *, Gindex , const Glnbundl *); Gerror (*pmrep )(Gwsl *, Gindex , const Gmkbundl *); Gerror (*txrep )(Gwsl *, Gindex , const Gtxbundl *); Gerror (*flrep )(Gwsl *, Gindex , const Gflbundl *); Gerror (*ptrep )(Gwsl *, Gindex , const Gptbundl *); Gerror (*corep )(Gwsl *, Gindex , const Gcobundl *); Gerror (*cliprect)(Gwsl *, const Gnlimit *); Gerror (*window )(Gwsl *, const Gnlimit *); Gerror (*viewport)(Gwsl *, const Gdlimit *); Gerror (*creseg )(Gwsl *, Gseg ); Gerror (*closeg )(Gwsl * ); Gerror (*renseg )(Gwsl *, Gseg , Gseg ); Gerror (*delseg )(Gwsl *, Gseg ); Gerror (*segtrans)(Gwsl *, Gseg , const Gsegtran *); Gerror (*segvis )(Gwsl *, Gseg , Gsegvis ); Gerror (*seghigh )(Gwsl *, Gseg , Gseghi ); Gerror (*segprior)(Gwsl *, Gseg , Gsegpri ); Gerror (*segdetec)(Gwsl *, Gseg , Gsegdet ); Gerror (*lcmode )(Gwsl *, Gidevno, Gimode, Gesw ); Gerror (*skmode )(Gwsl *, Gidevno, Gimode, Gesw ); Gerror (*vlmode )(Gwsl *, Gidevno, Gimode, Gesw ); Gerror (*chmode )(Gwsl *, Gidevno, Gimode, Gesw ); Gerror (*pkmode )(Gwsl *, Gidevno, Gimode, Gesw ); Gerror (*stmode )(Gwsl *, Gidevno, Gimode, Gesw ); Gerror (*lcinit )(Gwsl *, Gidevno, const Glocst * ); Gerror (*skinit )(Gwsl *, Gidevno, const Gstrokest * ); Gerror (*vlinit )(Gwsl *, Gidevno, const Gvalst * ); Gerror (*chinit )(Gwsl *, Gidevno, const Gchoicest * ); Gerror (*pkinit )(Gwsl *, Gidevno, const Gpickst * ); Gerror (*stinit )(Gwsl *, Gidevno, const Gstringst * ); Gerror (*lcrequ )(Gwsl *, Gidevno, Gqloc * ); Gerror (*skrequ )(Gwsl *, Gidevno, Gqstroke * ); Gerror (*vlrequ )(Gwsl *, Gidevno, Gqval * ); Gerror (*chrequ )(Gwsl *, Gidevno, Gqchoice * ); Gerror (*pkrequ )(Gwsl *, Gidevno, Gqpick * ); Gerror (*strequ )(Gwsl *, Gidevno, Gqstring * ); Gerror (*lcget )(Gwsl * ); Gerror (*skget )(Gwsl * ); Gerror (*vlget )(Gwsl * ); Gerror (*chget )(Gwsl * ); Gerror (*pkget )(Gwsl * ); Gerror (*stget )(Gwsl * ); Gerror (*getimage)(Gwsl *, Gint, Gint, Gint, Gint, void * ); Gerror (*putimage)(Gwsl *, Gint, Gint, const void *, Gint ); Gint (*imagesiz)(Gwsl *, Gint, Gint, Gint, Gint ); Gerror (*func0082)(Gwsl *,... ); Gerror (*func0083)(Gwsl *,... ); Gerror (*func0084)(Gwsl *,... ); Gerror (*func0085)(Gwsl *,... ); Gerror (*func0086)(Gwsl *,... ); Gerror (*func0087)(Gwsl *,... ); Gerror (*func0088)(Gwsl *,... ); Gerror (*func0089)(Gwsl *,... ); Gerror (*func0090)(Gwsl *,... ); Gerror (*func0091)(Gwsl *,... ); Gerror (*func0092)(Gwsl *,... ); Gerror (*warmup )( void ); Gerror (*func0094)(Gwsl *,... ); Gerror (*func0095)(Gwsl *,... ); Gerror (*func0096)(Gwsl *,... ); Gerror (*linhapat)(Gwsl *, Gint, Gint, Gint, Gint, Gint ); Gerror (*put_curs)(Gwsl *, Gint, Gint, Gtoggle, Gndc, Gndc ); Gint (*tam_text)(Gwsl *, Gnpoint * ); Gerror (*linha )(Gwsl *, Gint, Gint, Gint, Gint, Glntype, Gscale ); Gerror (*ponto )(Gwsl *, Gint, Gint ); Gerror (*put_stri)(Gwsl *, Gint, Gint, const Gchar * ); Gerror (*put_char)(Gwsl *, Gint, Gint, Gchar ); Gerror (*linhah )(Gwsl *, Gint, Gint, Gint, Gint, Glntype, Gscale ); Gerror (*linhav )(Gwsl *, Gint, Gint, Gint, Gint, Glntype, Gscale ); Gerror (*linhax )(Gwsl *, Gint, Gint, Gint, Gint, Glntype, Gscale ); Gerror (*pontox )(Gwsl *, Gint, Gint ); Gerror (*fillr )(Gwsl *, Gint, Gint, Gint, Gint ); Gerror (*floodf )(Gwsl *, Gint, Gint ); Gint (*pega_tec)(Gwsl * ); Gerror (*pega_loc)(Gwsl *, Gnpoint *, Gpet, Gesw, Gnpoint, Gnlimit, Gipoint, Gipoint, Gnpoint * ); Gerror (*init_cur)(Gwsl *, Gnpoint, Gpet, Gnlimit, Gipoint, Gipoint, Gnpoint * ); Gerror (*move_cur)(Gwsl *, Gnpoint ); Gerror (*end_cur )(Gwsl *, Gesw, Gint ); Gerror (*init_mou)(Gwsl *, Gndc, Gndc, Gnlimit ); Gint (*get_mous)(Gwsl *, Gnpoint * ); Gerror (*end_mous)(Gwsl * ); Gint (*abre_wn )(Gwsl *, Gint, Gint, Gint, Gint ); Gerror (*fecha_wn)(Gwsl *, Gint ); Gerror (*pega_str)(Gwsl *, Gesw, Gchar *, Gint, Gchar *, Gint, Gipoint, Gipoint, Gint, Gint ); }; /*******************************/ /** **/ /** GKS Description Table **/ /** **/ /*******************************/ /* Ggdt - GKS Desciption Table */ typedef struct { Gchar *level; /* level of GKS */ Gchar **wstypes; /* list of availables workstation types */ Gwsmax wsmax; /* workstation maximum numbers */ Gint maxtn; /* maximum normalization tranformation number */ } Ggdt; /****************************/ /** **/ /** Segment State List **/ /** **/ /****************************/ #define M_WK 10 /* Gsegsl - Segment State List */ typedef struct { unsigned char ws [M_WK]; /* set of associated workstations */ unsigned char rseg[M_WK]; /* necessidade de redesenho */ unsigned int vis :2; /* visibility */ unsigned int hi :2; /* highlighting */ unsigned int det :2; /* detectability */ Gsegtran tran; /* segment transformation matrix */ Gsegpri pri; /* priority */ Glong ptr; /* setor inicial */ Gint cont; /* numero de bytes no ultimo setor */ } Gsegsl; /************************/ /** **/ /** GKS State List **/ /** **/ /************************/ /* Ggsl - GKS State List */ typedef struct { Gws *openws; /* set of open workstations */ Gws *activews; /* set of active workstations */ /* Current primitive attributes */ Gindex lnindex; /* polyline index */ Glntype lntype; /* line type */ Gscale lnwid; /* line width scale factor */ Gcolour lncolour; /* polyline colour index */ Gindex mkindex; /* polymarker index */ Gmktype mktype; /* marker type */ Gscale mksize; /* marker size scale factor */ Gcolour mkcolour; /* polymarker colour index */ Gindex txindex; /* text index */ Gtxfp txfp; /* text font and precision */ Gchrexp chrexp; /* character expansion factor */ Gchrsp chrsp; /* character spacing */ Gcolour txcolour; /* text colour index */ Gchrht chrht; /* character height */ Gwpoint chrup; /* character up vector */ Gchrwid chrwid; /* character width */ Gwpoint chrbase; /* character base vector */ Gtxpath txpath; /* text path */ Gtxalign txalign; /* text alignment */ Gindex flindex; /* fill area index */ Gflinter flinter; /* fill area interior style */ Gflstyle flstyle; /* fill area style index */ Gcolour flcolour; /* fill area colour index */ Gwpoint ptwid; /* pattern width vector */ Gwpoint ptht; /* pattern height vector */ Gwpoint ptrf; /* pattern reference point */ Gasfs asfs; /* list of aspect source flag */ Gpickid pickid; /* current pick identifier */ /* normalizations transformation */ Gint currntr; /* current normalization transformation number */ Gint *ntr; /* list of normalization transformation number */ /* ordered by viewport input priority */ Gwlimit *window; /* list of windows */ Gnlimit *viewport; /* list of viewports */ Gcliprec cliprec; /* clipping rectangle */ /* segments */ Gseg openseg; /* name of open segment */ Gseg *seg; /* set of segments name in use */ Gsegsl *segsl; /* set of segment state lists */ Gsimultev simultev; /* more simultaneous events */ } Ggsl; /**************************/ /** **/ /** Error State List **/ /** **/ /**************************/ /* Gesl - Error State List */ typedef struct { Gtoggle state; /* error state */ FILE *file; /* error file */ /* identification of one of the logical input devices that caused an input queue overflow */ Gevent *qinfo; } Gesl; #endif