|
Pepper_47_C++_interfaces
|
#include <input_event.h>


Public Member Functions | |
| IMEInputEvent () | |
| Constructs an is_null() IME input event object. More... | |
| IMEInputEvent (const InputEvent &event) | |
| IMEInputEvent (const InstanceHandle &instance, PP_InputEvent_Type type, PP_TimeTicks time_stamp, const Var &text, const std::vector< uint32_t > &segment_offsets, int32_t target_segment, const std::pair< uint32_t, uint32_t > &selection) | |
| Var | GetText () const |
| uint32_t | GetSegmentNumber () const |
| uint32_t | GetSegmentOffset (uint32_t index) const |
| int32_t | GetTargetSegment () const |
| void | GetSelection (uint32_t *start, uint32_t *end) const |
Public Member Functions inherited from pp::InputEvent | |
| InputEvent () | |
| Default constructor that creates an is_null() InputEvent object. More... | |
| InputEvent (PP_Resource input_event_resource) | |
| ~InputEvent () | |
| PP_InputEvent_Type | GetType () const |
| PP_TimeTicks | GetTimeStamp () const |
| uint32_t | GetModifiers () const |
Public Member Functions inherited from pp::Resource | |
| Resource () | |
| The default constructor. More... | |
| Resource (const Resource &other) | |
| virtual | ~Resource () |
| Destructor. More... | |
| Resource & | operator= (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. More... | |
Definition at line 383 of file input_event.h.
| pp::IMEInputEvent::IMEInputEvent | ( | ) |
Constructs an is_null() IME input event object.
Definition at line 341 of file input_event.cc.
|
explicit |
Constructs an IME input event object from the provided generic input event. If the given event is itself is_null() or is not an IME input event, the object will be is_null().
| [in] | event | A generic input event. |
Definition at line 344 of file input_event.cc.
References pp::Core::AddRefResource(), pp::Module::core(), pp::Module::Get(), pp::Resource::PassRefFromConstructor(), and pp::Resource::pp_resource().
| pp::IMEInputEvent::IMEInputEvent | ( | const InstanceHandle & | instance, |
| PP_InputEvent_Type | type, | ||
| PP_TimeTicks | time_stamp, | ||
| const Var & | text, | ||
| const std::vector< uint32_t > & | segment_offsets, | ||
| int32_t | target_segment, | ||
| const std::pair< uint32_t, uint32_t > & | selection | ||
| ) |
This constructor manually constructs an IME event from the provided parameters.
| [in] | instance | The instance for which this event occurred. |
| [in] | type | A PP_InputEvent_Type identifying the type of input event. The type must be one of the ime event types. |
| [in] | time_stamp | A PP_TimeTicks indicating the time when the event occurred. |
| [in] | text | The string returned by GetText. |
| [in] | segment_offsets | The array of numbers returned by GetSegmentOffset. |
| [in] | target_segment | The number returned by GetTargetSegment. |
| [in] | selection | The range returned by GetSelection. |
Definition at line 354 of file input_event.cc.
References pp::Resource::PassRefFromConstructor(), pp::InstanceHandle::pp_instance(), and pp::Var::pp_var().
| uint32_t pp::IMEInputEvent::GetSegmentNumber | ( | ) | const |
Returns the number of segments in the composition text.
Definition at line 383 of file input_event.cc.
References pp::Resource::pp_resource().
| uint32_t pp::IMEInputEvent::GetSegmentOffset | ( | uint32_t | index | ) | const |
Returns the position of the index-th segmentation point in the composition text. The position is given by a byte-offset (not a character-offset) of the string returned by GetText(). It always satisfies 0=GetSegmentOffset(0) < ... < GetSegmentOffset(i) < GetSegmentOffset(i+1) < ... < GetSegmentOffset(GetSegmentNumber())=(byte-length of GetText()). Note that [GetSegmentOffset(i), GetSegmentOffset(i+1)) represents the range of the i-th segment, and hence GetSegmentNumber() can be a valid argument to this function instead of an off-by-1 error.
| [in] | ime_event | A PP_Resource corresponding to an IME event. |
| [in] | index | An integer indicating a segment. |
Definition at line 391 of file input_event.cc.
References pp::Resource::pp_resource().
| void pp::IMEInputEvent::GetSelection | ( | uint32_t * | start, |
| uint32_t * | end | ||
| ) | const |
Obtains the range selected by caret in the composition text.
| [out] | start | An integer indicating a start offset of selection range. |
| [out] | end | An integer indicating an end offset of selection range. |
Definition at line 407 of file input_event.cc.
References pp::Resource::pp_resource().
| int32_t pp::IMEInputEvent::GetTargetSegment | ( | ) | const |
Returns the index of the current target segment of composition.
Definition at line 399 of file input_event.cc.
References pp::Resource::pp_resource().
| Var pp::IMEInputEvent::GetText | ( | ) | const |
Returns the composition text as a UTF-8 string for the given IME event.
Definition at line 374 of file input_event.cc.
References pp::PASS_REF, pp::Resource::pp_resource(), and pp::Resource::Var.
1.8.6