--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SCL_CAPI_INPUTMETHOD_H__
+#define __SCL_CAPI_INPUTMETHOD_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*scl_process_key_event_with_imengine_cb)(uint32_t code, uint32_t mask, uint32_t layout, uint32_t dev_class, uint32_t dev_subclass, const char *dev_name, uint32_t serial, void* user_data);
+
+int scl_set_imengine(const char *engine_id);
+int scl_flush_imengine();
+int scl_reset_imengine();
+int scl_send_imengine_event(int command, uint32_t value);
+int scl_set_engine_loader_flag(bool flag);
+int scl_set_process_key_event_with_imengine_cb(scl_process_key_event_with_imengine_cb callback, void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SCL_CAPI_INPUTMETHOD_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dlog.h>
+#include <tizen.h>
+#include <inputmethod.h>
+#include <inputmethod_internal.h>
+#include "cscl-ui-inputmethod.h"
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "CSCLUINUI"
+
+static scl_process_key_event_with_imengine_cb g_process_key_event_with_imengine_cb = NULL;
+static void *g_process_key_event_with_imengine_cb_data = NULL;
+
+EXPORT_API int scl_set_imengine(const char *engine_id)
+{
+ int ret = IME_ERROR_NONE;
+ ret = ime_set_imengine(engine_id);
+
+ LOGD("engine_id : %s, ret : %d", engine_id, ret);
+ return ret;
+}
+
+EXPORT_API int scl_flush_imengine()
+{
+ int ret = IME_ERROR_NONE;
+ ret = ime_flush_imengine();
+
+ LOGD("ret : %d", ret);
+ return ret;
+}
+
+EXPORT_API int scl_reset_imengine()
+{
+ int ret = IME_ERROR_NONE;
+ ret = ime_reset_imengine();
+
+ LOGD("ret : %d", ret);
+ return ret;
+}
+
+EXPORT_API int scl_send_imengine_event(int command, uint32_t value)
+{
+ int ret = IME_ERROR_NONE;
+ ret = ime_send_imengine_event(command, value);
+
+ LOGD("command : %d, value : %d, ret : %d", command, value, ret);
+ return ret;
+}
+
+EXPORT_API int scl_set_engine_loader_flag(bool flag)
+{
+ int ret = IME_ERROR_NONE;
+ ret = ime_set_engine_loader_flag(flag);
+
+ LOGD("flag : %d, ret : %d", flag, ret);
+ return ret;
+}
+
+static void ime_app_process_key_event_with_imengine_cb(scim::KeyEvent &key, uint32_t serial, void *user_data)
+{
+ LOGD("process_key_event_with_imengine = key : %p, serial : %d", &key, serial);
+ if (g_process_key_event_with_imengine_cb) {
+ g_process_key_event_with_imengine_cb(key.code, key.mask, key.layout, key.dev_class, key.dev_subclass, (key.dev_name).c_str(), serial, user_data);
+ }
+}
+
+EXPORT_API int scl_set_process_key_event_with_imengine_cb(scl_process_key_event_with_imengine_cb callback, void *user_data)
+{
+ int ret = IME_ERROR_NONE;
+
+ g_process_key_event_with_imengine_cb = callback;
+ g_process_key_event_with_imengine_cb_data = user_data;
+
+ ret = ime_event_set_process_key_event_with_imengine_cb(ime_app_process_key_event_with_imengine_cb, user_data);
+
+ return ret;
+}