Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
4.2 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: access.h
  3. *
  4. * Copyright (c) 1985 - 1999, Microsoft Corporation
  5. *
  6. * Typedefs, defines, and prototypes that are used by the accessibility
  7. * routines and the various routines that call them (input routines and
  8. * SystemParametersInfo).
  9. *
  10. * History:
  11. * 11 Feb 93 GregoryW Created
  12. \***************************************************************************/
  13. #ifndef _ACCESS_
  14. #define _ACCESS_
  15. /*
  16. * Main accessibility routine entry points.
  17. */
  18. typedef BOOL (* ACCESSIBILITYPROC)(PKE, ULONG, int);
  19. BOOL FilterKeys(PKE, ULONG, int);
  20. BOOL xxxStickyKeys(PKE, ULONG, int);
  21. BOOL MouseKeys(PKE, ULONG, int);
  22. BOOL ToggleKeys(PKE, ULONG, int);
  23. BOOL HighContrastHotKey(PKE, ULONG, int);
  24. BOOL UtilityManager(PKE, ULONG, int);
  25. BOOL AccessProceduresStream(PKE, ULONG, int);
  26. VOID SetAccessEnabledFlag(VOID);
  27. VOID StopFilterKeysTimers(VOID);
  28. /*
  29. * Sound support.
  30. */
  31. typedef BOOL (* BEEPPROC)(void);
  32. BOOL HighBeep(void);
  33. BOOL LowBeep(void);
  34. BOOL KeyClick(void);
  35. BOOL UpSiren(void);
  36. BOOL DownSiren(void);
  37. BOOL DoBeep(BEEPPROC BeepProc, UINT Count);
  38. /*
  39. * Macros for dwFlags support
  40. */
  41. #define TEST_ACCESSFLAG(s, f) TEST_FLAG(g##s.dwFlags, f)
  42. #define TEST_BOOL_ACCESSFLAG(s, f) TEST_BOOL_FLAG(g##s.dwFlags, f)
  43. #define SET_ACCESSFLAG(s, f) SET_FLAG(g##s.dwFlags, f)
  44. #define CLEAR_ACCESSFLAG(s, f) CLEAR_FLAG(g##s.dwFlags, f)
  45. #define SET_OR_CLEAR_ACCESSFLAG(s, f, fSet) SET_OR_CLEAR_FLAG(g##s.dwFlags, f, fSet)
  46. #define TOGGLE_ACCESSFLAG(s, f) TOGGLE_FLAG(g##s.dwFlags, f)
  47. #define RIGHTSHIFTBIT 0x2
  48. #define ONLYRIGHTSHIFTDOWN(state) ((state) == RIGHTSHIFTBIT)
  49. #define FKFIRSTWARNINGTIME 4000
  50. #define FKACTIVATIONDELTA 4000
  51. #define FKEMERGENCY1DELTA 4000
  52. #define FKEMERGENCY2DELTA 4000
  53. //
  54. // Warning: do not change the ordering of these.
  55. //
  56. #define FKIDLE 0
  57. #define FKFIRSTWARNING 1
  58. #define FKTOGGLE 2
  59. #define FKFIRSTLEVELEMERGENCY 3
  60. #define FKSECONDLEVELEMERGENCY 4
  61. #define FKMOUSEMOVE 8
  62. /*
  63. * StickyKeys support.
  64. */
  65. #define TOGGLE_STICKYKEYS_COUNT 5
  66. #define UNION(x, y) ((x) | (y))
  67. #define LEFTSHIFTKEY(key) (((key) & 0xff) == VK_LSHIFT)
  68. #define RIGHTSHIFTKEY(key) (((key) & 0xff) == VK_RSHIFT)
  69. #define LEFTORRIGHTSHIFTKEY(key) (LEFTSHIFTKEY(key) || RIGHTSHIFTKEY(key))
  70. BOOL xxxTwoKeysDown(int);
  71. VOID SetGlobalCursorLevel(INT iCursorLevel);
  72. VOID xxxUpdateModifierState(int, int);
  73. VOID xxxTurnOffStickyKeys(VOID);
  74. VOID xxxHardwareMouseKeyUp(DWORD);
  75. /*
  76. * ToggleKeys support.
  77. */
  78. #define TOGGLEKEYTOGGLETIME 5000
  79. /*
  80. * MouseKeys support.
  81. */
  82. //
  83. // Parameter Constants for xxxButtonEvent()
  84. //
  85. #define MOUSE_BUTTON_LEFT 0x0001
  86. #define MOUSE_BUTTON_RIGHT 0x0002
  87. #define MOUSEKEYMODBITS 0x11
  88. #define LRALT 0x30
  89. #define LRCONTROL 0x0c
  90. #define LRSHIFT 0x03
  91. #define LRWIN 0xc0
  92. #define VK_U 0x55
  93. //
  94. // Mouse cursor movement data.
  95. //
  96. #define MK_UP 0xFF00
  97. #define MK_DOWN 0x0100
  98. #define MK_RIGHT 0x0001
  99. #define MK_LEFT 0x00FF
  100. #define MOUSETIMERRATE 50
  101. #define MOUSETICKS (1000 / MOUSETIMERRATE)
  102. /*
  103. * Factor for high-speed movement.
  104. */
  105. #define MK_CONTROL_SPEED 4
  106. /*
  107. * Valid ranges and default values.
  108. */
  109. #define MAXSPEED_MIN (10)
  110. #define MAXSPEED_MAX (360)
  111. #define MAXSPEED_DEF (40)
  112. #define TIMETOMAXSPEED_MIN (1000)
  113. #define TIMETOMAXSPEED_MAX (5000)
  114. #define TIMETOMAXSPEED_DEF (3000)
  115. typedef BOOL (* MOUSEPROC)(USHORT);
  116. VOID TurnOffMouseKeys(VOID);
  117. BOOL xxxMKButtonClick(USHORT);
  118. BOOL xxxMKMouseMove(USHORT);
  119. BOOL xxxMKButtonSetState(USHORT);
  120. BOOL MKButtonSelect(USHORT);
  121. BOOL xxxMKButtonDoubleClick(USHORT);
  122. BOOL xxxMKToggleMouseKeys(USHORT);
  123. VOID MKShowMouseCursor(VOID);
  124. VOID MKHideMouseCursor(VOID);
  125. VOID CalculateMouseTable(VOID);
  126. /*
  127. * TimeOut support.
  128. */
  129. VOID AccessTimeOutReset(VOID);
  130. VOID xxxAccessTimeOutTimer(PWND, UINT, UINT_PTR, LPARAM);
  131. /*
  132. * SoundSentry support.
  133. */
  134. BOOL _UserSoundSentryWorker(VOID);
  135. #endif // !_ACCESS_