home *** CD-ROM | disk | FTP | other *** search
- /*
- cmwinobj.h 3/15/88
-
- % Cmap window routines header.
- by Ted.
-
- OWL 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 8/09/88 jmd revised to use new object stuff
- 9/12/88 jmd Added in and out data to objects
- 4/22/89 ted Added bcwin class.
- 7/12/89 ted Converted '_func' prototypes from typedef to macro.
- */
-
- #ifndef OAK_CMWINOBJ
- #define OAK_CMWINOBJ
-
- /* #include "winobj.h" - already included via disp.h */
-
- /* -------------------------------------------------------------------------- */
-
- #define CMWINM_LASTMSG (WINM_LASTMSG)
-
- extern class_func (cmwin_Class);
- extern classinit_func (cmwin_MouseInit);
-
- typedef struct {
- win_xd wd;
-
- /* Declared VOID * so everyone won't have to include cmapdecl.h */
- VOID *cmap;
-
- int rowoffs;
- int coloffs;
- } cmwin_xd;
-
- #define cmwin_getxd(win) ((cmwin_xd *) win_getxd(win))
-
- #define cmwin_GetRowoffs(win) (cmwin_getxd(win)->rowoffs)
- #define cmwin_SetRowoffs(win, row) (cmwin_getxd(win)->rowoffs = (row))
- #define cmwin_GetColoffs(win) (cmwin_getxd(win)->coloffs)
- #define cmwin_SetColoffs(win, col) (cmwin_getxd(win)->coloffs = (col))
- /* -------------------------------------------------------------------------- */
-
- #define cmwin_DrawStringAttr(win, row, col, string, attrbuf, slen) \
- cmwin_dsa(win, row, col, string, attrbuf, 0, slen)
-
- #define cmwin_DrawString(win, row, col, string, attr, slen) \
- cmwin_dsa(win, row, col, string, NULL, attr, slen)
- /* -------------------------------------------------------------------------- */
- /*** Functions ***/
-
- /* cmwindra.c - functions that put stuff in a cmap and paint to display */
-
- extern int cmwin_GetStringAttr(_arg6(win_type win, int row, int col,
- char *charbuf, byte *attrbuf, int maxlen));
-
- extern char *cmwin_dsa(_arg7(win_type win, int row, int col, char *string,
- byte *attrbuf, byte attr, int slen));
-
- extern char *cmwin_DrawChar(_arg5(win_type win, int row, int col, char c, byte attr));
- extern void cmwin_DrawBox(_arg4(win_type win, char *boxcp, ocbox *cboxp, byte attr));
- extern void cmwin_DrawHzLine(_arg6(win_type win, char *linecp, int row1, int col1, int length, byte attr));
- extern void cmwin_DrawVtLine(_arg6(win_type win, char *linecp, int row1, int col1, int length, byte attr));
- extern void cmwin_ScrollBoxVt(_arg3(win_type win, ocbox *cboxp, int n));
- extern void cmwin_ScrollBoxHz(_arg3(win_type win, ocbox *cboxp, int n));
- extern void cmwin_ClearBox(_arg3(win_type win, ocbox *cboxp, byte attr));
- extern void cmwin_Clear(_arg2(win_type win, byte attr));
-
- /* cmwintty.c */
- extern void cmwin_PlotTTY(_arg2(win_type win, char *string));
-
- /* -------------------------------------------------------------------------- */
- /* Blank char window class */
-
- #define BCWINM_LASTMSG (WINM_LASTMSG)
-
- extern class_func (bcwin_Class);
-
- typedef struct {
- win_xd wd;
-
- char bchar;
- } bcwin_xd;
-
- #define bcwin_getxd(win) ((bcwin_xd *) win_getxd(win))
-
- #define bcwin_GetChar(win) (bcwin_getxd(win)->bchar)
- #define bcwin_SetChar(win, bc) (bcwin_getxd(win)->bchar = (bc))
- /* -------------------------------------------------------------------------- */
- #endif
-
-