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

  1. /*
  2.     winpriv.h
  3.  
  4.     % private definitions for windows
  5.  
  6.     3/29/88    by Ted
  7.  
  8.     OWL 1.1
  9.     Copyright (c) 1988, 1989 by Oakland Group, Inc.
  10.     ALL RIGHTS RESERVED.
  11.  
  12.     Revision History:
  13.     -----------------
  14.      6/26/89 ted    Added macros for fromwin, nextwin, mousecode.
  15.      6/28/89 ted    Added macros for [un]employedhead, bot_sys/employed_win.
  16.      7/10/89 ted    Moved nextwin to window structure from wmgr.
  17.      8/10/89 ted    Added macros: win_getwinbox & win_getshadowbox.
  18.      8/18/89 ted    Added win_OpenRaw.
  19. */
  20. /* -------------------------------------------------------------------------- */
  21. /* Macros */
  22.  
  23. #define win_setemployed(win, ef)    (win_getxd(win)->employed = (unsigned)(ef))
  24. #define win_setabove(win, ab)        (win_getxd(win)->above = (ab))
  25. #define win_setbelow(win, be)        (win_getxd(win)->below = (be))
  26.  
  27. #define win_getwinbox(win, boxp)                    \
  28.     (opbox_copy(boxp, win_inboxp(win)),                \
  29.      opbox_trans(boxp, win_pixboxp(win)->xmin, win_pixboxp(win)->ymin))
  30. #define win_getshadowbox(win, boxp)                    \
  31.     (opbox_copy(boxp, win_pixboxp(win)),            \
  32.      (boxp)->xmax += win_GetShadowX(win), (boxp)->ymax += win_GetShadowY(win))
  33.  
  34. #define win_setbd(win, bd)            (win_getxd(win)->bord = (bd))
  35. #define win_setfontptr(win, font)    (win_getxd(win)->font = (font))
  36. #define win_setattribute(win, attr)    (win_getxd(win)->attribute = (attr))
  37. #define win_setcursx(win, cx)        (win_getxd(win)->cursx = (cx))
  38. #define win_setcursy(win, cy)        (win_getxd(win)->cursy = (cy))
  39. #define win_setcurstype(win, ct)    (win_getxd(win)->curstype = (ct))
  40. #define win_setnullfont(win, nf)    (win_getxd(win)->nullfont = (nf))
  41.  
  42. #define win_DoMouse(win, msg, mev)    (*win_getxd(win)->mouhandler)(win, msg, mev)
  43.  
  44. #define win_setidmgr(win, id)        (win_getxd(win)->idmgr = id)
  45. #define win_nextwin(win)            (win_getxd(win)->nextwin)
  46. /* -------------------------------------------------------------------------- */
  47.  
  48. #define wmgr_employedhead()            (curr_wmgr->employedhead)
  49. #define wmgr_setemployedhead(win)    (curr_wmgr->employedhead = (win))
  50. #define wmgr_unemployedhead()        (curr_wmgr->unemployedhead)
  51. #define wmgr_setunemployedhead(win)    (curr_wmgr->unemployedhead = (win))
  52. #define wmgr_botsyswin()            (curr_wmgr->bot_sys_win)
  53. #define wmgr_setbotsyswin(win)        (curr_wmgr->bot_sys_win = (win))
  54. #define wmgr_setbotemployedwin(win)    (curr_wmgr->bot_employed_win = (win))
  55.  
  56. #define wmgr_setcurrwin(win)        (curr_wmgr->currwin = (win))
  57. #define wmgr_setbackwin(win)        (curr_wmgr->backwin = (win))
  58. #define wmgr_setdispwin(win)        (curr_wmgr->dispwin = (win))
  59.  
  60. #define wmgr_lastmev()                (&curr_wmgr->lastmev)
  61. #define wmgr_lastmoupos()            (&curr_wmgr->lastmoupos)
  62. #define wmgr_setfromwin(fwin)        (curr_wmgr->fromwin = fwin)
  63. #define wmgr_mousecode()            (curr_wmgr->mousecode)
  64.  
  65. #define wmgr_SMMptr()                (curr_wmgr->SMMptr)
  66. #define wmgr_SetSMMptr(smm)            (curr_wmgr->SMMptr = (smm))
  67.  
  68. #define wmgr_SendMouseMsgs(mouposp, newcurr)            \
  69.     (*curr_wmgr->SMMptr)(mouposp, newcurr)
  70.  
  71. #define wmgr_SetReplyStash(ec)        (curr_wmgr->mousereply = (ec))
  72. #define wmgr_ReplyStash()            (curr_wmgr->mousereply)
  73. #define wmgr_SetInMouse(mg)            (curr_wmgr->inmousemsg = (mg))
  74. #define wmgr_InMouse()                ((boolean) curr_wmgr->inmousemsg)
  75. #define wmgr_SetNewCurrentFlag(nc)    (curr_wmgr->newcurrent = (nc))
  76. #define wmgr_NewCurrentFlag()        ((boolean) curr_wmgr->newcurrent)
  77. #define wmgr_SetWasMouse(mf)        (curr_wmgr->wasmouse = (mf))
  78. #define wmgr_SetFakeMouse(fm)        (curr_wmgr->fakemouse = (fm))
  79. #define wmgr_trapmousewin()            (curr_wmgr->trapmousewin)
  80. /* -------------------------------------------------------------------------- */
  81.  
  82. /* wmgrinit.c */
  83. extern boolean    OWLPRIV wmgr_Init(_arg1(class_fptr backwin));
  84. extern void        OWLPRIV wmgr_Wrapup(_arg1(void));
  85.  
  86. /* winopen.c */
  87. extern win_type    win_OpenRaw(_arg2(class_fptr winclass, winopendata_struct *wod));
  88.  
  89. /* winexpos.c */
  90. extern boolean    OWLPRIV wmgr_OpenTiler(_arg1(void));
  91. extern void        OWLPRIV wmgr_CloseTiler(_arg1(void));
  92. extern boolean    OWLPRIV wmgr_ExposePixBox(_arg5(win_type topwin, win_type botwin,
  93.                                         opbox *scrboxp, int msg, VOID *emsgdata));
  94. /* winobsc.c */
  95. extern unsigned    OWLPRIV win_ParentClip(_arg3(win_type win, opbox *boxp, boolean doshad));
  96.  
  97. /* wingo.c */
  98. extern win_type    OWLPRIV win_MakeCurrent(_arg1(win_type win));
  99.  
  100. /* winlist.c */
  101. extern win_type    OWLPRIV wmgr_ListOpen(_arg1(void));
  102. extern void        OWLPRIV wmgr_ListClose(_arg1(win_type));
  103. extern void        OWLPRIV win_ListAdd(_arg2(win_type, win_type));
  104. extern void        OWLPRIV win_ListRemove(_arg1(win_type));
  105.  
  106. /* bordout.c */
  107. extern void     bord_DrawOutline(_arg2(win_type, opbox *));
  108. extern void     bord_EraseOutline(_arg2(win_type, opbox *));
  109.  
  110. /* dispinit.c (in here because there's no more sensible place for it) */
  111. extern boolean    OWLPRIV dispsetup(_arg1(dmode_fptr dmode));
  112. /* -------------------------------------------------------------------------- */
  113.  
  114. /*    Paints the window(s) equal to or below 'win' within 'box'. */
  115. #define wmgr_PaintPixBox(win, scrboxp)                \
  116.     wmgr_ExposePixBox(win, NULL, scrboxp, WINM_PAINT, NULL)
  117.  
  118. /*    Paints the window(s) equal to or below 'twin' and above 'bwin' within 'box'. */
  119. #define wmgr_PaintPixLayer(twin, bwin, scrboxp)        \
  120.     wmgr_ExposePixBox(twin, bwin, scrboxp, WINM_PAINT, NULL)
  121.  
  122. /*    Saves the window(s) equal to or below 'win' within 'box'. */
  123. #define wmgr_SavePixBox(win, scrboxp)                \
  124.     wmgr_ExposePixBox(win, NULL, scrboxp, WINM_SAVE, NULL)
  125.  
  126. /*    Saves the window(s) equal to or below 'twin' and above 'bwin' within 'box'. */
  127. #define wmgr_SavePixLayer(twin, bwin, scrboxp)        \
  128.     wmgr_ExposePixBox(twin, bwin, scrboxp, WINM_SAVE, NULL)
  129. /* -------------------------------------------------------------------------- */
  130.  
  131.