Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
 All Classes Namespaces Files Functions Typedefs Enumerations Macros Groups
pp::KeyboardInputEvent Class Reference
Inheritance diagram for pp::KeyboardInputEvent:
pp::InputEvent pp::Resource

Public Member Functions

 KeyboardInputEvent ()
 Constructs an is_null() keyboard input event object.
 
 KeyboardInputEvent (const InputEvent &event)
 
 KeyboardInputEvent (const InstanceHandle &instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, uint32_t key_code, const Var &character_text)
 
 KeyboardInputEvent (const InstanceHandle &instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, uint32_t modifiers, uint32_t key_code, const Var &character_text, const Var &code)
 
uint32_t GetKeyCode () const
 
Var GetCharacterText () const
 
Var GetCode () const
 Returns the DOM |code| for the keyboard event. More...
 
- Public Member Functions inherited from pp::InputEvent
 InputEvent ()
 Default constructor that creates an is_null() InputEvent object.
 
 InputEvent (PP_Resource input_event_resource)
 
PP_InputEvent_Type GetType () const
 
PP_TimeTicks GetTimeStamp () const
 
uint32_t GetModifiers () const
 
- Public Member Functions inherited from pp::Resource
 Resource ()
 The default constructor.
 
 Resource (const Resource &other)
 
virtual ~Resource ()
 Destructor.
 
Resourceoperator= (const Resource &other)
 
bool is_null () const
 
PP_Resource pp_resource () const
 
PP_Resource detach ()
 

Additional Inherited Members

- Protected Member Functions inherited from pp::Resource
 Resource (PP_Resource resource)
 
 Resource (PassRef, PP_Resource resource)
 
void PassRefFromConstructor (PP_Resource resource)
 
void Clear ()
 Sets this resource to null. This releases ownership of the resource.
 

Constructor & Destructor Documentation

pp::KeyboardInputEvent::KeyboardInputEvent ( const InputEvent event)
explicit

Constructs a keyboard input event object from the provided generic input event. If the given event is itself is_null() or is not a keyboard input event, the keybaord object will be is_null().

Parameters
[in]eventA generic input event.
pp::KeyboardInputEvent::KeyboardInputEvent ( const InstanceHandle instance,
PP_InputEvent_Type  type,
PP_TimeTicks  time_stamp,
uint32_t  modifiers,
uint32_t  key_code,
const Var character_text 
)

Constructs a keyboard input even from the given parameters.

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. Chrome populates this with the Windows-style Virtual Key code of the key.
[in]character_textThis value represents the typed character as a UTF-8 string.
pp::KeyboardInputEvent::KeyboardInputEvent ( const InstanceHandle instance,
PP_InputEvent_Type  type,
PP_TimeTicks  time_stamp,
uint32_t  modifiers,
uint32_t  key_code,
const Var character_text,
const Var code 
)

Constructs a keyboard input even from the given parameters.

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. Chrome populates this with 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 reflects the DOM KeyboardEvent code field, which identifies the physical key associated with the event.

Member Function Documentation

Var pp::KeyboardInputEvent::GetCharacterText ( ) const

Returns the typed character for the given character 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.
Var pp::KeyboardInputEvent::GetCode ( ) const

Returns the DOM |code| for the keyboard event.

Returns
A string var representing a physical key that was pressed to generate this event.
uint32_t pp::KeyboardInputEvent::GetKeyCode ( ) const

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


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