mipointrst.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * mipointrst.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. #include "mipointer.h"
  25. #include "scrnintstr.h"
  26. #define MOTION_SIZE 256
  27. typedef struct {
  28. xTimecoord event;
  29. ScreenPtr pScreen;
  30. } miHistoryRec, *miHistoryPtr;
  31. typedef struct {
  32. ScreenPtr pScreen; /* current screen */
  33. ScreenPtr pSpriteScreen;/* screen containing current sprite */
  34. CursorPtr pCursor; /* current cursor */
  35. CursorPtr pSpriteCursor;/* cursor on screen */
  36. BoxRec limits; /* current constraints */
  37. Bool confined; /* pointer can't change screens */
  38. int x, y; /* hot spot location */
  39. int devx, devy; /* sprite position */
  40. DevicePtr pPointer; /* pointer device structure */
  41. miHistoryRec history[MOTION_SIZE];
  42. int history_start, history_end;
  43. } miPointerRec, *miPointerPtr;
  44. typedef struct {
  45. const miPointerSpriteFuncRec *spriteFuncs; /* sprite-specific methods */
  46. miPointerScreenFuncPtr screenFuncs; /* screen-specific methods */
  47. CloseScreenProcPtr CloseScreen;
  48. Bool waitForUpdate; /* don't move cursor in SIGIO */
  49. Bool showTransparent; /* show empty cursors */
  50. } miPointerScreenRec, *miPointerScreenPtr;