Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: ppapi/api/ppb_input_event.idl

Issue 10905131: Update PP_InputEvent_Modifier enum to match WebInputEvent::Modifiers (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ppapi/c/ppb_input_event.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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 Input Event interfaces. 7 * This file defines the Input Event interfaces.
8 */ 8 */
9 9
10 label Chrome { 10 label Chrome {
11 M13 = 1.0, 11 M13 = 1.0,
12 M14 = 1.1 12 M14 = 1.1
dmichael (off chromium) 2012/09/11 15:20:01 Should we consider reving this? If we leave it al
raymes 2012/09/11 21:52:01 Thanks, yeh I did think about this and in practice
13 }; 13 };
14 14
15 /** 15 /**
16 * This enumeration contains the types of input events. 16 * This enumeration contains the types of input events.
17 */ 17 */
18 [assert_size(4)] 18 [assert_size(4)]
19 enum PP_InputEvent_Type { 19 enum PP_InputEvent_Type {
20 PP_INPUTEVENT_TYPE_UNDEFINED = -1, 20 PP_INPUTEVENT_TYPE_UNDEFINED = -1,
21 21
22 /** 22 /**
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 PP_INPUTEVENT_MODIFIER_SHIFTKEY = 1 << 0, 189 PP_INPUTEVENT_MODIFIER_SHIFTKEY = 1 << 0,
190 PP_INPUTEVENT_MODIFIER_CONTROLKEY = 1 << 1, 190 PP_INPUTEVENT_MODIFIER_CONTROLKEY = 1 << 1,
191 PP_INPUTEVENT_MODIFIER_ALTKEY = 1 << 2, 191 PP_INPUTEVENT_MODIFIER_ALTKEY = 1 << 2,
192 PP_INPUTEVENT_MODIFIER_METAKEY = 1 << 3, 192 PP_INPUTEVENT_MODIFIER_METAKEY = 1 << 3,
193 PP_INPUTEVENT_MODIFIER_ISKEYPAD = 1 << 4, 193 PP_INPUTEVENT_MODIFIER_ISKEYPAD = 1 << 4,
194 PP_INPUTEVENT_MODIFIER_ISAUTOREPEAT = 1 << 5, 194 PP_INPUTEVENT_MODIFIER_ISAUTOREPEAT = 1 << 5,
195 PP_INPUTEVENT_MODIFIER_LEFTBUTTONDOWN = 1 << 6, 195 PP_INPUTEVENT_MODIFIER_LEFTBUTTONDOWN = 1 << 6,
196 PP_INPUTEVENT_MODIFIER_MIDDLEBUTTONDOWN = 1 << 7, 196 PP_INPUTEVENT_MODIFIER_MIDDLEBUTTONDOWN = 1 << 7,
197 PP_INPUTEVENT_MODIFIER_RIGHTBUTTONDOWN = 1 << 8, 197 PP_INPUTEVENT_MODIFIER_RIGHTBUTTONDOWN = 1 << 8,
198 PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY = 1 << 9, 198 PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY = 1 << 9,
199 PP_INPUTEVENT_MODIFIER_NUMLOCKKEY = 1 << 10 199 PP_INPUTEVENT_MODIFIER_NUMLOCKKEY = 1 << 10,
200 PP_INPUTEVENT_MODIFIER_ISLEFT = 1 << 11,
201 PP_INPUTEVENT_MODIFIER_ISRIGHT = 1 << 12
200 }; 202 };
201 203
202 /** 204 /**
203 * This enumeration contains constants representing each mouse button. To get 205 * This enumeration contains constants representing each mouse button. To get
204 * the mouse button for a mouse down or up event, use GetMouseButton on 206 * the mouse button for a mouse down or up event, use GetMouseButton on
205 * PPB_InputEvent. 207 * PPB_InputEvent.
206 */ 208 */
207 [assert_size(4)] 209 [assert_size(4)]
208 enum PP_InputEvent_MouseButton { 210 enum PP_InputEvent_MouseButton {
209 PP_INPUTEVENT_MOUSEBUTTON_NONE = -1, 211 PP_INPUTEVENT_MOUSEBUTTON_NONE = -1,
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 */ 395 */
394 void ClearInputEventRequest([in] PP_Instance instance, 396 void ClearInputEventRequest([in] PP_Instance instance,
395 [in] uint32_t event_classes); 397 [in] uint32_t event_classes);
396 398
397 /** 399 /**
398 * IsInputEvent() returns true if the given resource is a valid input event 400 * IsInputEvent() returns true if the given resource is a valid input event
399 * resource. 401 * resource.
400 * 402 *
401 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic 403 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic
402 * resource. 404 * resource.
403 * 405 *
404 * @return <code>PP_TRUE</code> if the given resource is a valid input event 406 * @return <code>PP_TRUE</code> if the given resource is a valid input event
405 * resource. 407 * resource.
406 */ 408 */
407 PP_Bool IsInputEvent([in] PP_Resource resource); 409 PP_Bool IsInputEvent([in] PP_Resource resource);
408 410
409 /** 411 /**
410 * GetType() returns the type of input event for the given input event 412 * GetType() returns the type of input event for the given input event
411 * resource. 413 * resource.
412 * 414 *
413 * @param[in] resource A <code>PP_Resource</code> corresponding to an input 415 * @param[in] resource A <code>PP_Resource</code> corresponding to an input
414 * event. 416 * event.
415 * 417 *
416 * @return A <code>PP_InputEvent_Type</code> if its a valid input event or 418 * @return A <code>PP_InputEvent_Type</code> if its a valid input event or
417 * <code>PP_INPUTEVENT_TYPE_UNDEFINED</code> if the resource is invalid. 419 * <code>PP_INPUTEVENT_TYPE_UNDEFINED</code> if the resource is invalid.
418 */ 420 */
419 PP_InputEvent_Type GetType([in] PP_Resource event); 421 PP_InputEvent_Type GetType([in] PP_Resource event);
420 422
421 /** 423 /**
422 * GetTimeStamp() Returns the time that the event was generated. This will be 424 * GetTimeStamp() Returns the time that the event was generated. This will be
423 * before the current time since processing and dispatching the event has 425 * before the current time since processing and dispatching the event has
424 * some overhead. Use this value to compare the times the user generated two 426 * some overhead. Use this value to compare the times the user generated two
425 * events without being sensitive to variable processing time. 427 * events without being sensitive to variable processing time.
426 * 428 *
427 * @param[in] resource A <code>PP_Resource</code> corresponding to the event. 429 * @param[in] resource A <code>PP_Resource</code> corresponding to the event.
428 * 430 *
429 * @return The return value is in time ticks, which is a monotonically 431 * @return The return value is in time ticks, which is a monotonically
430 * increasing clock not related to the wall clock time. It will not change 432 * increasing clock not related to the wall clock time. It will not change
431 * if the user changes their clock or daylight savings time starts, so can 433 * if the user changes their clock or daylight savings time starts, so can
432 * be reliably used to compare events. This means, however, that you can't 434 * be reliably used to compare events. This means, however, that you can't
433 * correlate event times to a particular time of day on the system clock. 435 * correlate event times to a particular time of day on the system clock.
434 */ 436 */
435 PP_TimeTicks GetTimeStamp([in] PP_Resource event); 437 PP_TimeTicks GetTimeStamp([in] PP_Resource event);
436 438
437 /** 439 /**
438 * GetModifiers() returns a bitfield indicating which modifiers were down 440 * GetModifiers() returns a bitfield indicating which modifiers were down
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 */ 736 */
735 PP_Resource Create([in] PP_Instance instance, 737 PP_Resource Create([in] PP_Instance instance,
736 [in] PP_InputEvent_Type type, 738 [in] PP_InputEvent_Type type,
737 [in] PP_TimeTicks time_stamp, 739 [in] PP_TimeTicks time_stamp,
738 [in] uint32_t modifiers, 740 [in] uint32_t modifiers,
739 [in] uint32_t key_code, 741 [in] uint32_t key_code,
740 [in] PP_Var character_text); 742 [in] PP_Var character_text);
741 743
742 /** 744 /**
743 * IsKeyboardInputEvent() determines if a resource is a keyboard event. 745 * IsKeyboardInputEvent() determines if a resource is a keyboard event.
744 * 746 *
745 * @param[in] resource A <code>PP_Resource</code> corresponding to an event. 747 * @param[in] resource A <code>PP_Resource</code> corresponding to an event.
746 * 748 *
747 * @return <code>PP_TRUE</code> if the given resource is a valid input event. 749 * @return <code>PP_TRUE</code> if the given resource is a valid input event.
748 */ 750 */
749 PP_Bool IsKeyboardInputEvent([in] PP_Resource resource); 751 PP_Bool IsKeyboardInputEvent([in] PP_Resource resource);
750 752
751 /** 753 /**
752 * GetKeyCode() returns the DOM keyCode field for the keyboard event. 754 * GetKeyCode() returns the DOM keyCode field for the keyboard event.
753 * Chrome populates this with the Windows-style Virtual Key code of the key. 755 * Chrome populates this with the Windows-style Virtual Key code of the key.
754 * 756 *
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 * @param[in] list The list. 890 * @param[in] list The list.
889 * 891 *
890 * @param[in] touch_id The id of the touch-point. 892 * @param[in] touch_id The id of the touch-point.
891 * 893 *
892 * @return A <code>PP_TouchPoint</code> representing the touch-point. 894 * @return A <code>PP_TouchPoint</code> representing the touch-point.
893 */ 895 */
894 PP_TouchPoint GetTouchById([in] PP_Resource resource, 896 PP_TouchPoint GetTouchById([in] PP_Resource resource,
895 [in] PP_TouchListType list, 897 [in] PP_TouchListType list,
896 [in] uint32_t touch_id); 898 [in] uint32_t touch_id);
897 }; 899 };
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/ppb_input_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698