home *** CD-ROM | disk | FTP | other *** search
- /*
- bordglts.c 2/87
-
- % bord_GetLights
-
- OWL 1.1
- Copyright (c) 1986, 1987, 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 11/08/88 ted Changed to new non-window border scheme
- */
-
- #include "oakhead.h"
- #include "disppriv.h"
- #include "bordobj.h"
-
- void bord_GetLights(win, up, down, left, right)
- win_type win;
- boolean *up;
- boolean *down;
- boolean *left;
- boolean *right;
- /*
- Get scroll light info for a border.
- Sets the appropriate light TRUE if the border's owner can scroll
- in that direction.
- */
- {
- inposdata_struct inpos;
-
- if (win == NULL) {
- /* just in case */
- *up = FALSE;
- *down = FALSE;
- *left = FALSE;
- *right = FALSE;
- }
- else {
- inpos.win = win;
- win_Do(win, WINM_GETINPOS, NULL, &inpos);
-
- *up = (inpos.inbox.ymin < 0);
- *left = (inpos.inbox.xmin < 0);
- *down = (inpos.inbox.ymax > win_GetPixHeight(win));
- *right = (inpos.inbox.xmax > win_GetPixWidth(win));
- }
- }
-
-