mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 14:49:59 +00:00
update
Signed-off-by: yangliu <yangliu146@huawei.com>
This commit is contained in:
parent
1ee6fed05a
commit
30a04d4443
@ -17,9 +17,9 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
namespace OHOS {
|
namespace OHOS {
|
||||||
namespace MiscServices {
|
namespace MiscServices {
|
||||||
|
|
||||||
ContextBase::~ContextBase()
|
ContextBase::~ContextBase()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
napi_status ContextBase::GetNative(napi_env envi, napi_callback_info info)
|
napi_status ContextBase::GetNative(napi_env envi, napi_callback_info info)
|
||||||
|
@ -55,7 +55,7 @@ void JsGetInputMethodController::CBOrPromiseStopInput(napi_env env,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
napi_value JsGetInputMethodController::Init(napi_env env, napi_value info)
|
napi_value JsGetInputMethodController::Init(napi_env env, napi_value info)
|
||||||
{
|
{
|
||||||
napi_property_descriptor descriptor[] = {
|
napi_property_descriptor descriptor[] = {
|
||||||
DECLARE_NAPI_FUNCTION("getInputMethodController", GetInputMethodController),
|
DECLARE_NAPI_FUNCTION("getInputMethodController", GetInputMethodController),
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
namespace OHOS {
|
namespace OHOS {
|
||||||
namespace MiscServices {
|
namespace MiscServices {
|
||||||
struct StopInputContext : public ContextBase {
|
struct StopInputContext : public ContextBase {
|
||||||
bool sStopInput = false;
|
bool sStopInput = false;
|
||||||
napi_status status = napi_generic_failure;
|
napi_status status = napi_generic_failure;
|
||||||
};
|
};
|
||||||
class JsGetInputMethodController {
|
class JsGetInputMethodController {
|
||||||
|
@ -89,7 +89,6 @@ void JsGetInputMethodSetting::GetResult(napi_env env, std::vector<InputMethodPro
|
|||||||
uint32_t index = 0;
|
uint32_t index = 0;
|
||||||
|
|
||||||
for (const auto &item : properties) {
|
for (const auto &item : properties) {
|
||||||
|
|
||||||
if (item == nullptr) {
|
if (item == nullptr) {
|
||||||
IMSA_HILOGE("GetResult::item is null");
|
IMSA_HILOGE("GetResult::item is null");
|
||||||
continue;
|
continue;
|
||||||
|
@ -25,7 +25,7 @@ namespace OHOS {
|
|||||||
namespace MiscServices {
|
namespace MiscServices {
|
||||||
thread_local napi_ref JsInputMethod::IMSRef_ = nullptr;
|
thread_local napi_ref JsInputMethod::IMSRef_ = nullptr;
|
||||||
const std::string JsInputMethod::IMS_CLASS_NAME = "InputMethod";
|
const std::string JsInputMethod::IMS_CLASS_NAME = "InputMethod";
|
||||||
napi_value JsInputMethod::Init(napi_env env, napi_value exports)
|
napi_value JsInputMethod::Init(napi_env env, napi_value exports)
|
||||||
{
|
{
|
||||||
napi_property_descriptor descriptor[] = {
|
napi_property_descriptor descriptor[] = {
|
||||||
DECLARE_NAPI_FUNCTION("switchInputMethod", SwitchInputMethod),
|
DECLARE_NAPI_FUNCTION("switchInputMethod", SwitchInputMethod),
|
||||||
@ -69,7 +69,7 @@ napi_value JsInputMethod::JsConstructor(napi_env env, napi_callback_info cbinfo)
|
|||||||
|
|
||||||
void JsInputMethod::CallbackOrPromiseSwitchInput(
|
void JsInputMethod::CallbackOrPromiseSwitchInput(
|
||||||
napi_env env, const SwitchInputMethodContext *switchInput, napi_value err, napi_value data)
|
napi_env env, const SwitchInputMethodContext *switchInput, napi_value err, napi_value data)
|
||||||
{
|
{
|
||||||
IMSA_HILOGI("run in CallbackOrPromiseSwitchInput");
|
IMSA_HILOGI("run in CallbackOrPromiseSwitchInput");
|
||||||
napi_value args[RESULT_COUNT] = {err, data};
|
napi_value args[RESULT_COUNT] = {err, data};
|
||||||
if (switchInput->deferred) {
|
if (switchInput->deferred) {
|
||||||
|
Loading…
Reference in New Issue
Block a user