home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / progrmng / stk110.lzh / STKSRC.COM / MOUSE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-25  |  3.5 KB  |  78 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.1
  9.  
  10.               Copyright (C) Jari Karjala 1991
  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. /**********************************************************************
  24. * Codes for mouse button presses: 
  25. **********************************************************************/
  26. #define BUTTON_LEFT         1
  27. #define BUTTON_RIGHT        2
  28. #define BUTTON_MS_MIDDLE    (BUTTON_RIGHT | BUTTON_LEFT)
  29. #define BUTTON_MIDDLE       4
  30.  
  31.  
  32. typedef unsigned int MOUSE_POINTER[2][16];
  33. /**********************************************************************
  34. * The mouse cursor datatype.
  35. * First mask and then shape bitmap (must be WORDs) 
  36. **********************************************************************/
  37.  
  38. /**********************************************************************
  39. * Predefined mouse cursor shapes:
  40. **********************************************************************/
  41. #ifndef NO_EXTERNS
  42. extern MOUSE_POINTER mouse_pointer_arrow;    /* HotSpot 1,1   */
  43. extern MOUSE_POINTER mouse_pointer_hourglass;/* HotSpot 7,7  */
  44. extern MOUSE_POINTER mouse_pointer_cross;    /* HotSpot 7,7   */
  45. #else
  46. #undef NO_EXTERNS
  47. #endif
  48.  
  49. /***** Function prototypes *****/
  50.  
  51. int     mouse_initialize(void);
  52. /**********************************************************************
  53. * Initialize the mouse driver, set the pointer shape to arrow,
  54. * set pointer window to full screen and enable cursor.
  55. * Return: the number of buttons or 0 if no mouse driver detected
  56. **********************************************************************/
  57.  
  58. /**********************************************************************
  59. * For the following functions, see the mouse documention
  60. **********************************************************************/
  61. int     mouse_driver_init(void);                                /**  0 **/
  62. void    mouse_show_pointer(void);                               /**  1 **/
  63. void    mouse_hide_pointer(void);                               /**  2 **/
  64. void    mouse_get_pointer_xy(int *x, int *y);                   /**  3 **/
  65. void    mouse_get_rel_pointer_xy(int *x, int *y);               /** 11 **/
  66. int     mouse_get_buttons(void);                                /**  3 **/
  67. int     mouse_get_presses(int buttons);                         /**  5 **/
  68. int     mouse_get_releases(int buttons);                        /**  6 **/
  69. void    mouse_set_pointer_xy(int x, int y);                     /**  4 **/
  70. void    mouse_set_sensitivity(int x, int y);                    /** 15 **/
  71. void    mouse_set_pointer_shape(int HotX, int HotY, MOUSE_POINTER shape);
  72. void    mouse_set_pointer_window(int a, int b, int c, int d);    /**  7 **/
  73. void    mouse_disable_pointer_window(int a, int b, int c, int d);/** 16 **/
  74. void    mouse_set_light_pen(int a);                         /** 13 & 14 **/
  75.  
  76. #endif
  77.