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 /* From pp_input_event.idl modified Wed Jul 20 11:21:44 2011. */ | 6 /* From pp_input_event.idl modified Thu Aug 11 14:47:50 2011. */ |
7 | 7 |
8 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ | 8 #ifndef PPAPI_C_PP_INPUT_EVENT_H_ |
9 #define PPAPI_C_PP_INPUT_EVENT_H_ | 9 #define PPAPI_C_PP_INPUT_EVENT_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_macros.h" | 12 #include "ppapi/c/pp_macros.h" |
13 #include "ppapi/c/pp_stdint.h" | 13 #include "ppapi/c/pp_stdint.h" |
14 #include "ppapi/c/ppb_input_event.h" | 14 #include "ppapi/c/ppb_input_event.h" |
15 | 15 |
16 /** | 16 /** |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 * The <code>PP_InputEvent_Wheel</code> struct represents all mouse wheel | 130 * The <code>PP_InputEvent_Wheel</code> struct represents all mouse wheel |
131 * events. | 131 * events. |
132 */ | 132 */ |
133 struct PP_InputEvent_Wheel { | 133 struct PP_InputEvent_Wheel { |
134 /** | 134 /** |
135 * This value represents a combination of the <code>EVENT_MODIFIER</code> | 135 * This value represents a combination of the <code>EVENT_MODIFIER</code> |
136 * flags. | 136 * flags. |
137 */ | 137 */ |
138 uint32_t modifier; | 138 uint32_t modifier; |
139 /** | 139 /** |
140 * Indicates the amount vertically and horizontally the user has requested | 140 * The mouse wheel's horizontal scroll amount. A scroll to the right |
141 * to scroll by with their mouse wheel. A scroll down or to the right (where | 141 * (where the content moves left) is represented as positive values, |
142 * the content moves up or left) is represented as positive values, and | 142 * and a scroll to the left (where the content moves right) is |
143 * a scroll up or to the left (where the content moves down or right) is | |
144 * represented as negative values. | 143 * represented as negative values. |
145 * | 144 * |
146 * The units are either in pixels (when scroll_by_page is false) or pages | 145 * The units are either in pixels (when scroll_by_page is false) or pages |
147 * (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 | 146 * (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 |
148 * pixels when scroll_by_page is false, and scroll up 3 pages when | 147 * pixels when scroll_by_page is false, and scroll up 3 pages when |
149 * scroll_by_page is true. | 148 * scroll_by_page is true. |
150 * | 149 * |
151 * This amount is system dependent and will take into account the user's | 150 * This amount is system dependent and will take into account the user's |
152 * preferred scroll sensitivity and potentially also nonlinear acceleration | 151 * preferred scroll sensitivity and potentially also nonlinear acceleration |
153 * based on the speed of the scrolling. | 152 * based on the speed of the scrolling. |
154 * | 153 * |
155 * Devices will be of varying resolution. Some mice with large detents will | 154 * Devices will be of varying resolution. Some mice with large detents will |
156 * only generate integer scroll amounts. But fractional values are also | 155 * only generate integer scroll amounts. But fractional values are also |
157 * possible, for example, on some trackpads and newer mice that don't have | 156 * possible, for example, on some trackpads and newer mice that don't have |
158 * "clicks". | 157 * "clicks". |
159 */ | 158 */ |
160 float delta_x; | 159 float delta_x; |
161 /** This value represents */ | 160 /** |
| 161 * The mouse wheel's vertical scroll amount. A scroll down (where the |
| 162 * content moves up) is represented as positive values, and a scroll up |
| 163 * (where the content moves down) is represented as negative values. |
| 164 * |
| 165 * The units are either in pixels (when scroll_by_page is false) or pages |
| 166 * (when scroll_by_page is true). For example, delta_y = -3 means scroll up 3 |
| 167 * pixels when scroll_by_page is false, and scroll up 3 pages when |
| 168 * scroll_by_page is true. |
| 169 * |
| 170 * This amount is system dependent and will take into account the user's |
| 171 * preferred scroll sensitivity and potentially also nonlinear acceleration |
| 172 * based on the speed of the scrolling. |
| 173 * |
| 174 * Devices will be of varying resolution. Some mice with large detents will |
| 175 * only generate integer scroll amounts. But fractional values are also |
| 176 * possible, for example, on some trackpads and newer mice that don't have |
| 177 * "clicks". |
| 178 */ |
162 float delta_y; | 179 float delta_y; |
163 /** | 180 /** |
164 * The number of "clicks" of the scroll wheel that have produced the | 181 * The number of "clicks" of the scroll wheel that have produced the |
165 * event. The value may have system-specific acceleration applied to it, | 182 * event. The value may have system-specific acceleration applied to it, |
166 * depending on the device. The positive and negative meanings are the same | 183 * depending on the device. The positive and negative meanings are the same |
167 * as for <code>delta_x</code> and <code>delta_y</code>. | 184 * as for <code>delta_x</code> and <code>delta_y</code>. |
168 * | 185 * |
169 * If you are scrolling, you probably want to use the delta values above. | 186 * If you are scrolling, you probably want to use the delta values above. |
170 * These tick events can be useful if you aren't doing actual scrolling and | 187 * These tick events can be useful if you aren't doing actual scrolling and |
171 * don't want or pixel values. An example may be cycling between different | 188 * don't want or pixel values. An example may be cycling between different |
(...skipping 16 matching lines...) Expand all Loading... |
188 */ | 205 */ |
189 PP_Bool scroll_by_page; | 206 PP_Bool scroll_by_page; |
190 }; | 207 }; |
191 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Wheel, 24); | 208 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Wheel, 24); |
192 /** | 209 /** |
193 * @} | 210 * @} |
194 */ | 211 */ |
195 | 212 |
196 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ | 213 #endif /* PPAPI_C_PP_INPUT_EVENT_H_ */ |
197 | 214 |
OLD | NEW |