accessibility_controller_enums.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_PUBLIC_CPP_ACCESSIBILITY_CONTROLLER_ENUMS_H_
  5. #define ASH_PUBLIC_CPP_ACCESSIBILITY_CONTROLLER_ENUMS_H_
  6. namespace ash {
  7. // Alert sent to the accessibility api.
  8. enum class AccessibilityAlert {
  9. // Default value, indicates no accessibility alert.
  10. NONE,
  11. // When caps lock is turned on.
  12. CAPS_ON,
  13. // When caps lock is turned off.
  14. CAPS_OFF,
  15. // When screen is turned on by tablet power button.
  16. SCREEN_ON,
  17. // When screen is turned off by tablet power button.
  18. SCREEN_OFF,
  19. // When window moved to another display by accelerators.
  20. WINDOW_MOVED_TO_ANOTHER_DISPLAY,
  21. // When the user attempts a keyboard command that requires a window to work,
  22. // and none is available.
  23. WINDOW_NEEDED,
  24. // When the user enters window overview mode.
  25. WINDOW_OVERVIEW_MODE_ENTERED,
  26. // When workspace state just changed to WorkspaceWindowState::kFullscreen.
  27. WORKSPACE_FULLSCREEN_STATE_ENTERED,
  28. // When workspace state just changed from WorkspaceWindowState::kFullscreen.
  29. // to others.
  30. WORKSPACE_FULLSCREEN_STATE_EXITED,
  31. // When the user enters desk templates mode.
  32. DESK_TEMPLATES_MODE_ENTERED
  33. };
  34. enum class AccessibilityPanelState {
  35. // Window bounds are set explicitly.
  36. BOUNDED,
  37. // Width of panel matches screen width, y_coord and height are set by bounds.
  38. FULL_WIDTH,
  39. // Panel occupies the full screen. Bounds are ignored.
  40. FULLSCREEN
  41. };
  42. // These values are persisted to logs and should not be renumbered or re-used.
  43. // See tools/metrics/histograms/enums.xml.
  44. enum class DictationToggleSource {
  45. // Toggled by the keyboard command (Search + D).
  46. kKeyboard,
  47. // Toggled by the dictation button in the tray.
  48. kButton,
  49. // Switch Access context menu button.
  50. kSwitchAccess,
  51. // Chromevox chrome extension.
  52. kChromevox,
  53. // Accessibility Common chrome extension.
  54. kAccessibilityCommon,
  55. kMaxValue = kAccessibilityCommon
  56. };
  57. enum class SelectToSpeakState {
  58. // Select to Speak is not actively selecting text or speaking.
  59. kSelectToSpeakStateInactive,
  60. // Select to Speak is being used to actively select a new region. Note that
  61. // it might also be speaking, but the selecting state takes precedence.
  62. kSelectToSpeakStateSelecting,
  63. // Select to Speak is currently speaking.
  64. kSelectToSpeakStateSpeaking,
  65. };
  66. enum class SelectToSpeakPanelAction {
  67. // No action.
  68. kNone,
  69. // Navigate to previous paragraph/block.
  70. kPreviousParagraph,
  71. // Navigate to previous sentence.
  72. kPreviousSentence,
  73. // Pause text-to-speech.
  74. kPause,
  75. // Resumes text-to-speech.
  76. kResume,
  77. // Navigate to next sentence.
  78. kNextSentence,
  79. // Navigate to next paragraph/block.
  80. kNextParagraph,
  81. // Exit Select-to-speak.
  82. kExit,
  83. // Change reading speed.
  84. kChangeSpeed,
  85. };
  86. enum class SwitchAccessCommand {
  87. // Do not perform a command.
  88. kNone,
  89. // Command to select the focused element.
  90. kSelect,
  91. // Command to move focus to the next element.
  92. kNext,
  93. // Command to move focus to the previous element.
  94. kPrevious,
  95. };
  96. enum class MagnifierCommand {
  97. // Stop moving magnifier viewport.
  98. kMoveStop,
  99. // Command to move magnifier viewport up.
  100. kMoveUp,
  101. // Command to move magnifier viewport down.
  102. kMoveDown,
  103. // Command to move magnifier viewport left.
  104. kMoveLeft,
  105. // Command to move magnifier viewport right.
  106. kMoveRight,
  107. };
  108. // The type of mouse event the Automatic Clicks feature should perform when
  109. // dwelling. These values are written to prefs and correspond to
  110. // AutoclickActionType in enums.xml, so should not be changed. New values
  111. // should be added at the end.
  112. enum class AutoclickEventType {
  113. // Perform a left click.
  114. kLeftClick = 0,
  115. // Perform a right click.
  116. kRightClick = 1,
  117. // Perform a drag and drop, i.e. click down at the first dwell, and up at the
  118. // second dwell.
  119. kDragAndDrop = 2,
  120. // Perform a double-click.
  121. kDoubleClick = 3,
  122. // A non-action, i.e. nothing will happen at the end of the dwell time.
  123. kNoAction = 4,
  124. // A mousewheel scroll action. An additional menu will be shown for the user
  125. // to pick whether they want to scroll up/down/left/right.
  126. kScroll = 5,
  127. kMaxValue = kScroll
  128. };
  129. // Display location of the on-screen floating menus used by accessibility
  130. // features(e.g. the Automatic Clicks) . These values are written to prefs so
  131. // they should not be changed. New values should be added at the end.
  132. enum class FloatingMenuPosition {
  133. // The bottom right of the screen.
  134. kBottomRight,
  135. // The bottom left of the screen.
  136. kBottomLeft,
  137. // The top left of the screen.
  138. kTopLeft,
  139. // The top right of the screen.
  140. kTopRight,
  141. // The default position. This will be either the bottom right in LTR languages
  142. // or the bottom right in RTL languages. Once the user explicitly picks
  143. // a position it will no longer change with language direction.
  144. kSystemDefault,
  145. };
  146. // Mouse following mode for magnifier. This indicates the way the magnified
  147. // viewport follows the mouse as it moves across the screen. These values are
  148. // written to prefs so they should not be changed. New values should be added at
  149. // the end.
  150. enum class MagnifierMouseFollowingMode {
  151. // Continuous following mode.
  152. kContinuous = 0,
  153. // Centered following mode.
  154. kCentered = 1,
  155. // Edge following mode.
  156. kEdge = 2,
  157. kMaxValue = kEdge
  158. };
  159. // The icon shown in the Dictation bubble UI. This enum should be kept in sync
  160. // with chrome.accessibilityPrivate.DictationBubbleIconType.
  161. enum class DictationBubbleIconType {
  162. kHidden,
  163. kStandby,
  164. kMacroSuccess,
  165. kMacroFail,
  166. };
  167. // Hints that can show up in the Dictation bubble UI. This enum should be kept
  168. // in sync with chrome.accessibilityPrivate.DictationBubbleHintType.
  169. enum class DictationBubbleHintType {
  170. kTrySaying,
  171. kType,
  172. kDelete,
  173. kSelectAll,
  174. kUndo,
  175. kHelp,
  176. kUnselect,
  177. kCopy,
  178. };
  179. } // namespace ash
  180. #endif // ASH_PUBLIC_CPP_ACCESSIBILITY_CONTROLLER_ENUMS_H_