home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / CMWINOBJ.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  3.2 KB  |  97 lines

  1. /*
  2.     cmwinobj.h        3/15/88
  3.  
  4.     % Cmap window routines header.
  5.     by Ted.
  6.  
  7.     OWL 1.1
  8.     Copyright (c) 1988, by Oakland Group, Inc.
  9.     ALL RIGHTS RESERVED.
  10.  
  11.     Revision History:
  12.     -----------------
  13.      8/09/88 jmd    revised to use new object stuff
  14.      9/12/88 jmd    Added in and out data to objects
  15.      4/22/89 ted    Added bcwin class.
  16.      7/12/89 ted    Converted '_func' prototypes from typedef to macro.
  17. */
  18.  
  19. #ifndef OAK_CMWINOBJ
  20. #define OAK_CMWINOBJ
  21.  
  22. /* #include "winobj.h" - already included via disp.h */
  23.  
  24. /* -------------------------------------------------------------------------- */
  25.  
  26. #define CMWINM_LASTMSG     (WINM_LASTMSG)
  27.  
  28. extern class_func        (cmwin_Class);
  29. extern classinit_func     (cmwin_MouseInit);
  30.  
  31. typedef struct {
  32.     win_xd        wd;
  33.  
  34. /* Declared VOID * so everyone won't have to include cmapdecl.h */
  35.     VOID         *cmap;
  36.  
  37.     int         rowoffs;
  38.     int            coloffs;
  39. } cmwin_xd;
  40.  
  41. #define cmwin_getxd(win)            ((cmwin_xd *) win_getxd(win))
  42.  
  43. #define cmwin_GetRowoffs(win)        (cmwin_getxd(win)->rowoffs)
  44. #define cmwin_SetRowoffs(win, row)    (cmwin_getxd(win)->rowoffs = (row))
  45. #define cmwin_GetColoffs(win)        (cmwin_getxd(win)->coloffs)
  46. #define cmwin_SetColoffs(win, col)    (cmwin_getxd(win)->coloffs = (col))
  47. /* -------------------------------------------------------------------------- */
  48.  
  49. #define cmwin_DrawStringAttr(win, row, col, string, attrbuf, slen) \
  50.             cmwin_dsa(win, row, col, string, attrbuf, 0, slen)
  51.  
  52. #define cmwin_DrawString(win, row, col, string, attr, slen)     \
  53.             cmwin_dsa(win, row, col, string, NULL, attr, slen)
  54. /* -------------------------------------------------------------------------- */
  55. /*** Functions ***/
  56.  
  57. /* cmwindra.c - functions that put stuff in a cmap and paint to display */
  58.  
  59. extern int     cmwin_GetStringAttr(_arg6(win_type win, int row, int col,
  60.                             char *charbuf, byte *attrbuf, int maxlen));
  61.  
  62. extern char *cmwin_dsa(_arg7(win_type win, int row, int col, char *string,
  63.                             byte *attrbuf, byte attr, int slen));
  64.  
  65. extern char *cmwin_DrawChar(_arg5(win_type win, int row, int col, char c, byte attr));
  66. extern void cmwin_DrawBox(_arg4(win_type win, char *boxcp, ocbox *cboxp, byte attr));
  67. extern void cmwin_DrawHzLine(_arg6(win_type win, char *linecp, int row1, int col1, int length, byte attr));
  68. extern void cmwin_DrawVtLine(_arg6(win_type win, char *linecp, int row1, int col1, int length, byte attr));
  69. extern void cmwin_ScrollBoxVt(_arg3(win_type win, ocbox *cboxp, int n));
  70. extern void cmwin_ScrollBoxHz(_arg3(win_type win, ocbox *cboxp, int n));
  71. extern void cmwin_ClearBox(_arg3(win_type win, ocbox *cboxp, byte attr));
  72. extern void cmwin_Clear(_arg2(win_type win, byte attr));
  73.  
  74. /* cmwintty.c */
  75. extern void cmwin_PlotTTY(_arg2(win_type win, char *string));
  76.  
  77. /* -------------------------------------------------------------------------- */
  78. /* Blank char window class */
  79.  
  80. #define BCWINM_LASTMSG     (WINM_LASTMSG)
  81.  
  82. extern class_func        (bcwin_Class);
  83.  
  84. typedef struct {
  85.     win_xd        wd;
  86.  
  87.     char        bchar;
  88. } bcwin_xd;
  89.  
  90. #define bcwin_getxd(win)            ((bcwin_xd *) win_getxd(win))
  91.  
  92. #define bcwin_GetChar(win)        (bcwin_getxd(win)->bchar)
  93. #define bcwin_SetChar(win, bc)    (bcwin_getxd(win)->bchar = (bc))
  94. /* -------------------------------------------------------------------------- */
  95. #endif
  96.  
  97.