home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / mgl11 / include / mouse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-07  |  3.0 KB  |  102 lines

  1. /****************************************************************************
  2. *
  3. *                              The MegaToolbox
  4. *
  5. *                   Copyright (C) 1993 SciTech Software
  6. *                            All rights reserved.
  7. *
  8. * Filename:        $RCSfile: mouse.h $
  9. * Version:        $Revision: 1.3 $
  10. *
  11. * Language:        ANSI C
  12. * Environment:    any
  13. *
  14. * Description:    Header file for the mouse interface module.
  15. *
  16. *    For full compatibility with this module, you must have one of the
  17. *    following mice:
  18. *
  19. *        -    Microsoft Mouse version 6.1 or later, or any mouse compatible
  20. *            with this mouse.
  21. *        -    Logitech Mouse version 3.4 or later.
  22. *        -    Mouse Systems' PC Mouse version 6.22 or later.
  23. *        -    IMSI mouse version 6.11 or later.
  24. *
  25. * $Id: mouse.h 1.3 1994/03/06 07:53:13 kjb release $
  26. *
  27. ****************************************************************************/
  28.  
  29. #ifndef    __MOUSE_H
  30. #define    __MOUSE_H
  31.  
  32. #ifndef __DEBUG_H
  33. #include "debug.h"
  34. #endif
  35.  
  36. /*--------------------- Macros and type definitions -----------------------*/
  37.  
  38. #define leftBut        0            /* Button types for MS_pressed() etc    */
  39. #define    rightBut    1
  40. #define middleBut    2
  41.  
  42. #define    SOFTWARE    0            /* Text cursor types                    */
  43. #define HARDWARE    1
  44.  
  45. typedef struct {                /* Mouse status structure                */
  46.     int            but_status;        /* Which buttons are currently down        */
  47.     int            but_count;        /* Number of presses for button            */
  48.     int            x;                /* Position of last button press h        */
  49.     int            y;                /* Position of last button press v        */
  50.     } ms_status;
  51.  
  52. typedef struct {                /* Interrupt subroutine info structure    */
  53.     void        *addr;            /* Address of interrupt subroutine        */
  54.     int            mask;            /* Mask for subroutine                    */
  55.     } intsub;
  56.  
  57. typedef    unsigned int bits16[16];
  58.  
  59. typedef    struct {                /* Graphical cursor structure            */
  60.     bits16        screenmask;
  61.     bits16        cursormask;
  62.     int            hotspot_x;
  63.     int            hotspot_y;
  64.     } cursor;
  65.  
  66. /*------------------------- Function Prototypes ---------------------------*/
  67.  
  68. #ifdef    __cplusplus
  69. extern "C" {            /* Use "C" linkage when in C++ mode    */
  70. #endif
  71.  
  72. int        PUBAPI MS_init(void);
  73. void    PUBAPI MS_exit(void);
  74. void    PUBAPI MS_suspend(void);
  75. void    PUBAPI MS_resume(void);
  76. int        PUBAPI MS_hardReset(void);
  77. void    PUBAPI MS_show(void);
  78. void    PUBAPI MS_hide(void);
  79. void    PUBAPI MS_pos(ms_status *stat);
  80. void    PUBAPI MS_moveTo(int h,int v);
  81. void    PUBAPI MS_pressed(int which,ms_status *stat);
  82. void    PUBAPI MS_released(int which,ms_status *stat);
  83. void    PUBAPI MS_constrain(int left,int top,int right,int bottom);
  84. void    PUBAPI MS_setCursor(cursor *curs);
  85. void    PUBAPI MS_setTextCursor(int type,int screenMask,int cursorMask);
  86. void    PUBAPI MS_motion(int *h,int *v);
  87. void    PUBAPI MS_speed(int hratio,int vratio);
  88. void    PUBAPI MS_dblSpeed(int threshold);
  89. void     PUBAPI MS_swapIntSub(int num,intsub *newSub,intsub *oldSub);
  90. int     PUBAPI MS_stateSize(void);
  91. void    PUBAPI MS_saveState(void *theState);
  92. void    PUBAPI MS_restoreState(void *theState);
  93. void    PUBAPI MS_setCrtPage(int page);
  94. int        PUBAPI MS_getCrtPage(void);
  95. int        PUBAPI MS_softReset(void);
  96.  
  97. #ifdef    __cplusplus
  98. }                        /* End of "C" linkage for C++    */
  99. #endif
  100.  
  101. #endif  /* __MOUSE_H */
  102.