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

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

Issue 9353013: Add GetUsbKeyCode dev interface for Pepper key events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add GetUsbScanCode_Dev to Pepper/NaCl interface Created 8 years, 10 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 | Annotate | Revision Log
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 {
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time 675 * @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time
676 * when the event occurred. 676 * when the event occurred.
677 * 677 *
678 * @param[in] modifiers A bit field combination of the 678 * @param[in] modifiers A bit field combination of the
679 * <code>PP_InputEvent_Modifier</code> flags. 679 * <code>PP_InputEvent_Modifier</code> flags.
680 * 680 *
681 * @param[in] key_code This value reflects the DOM KeyboardEvent 681 * @param[in] key_code This value reflects the DOM KeyboardEvent
682 * <code>keyCode</code> field. Chrome populates this with the Windows-style 682 * <code>keyCode</code> field. Chrome populates this with the Windows-style
683 * Virtual Key code of the key. 683 * Virtual Key code of the key.
684 * 684 *
685 * @param[in] usb_scan_code This value reflects the USB scancode that
686 * generated this keyboard event.
687 *
685 * @param[in] character_text This value represents the typed character as a 688 * @param[in] character_text This value represents the typed character as a
686 * UTF-8 string. 689 * UTF-8 string.
687 * 690 *
688 * @return A <code>PP_Resource</code> containing the new keyboard input 691 * @return A <code>PP_Resource</code> containing the new keyboard input
689 * event. 692 * event.
690 */ 693 */
691 PP_Resource Create([in] PP_Instance instance, 694 PP_Resource Create([in] PP_Instance instance,
692 [in] PP_InputEvent_Type type, 695 [in] PP_InputEvent_Type type,
693 [in] PP_TimeTicks time_stamp, 696 [in] PP_TimeTicks time_stamp,
694 [in] uint32_t modifiers, 697 [in] uint32_t modifiers,
695 [in] uint32_t key_code, 698 [in] uint32_t key_code,
699 [in] uint32_t usb_scan_code,
696 [in] PP_Var character_text); 700 [in] PP_Var character_text);
697 701
698 /** 702 /**
699 * IsKeyboardInputEvent() determines if a resource is a keyboard event. 703 * IsKeyboardInputEvent() determines if a resource is a keyboard event.
700 * 704 *
701 * @param[in] resource A <code>PP_Resource</code> corresponding to an event. 705 * @param[in] resource A <code>PP_Resource</code> corresponding to an event.
702 * 706 *
703 * @return <code>PP_TRUE</code> if the given resource is a valid input event. 707 * @return <code>PP_TRUE</code> if the given resource is a valid input event.
704 */ 708 */
705 PP_Bool IsKeyboardInputEvent([in] PP_Resource resource); 709 PP_Bool IsKeyboardInputEvent([in] PP_Resource resource);
706 710
707 /** 711 /**
708 * GetKeyCode() returns the DOM keyCode field for the keyboard event. 712 * GetKeyCode() returns the DOM keyCode field for the keyboard event.
709 * Chrome populates this with the Windows-style Virtual Key code of the key. 713 * Chrome populates this with the Windows-style Virtual Key code of the key.
710 * 714 *
711 * @param[in] key_event A <code>PP_Resource</code> corresponding to a 715 * @param[in] key_event A <code>PP_Resource</code> corresponding to a
712 * keyboard event. 716 * keyboard event.
713 * 717 *
714 * @return The DOM keyCode field for the keyboard event. 718 * @return The DOM keyCode field for the keyboard event.
715 */ 719 */
716 uint32_t GetKeyCode([in] PP_Resource key_event); 720 uint32_t GetKeyCode([in] PP_Resource key_event);
717 721
718 /** 722 /**
723 * GetUsbScanCode_Dev() returns the USB scancode that corresponds to the key
724 * that generated this keyboard event.
725 *
726 * @param[in] key_event A <code>PP_Resource</code> corresponding to a
727 * keyboard event.
728 *
729 * @return The USB scancode field for the keyboard event.
730 */
731 uint32_t GetUsbScanCode_Dev([in] PP_Resource key_event);
brettw 2012/02/09 19:19:44 We need to keep backwards compat for old users of
Wez 2012/02/16 19:18:51 Yes, the plan is to have a new dev interface with
garykac 2012/02/16 20:45:03 Patchset 5 and beyond have the updated code (where
732
733 /**
719 * GetCharacterText() returns the typed character as a UTF-8 string for the 734 * GetCharacterText() returns the typed character as a UTF-8 string for the
720 * given character event. 735 * given character event.
721 * 736 *
722 * @param[in] character_event A <code>PP_Resource</code> corresponding to a 737 * @param[in] character_event A <code>PP_Resource</code> corresponding to a
723 * keyboard event. 738 * keyboard event.
724 * 739 *
725 * @return A string var representing a single typed character for character 740 * @return A string var representing a single typed character for character
726 * input events. For non-character input events the return value will be an 741 * input events. For non-character input events the return value will be an
727 * undefined var. 742 * undefined var.
728 */ 743 */
729 PP_Var GetCharacterText([in] PP_Resource character_event); 744 PP_Var GetCharacterText([in] PP_Resource character_event);
730 }; 745 };
731 746
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/ppb_input_event.h » ('j') | ppapi/native_client/src/shared/ppapi_proxy/input_event_data.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698