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

  1. /*
  2.     bordglts.c   2/87
  3.  
  4.     % bord_GetLights
  5.  
  6.     OWL 1.1
  7.     Copyright (c) 1986, 1987, 1988, by Oakland Group, Inc.
  8.     ALL RIGHTS RESERVED.
  9.  
  10.     Revision History:
  11.      -----------------
  12.     11/08/88 ted    Changed to new non-window border scheme
  13. */
  14.  
  15. #include "oakhead.h"
  16. #include "disppriv.h"
  17. #include "bordobj.h"
  18.  
  19. void bord_GetLights(win, up, down, left, right)
  20.     win_type win;
  21.     boolean *up;
  22.     boolean *down;
  23.     boolean *left;
  24.     boolean *right;
  25. /*
  26.     Get scroll light info for a border.
  27.     Sets the appropriate light TRUE if the border's owner can scroll
  28.     in that direction.
  29. */
  30. {
  31.     inposdata_struct inpos;
  32.  
  33.     if (win == NULL) {
  34.         /* just in case */
  35.         *up = FALSE;
  36.         *down = FALSE;
  37.         *left = FALSE;
  38.         *right = FALSE;
  39.     }
  40.     else {
  41.         inpos.win = win;
  42.         win_Do(win, WINM_GETINPOS, NULL, &inpos);
  43.  
  44.         *up = (inpos.inbox.ymin < 0);
  45.         *left = (inpos.inbox.xmin < 0);
  46.         *down = (inpos.inbox.ymax > win_GetPixHeight(win));
  47.         *right = (inpos.inbox.xmax > win_GetPixWidth(win));
  48.     }
  49. }
  50.  
  51.