| OLD | NEW |
| 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 /* From ppb_input_event.idl modified Mon Nov 14 10:36:01 2011. */ | 6 /* From ppb_input_event.idl modified Wed Feb 8 13:23:45 2012. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPB_INPUT_EVENT_H_ | 8 #ifndef PPAPI_C_PPB_INPUT_EVENT_H_ |
| 9 #define PPAPI_C_PPB_INPUT_EVENT_H_ | 9 #define PPAPI_C_PPB_INPUT_EVENT_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_point.h" | 14 #include "ppapi/c/pp_point.h" |
| 15 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
| 16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time | 654 * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time |
| 655 * when the event occurred. | 655 * when the event occurred. |
| 656 * | 656 * |
| 657 * @param[in] modifiers A bit field combination of the | 657 * @param[in] modifiers A bit field combination of the |
| 658 * <code>PP_InputEvent_Modifier</code> flags. | 658 * <code>PP_InputEvent_Modifier</code> flags. |
| 659 * | 659 * |
| 660 * @param[in] key_code This value reflects the DOM KeyboardEvent | 660 * @param[in] key_code This value reflects the DOM KeyboardEvent |
| 661 * <code>keyCode</code> field. Chrome populates this with the Windows-style | 661 * <code>keyCode</code> field. Chrome populates this with the Windows-style |
| 662 * Virtual Key code of the key. | 662 * Virtual Key code of the key. |
| 663 * | 663 * |
| 664 * @param[in] usb_scan_code This value reflects the USB scancode that |
| 665 * generated this keyboard event. |
| 666 * |
| 664 * @param[in] character_text This value represents the typed character as a | 667 * @param[in] character_text This value represents the typed character as a |
| 665 * UTF-8 string. | 668 * UTF-8 string. |
| 666 * | 669 * |
| 667 * @return A <code>PP_Resource</code> containing the new keyboard input | 670 * @return A <code>PP_Resource</code> containing the new keyboard input |
| 668 * event. | 671 * event. |
| 669 */ | 672 */ |
| 670 PP_Resource (*Create)(PP_Instance instance, | 673 PP_Resource (*Create)(PP_Instance instance, |
| 671 PP_InputEvent_Type type, | 674 PP_InputEvent_Type type, |
| 672 PP_TimeTicks time_stamp, | 675 PP_TimeTicks time_stamp, |
| 673 uint32_t modifiers, | 676 uint32_t modifiers, |
| 674 uint32_t key_code, | 677 uint32_t key_code, |
| 678 uint32_t usb_scan_code, |
| 675 struct PP_Var character_text); | 679 struct PP_Var character_text); |
| 676 /** | 680 /** |
| 677 * IsKeyboardInputEvent() determines if a resource is a keyboard event. | 681 * IsKeyboardInputEvent() determines if a resource is a keyboard event. |
| 678 * | 682 * |
| 679 * @param[in] resource A <code>PP_Resource</code> corresponding to an event. | 683 * @param[in] resource A <code>PP_Resource</code> corresponding to an event. |
| 680 * | 684 * |
| 681 * @return <code>PP_TRUE</code> if the given resource is a valid input event. | 685 * @return <code>PP_TRUE</code> if the given resource is a valid input event. |
| 682 */ | 686 */ |
| 683 PP_Bool (*IsKeyboardInputEvent)(PP_Resource resource); | 687 PP_Bool (*IsKeyboardInputEvent)(PP_Resource resource); |
| 684 /** | 688 /** |
| 685 * GetKeyCode() returns the DOM keyCode field for the keyboard event. | 689 * GetKeyCode() returns the DOM keyCode field for the keyboard event. |
| 686 * Chrome populates this with the Windows-style Virtual Key code of the key. | 690 * Chrome populates this with the Windows-style Virtual Key code of the key. |
| 687 * | 691 * |
| 688 * @param[in] key_event A <code>PP_Resource</code> corresponding to a | 692 * @param[in] key_event A <code>PP_Resource</code> corresponding to a |
| 689 * keyboard event. | 693 * keyboard event. |
| 690 * | 694 * |
| 691 * @return The DOM keyCode field for the keyboard event. | 695 * @return The DOM keyCode field for the keyboard event. |
| 692 */ | 696 */ |
| 693 uint32_t (*GetKeyCode)(PP_Resource key_event); | 697 uint32_t (*GetKeyCode)(PP_Resource key_event); |
| 694 /** | 698 /** |
| 699 * GetUsbScanCode_Dev() returns the USB scancode that corresponds to the key |
| 700 * that generated this keyboard event. |
| 701 * |
| 702 * @param[in] key_event A <code>PP_Resource</code> corresponding to a |
| 703 * keyboard event. |
| 704 * |
| 705 * @return The USB scancode field for the keyboard event. |
| 706 */ |
| 707 uint32_t (*GetUsbScanCode_Dev)(PP_Resource key_event); |
| 708 /** |
| 695 * GetCharacterText() returns the typed character as a UTF-8 string for the | 709 * GetCharacterText() returns the typed character as a UTF-8 string for the |
| 696 * given character event. | 710 * given character event. |
| 697 * | 711 * |
| 698 * @param[in] character_event A <code>PP_Resource</code> corresponding to a | 712 * @param[in] character_event A <code>PP_Resource</code> corresponding to a |
| 699 * keyboard event. | 713 * keyboard event. |
| 700 * | 714 * |
| 701 * @return A string var representing a single typed character for character | 715 * @return A string var representing a single typed character for character |
| 702 * input events. For non-character input events the return value will be an | 716 * input events. For non-character input events the return value will be an |
| 703 * undefined var. | 717 * undefined var. |
| 704 */ | 718 */ |
| 705 struct PP_Var (*GetCharacterText)(PP_Resource character_event); | 719 struct PP_Var (*GetCharacterText)(PP_Resource character_event); |
| 706 }; | 720 }; |
| 707 | 721 |
| 708 typedef struct PPB_KeyboardInputEvent_1_0 PPB_KeyboardInputEvent; | 722 typedef struct PPB_KeyboardInputEvent_1_0 PPB_KeyboardInputEvent; |
| 709 /** | 723 /** |
| 710 * @} | 724 * @} |
| 711 */ | 725 */ |
| 712 | 726 |
| 713 #endif /* PPAPI_C_PPB_INPUT_EVENT_H_ */ | 727 #endif /* PPAPI_C_PPB_INPUT_EVENT_H_ */ |
| 714 | 728 |
| OLD | NEW |