home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / s / s001 / 1.ddi / PFC / SRC / VIDCSRTY.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-10-19  |  1.2 KB  |  50 lines

  1. /* 88-10-10 Jahns    csr_shape[FAT] 0x0507 -> 0x0407         */
  2. /* 89-10-05 Vogt N.    csr_shape[HIDDEN] 0x2000 -> 0x3000  (mono)    */
  3. /*                     for some new HGC's with LSI chip   */
  4.  
  5.  
  6.  
  7. /* (c) 1985, Phoenix Computer Products Corp. and Novum Organum, Inc. */
  8. /***
  9. * Name:        vidcsrtyp -- change the appearance of the cursor
  10. *
  11. * Synopsis:    void    vidcsrtyp();
  12. *        int    mode;
  13. *        vidcsrtyp( mode );
  14. *
  15. * Description:    Changes the cursor appearance to one of several pre-defined
  16. *        types.
  17. *
  18. * Returns:    Nothing.
  19. *
  20. * (C) Novum Organum, Inc. 1985
  21. *
  22. ***/
  23.  
  24. #include "cptpdf.h"
  25. #include "psys.h"
  26.  
  27. static    _csr_type=CSR_NORMAL;
  28.  
  29. vidcsrtyp ( type )
  30.     int    type;
  31. {
  32. static    ushort    csr_shape[2][6] =
  33. /* HIDDEN, THIN ,NORMAL, FAT  ,BLOCK , DASH        cursor appearance    */
  34.  {{0x2000,0x0707,0x0607,0x0407,0x0007,0x0404},    /* for RGB screen    */
  35.   {0x3000,0x0D0D,0x0C0D,0x090D,0x000D,0x0707}}; /* for monochrome screen*/
  36.  
  37.     REGIS    regs;
  38.     int    prv;
  39.  
  40.     if (type == CSR_GET) return(_csr_type);
  41.  
  42.     type %= 6;
  43.     regs.ax = TOHIBYTE(V_SETCURSTYP);
  44.     regs.cx = csr_shape[ (vidgetmode()==VM_MONOCHROME) ][ type ];
  45.     syivexe( V_VID_INTRPT, ®s );
  46.     prv = _csr_type;
  47.     _csr_type = type;
  48.     return (prv);
  49. }
  50.