home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / STK100.ZIP / STKSRC.COM / MOUSE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-10-20  |  2.8 KB  |  64 lines

  1. /**********************************************************************
  2. * mouse.h
  3. * The mouse interface through INT 33.
  4. * NOTE: The pointer is not visible in the 2nd page of a Hercules card
  5. **********************************************************************
  6.                     This file is part of
  7.  
  8.          STK -- The sprite toolkit -- version 1.0
  9.  
  10.               Copyright (C) Jari Karjala 1990
  11.  
  12. The sprite toolkit (STK) is a FreeWare toolkit for creating high
  13. resolution sprite graphics with PCompatible hardware. This toolkit 
  14. is provided as is without any warranty or such thing. See the file
  15. COPYING for further information.
  16.  
  17. **********************************************************************
  18. **********************************************************************/
  19.  
  20. #if     !defined(__MOUSE_H_)
  21. #define __MOUSE_H_
  22.  
  23. /** Codes for button presses **/
  24. #define BUTTON_LEFT         1
  25. #define BUTTON_RIGHT        2
  26. #define BUTTON_MS_MIDDLE    (BUTTON_RIGHT | BUTTON_LEFT)
  27. #define BUTTON_MIDDLE       4
  28.  
  29. /* First mask and then shape bitmap (must be WORDs) */
  30. typedef unsigned int MOUSE_POINTER[2][16];
  31.  
  32. #ifndef NO_EXTERNS
  33. extern MOUSE_POINTER mouse_pointer_arrow;    /* HotSpot 1,1   */
  34. extern MOUSE_POINTER mouse_pointer_hourglass;/* HotSpot 7,7  */
  35. extern MOUSE_POINTER mouse_pointer_cross;    /* HotSpot 7,7   */
  36. #else
  37. #undef NO_EXTERNS
  38. #endif
  39.  
  40. /** For further information, see the mouse documention **/
  41. int     mouse_driver_init(void);                                /**  0 **/
  42. void    mouse_show_pointer(void);                               /**  1 **/
  43. void    mouse_hide_pointer(void);                               /**  2 **/
  44. void    mouse_get_pointer_xy(int *x, int *y);                   /**  3 **/
  45. void    mouse_get_rel_pointer_xy(int *x, int *y);               /** 11 **/
  46. int     mouse_get_buttons(void);                                /**  3 **/
  47. int     mouse_get_presses(int buttons);                         /**  5 **/
  48. int     mouse_get_releases(int buttons);                        /**  6 **/
  49. void    mouse_set_pointer_xy(int x, int y);                     /**  4 **/
  50. void    mouse_set_sensitivity(int x, int y);                    /** 15 **/
  51. void    mouse_set_pointer_shape(int HotX, int HotY, MOUSE_POINTER shape);
  52. void    mouse_set_pointer_window(int a, int b, int c, int d);    /**  7 **/
  53. void    mouse_disable_pointer_window(int a, int b, int c, int d);/** 16 **/
  54. void    mouse_set_light_pen(int a);                         /** 13 & 14 **/
  55.  
  56. /**********************************************************************
  57. * Initialize the mouse driver, set the pointer shape and pointer window.
  58. * Return: the number of buttons or 0 if no mouse driver detected
  59. **********************************************************************/
  60. int     mouse_initialize(void);
  61.  
  62. #endif
  63.