home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / window / ultrawin / uw_proto.h < prev    next >
Encoding:
Text File  |  1992-02-02  |  10.1 KB  |  254 lines

  1. /****************************************************************************/
  2. /*                                                                                                                                                    */
  3. /* UW_PROTO.H                                                                                                                             */
  4. /*                                                                                                                                                    */
  5. /* Prototype file for UltraWin.                                             */
  6. /*                                                                                                                    Kevin Huck            */
  7. /*                                                                                                                    Boyd Gafford        */
  8. /*                                                                                                                                                    */
  9. /****************************************************************************/
  10.  
  11. /*------------------------- Prototypes for UW_WIN.C ------------------------*/
  12. void reset_all_masks();
  13. void refresh_desktop();
  14. void refresh_column( int col );
  15. void refresh_row( int row );
  16. void refresh_rect( RECT r );
  17. void add_wn_mask( WINDOW *wnp );
  18. void remove_wn_mask( WINDOW *wnp );
  19. void col_wn_mask( int x_pos, int y_min, int y_max, int amount );
  20. void row_wn_mask( int y_pos, int x_min, int x_max, int amount );
  21. void set_window_attr();
  22. WINDOW *end_window( WINDOW *wnp );
  23. WINDOW *cr_inwindow( int col, int row );
  24. WINDOW *add_window( WINDOW *wnp );
  25. int remove_window( WINDOW *wnp );
  26. void pull_to_top( WINDOW *wnp );
  27. int make_top_window( WINDOW *wnp );
  28. void mask_flags_on();
  29. void move_wn_left( int cols, WINDOW *wnp );
  30. void move_wn_right( int cols, WINDOW *wnp );
  31. void move_wn_up( int rows, WINDOW *wnp );
  32. void move_wn_down( int rows, WINDOW *wnp );
  33. void set_rect(RECT *rectp, int x1, int y1, int x2, int y2);
  34. int rect_equal(RECT r1, RECT r2);
  35. rect_enclosed(RECT *r1, RECT *r2);
  36. int rect_overlap(RECT *r1, RECT *r2);
  37. void offset_rect(RECT *rectp, int col, int row);
  38. int cr_inrect(int col, int row, RECT rect);
  39.  
  40. /*------------------------- Prototypes for UW_FONT.C ------------------------*/
  41. int encode_color(int r, int g, int b);
  42. void decode_color(int color, int *r, int *g, int *b);
  43. void write_palette( int pnum, uchar val );
  44. void write_palette_all( uchar *vals );
  45. int read_palette( int pnum );
  46. void read_palette_all( uchar *vals );
  47. void set_block_ab(int a, int b);
  48. void blink_enable(int state);
  49. void replicate_enable(int state);
  50. int load_font( uchar *font, char *fname );
  51. int save_font( uchar *font, char *fname, int scan_lines );
  52. void install_font(uchar *font, int block, int offset, int cnt,
  53.     int scan_lines, int setmode );
  54. void rom8x8(int block, int setmode);
  55. void rom8x14(int block, int setmode);
  56. void rom8x16(int block, int setmode);
  57. uchar far *get_font_info( int type, int *scan_lines, int *rows );
  58.  
  59. /*------------------------- Prototypes for UW_ENTRY.C ------------------------*/
  60. void up_first_char( char *wk_str, char *mask );
  61. void disp_entry( int c, int r, int m_att, char *s, char *m,
  62.                                  int offset, int disp_width, int arrow_flag, WINDOW *wnp );
  63. void g_insert( char *s, char *m, char *t, int pos );
  64. void g_delete( char *s, char *m, char *t, int pos );
  65. void g_rtl_insert( char *s, char *m, char *t, int pos );
  66. void g_rtl_delete( char *s, char *m, char *t, int pos );
  67. void add_mask( char *s, char *m, char *t );
  68. int rmv_mask( char *s, char *t );
  69. int validate( char *c, char t );
  70. void strip_entry( char *s, char *m );
  71. void strip_end( char *s, char *m );
  72. void strip_start( char *s, char *m );
  73. int strip_len( char *s, char *m );
  74. int wn_gets( char *str, char *mask, char *template, int m_att,
  75.                          int strip_mode, WINDOW *wnp );
  76. int init_gets_str( char *s, char *m, char *t, char *wk );
  77. void rev_init_gets_str( char *s, char *m, char *t, char *wk );
  78. void reverse_str( char *s );
  79. int wn_gets_ll( char *str, char *mask, char *template, int m_att,
  80.                                 int flags, int disp_width, WINDOW *wnp );
  81. #ifdef __cplusplus
  82. void set_validation_func( int (*func_ptr)(...) );
  83. void set_gets_hook( int (*func_ptr)(...) );
  84. #else
  85. void set_validation_func( int (*func_ptr)() );
  86. void set_gets_hook( int (*func_ptr)() );
  87. #endif
  88.  
  89. /*------------------------- Prototypes for UW_MENU.C ------------------------*/
  90. void menu_st( MENU *mnp, int csr, int inx);
  91. void menu_create( int x_min, int y_min, int x_max, int y_max, int direction,
  92.                         int back_att, int bdr_att, int csr_att, int first_att,
  93.                         int bdr, int type, MENU *mnp );
  94. void item_add( char *entry, int id, int first_pos, MENU *mnp );
  95. void menu_set( MENU *mnp );
  96. void menu_restore( MENU *mnp );
  97. void menu_destroy( MENU *mnp );
  98. void decrement_csr( int *csr, int min, int max);
  99. void increment_csr( int *csr, int min, int max);
  100. int upkey( int key );
  101. int menu_horiz( MENU *mnp, int proc_mode );
  102. int menu_vert( MENU *mnp, int proc_mode );
  103. int do_menu( MENU *mnp, int proc_mode );
  104. int menu_system( MENU *top_mnp, MENU *dropmenu[], int draw_top );
  105.  
  106. /*------------------------- Prototypes for UW_PRTF.C ------------------------*/
  107. int wn_printf( WINDOW *wnp, char *fmt, ... );
  108.  
  109. /*------------------------- Prototypes for UW_RFSH.C ------------------------*/
  110. move_n_to_f( int *s, int dest_seg, int dest_off, int cnt );
  111. move_f_to_n( int src_seg, int src_off, int *d, int cnt );
  112. void wn_io( int dir, int area, WINDOW *wnp );
  113. void wn_rfsh_line( int line, WINDOW *wnp );
  114. void wn_rfsh_col( int col, WINDOW *wnp );
  115.  
  116. /*------------------------- Prototypes for UW_WN.C  ------------------------*/
  117. int wn_create( int x_min, int y_min, int x_max, int y_max, int bdr, int mode, WINDOW *wnp );
  118. void wn_destroy( WINDOW *wnp );
  119. void wn_set( WINDOW *wnp );
  120. void wn_clear( WINDOW *wnp );
  121. void wn_move( int col, int row, WINDOW *wnp );
  122.  
  123. /*------------------------- Prototypes for UW_LL.C  ------------------------*/
  124. int _csr_adj( WINDOW *wnp );
  125. void _scroll( int dir, WINDOW *wnp );
  126. uchar far *_calc_scr_addr(WINDOW *wnp);
  127. uchar *_calc_buff_addr(WINDOW *wnp);
  128. uchar *_calc_mask_addr(WINDOW *wnp);
  129. void _calc_all_addr(uchar far **scr, uchar **buff, uchar **mask, WINDOW *wnp);
  130.  
  131. /*------------------------- Prototypes for UW_BDR.C ------------------------*/
  132. void wn_co( int cnt, uchar c, WINDOW *wnp );
  133. void wn_border( WINDOW *wnp );
  134. void wn_hline(int row, int style, WINDOW *wnp);
  135. void wn_vline(int col, int style, WINDOW *wnp);
  136.  
  137. /*------------------------- Prototypes for UW_MASK.C ------------------------*/
  138. void adjust_mask_col( int x_pos, int y_min, int y_max, int amount, WINDOW *wnp );
  139. void adjust_mask_row( int y_pos, int x_min, int x_max, int amount, WINDOW *wnp );
  140. void set_mask( int mode, WINDOW *wnp1, WINDOW *wnp2 );
  141. void clear_mask( WINDOW *wnp );
  142.  
  143. /*------------------------- Prototypes for UW_TERM.C ------------------------*/
  144. void wn_claol( WINDOW *wnp );
  145. void wn_cleol( WINDOW *wnp );
  146. void wn_clbol( WINDOW *wnp );
  147. void wn_cleos( WINDOW *wnp );
  148. void wn_clbos( WINDOW *wnp );
  149. void wn_claos( WINDOW *wnp );
  150. void wn_cln(int qty, WINDOW *wnp);
  151. void wn_clear_tabs( WINDOW *wnp );
  152. void wn_init_tabs( int space, WINDOW *wnp );
  153. void wn_set_tab( WINDOW *wnp );
  154. void wn_reset_tab( WINDOW *wnp );
  155. void wn_tab_right( int cnt, WINDOW *wnp );
  156. void wn_tab_left( int cnt, WINDOW *wnp );
  157. void wn_ins_del_chars(int mode, int c, int cnt, WINDOW *wnp );
  158. void wn_ins_del_lines(int mode, int c, int cnt, WINDOW *wnp );
  159. void wn_csr_dn( int qty, WINDOW *wnp );
  160. void wn_csr_up( int qty, WINDOW *wnp );
  161. void wn_csr_left( int qty, WINDOW *wnp );
  162. void wn_csr_right( int qty, WINDOW *wnp );
  163. void wn_csr_pos( int line, int col, WINDOW *wnp );
  164. void wn_scroll_reg( int line_s, int line_e, WINDOW *wnp );
  165. void wn_bksp( int qty, WINDOW *wnp );
  166.  
  167. /*------------------------- Prototypes for UW_GRAPH.C ------------------------*/
  168. int init_uw_graphics( int xres, int yres, int font_rows, int font_spacing, int seg, int off );
  169. int g_ch( int c, int r, int v );
  170. void compatibility_hook();
  171.  
  172. /*------------------------- Prototypes for UW_ST.C  ------------------------*/
  173. void wn_st( char *s, WINDOW *wnp );
  174. void wn_st_qty( char *s, int qty, WINDOW *wnp );
  175. void wn_plst( int col, int line, char *s, WINDOW *wnp );
  176.  
  177. /*------------------------- Prototypes for UW_CSR.C ------------------------*/
  178. void rd_csr( int *col, int *line );
  179. void mv_csr( int col, int line );
  180. void csr_style( int style );
  181. void csr_hide();
  182. void csr_show();
  183. void pl_csr( WINDOW *wnp );
  184.  
  185. /*------------------------- Prototypes for UW_CH.C  ------------------------*/
  186. void wn_ch( int c, WINDOW *wnp );
  187. void wn_noatt_ch( int c, WINDOW *wnp );
  188. uchar wn_och( WINDOW *wnp );
  189. uchar wn_oatt( WINDOW *wnp );
  190. void wn_qch( int cnt, uchar c, WINDOW *wnp );
  191.  
  192. /*------------------------- Prototypes for UW_PRINT.C ------------------------*/
  193. int init_printer( char *fname, char *diskbuff, long isize, long msize, PRINT *p );
  194. int end_printer( PRINT *p );
  195. int realloc_printer( long new_size, PRINT *p );
  196. void set_prt_xlat( int state, uchar *xlat, PRINT *p );
  197. int print_char( uchar c, PRINT *p );
  198. int print_str( uchar *str, PRINT *p );
  199. int print_data( uchar *data, int cnt, PRINT *p );
  200. int print_file( char *fname, PRINT *p );
  201. int print_window( WINDOW *wnp, PRINT *p );
  202. int print_screen( PRINT *p );
  203. int print_eol( PRINT *p );
  204. int print_in_bkgrnd( void );
  205. void disp_print_stats( PRINT *p, int mode, WINDOW *wnp );
  206.  
  207. /*------------------------- Prototypes for UW_EVENT.C ------------------------*/
  208. void m_reset(M_RESET *m);
  209. void m_colrange( int col_min, int col_max );
  210. void m_rowrange( int row_min, int row_max );
  211. void init_mouse();
  212. void end_mouse();
  213. void m_show();
  214. void m_hide();
  215. void m_pos( M_LOC *m );
  216. void m_moveto( int col, int row );
  217. void m_pressed( int button, M_LOC *m );
  218. void m_released( int button, M_LOC *m );
  219. void m_textcursor(int curstype, unsigned arg1, unsigned arg2);
  220. void m_motion( M_MOVE *m );
  221. void m_lpen_on();
  222. void m_lpen_off();
  223. void m_ratio( int horiz, int vert );
  224. void wait_ticks( clock_t ticks );
  225. int get_key();
  226. int check_key();
  227. int event_pending();
  228. void set_idle_func( int (*func_ptr)() );
  229. void wait_event();
  230.  
  231. /*------------------------- Prototypes for UW_VID.C ------------------------*/
  232. void set_25_rows();
  233. int get_num_rows();
  234. void get_v_mode();
  235. void init_video(int cols, int rows);
  236. void set_vid_addr( int segment, int offset );
  237. void force_video(int force_mode, int cols, int rows);
  238. void end_video();
  239. uchar swap_nibbles( uchar c );
  240. uchar get_att( uchar att );
  241. void check_desq();
  242. void mode43();
  243. void mode25();
  244. ega_vga_check();
  245. void far interrupt clock_vect();
  246. void init_clock(unsigned int speed);
  247. void end_clock();
  248. void clock_speed( uint speed );
  249. void tone( uint freq, int dur );
  250. void sound_off();
  251. void wait_ticks( clock_t ticks );
  252.  
  253. /**** END OF FILE ****/
  254.