home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / TURBOC_1.LZH / INCLUDE / VDI.H < prev   
Text File  |  1990-03-02  |  11KB  |  296 lines

  1. /*      VDI.H
  2.  
  3.         GEM VDI Definitions
  4.  
  5.         Copyright (c) Borland International 1988
  6.         All Rights Reserved.
  7. */
  8.  
  9.  
  10. #if  !defined( __VDI__ )
  11. #define __VDI__
  12.  
  13.  
  14. /****** Control definitions *********************************************/
  15.  
  16. void    v_opnwk( int *work_in,  int *handle, int *work_out);
  17. void    v_clswk( int handle );
  18. void    v_opnvwk( int *work_in, int *handle, int *work_out);
  19. void    v_clsvwk( int handle );
  20. void    v_clrwk( int handle );
  21. void    v_updwk( int handle );
  22. int             vst_load_fonts( int handle, int select );
  23. void    vst_unload_fonts( int handle, int select );
  24. void    vs_clip( int handle, int clip_flag, int *pxyarray );
  25.  
  26.  
  27. /****** Output definitions **********************************************/
  28.  
  29. void    v_pline( int handle, int count, int *pxyarray );
  30. void    v_pmarker( int handle, int count, int *pxyarray );
  31. void    v_gtext( int handle, int x, int y, char *string );
  32. void    v_fillarea( int handle, int count, int *pxyarray );
  33. void    v_cellarray( int handle, int *pxyarray, int row_length,
  34.                      int el_used, int num_rows, int wrt_mode,
  35.                      int *colarray );
  36. void    v_contourfill( int handle, int x, int y, int index );
  37. void    vr_recfl( int handle, int *pxyarray );
  38. void    v_bar( int handle, int *pxyarray );
  39. void    v_arc( int handle, int x, int y, int radius,
  40.                int begang, int endang );
  41. void    v_pieslice( int handle, int x, int y, int radius,
  42.                     int begang, int endang );
  43. void    v_circle( int handle, int x, int y, int radius );
  44. void    v_ellarc( int handle, int x, int y, int xradius,
  45.                   int yradius, int begang, int endang );
  46. void    v_ellpie( int handle, int x, int y, int xradius,
  47.                   int yradius, int begang, int endang );
  48. void    v_ellipse( int handle, int x, int y, int xradius,
  49.                    int yradius  );
  50. void    v_rbox  ( int handle, int *pxyarray );
  51. void    v_rfbox ( int handle, int *pxyarray );
  52. void    v_justified( int handle,int x, int y, char *string,
  53.                      int length, int word_space,
  54.                      int char_space );
  55.  
  56.  
  57. /****** Attribute definitions *****************************************/
  58.  
  59. #define IP_HOLLOW       0
  60. #define IP_1PATT        1
  61. #define IP_2PATT        2
  62. #define IP_3PATT        3
  63. #define IP_4PATT        4
  64. #define IP_5PATT        5
  65. #define IP_6PATT        6
  66. #define IP_SOLID        7
  67.  
  68.  
  69. /* gsx modes */
  70.  
  71. #define MD_REPLACE      1
  72. #define MD_TRANS        2
  73. #define MD_XOR          3
  74. #define MD_ERASE        4
  75.  
  76.  
  77. /* gsx styles */
  78.  
  79. #define FIS_HOLLOW      0
  80. #define FIS_SOLID       1
  81. #define FIS_PATTERN     2
  82. #define FIS_HATCH       3
  83. #define FIS_USER        4
  84.  
  85.  
  86. /* bit blt rules */
  87.  
  88. #define ALL_WHITE        0
  89. #define S_AND_D          1
  90. #define S_AND_NOTD       2
  91. #define S_ONLY           3
  92. #define NOTS_AND_D       4
  93. #define D_ONLY           5
  94. #define S_XOR_D          6
  95. #define S_OR_D           7
  96. #define NOT_SORD         8
  97. #define NOT_SXORD        9
  98. #define D_INVERT        10
  99. #define NOT_D           11
  100. #define S_OR_NOTD       12
  101. #define NOTS_OR_D       13
  102. #define NOT_SANDD       14
  103. #define ALL_BLACK       15
  104.  
  105.  
  106. /* linetypes */
  107.  
  108. #define SOLID           1
  109. #define LONGDASH        2
  110. #define DOT             3
  111. #define DASHDOT         4
  112. #define DASH            5
  113. #define DASH2DOT        6
  114. #define USERLINE        7
  115.  
  116. #define SQUARE          0
  117. #define ARROWED         1
  118. #define ROUND           2
  119.  
  120. int     vswr_mode( int handle, int mode );
  121. void    vs_color( int handle, int index, int *rgb_in );
  122. int     vsl_type( int handle, int style );
  123. void    vsl_udsty( int handle, int pattern );
  124. int     vsl_width( int handle, int width );
  125. int     vsl_color( int handle, int color_index );
  126. void    vsl_ends( int handle, int beg_style, int end_style );
  127. int     vsm_type( int handle, int symbol );
  128. int     vsm_height( int handle, int height );
  129. int     vsm_color( int handle, int color_index );
  130. void    vst_height( int handle, int height, int *char_width,
  131.                     int *char_height, int *cell_width,
  132.                     int *cell_height );
  133. int     vst_point( int handle, int point, int *char_width,
  134.                     int *char_height, int *cell_width,
  135.                     int *cell_height );
  136. int     vst_rotation( int handle, int angle );
  137. int     vst_font( int handle, int font );
  138. int     vst_color( int handle, int color_index );
  139. int     vst_effects( int handle, int effect );
  140. void    vst_alignment( int handle, int hor_in, int vert_in,
  141.                        int *hor_out, int *vert_out );
  142. int     vsf_interior( int handle, int style );
  143. int     vsf_style( int handle, int style_index );
  144. int     vsf_color( int handle, int color_index );
  145. int     vsf_perimeter( int handle, int per_vis );
  146. void    vsf_udpat( int handle, int *pfill_pat, int planes );
  147.  
  148.  
  149. /****** Raster definitions *********************************************/
  150.  
  151. typedef struct
  152. {
  153.         void            *fd_addr;
  154.         int             fd_w;
  155.         int             fd_h;
  156.         int             fd_wdwidth;
  157.         int             fd_stand;
  158.         int             fd_nplanes;
  159.         int             fd_r1;
  160.         int             fd_r2;
  161.         int             fd_r3;
  162. } MFDB;
  163.  
  164. void    vro_cpyfm( int handle, int vr_mode, int *pxyarray,
  165.                    MFDB *psrcMFDB, MFDB *pdesMFDB );
  166. void    vrt_cpyfm( int handle, int vr_mode, int *pxyarray,
  167.                    MFDB *psrcMFDB, MFDB *pdesMFDB,
  168.                    int *color_index );
  169. void    vr_trnfm( int handle, MFDB *psrcMFDB, MFDB *pdesMFDB );
  170. void    v_get_pixel( int handle, int x, int y, int *pel,
  171.                      int *index );
  172.  
  173.  
  174. /****** Input definitions **********************************************/
  175.  
  176. void    vsin_mode( int handle, int dev_type, int mode );
  177. void    vrq_locator( int handle, int x, int y, int *xout,
  178.                      int *yout, int *term );
  179. int     vsm_locator( int handle, int x, int y, int *xout,
  180.                      int *yout, int *term );
  181. void    vrq_valuator( int handle, int valuator_in,
  182.                       int *valuator_out, int *terminator );
  183. void    vsm_valuator( int handle, int val_in, int *val_out,
  184.                       int *term, int *status );
  185. void    vrq_choice( int handle, int ch_in, int *ch_out );
  186. int     vsm_choice( int handle, int *choice );
  187. void    vrq_string( int handle, int max_length, int echo_mode,
  188.                     int *echo_xy, char *string );
  189. int     vsm_string( int handle, int max_length, int echo_mode,
  190.                     int *echo_xy, char *string );
  191. void    vsc_form( int handle, int *pcur_form );
  192. void    vex_timv( int handle, int (*tim_addr)(), int (**otim_addr)(),
  193.                   int *tim_conv );
  194. void    v_show_c( int handle, int reset );
  195. void    v_hide_c( int handle );
  196. void    vq_mouse( int handle, int *pstatus, int *x, int *y );
  197. void    vex_butv( int handle, int (*pusrcode)(), int (**psavcode)() );
  198. void    vex_motv( int handle, int (*pusrcode)(), int (**psavcode)() );
  199. void    vex_curv( int handle, int (*pusrcode)(), int (**psavcode)() );
  200. void    vq_key_s( int handle, int *pstatus );
  201.  
  202.  
  203. /****** Inquire definitions *******************************************/
  204.  
  205. void    vq_extnd( int handle, int owflag, int *work_out );
  206. int     vq_color( int handle, int color_index,
  207.                   int set_flag, int *rgb );
  208. void    vql_attributes( int handle, int *attrib );
  209. void    vqm_attributes( int handle, int *attrib );
  210. void    vqf_attributes( int handle, int *attrib );
  211. void    vqt_attributes( int handle, int *attrib );
  212. void    vqt_extent( int handle, char *string, int *extent );
  213. int     vqt_width( int handle, char character,
  214.                    int *cell_width, int *left_delta,
  215.                    int *right_delta );
  216. int     vqt_name( int handle, int element_num, char *name );
  217. void    vq_cellarray( int handle, int *pxyarray,
  218.                       int row_length, int num_rows,
  219.                       int *el_used, int *rows_used,
  220.                       int *status, int *colarray );
  221. void    vqin_mode( int handle, int dew_type, int *input_mode );
  222. void    vqt_fontinfo( int handle, int *minADE, int *maxADE,
  223.                       int *distances, int *maxwidth,
  224.                       int *effects );
  225.  
  226.  
  227. /****** Escape definitions *********************************************/
  228.  
  229. void    vq_chcells( int handle, int *rows, int *columns );
  230. void    v_exit_cur( int handle );
  231. void    v_enter_cur( int handle );
  232. void    v_curup( int handle );
  233. void    v_curdown( int handle );
  234. void    v_curright( int handle );
  235. void    v_curleft( int handle );
  236. void    v_curhome( int handle );
  237. void    v_eeos( int handle );
  238. void    v_eeol( int handle );
  239. void    vs_curaddress( int handle, int row, int column );
  240. void    v_curtext( int handle, char *string );
  241. void    v_rvon( int handle );
  242. void    v_rvoff( int handle );
  243. void    vq_curaddress( int handle, int *row, int *column );
  244. int     vq_tabstatus( int handle );
  245. void    v_hardcopy( int handle );
  246. void    v_dspcur( int handle, int x, int y );
  247. void    v_rmcur( int handle );
  248. void    v_form_adv( int handle );
  249. void    v_output_window( int handle, int *xyarray );
  250. void    v_clear_disp_list( int handle );
  251. void    v_bit_image( int handle, const char *filename,
  252.                      int aspect, int x_scale, int y_scale,
  253.                      int h_align, int v_align, int *xyarray );
  254. void    vq_scan( int handle, int *g_slice, int *g_page,
  255.                  int *a_slice, int *a_page, int *div_fac);
  256. void    v_alpha_text( int handle, char *string );
  257. void    vs_palette( int handle, int palette );
  258. void    vqp_films( int handle, char *film_names );
  259. void    vqp_state( int handle, int *port, char *film_name,
  260.                    int *lightness, int *interlace,
  261.                    int *planes, int *indexes );
  262. void    vsp_state( int handle, int port, int film_num,
  263.                    int lightness, int interlace, int planes,
  264.                    int *indexes );
  265. void    vsp_save( int handle );
  266. void    vsp_message( int handle );
  267. int     vqp_error( int handle );
  268. void    v_meta_extents( int handle, int min_x, int min_y,
  269.                         int max_x, int max_y );
  270. void    v_write_meta( int handle, 
  271.                       int num_intin, int *intin,
  272.                       int num_ptsin, int *ptsin );
  273. void    vm_coords( int handle, int llx, int lly, int urx, int ury );
  274. void    vm_filename( int handle, const char *filename );
  275. void    wm_pagesize( int handle, int pgwidth, int pdheight );
  276. void    v_offset( int handle, int offset );
  277. void    v_fontinit( int handle, int fh_high, int fh_low );
  278. void    v_escape2000( int times );
  279.  
  280. void    vt_resolution( int handle, int xres, int yres, 
  281.                        int *xset, int *yset );
  282. void    vt_axis( int handle, int xres, int yres, 
  283.                  int *xset, int *yset );
  284. void    vt_origin( int handle, int xorigin, int yorigin );
  285. void    vq_tdimensions( int handle, int *xdimension, int *ydimension );
  286. void    vt_alignment( int handle, int dx, int dy );
  287. void    vsp_film( int handle, int index, int lightness );
  288. void    vsc_expose( int handle, int state );
  289.  
  290. int     vq_gdos( void );
  291.  
  292.  
  293. #endif
  294.  
  295. /***********************************************************************/
  296.