home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / fed0217s.zip / include / vio.h < prev   
C/C++ Source or Header  |  2001-11-06  |  3KB  |  98 lines

  1. /*
  2. ** Module   :VIO.H
  3. ** Abstract :Console I/O
  4. **
  5. ** Copyright (C) Sergey I. Yevtushenko
  6. **
  7. ** Log: Wed  29/01/1997     Created
  8. */
  9.  
  10. #ifndef  __VIO_H
  11. #define  __VIO_H
  12.  
  13. #define KEY_NAME_LEN    32
  14.  
  15. struct Rect
  16. {
  17.     int row;
  18.     int col;
  19.     int rows;
  20.     int cols;
  21. };
  22.  
  23. typedef struct _st_key
  24. {
  25.     unsigned short key;
  26.     unsigned short skey;
  27.     unsigned short shift;
  28.     unsigned short old_key;
  29.     unsigned short rep_count;
  30.     char KeyName[KEY_NAME_LEN];
  31. } KeyInfo;
  32.  
  33. struct stKeyMap
  34. {
  35.     unsigned char code;
  36.     char *name;
  37. };
  38.  
  39. class PMObj
  40. {
  41.         unsigned long hab;
  42.         unsigned long hmq;
  43.     public:
  44.  
  45.         PMObj();
  46.         ~PMObj();
  47. };
  48.  
  49. extern stKeyMap AltKey[];
  50.  
  51. #define SWITCH_CHAR     '~'
  52. #define NoCursor        0
  53. #define Underline       1
  54. #define BigCursor       2
  55.  
  56. #define SCROLL_UP       0
  57. #define SCROLL_DN       1
  58. #define SCROLL_LT       2
  59. #define SCROLL_RT       3
  60.  
  61. void vio_read_key(KeyInfo*);
  62. void vio_show(void);
  63. void vio_show_str(int Row, int Col, int Len);
  64. void vio_show_buf(int Offset, int Len);
  65. void vio_draw_attr(int Row, int Col, int Len, int Color);
  66. void vio_vdraw(int Row, int Col, char Char, int Len, int Color);
  67. void vio_vdraw2(int Row, int Col, char Char, int Len, int Color);
  68. void vio_hdraw(int Row, int Col, char Char, int Len, int Color);
  69. void vio_hdraw2(int Row, int Col, char Char, int Len, int Color);
  70. void vio_printh(int Row, int Col, char *String, int MaxLen, int Color, int ColorH);
  71. void vio_printh2(int Row, int Col, char *String, int MaxLen, int Color, int ColorH);
  72. void vio_print(int Row, int Col, char *String, int MaxLen, int Color);
  73. void vio_print2(int Row, int Col, char *String, int MaxLen, int Color);
  74. void vio_fill(int Color, int Char);
  75. void vio_cls(int Color);
  76. void vio_init(void);
  77. void vio_shutdown(void);
  78. void vio_cursor_pos(int row, int col);
  79. void vio_cursor_type(int shape);
  80. void vio_box(int Row, int Col, int Hight, int Width, int Type, int Color);
  81. void vio_box2(int Row, int Col, int Hight, int Width, int Type, int Color);
  82. char* vio_set_work_buff(char *buff);
  83. void *vio_save_box(int Row, int Col, int Hight, int Width);
  84. void vio_restore_box(void *data);
  85.  
  86. void vio_scroll(int Dir, Rect& rect, int Num, int Attr);
  87. int cstrlen(char *str);
  88. char * cvt_num(unsigned int, int);
  89. char * xcvt_char(int);
  90. int init_pm(int);
  91. void deinit_pm(void);
  92. void set_title(char *title);
  93.  
  94. int cp2cp(char *cp1, char *cp2, char *src, char *dst, int len);
  95. char *str_dup(char*, int = -1);
  96.  
  97. #endif
  98.