-
Notifications
You must be signed in to change notification settings - Fork 17
[NUI] Support software keyboard input #349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d59781b
d6e4a06
bebb254
7f8cef0
bb8d7f7
eee1ce2
25f4900
dc26259
bb88ea0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,6 +146,12 @@ TizenInputMethodContext::TizenInputMethodContext(uintptr_t window_id) { | |
| TizenInputMethodContext::~TizenInputMethodContext() { | ||
| UnregisterEventCallbacks(); | ||
|
|
||
| #ifdef NUI_SUPPORT | ||
| if (ecore_device_) { | ||
| ecore_device_del(ecore_device_); | ||
| } | ||
| #endif | ||
|
|
||
| if (imf_context_) { | ||
| ecore_imf_context_del(imf_context_); | ||
| } | ||
|
|
@@ -191,6 +197,51 @@ bool TizenInputMethodContext::HandleEvasEventKeyUp(Evas_Event_Key_Up* event) { | |
| reinterpret_cast<Ecore_IMF_Event*>(&imf_event)); | ||
| } | ||
|
|
||
| #ifdef NUI_SUPPORT | ||
| bool TizenInputMethodContext::HandleNuiKeyEvent(const char* device_name, | ||
| uint32_t device_class, | ||
| uint32_t device_subclass, | ||
| const char* key, | ||
| const char* string, | ||
| uint32_t modifiers, | ||
| uint32_t scan_code, | ||
| size_t timestamp, | ||
| bool is_down) { | ||
|
Comment on lines
+201
to
+209
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method (or
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are all Ecore_Events, but NUI doesn't provide all properties of EcoreEvent (maybe?). |
||
| Ecore_Event_Key event; | ||
| event.keyname = event.key = key ? key : ""; | ||
| event.string = string ? string : ""; | ||
| event.modifiers = modifiers; | ||
swift-kim marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| event.keycode = scan_code; | ||
| event.timestamp = timestamp; | ||
| if (device_name) { | ||
| if (!ecore_device_) { | ||
| ecore_device_ = ecore_device_add(); | ||
| } | ||
|
|
||
| event.dev = ecore_device_; | ||
| ecore_device_name_set(event.dev, device_name); | ||
| ecore_device_class_set(event.dev, | ||
| static_cast<Ecore_IMF_Device_Class>(device_class)); | ||
| ecore_device_subclass_set( | ||
| event.dev, static_cast<Ecore_IMF_Device_Subclass>(device_subclass)); | ||
| } | ||
|
|
||
| if (is_down) { | ||
| Ecore_IMF_Event_Key_Down imf_event = | ||
| EcoreEventKeyToEcoreImfEvent<Ecore_IMF_Event_Key_Down>(&event); | ||
| return ecore_imf_context_filter_event( | ||
| imf_context_, ECORE_IMF_EVENT_KEY_DOWN, | ||
| reinterpret_cast<Ecore_IMF_Event*>(&imf_event)); | ||
| } else { | ||
| Ecore_IMF_Event_Key_Up imf_event = | ||
| EcoreEventKeyToEcoreImfEvent<Ecore_IMF_Event_Key_Up>(&event); | ||
| return ecore_imf_context_filter_event( | ||
| imf_context_, ECORE_IMF_EVENT_KEY_UP, | ||
| reinterpret_cast<Ecore_IMF_Event*>(&imf_event)); | ||
| } | ||
| } | ||
| #endif | ||
|
|
||
| InputPanelGeometry TizenInputMethodContext::GetInputPanelGeometry() { | ||
| FT_ASSERT(imf_context_); | ||
| InputPanelGeometry geometry; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.