home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / UDEL.ZIP / SFMOU.H < prev    next >
Text File  |  1988-08-16  |  6KB  |  124 lines

  1. /******************************************************************************
  2. *   sfmou.h    standart mouse routines to run under Os/2 version 1.0          *
  3. *                                                                             *
  4. *                                                                             *
  5. *                                                                             *
  6. *                                                        07/10/88             *
  7. ******************************************************************************/
  8.  
  9.  
  10. #define M_NO_WAIT  0      /*  do not wait for mouse action */
  11.  
  12. #define M_WAIT     1      /*  wait for mouse action */
  13.  
  14. #define NO_MOUSE   0     /*  mouse wait failed */
  15.  
  16.  
  17. struct MOUPOS {
  18.                 USHORT row;
  19.                 USHORT col;
  20.               };
  21.  
  22.  
  23.  
  24.  
  25.  
  26. void sfmou_open(char *,HMOU *);
  27. /* char *mousys;
  28.    HMOU *mouse;  */
  29. /******************************************************************************
  30. *   sfmou_open    opens mouse for use in your application                     *
  31. *                       returns  mouse  a handle for other calls              *
  32. *                       mousys most contains the name of your pointer draw    *
  33. *                       device defineed in your config file                   *
  34. *                       use "point01.sys"                                     *
  35. *                       Note pass 0 as mousys to get default pointer draw     *
  36. *                       defined in your config.                               *
  37. *                                                                             *
  38. *   NOTE: must call sfmou_draw_ptr to start showing mouse                     *
  39. *                                                                             *
  40. *   note: mouse will have value NO_MOUSE if mouse opens fails.                *
  41. ******************************************************************************/
  42.  
  43.  
  44.  
  45. void sfmou_draw_ptr(HMOU);
  46. /* HMOU mouse; */
  47. /******************************************************************************
  48. *  sfmou_draw_ptr   -  start displaying mouse pointer                         *
  49. ******************************************************************************/
  50.  
  51.  
  52. void sfmou_read(int *,int *,int *,int *,int *,int *,int *,HMOU);
  53. /* int *event, *b1, *b2, *b3, *row, *col;
  54.   int *wait;
  55.   HMOU mouse; */
  56. /******************************************************************************
  57. *  sfmou_read_mouse   read mouse event que and returns the following          *
  58. *                                                                             *
  59. *                     event = 1 if no buttons pushed since last read put      *
  60. *                               there is mouse movement                       *
  61. *                                                                             *
  62. *                     b1 - b3   mouse buttons 1 - 3   1 = mouse button action *
  63. *                                                     2 = Action and movement *
  64. *                                                                             *
  65. *                     row       current row position                          *
  66. *                                                                             *
  67. *                     col       current col position                          *
  68. *                                                                             *
  69. *                     wait      0 do not wait for mouse action                *
  70. *                               1 wait for mouse action                       *
  71. *                                                                             *
  72. *                     mouse     mouse handle from sfmou_open                  *
  73. ******************************************************************************/
  74.  
  75.  
  76. void sfmou_hide_ptr(NOPTRRECT *,HMOU);
  77. /* NOPTRRECT *pa;
  78.   HMOU  mouse; */
  79. /******************************************************************************
  80. *  sfmou_hide  -  nda is a data stucture that sets the area where mouse       *
  81. *                 pointer will be hidden when in the define area              *
  82. *                 the sub field names are   nda.row lower row area            *
  83. *                                           nda.col lower col area            *
  84. *                                           nda.cRow upper row area           *
  85. *                                           nda.cCol upper col area           *
  86. ******************************************************************************/
  87.  
  88.  
  89. void sfmou_set_ptr_loc(int,int,HMOU);
  90. /* int row, col;
  91.    HMOU  mouse; */
  92. /******************************************************************************
  93. * sfmou_set_ptr_loc  moves mouse pointer row, col specified                   *
  94. ******************************************************************************/
  95.  
  96.  
  97. void sfmou_get_ptr_loc(int *,int *,HMOU);
  98. /*
  99. int *mx, *my;
  100. HMOU mouse;
  101. /*
  102. /******************************************************************************
  103. * sfmou_get_ptr_loc  get the mouse current pointer position x, y              *
  104. ******************************************************************************/
  105.  
  106.  
  107. void sfmou_flush(HMOU);
  108. /* HMOU mouse; */
  109. /******************************************************************************
  110. * sfmou_flush_mouse  removes all mouse input from mouse que                   *
  111. ******************************************************************************/
  112.  
  113.  
  114.  
  115.  
  116.  
  117. void sfmou_close(HMOU);
  118. /* HMOU mouse; */
  119. /*******************************************************************************
  120. *  sfmou_close_mouse   -  closes the mouse.                                    *
  121. *******************************************************************************/
  122.  
  123.  
  124.