Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
PPB_KeyboardInputEvent_1_2 Struct Reference

#include <ppb_input_event.h>

Public Attributes

PP_Resource(* Create )(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, uint32_t key_code, struct PP_Var character_text, struct PP_Var code)
 
PP_Bool(* IsKeyboardInputEvent )(PP_Resource resource)
 
uint32_t(* GetKeyCode )(PP_Resource key_event)
 
struct PP_Var(* GetCharacterText )(PP_Resource character_event)
 
struct PP_Var(* GetCode )(PP_Resource key_event)
 

Detailed Description

The PPB_KeyboardInputEvent interface contains pointers to several functions related to keyboard input events.

Member Data Documentation

PP_Resource(* PPB_KeyboardInputEvent_1_2::Create)(PP_Instance instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, uint32_t key_code, struct PP_Var character_text, struct PP_Var code)

Creates a keyboard input event with the given parameters. Normally you will get a keyboard event passed through the HandleInputEvent and will not need to create them, but some applications may want to create their own for internal use. The type must be one of the keyboard event types.

Parameters
[in]instanceThe instance for which this event occurred.
[in]typeA PP_InputEvent_Type identifying the type of input event.
[in]time_stampA PP_TimeTicks indicating the time when the event occurred.
[in]modifiersA bit field combination of the PP_InputEvent_Modifier flags.
[in]key_codeThis value reflects the DOM KeyboardEvent keyCode field, which is the Windows-style Virtual Key code of the key.
[in]character_textThis value represents the typed character as a UTF-8 string.
[in]codeThis value represents the DOM3 |code| string that corresponds to the physical key being pressed.
Returns
A PP_Resource containing the new keyboard input event.
struct PP_Var(* PPB_KeyboardInputEvent_1_2::GetCharacterText)(PP_Resource character_event)

GetCharacterText() returns the typed character as a UTF-8 string for the given character event.

Parameters
[in]character_eventA PP_Resource corresponding to a keyboard event.
Returns
A string var representing a single typed character for character input events. For non-character input events the return value will be an undefined var.
struct PP_Var(* PPB_KeyboardInputEvent_1_2::GetCode)(PP_Resource key_event)

GetCode() returns the DOM |code| field for this keyboard event, as defined in the DOM3 Events spec: http://www.w3.org/TR/DOM-Level-3-Events/

Parameters
[in]key_eventThe key event for which to return the key code.
Returns
The string that contains the DOM |code| for the keyboard event.
uint32_t(* PPB_KeyboardInputEvent_1_2::GetKeyCode)(PP_Resource key_event)

GetKeyCode() returns the DOM keyCode field for the keyboard event. Chrome populates this with the Windows-style Virtual Key code of the key.

Parameters
[in]key_eventA PP_Resource corresponding to a keyboard event.
Returns
The DOM keyCode field for the keyboard event.
PP_Bool(* PPB_KeyboardInputEvent_1_2::IsKeyboardInputEvent)(PP_Resource resource)

IsKeyboardInputEvent() determines if a resource is a keyboard event.

Parameters
[in]resourceA PP_Resource corresponding to an event.
Returns
PP_TRUE if the given resource is a valid input event.

The documentation for this struct was generated from the following file: