| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the API used to handle mouse and keyboard input events. | 7 * This file defines the API used to handle mouse and keyboard input events. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 * events. | 121 * events. |
| 122 */ | 122 */ |
| 123 [assert_size(24)] struct PP_InputEvent_Wheel { | 123 [assert_size(24)] struct PP_InputEvent_Wheel { |
| 124 /** | 124 /** |
| 125 * This value represents a combination of the <code>EVENT_MODIFIER</code> | 125 * This value represents a combination of the <code>EVENT_MODIFIER</code> |
| 126 * flags. | 126 * flags. |
| 127 */ | 127 */ |
| 128 uint32_t modifier; | 128 uint32_t modifier; |
| 129 | 129 |
| 130 /** | 130 /** |
| 131 * Indicates the amount vertically and horizontally the user has requested | 131 * The mouse wheel's horizontal scroll amount. A scroll to the right |
| 132 * to scroll by with their mouse wheel. A scroll down or to the right (where | 132 * (where the content moves left) is represented as positive values, |
| 133 * the content moves up or left) is represented as positive values, and | 133 * and a scroll to the left (where the content moves right) is |
| 134 * a scroll up or to the left (where the content moves down or right) is | |
| 135 * represented as negative values. | 134 * represented as negative values. |
| 136 * | 135 * |
| 137 * The units are either in pixels (when scroll_by_page is false) or pages | 136 * The units are either in pixels (when scroll_by_page is false) or pages |
| 138 * (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 | 137 * (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 |
| 139 * pixels when scroll_by_page is false, and scroll up 3 pages when | 138 * pixels when scroll_by_page is false, and scroll up 3 pages when |
| 140 * scroll_by_page is true. | 139 * scroll_by_page is true. |
| 141 * | 140 * |
| 142 * This amount is system dependent and will take into account the user's | 141 * This amount is system dependent and will take into account the user's |
| 143 * preferred scroll sensitivity and potentially also nonlinear acceleration | 142 * preferred scroll sensitivity and potentially also nonlinear acceleration |
| 144 * based on the speed of the scrolling. | 143 * based on the speed of the scrolling. |
| 145 * | 144 * |
| 146 * Devices will be of varying resolution. Some mice with large detents will | 145 * Devices will be of varying resolution. Some mice with large detents will |
| 147 * only generate integer scroll amounts. But fractional values are also | 146 * only generate integer scroll amounts. But fractional values are also |
| 148 * possible, for example, on some trackpads and newer mice that don't have | 147 * possible, for example, on some trackpads and newer mice that don't have |
| 149 * "clicks". | 148 * "clicks". |
| 150 */ | 149 */ |
| 151 float_t delta_x; | 150 float_t delta_x; |
| 152 | 151 |
| 153 /** This value represents */ | 152 /** |
| 153 * The mouse wheel's vertical scroll amount. A scroll down (where the |
| 154 * content moves up) is represented as positive values, and a scroll up |
| 155 * (where the content moves down) is represented as negative values. |
| 156 * |
| 157 * The units are either in pixels (when scroll_by_page is false) or pages |
| 158 * (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 |
| 159 * pixels when scroll_by_page is false, and scroll up 3 pages when |
| 160 * scroll_by_page is true. |
| 161 * |
| 162 * This amount is system dependent and will take into account the user's |
| 163 * preferred scroll sensitivity and potentially also nonlinear acceleration |
| 164 * based on the speed of the scrolling. |
| 165 * |
| 166 * Devices will be of varying resolution. Some mice with large detents will |
| 167 * only generate integer scroll amounts. But fractional values are also |
| 168 * possible, for example, on some trackpads and newer mice that don't have |
| 169 * "clicks". |
| 170 */ |
| 154 float_t delta_y; | 171 float_t delta_y; |
| 155 | 172 |
| 156 /** | 173 /** |
| 157 * The number of "clicks" of the scroll wheel that have produced the | 174 * The number of "clicks" of the scroll wheel that have produced the |
| 158 * event. The value may have system-specific acceleration applied to it, | 175 * event. The value may have system-specific acceleration applied to it, |
| 159 * depending on the device. The positive and negative meanings are the same | 176 * depending on the device. The positive and negative meanings are the same |
| 160 * as for <code>delta_x</code> and <code>delta_y</code>. | 177 * as for <code>delta_x</code> and <code>delta_y</code>. |
| 161 * | 178 * |
| 162 * If you are scrolling, you probably want to use the delta values above. | 179 * If you are scrolling, you probably want to use the delta values above. |
| 163 * These tick events can be useful if you aren't doing actual scrolling and | 180 * These tick events can be useful if you aren't doing actual scrolling and |
| (...skipping 13 matching lines...) Expand all Loading... |
| 177 float_t wheel_ticks_y; | 194 float_t wheel_ticks_y; |
| 178 | 195 |
| 179 /** | 196 /** |
| 180 * Indicates if the scroll <code>delta_x</code>/<code>delta_y</code> | 197 * Indicates if the scroll <code>delta_x</code>/<code>delta_y</code> |
| 181 * indicates pages or lines to scroll by. When true, the user is requesting | 198 * indicates pages or lines to scroll by. When true, the user is requesting |
| 182 * to scroll by pages. | 199 * to scroll by pages. |
| 183 */ | 200 */ |
| 184 PP_Bool scroll_by_page; | 201 PP_Bool scroll_by_page; |
| 185 }; | 202 }; |
| 186 | 203 |
| OLD | NEW |