home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / VOGLE.ZIP / VOGLE / DRIVERS / IBMPC / PC_LOCAT.C < prev    next >
C/C++ Source or Header  |  2000-02-11  |  327b  |  28 lines

  1. #include "vogle.h"
  2.  
  3. static    int    have_mouse = 0;
  4.  
  5. pc_locinit(x, y)
  6.     int    x, y;
  7. {
  8.     if ((have_mouse = ismouse(x, y))) 
  9.         showmouse();
  10. }
  11.  
  12. int
  13. pc_locator(x, y)
  14.     int *x, *y;
  15. {
  16.     int ix, iy, b;
  17.  
  18.     if (!have_mouse) 
  19.         return (-1);
  20.  
  21.  
  22.     b = readmouse(&ix, &iy);
  23.  
  24.     *x = ix;
  25.     *y = vdevice.sizeSy - iy;
  26.     return (b);
  27. }
  28.