home *** CD-ROM | disk | FTP | other *** search
- /*
- digcursl.c
-
- % Function for getting cursor size given cursor type.
-
- 5/16/88 by Ted.
- Extracted from pcfuncs.c
-
- OWL 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- */
-
- #include "oakhead.h"
- #include "disppriv.h"
- #include "digutil.h"
- /* -------------------------------------------------------------------------- */
-
- void DIGPRIV dig_getcurslines(ctype, nlines, startp, endp)
- cursortype ctype;
- opcoord nlines;
- opcoord *startp;
- opcoord *endp;
- {
- opcoord thick, thin;
-
- thick = 2*(nlines/8);
- thin = nlines/15;
-
- switch(ctype) {
- case CURSOR_NONE:
- *startp = 32; /* special start value for no bios cursor */
- *endp = 1; /* special end value for no bios cursor */
- break;
- case CURSOR_BLOCK:
- *startp = 0; /* start value */
- *endp = nlines;
- break;
- case CURSOR_DASH:
- *startp = nlines / 2;
- *endp = (*startp) + (thick - thin);
- break;
- case CURSOR_HALF:
- *startp = nlines / 2;
- *endp = nlines;
- break;
- case CURSOR_THIN:
- *startp = nlines - (1 + thin);
- *endp = nlines;
- break;
- case CURSOR_NORMAL:
- default:
- *startp = nlines - thick;
- *endp = nlines - thin;
- break;
- }
- }
- /* -------------------------------------------------------------------------- */
-
-