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

  1. /*
  2.     digcursl.c
  3.  
  4.     % Function for getting cursor size given cursor type.
  5.  
  6.     5/16/88  by Ted.
  7.     Extracted from pcfuncs.c
  8.  
  9.     OWL 1.1
  10.     Copyright (c) 1988, by Oakland Group, Inc.
  11.     ALL RIGHTS RESERVED.
  12.  
  13.     Revision History:
  14.     -----------------
  15. */
  16.  
  17. #include "oakhead.h"
  18. #include "disppriv.h"
  19. #include "digutil.h"
  20. /* -------------------------------------------------------------------------- */
  21.  
  22. void DIGPRIV dig_getcurslines(ctype, nlines, startp, endp)
  23.     cursortype ctype;
  24.     opcoord nlines;
  25.     opcoord *startp;
  26.     opcoord *endp;
  27. {
  28.     opcoord thick, thin;
  29.  
  30.     thick = 2*(nlines/8);
  31.     thin = nlines/15;
  32.  
  33.     switch(ctype) {
  34.     case CURSOR_NONE:
  35.         *startp = 32;            /* special start value for no bios cursor */
  36.         *endp   = 1;            /* special end value for no bios cursor */
  37.         break;
  38.     case CURSOR_BLOCK:
  39.         *startp = 0;            /* start value */
  40.         *endp   = nlines;
  41.         break;
  42.     case CURSOR_DASH:
  43.         *startp = nlines / 2;
  44.         *endp   = (*startp) + (thick - thin);
  45.         break;
  46.     case CURSOR_HALF:
  47.         *startp = nlines / 2;
  48.         *endp   = nlines;
  49.         break;
  50.     case CURSOR_THIN:
  51.         *startp = nlines - (1 + thin);
  52.         *endp   = nlines;
  53.         break;
  54.     case CURSOR_NORMAL:
  55.     default:
  56.         *startp = nlines - thick;
  57.         *endp   = nlines - thin;
  58.         break;
  59.     }
  60. }
  61. /* -------------------------------------------------------------------------- */
  62.  
  63.