home *** CD-ROM | disk | FTP | other *** search
- /*
- winpriv.h
-
- % private definitions for windows
-
- 3/29/88 by Ted
-
- OWL 1.1
- Copyright (c) 1988, 1989 by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 6/26/89 ted Added macros for fromwin, nextwin, mousecode.
- 6/28/89 ted Added macros for [un]employedhead, bot_sys/employed_win.
- 7/10/89 ted Moved nextwin to window structure from wmgr.
- 8/10/89 ted Added macros: win_getwinbox & win_getshadowbox.
- 8/18/89 ted Added win_OpenRaw.
- */
- /* -------------------------------------------------------------------------- */
- /* Macros */
-
- #define win_setemployed(win, ef) (win_getxd(win)->employed = (unsigned)(ef))
- #define win_setabove(win, ab) (win_getxd(win)->above = (ab))
- #define win_setbelow(win, be) (win_getxd(win)->below = (be))
-
- #define win_getwinbox(win, boxp) \
- (opbox_copy(boxp, win_inboxp(win)), \
- opbox_trans(boxp, win_pixboxp(win)->xmin, win_pixboxp(win)->ymin))
- #define win_getshadowbox(win, boxp) \
- (opbox_copy(boxp, win_pixboxp(win)), \
- (boxp)->xmax += win_GetShadowX(win), (boxp)->ymax += win_GetShadowY(win))
-
- #define win_setbd(win, bd) (win_getxd(win)->bord = (bd))
- #define win_setfontptr(win, font) (win_getxd(win)->font = (font))
- #define win_setattribute(win, attr) (win_getxd(win)->attribute = (attr))
- #define win_setcursx(win, cx) (win_getxd(win)->cursx = (cx))
- #define win_setcursy(win, cy) (win_getxd(win)->cursy = (cy))
- #define win_setcurstype(win, ct) (win_getxd(win)->curstype = (ct))
- #define win_setnullfont(win, nf) (win_getxd(win)->nullfont = (nf))
-
- #define win_DoMouse(win, msg, mev) (*win_getxd(win)->mouhandler)(win, msg, mev)
-
- #define win_setidmgr(win, id) (win_getxd(win)->idmgr = id)
- #define win_nextwin(win) (win_getxd(win)->nextwin)
- /* -------------------------------------------------------------------------- */
-
- #define wmgr_employedhead() (curr_wmgr->employedhead)
- #define wmgr_setemployedhead(win) (curr_wmgr->employedhead = (win))
- #define wmgr_unemployedhead() (curr_wmgr->unemployedhead)
- #define wmgr_setunemployedhead(win) (curr_wmgr->unemployedhead = (win))
- #define wmgr_botsyswin() (curr_wmgr->bot_sys_win)
- #define wmgr_setbotsyswin(win) (curr_wmgr->bot_sys_win = (win))
- #define wmgr_setbotemployedwin(win) (curr_wmgr->bot_employed_win = (win))
-
- #define wmgr_setcurrwin(win) (curr_wmgr->currwin = (win))
- #define wmgr_setbackwin(win) (curr_wmgr->backwin = (win))
- #define wmgr_setdispwin(win) (curr_wmgr->dispwin = (win))
-
- #define wmgr_lastmev() (&curr_wmgr->lastmev)
- #define wmgr_lastmoupos() (&curr_wmgr->lastmoupos)
- #define wmgr_setfromwin(fwin) (curr_wmgr->fromwin = fwin)
- #define wmgr_mousecode() (curr_wmgr->mousecode)
-
- #define wmgr_SMMptr() (curr_wmgr->SMMptr)
- #define wmgr_SetSMMptr(smm) (curr_wmgr->SMMptr = (smm))
-
- #define wmgr_SendMouseMsgs(mouposp, newcurr) \
- (*curr_wmgr->SMMptr)(mouposp, newcurr)
-
- #define wmgr_SetReplyStash(ec) (curr_wmgr->mousereply = (ec))
- #define wmgr_ReplyStash() (curr_wmgr->mousereply)
- #define wmgr_SetInMouse(mg) (curr_wmgr->inmousemsg = (mg))
- #define wmgr_InMouse() ((boolean) curr_wmgr->inmousemsg)
- #define wmgr_SetNewCurrentFlag(nc) (curr_wmgr->newcurrent = (nc))
- #define wmgr_NewCurrentFlag() ((boolean) curr_wmgr->newcurrent)
- #define wmgr_SetWasMouse(mf) (curr_wmgr->wasmouse = (mf))
- #define wmgr_SetFakeMouse(fm) (curr_wmgr->fakemouse = (fm))
- #define wmgr_trapmousewin() (curr_wmgr->trapmousewin)
- /* -------------------------------------------------------------------------- */
-
- /* wmgrinit.c */
- extern boolean OWLPRIV wmgr_Init(_arg1(class_fptr backwin));
- extern void OWLPRIV wmgr_Wrapup(_arg1(void));
-
- /* winopen.c */
- extern win_type win_OpenRaw(_arg2(class_fptr winclass, winopendata_struct *wod));
-
- /* winexpos.c */
- extern boolean OWLPRIV wmgr_OpenTiler(_arg1(void));
- extern void OWLPRIV wmgr_CloseTiler(_arg1(void));
- extern boolean OWLPRIV wmgr_ExposePixBox(_arg5(win_type topwin, win_type botwin,
- opbox *scrboxp, int msg, VOID *emsgdata));
- /* winobsc.c */
- extern unsigned OWLPRIV win_ParentClip(_arg3(win_type win, opbox *boxp, boolean doshad));
-
- /* wingo.c */
- extern win_type OWLPRIV win_MakeCurrent(_arg1(win_type win));
-
- /* winlist.c */
- extern win_type OWLPRIV wmgr_ListOpen(_arg1(void));
- extern void OWLPRIV wmgr_ListClose(_arg1(win_type));
- extern void OWLPRIV win_ListAdd(_arg2(win_type, win_type));
- extern void OWLPRIV win_ListRemove(_arg1(win_type));
-
- /* bordout.c */
- extern void bord_DrawOutline(_arg2(win_type, opbox *));
- extern void bord_EraseOutline(_arg2(win_type, opbox *));
-
- /* dispinit.c (in here because there's no more sensible place for it) */
- extern boolean OWLPRIV dispsetup(_arg1(dmode_fptr dmode));
- /* -------------------------------------------------------------------------- */
-
- /* Paints the window(s) equal to or below 'win' within 'box'. */
- #define wmgr_PaintPixBox(win, scrboxp) \
- wmgr_ExposePixBox(win, NULL, scrboxp, WINM_PAINT, NULL)
-
- /* Paints the window(s) equal to or below 'twin' and above 'bwin' within 'box'. */
- #define wmgr_PaintPixLayer(twin, bwin, scrboxp) \
- wmgr_ExposePixBox(twin, bwin, scrboxp, WINM_PAINT, NULL)
-
- /* Saves the window(s) equal to or below 'win' within 'box'. */
- #define wmgr_SavePixBox(win, scrboxp) \
- wmgr_ExposePixBox(win, NULL, scrboxp, WINM_SAVE, NULL)
-
- /* Saves the window(s) equal to or below 'twin' and above 'bwin' within 'box'. */
- #define wmgr_SavePixLayer(twin, bwin, scrboxp) \
- wmgr_ExposePixBox(twin, bwin, scrboxp, WINM_SAVE, NULL)
- /* -------------------------------------------------------------------------- */
-
-