mipointer.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. * mipointer.h
  3. *
  4. */
  5. /*
  6. Copyright 1989, 1998 The Open Group
  7. Permission to use, copy, modify, distribute, and sell this software and its
  8. documentation for any purpose is hereby granted without fee, provided that
  9. the above copyright notice appear in all copies and that both that
  10. copyright notice and this permission notice appear in supporting
  11. documentation.
  12. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  18. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  19. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  20. Except as contained in this notice, the name of The Open Group shall not be
  21. used in advertising or otherwise to promote the sale, use or other dealings
  22. in this Software without prior written authorization from The Open Group.
  23. */
  24. #ifndef MIPOINTER_H
  25. #define MIPOINTER_H
  26. #include "cursor.h"
  27. #include "input.h"
  28. typedef struct _miPointerSpriteFuncRec {
  29. Bool (*RealizeCursor)(
  30. ScreenPtr /* pScr */,
  31. CursorPtr /* pCurs */
  32. );
  33. Bool (*UnrealizeCursor)(
  34. ScreenPtr /* pScr */,
  35. CursorPtr /* pCurs */
  36. );
  37. void (*SetCursor)(
  38. ScreenPtr /* pScr */,
  39. CursorPtr /* pCurs */,
  40. int /* x */,
  41. int /* y */
  42. );
  43. void (*MoveCursor)(
  44. ScreenPtr /* pScr */,
  45. int /* x */,
  46. int /* y */
  47. );
  48. } miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
  49. typedef struct _miPointerScreenFuncRec {
  50. Bool (*CursorOffScreen)(
  51. ScreenPtr* /* ppScr */,
  52. int* /* px */,
  53. int* /* py */
  54. );
  55. void (*CrossScreen)(
  56. ScreenPtr /* pScr */,
  57. int /* entering */
  58. );
  59. void (*WarpCursor)(
  60. ScreenPtr /* pScr */,
  61. int /* x */,
  62. int /* y */
  63. );
  64. void (*EnqueueEvent)(
  65. xEventPtr /* event */
  66. );
  67. void (*NewEventScreen)(
  68. ScreenPtr /* pScr */,
  69. Bool /* fromDIX */
  70. );
  71. } miPointerScreenFuncRec, *miPointerScreenFuncPtr;
  72. extern Bool miDCInitialize(
  73. ScreenPtr /*pScreen*/,
  74. miPointerScreenFuncRec * /*screenFuncs*/
  75. );
  76. extern Bool miPointerInitialize(
  77. ScreenPtr /*pScreen*/,
  78. const miPointerSpriteFuncRec * /*spriteFuncs*/,
  79. miPointerScreenFuncPtr /*screenFuncs*/,
  80. Bool /*waitForUpdate*/
  81. );
  82. extern void miPointerWarpCursor(
  83. ScreenPtr /*pScreen*/,
  84. int /*x*/,
  85. int /*y*/
  86. );
  87. extern int miPointerGetMotionBufferSize(
  88. void
  89. );
  90. extern int miPointerGetMotionEvents(
  91. DeviceIntPtr /*pPtr*/,
  92. xTimecoord * /*coords*/,
  93. unsigned long /*start*/,
  94. unsigned long /*stop*/,
  95. ScreenPtr /*pScreen*/
  96. );
  97. extern void miPointerUpdate(
  98. void
  99. );
  100. extern void miPointerDeltaCursor(
  101. int /*dx*/,
  102. int /*dy*/,
  103. unsigned long /*time*/
  104. );
  105. extern void miPointerAbsoluteCursor(
  106. int /*x*/,
  107. int /*y*/,
  108. unsigned long /*time*/
  109. );
  110. extern void miPointerPosition(
  111. int * /*x*/,
  112. int * /*y*/
  113. );
  114. extern void miPointerSetNewScreen(
  115. int, /*screen_no*/
  116. int, /*x*/
  117. int /*y*/
  118. );
  119. extern ScreenPtr miPointerCurrentScreen(
  120. void
  121. );
  122. extern void miRegisterPointerDevice(
  123. ScreenPtr /*pScreen*/,
  124. DeviceIntPtr /*pDevice*/
  125. );
  126. extern int miPointerScreenIndex;
  127. #endif /* MIPOINTER_H */