home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / CSAPE32.ARJ / SOURCE / OWLSCR / BORDGLTS.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-28  |  977 b   |  48 lines

  1. /*
  2.     bordglts.c   2/87
  3.  
  4.     % bord_GetLights
  5.  
  6.     OWL 1.2
  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.      3/28/90 jmd    ansi-fied
  15. */
  16.  
  17. #include "oakhead.h"
  18. #include "disppriv.h"
  19. #include "bordobj.h"
  20.  
  21. void bord_GetLights(win_type win, boolean *up, boolean *down, boolean *left, boolean *right)
  22. /*
  23.     Get scroll light info for a border.
  24.     Sets the appropriate light TRUE if the border's owner can scroll
  25.     in that direction.
  26. */
  27. {
  28.     inposdata_struct inpos;
  29.  
  30.     if (win == NULL) {
  31.         /* just in case */
  32.         *up = FALSE;
  33.         *down = FALSE;
  34.         *left = FALSE;
  35.         *right = FALSE;
  36.     }
  37.     else {
  38.         inpos.win = win;
  39.         win_Do(win, WINM_GETINPOS, NULL, &inpos);
  40.  
  41.         *up = (inpos.inbox.ymin < 0);
  42.         *left = (inpos.inbox.xmin < 0);
  43.         *down = (inpos.inbox.ymax > win_GetPixHeight(win));
  44.         *right = (inpos.inbox.xmax > win_GetPixWidth(win));
  45.     }
  46. }
  47.  
  48.