Merge branch 'tizen_6.0' into tizen_6.0_hotfix 37/251737/1 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/hotfix/20210119.230403 submit/tizen_6.0_hotfix/20210119.044617
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 19 Jan 2021 04:06:13 +0000 (13:06 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 19 Jan 2021 04:06:19 +0000 (13:06 +0900)
Change-Id: I89c55c0414b709012e2b5dec84371486c78dbaf5

inputmethod/include/inputmethod.h
inputmethod/include/inputmethod_device_event.h
inputmethod/include/inputmethod_internal.h
inputmethod/src/inputmethod.cpp
packaging/capi-ui-inputmethod.spec

index e902299..6cfeebe 100644 (file)
@@ -91,7 +91,7 @@ typedef enum {
  *
  * @remarks Currently, a font style is available to use.
  *
- * @see ime_preedit_attribute()
+ * @see ime_preedit_attribute
  * @see ime_update_preedit_string()
  */
 typedef enum {
@@ -839,7 +839,7 @@ typedef struct {
  *
  * @pre The ime_event_set_***() functions can be called to set the event handling callback functions.
  *
- * @see ime_callback_s()
+ * @see ime_callback_s
  * @see ime_event_set_focus_in_cb()
  * @see ime_event_set_focus_out_cb()
  * @see ime_event_set_surrounding_text_updated_cb()
index 65c41cf..4aefb89 100644 (file)
@@ -188,7 +188,7 @@ int ime_event_unset_process_input_device_event_cb(void);
  * @retval #IME_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
  *
- * @see ime_rotary_input_device_direction_e
+ * @see ime_input_device_rotary_direction_e
  * @see ime_process_input_device_event_cb()
  *
  * @code
index 83420af..0b8002b 100644 (file)
@@ -114,7 +114,7 @@ typedef void (*ime_optimization_hint_set_cb)(ime_optimization_hint_e hint, void
  * @param[in] key The key event of the keyboard
  * @param[in] user_data User data to be passed from the callback registration function
  */
-typedef bool (*ime_process_key_event_with_imengine_cb)(scim::KeyEvent &key, void *user_data);
+typedef void (*ime_process_key_event_with_imengine_cb)(scim::KeyEvent &key, uint32_t serial, void *user_data);
 
 /**
  * @brief Called when a autocapital type is set.
@@ -1087,6 +1087,21 @@ int ime_set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, s
  */
 int ime_set_engine_loader_flag(bool flag);
 
+/**
+ * @brief Sends the key event processing result.
+ *
+ * @since_tizen 6.0
+ *
+ * @privilege %http://tizen.org/privilege/ime
+ *
+ * @param[in] is_success The result value to be sent, indicating whether the key event processing succeeded or not
+ * @return 0 on success, otherwise a negative error value
+ * @retval #IME_ERROR_NONE No error
+ * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
+ * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
+ */
+int ime_send_key_event_processing_result(scim::KeyEvent &key, uint32_t serial, bool is_success);
+
 #ifdef __cplusplus
 }
 #endif
index b2b9e8f..69c8881 100644 (file)
@@ -72,7 +72,7 @@ class CCoreEventCallback : public ISCLCoreEventCallback
     void on_set_mime_type(const sclchar *mime_type);
     void on_set_prediction_hint_data(const sclchar *key, const sclchar *value);
     void on_set_optimization_hint(sclu32 hint);
-    void on_process_key_event_with_imengine(scim::KeyEvent &key, sclu32 *ret);
+    void on_process_key_event_with_imengine(scim::KeyEvent &key, sclu32 serial);
     void on_set_autocapital_type(sclu32 type);
     void on_set_prediction_allow(sclu32 prediction_allow);
     void on_trigger_property(const sclchar *property);
@@ -549,15 +549,10 @@ void CCoreEventCallback::on_set_optimization_hint(sclu32 hint)
     }
 }
 
-void CCoreEventCallback::on_process_key_event_with_imengine(scim::KeyEvent &key, sclu32 *ret)
+void CCoreEventCallback::on_process_key_event_with_imengine(scim::KeyEvent &key, sclu32 serial)
 {
     if (g_event_callback.process_key_event_with_imengine) {
-        bool processed = g_event_callback.process_key_event_with_imengine(key, g_event_callback.process_key_event_with_imengine_user_data);
-
-        if (ret)
-            *ret = processed ? 1 : 0;
-    } else {
-        if (ret) *ret = 0;
+        g_event_callback.process_key_event_with_imengine(key, serial, g_event_callback.process_key_event_with_imengine_user_data);
     }
 }
 
@@ -2914,6 +2909,23 @@ EXPORT_API int ime_set_engine_loader_flag(bool flag)
 
     return IME_ERROR_NONE;
 }
+
+EXPORT_API int ime_send_key_event_processing_result(scim::KeyEvent &key, uint32_t serial, bool is_success)
+{
+    ime_error_e retVal = IME_ERROR_NONE;
+
+    if (!g_running) {
+        LOGW("IME_ERROR_NOT_RUNNING");
+        return IME_ERROR_NOT_RUNNING;
+    }
+
+    retVal = _check_privilege();
+    if (retVal != IME_ERROR_NONE) return retVal;
+
+    g_core.send_key_event_processing_result(key, serial, is_success);
+
+    return IME_ERROR_NONE;
+}
 //LCOV_EXCL_STOP
 
 EXPORT_API int ime_update_input_panel_event(ime_event_type_e type, unsigned int value)
index 5df5047..9c35e72 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-ui-inputmethod
 Summary:    Input Method Library
-Version:    0.5.6
+Version:    0.5.8
 Release:    1
 Group:      Graphics & UI Framework/Input
 License:    Apache-2.0