home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / VIDEO / WINMGR2.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-10  |  3.7 KB  |  85 lines

  1. /* winmgr1.h */
  2.  
  3. #define FALSE 0
  4. #define TRUE  1
  5.  
  6. #define WM_USED 0x6d77fa10
  7.  
  8. struct _wm_window
  9. {
  10.   int used;               /* WM_USED, if this slot is used                 */
  11.   int visible;            /* TRUE, if whole window is visible              */
  12.   int display;            /* open && update_flag                           */
  13.   int update_flag;        /* TRUE, if updating screen immediately          */
  14.   int update_req;         /* TRUE, if screen window has to be updated      */
  15.   int open;               /* TRUE, if window open                          */
  16.   int wrap;               /* TRUE, if end-of-line-wrap is activated        */
  17.   char *data;             /* Window contents                               */
  18.   char *mask;             /* Visible characters of window (FALSE/TRUE)     */
  19.   int masksize;           /* Length of mask array                          */
  20.   int x0, y0, x1, y1;     /* Usable area of window                         */
  21.   int bx0, by0, bx1, by1; /* Whole window including border                 */
  22.   int ax, ay;             /* x0-bx0 and y0-by0 (border width 0 or 1)       */
  23.   int border;             /* Border flag                                   */
  24.   int battr;              /* Border attributes                             */
  25.   int wattr;              /* Window contents attributes                    */
  26.   int x, y;               /* Cursor position                               */
  27.   int width;              /* Window width                                  */
  28.   int height;             /* Window height                                 */
  29.   int bwidth;             /* Window width including border                 */
  30.   int bheight;            /* Window height including border                */
  31.   int c_vis;              /* TRUE: visible cursor, FALSE: invisible cursor */
  32.   int c_start, c_end;     /* Cursor type                                   */
  33. };
  34.  
  35. extern wm_handle _wm_tab;
  36. extern wm_handle *_wm_idx;
  37.  
  38. extern char *_wm_screen;
  39. extern char *_wm_line;
  40.  
  41. extern int _wm_width;
  42. extern int _wm_height;
  43. extern int _wm_count;
  44. extern int _wm_max;
  45. extern int _wm_saved_cstart;
  46. extern int _wm_saved_cend;
  47. extern int _wm_saved_x;
  48. extern int _wm_saved_y;
  49.  
  50. extern wm_handle _wm_cursor;           /* Window selected by wm_cursor */
  51. extern int _wm_c_hide;                 /* Cursor mode                  */
  52.  
  53. #define MIN(a,b) ((a) < (b) ? (a) : (b))
  54. #define MAX(a,b) ((a) > (b) ? (a) : (b))
  55.  
  56. #define DATA(wh,x,y) ((wh)->data[2*((x)+(y)*(wh)->bwidth)])
  57. #define MASK(wh,x,y) ((wh)->mask[(x)+(y)*(wh)->bwidth])
  58.  
  59. void _wm_puts_len (wm_handle wh, const char *p, int len);
  60.  
  61. void _wm_cursor1 (void);
  62. void _wm_put1 (wm_handle wh);
  63. void _wm_clrline1 (wm_handle wh, int y, int x0, int x1);
  64. void _wm_clr1 (wm_handle wh);
  65. int  _wm_idx1 (wm_handle wh);
  66. void _wm_unhide1 (wm_handle wh, wm_handle new_wh);
  67. void _wm_copy1 (wm_handle wh, wm_handle old_wh);
  68. void _wm_hide1 (void);
  69. int  _wm_jam1 (wm_handle wh1, wm_handle wh2);
  70. void _wm_store1 (wm_handle wh, int x, int y, char c, int a);
  71. void _wm_line1 (wm_handle wh, int y);
  72. void _wm_hide2 (wm_handle wh1, wm_handle wh2);
  73. void _wm_border1 (wm_handle wh, int title_flag, int title_attr,
  74.     const char *title);
  75. void _wm_allvisible (wm_handle wh);
  76.  
  77. void _wm_putc2 (char c, int x, int y, int a);
  78. void _wm_puts2 (char *dst, const char *src, int cnt, int a);
  79. void _wm_putsa2 (char *dst, const char *src, int cnt);
  80. void _wm_puta2 (char *dst, int a, int cnt);
  81. void _wm_move2 (char *data, int y, int x0, int x1, int dir);
  82. void _wm_line2 (char *mask, char *data, int y, int x0, int x1);
  83. void _wm_copy2 (char *mask, char *dst, char *src, int width);
  84. void _wm_clrline2 (char *dst, int width, char a);
  85.