/* * inc/simula.h * Include file with simulation function declarations * Microsoft C 5.0 - Turbo C 2.0 - VAX C 3.0 * Grupo de Tecnologia em Computacao Grafica - PUC/RIO * 23 Ago 91 */ #ifndef _SIMULA_ #define _SIMULA_ #ifndef _GKS_TYPE_ #include Gks_type #endif #ifdef __NOUNIN /* Gchoice_rec - choice data record */ typedef struct { struct { Gchar *data; /* device/implementation dependent data */ } pet1; } Gchoice_rec; /* Gpick_rec - pick data record */ typedef struct { struct { Gchar *data; /* device/implementation dependent data */ } pet1; } Gpick_rec; /* Gstring_rec - string data record */ typedef struct { struct { Gint bufsiz; /* buffer size */ Gint position; /* initial cursor position */ Gchar *data; /* device/implementation dependent data */ } pet1; } Gstring_rec; /* Gval_rec - valuator data record */ typedef struct { struct { Gfloat low; /* low range limit */ Gfloat high; /* high range limit */ Gchar *data; /* device/implementation dependent data */ } pet1; } Gval_rec; /* Gloc_rec - locator data record */ typedef struct { struct { Gchar *data; /* device/implementation dependent data */ } pet1; } Gloc_rec; /* Gstroke_rec - stroke data record */ typedef struct { struct { Gint bufsiz; /* input buffer size */ Gint editpos; /* editing position */ Gwpoint interval; /* x, y interval */ Gfloat time; /* time interval */ Gchar *data; /* device/implementation dependent data */ } pet1; } Gstroke_rec; /* Gdef_choice - default choice data */ typedef struct { Gint choices; /* maximum number of choices */ Gint n_pets; /* number of prompt and echo types */ Gpet *pets; /* list of prompt and echo types */ Gdlimit e_area; /* default echo area */ Gchoice_rec record; /* default choice data record */ } Gdef_choice; /* Gdef_pick - default pick data */ typedef struct { Gint n_pets; /* number of prompt and echo types */ Gpet *pets; /* list of prompt and echo types */ Gdlimit e_area; /* default echo area */ Gpick_rec record; /* default pick data record */ } Gdef_pick; /* Gdef_string - default string data */ typedef struct { Gint bufsiz; /* initial buffer size */ Gint n_pets; /* number of prompt and echo types */ Gpet *pets; /* list of prompt and echo types */ Gdlimit e_area; /* default echo area */ Gstring_rec record; /* default string data record */ } Gdef_string; /* Gdef_val - default valuator data */ typedef struct { Gfloat value; /* initial value */ Gint n_pets; /* number of prompt and echo types */ Gpet *pets; /* list of prompt and echo types */ Gdlimit e_area; /* default echo area */ Gval_rec record; /* default valuator data record */ } Gdef_val; /* Gdef_loc - default locator data */ typedef struct { Gwpoint position; /* initial position */ Gint n_pets; /* number of prompt and echo types */ Gpet *pets; /* list of prompt and echo types */ Gdlimit e_area; /* default echo area */ Gloc_rec record; /* default locator data record */ } Gdef_loc; /* Gdef_stroke - default stroke data */ typedef struct { Gint bufsiz; /* initial buffer size */ Gint n_pets; /* number of prompt and echo types */ Gpet *pets; /* list of prompt and echo types */ Gdlimit e_area; /* default echo area */ Gstroke_rec record; /* default stroke data record */ } Gdef_stroke; #else #define Gchoice_rec Gchoicerec #define Gpick_rec Gpickrec #define Gstring_rec Gstringrec #define Gval_rec Gvalrec #define Gloc_rec Glocrec #define Gstroke_rec Gstrokerec #define Gdef_choice Gdefchoice #define Gdef_pick Gdefpick #define Gdef_string Gdefstring #define Gdef_val Gdefval #define Gdef_loc Gdefloc #define Gdef_stroke Gdefstroke #endif /* Cohen-Sutherland clipping algorithm for line p1=(x1,y1) to p2=(x2,y2) */ Gerror _gks_puc_sim_clip2 ( const Gipoint *, const Gipoint *, Gipoint *, Gipoint * ); /* simulacao de espessura de linha com pontos */ Gerror _gks_puc_sim_line_width ( Gwsl *, Gint, Gint, Gint, Gint, Gint *, Gscale, Gint, Gint, Gint, Gint ); /* simulacao de linha com pontos */ Gerror _gks_puc_sim_bres ( Gwsl *, Gint, Gint, Gint, Gint, Glntype, Gscale ); /* rotina para simulacao de linha ( com clippling ) */ Gerror _gks_puc_sim_linha (Gwsl *, Gint, Gint, Gint, Gint, Glntype, Gscale ); /* rotina para simulacao de PolyLine */ Gerror _gks_puc_sim_line ( Gwsl *, const Gpar_plpmfl * ); /* rotina para simulacao de tipos de marcas */ Gerror _gks_puc_sim_marker ( Gwsl *, const Gpar_plpmfl * ); /* rotinas para simulacao de textos em qualquer precisao */ Gerror _gks_puc_sim_txt ( Gwsl *, const Gpar_text * ); Gerror _gks_puc_sim_txt_char ( Gwsl *, const Gpar_text * ); Gerror _gks_puc_sim_txt_stroke ( Gwsl *, const Gpar_text *, Gtxfont ); /* rotina para simulacao de Fill Area com qualquer estilo interior */ Gerror _gks_puc_sim_fill ( Gwsl *, const Gpar_plpmfl * ); /* rotina para simulacao de Fill Area - HATCH e SOLID */ Gerror _gks_puc_sim_hatch ( Gwsl *, const Gpar_plpmfl * ); /* rotina para simulacao de Fill Area - PATTERN */ Gerror _gks_puc_sim_pattern ( Gwsl *, const Gpar_plpmfl * ); /* rotina para simulacao de Fill Area - HOLLOW */ Gerror _gks_puc_sim_hollow ( Gwsl *, const Gpar_plpmfl * ); /* rotina para simulacao de Cell Array */ Gerror _gks_puc_sim_ca ( Gwsl *, const Gpar_ca * ); /* pega caracter do teclado do PC */ Gint _gks_puc_sim_get_key ( Gwsl *); /* Interpreta teclado PC */ Gerror _gks_puc_sim_int_tecl ( Gwsl *, Gesw , Gchar *, Gint , Gchar *, Gint , Gipoint , Gipoint , Gint , Gerror ); /* pega posicao - locator */ Gerror _gks_puc_sim_pega_loc (Gwsl *, Gnpoint *, Gpet , Gesw , Gnpoint , Gnlimit , Gipoint , Gipoint, Gnpoint *); /* REQUEST LOCATOR */ Gerror _gks_puc_sim_req_loc ( Gwsl *, Gidevno, Gqloc * ); /* REQUEST STROKE */ Gerror _gks_puc_sim_req_stroke ( Gwsl *, Gidevno, Gqstroke * ); /* REQUEST STRING */ Gerror _gks_puc_sim_req_string ( Gwsl *, Gidevno, Gqstring * ); /* REQUEST CHOICE */ Gerror _gks_puc_sim_req_choice ( Gwsl *, Gidevno, Gqchoice * ); /* REQUEST VALUATOR */ Gerror _gks_puc_sim_req_val ( Gwsl *, Gidevno, Gqval * ); /* REQUEST PICK */ Gerror _gks_puc_sim_req_pick ( Gwsl *, Gidevno, Gqpick * ); /* inicializa o cursor */ Gerror _gks_puc_sim_init_cur (Gwsl *, Gnpoint, Gpet, Gnlimit, Gipoint, Gipoint, Gnpoint *); /* atualiza a posicao do cursor */ Gerror _gks_puc_sim_move_cur (Gwsl *, Gnpoint); /* encerra o cursor */ Gerror _gks_puc_sim_end_cur (Gwsl *, Gesw, Gint); /* inicializa o mouse */ Gerror _gks_puc_sim_init_mou (Gwsl *, Gndc, Gndc, Gnlimit ); /* pega a posicao do mouse e o estado das teclas */ Gerror _gks_puc_sim_get_mous (Gwsl *, Gnpoint *); /* encerra o mouse */ Gerror _gks_puc_sim_end_mous (Gwsl * ); #endif