/base/time/time_service/framework/js/napi/common/src/ |
D | napi_async_work.cpp | 74 napi_value NapiAsyncWork::Enqueue(napi_env env, ContextBase *ctxt, const std::string &name, in Enqueue() argument 77 if (ctxt->status != napi_ok) { in Enqueue() 78 … NapiUtils::ThrowError(env, CODE_TO_MESSAGE.find(ctxt->errCode)->second.c_str(), ctxt->errCode); in Enqueue() 81 ctxt->execute = std::move(execute); in Enqueue() 82 ctxt->complete = std::move(complete); in Enqueue() 84 if (ctxt->callbackRef == nullptr) { in Enqueue() 85 napi_create_promise(ctxt->env, &ctxt->deferred, &promise); in Enqueue() 88 napi_get_undefined(ctxt->env, &promise); in Enqueue() 91 napi_create_string_utf8(ctxt->env, name.c_str(), NAPI_AUTO_LENGTH, &resource); in Enqueue() 93 ctxt->env, nullptr, resource, in Enqueue() [all …]
|
/base/inputmethod/imf/interfaces/kits/js/napi/inputmethodability/ |
D | js_text_input_client_engine.cpp | 53 auto ctxt = std::make_shared<MoveCursorContext>(); in MoveCursor() local 54 … auto input = [ctxt](napi_env env, size_t argc, napi_value *argv, napi_value self) -> napi_status { in MoveCursor() 67 status = GetMoveCursorParam(env, argv[0], ctxt); in MoveCursor() 70 auto exec = [ctxt](AsyncCall::Context *ctx) { in MoveCursor() 71 int32_t code = InputMethodAbility::GetInstance()->MoveCursor(ctxt->num); in MoveCursor() 73 ctxt->status = napi_ok; in MoveCursor() 74 ctxt->SetState(ctxt->status); in MoveCursor() 76 ctxt->SetErrorCode(code); in MoveCursor() 79 ctxt->SetAction(std::move(input)); in MoveCursor() 80 AsyncCall asyncCall(env, info, std::dynamic_pointer_cast<AsyncCall::Context>(ctxt)); in MoveCursor() [all …]
|
D | js_keyboard_controller_engine.cpp | 89 auto ctxt = std::make_shared<HideContext>(); in Hide() local 90 … auto input = [ctxt](napi_env env, size_t argc, napi_value *argv, napi_value self) -> napi_status { in Hide() 93 auto exec = [ctxt](AsyncCall::Context *ctx) { in Hide() 96 ctxt->status = napi_ok; in Hide() 97 ctxt->SetState(ctxt->status); in Hide() 99 ctxt->SetErrorCode(code); in Hide() 102 ctxt->SetAction(std::move(input)); in Hide() 103 AsyncCall asyncCall(env, info, std::dynamic_pointer_cast<AsyncCall::Context>(ctxt), 0); in Hide() 109 auto ctxt = std::make_shared<HideKeyboardContext>(); in HideKeyboard() local 110 auto input = [ctxt]( in HideKeyboard() [all …]
|
D | js_text_input_client_engine.h | 218 std::shared_ptr<SendKeyFunctionContext> ctxt); 220 std::shared_ptr<DeleteForwardContext> ctxt); 222 std::shared_ptr<DeleteBackwardContext> ctxt); 224 std::shared_ptr<MoveCursorContext> ctxt); 226 std::shared_ptr<InsertTextContext> ctxt); 228 std::shared_ptr<GetForwardContext> ctxt); 230 std::shared_ptr<GetBackwardContext> ctxt);
|
/base/inputmethod/imf/interfaces/kits/js/napi/inputmethodclient/ |
D | js_input_method.cpp | 62 napi_env env, napi_value argv, std::shared_ptr<SwitchInputMethodContext> ctxt) in GetInputMethodProperty() argument 73 ctxt->packageName = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 76 ctxt->methodId = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 77 if (ctxt->packageName.empty() || ctxt->methodId.empty()) { in GetInputMethodProperty() 80 ctxt->packageName = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 84 ctxt->methodId = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 86 if (ctxt->packageName.empty() || ctxt->methodId.empty()) { in GetInputMethodProperty() 90 …IMSA_HILOGI("methodId:%{public}s and packageName:%{public}s", ctxt->methodId.c_str(), ctxt->packag… in GetInputMethodProperty() 95 napi_env env, napi_value argv, std::shared_ptr<SwitchInputMethodContext> ctxt) in GetInputMethodSubProperty() argument 108 ctxt->name = GetStringProperty(env, result); in GetInputMethodSubProperty() [all …]
|
D | js_get_input_method_setting.cpp | 177 napi_env env, napi_value argv, std::shared_ptr<ListInputContext> ctxt) in GetInputMethodProperty() argument 185 ctxt->property.name = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 189 ctxt->property.id = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 191 if (ctxt->property.name.empty() || ctxt->property.id.empty()) { in GetInputMethodProperty() 194 ctxt->property.name = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 198 ctxt->property.id = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 200 if (ctxt->property.name.empty() || ctxt->property.id.empty()) { in GetInputMethodProperty() 207 ctxt->property.label = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 211 ctxt->property.icon = JsInputMethod::GetStringProperty(env, result); in GetInputMethodProperty() 215 ctxt->property.iconId = JsInputMethod::GetNumberProperty(env, result); in GetInputMethodProperty() [all …]
|
D | js_get_input_method_controller.cpp | 115 auto ctxt = std::make_shared<HandleContext>(); in HandleSoftKeyboard() local 116 … auto input = [ctxt](napi_env env, size_t argc, napi_value *argv, napi_value self) -> napi_status { in HandleSoftKeyboard() 119 auto output = [ctxt, isOutput](napi_env env, napi_value *result) -> napi_status { in HandleSoftKeyboard() 123 napi_status status = napi_get_boolean(env, ctxt->isHandle, result); in HandleSoftKeyboard() 127 auto exec = [ctxt, callback, needThrowException](AsyncCall::Context *ctx) { in HandleSoftKeyboard() 131 ctxt->status = napi_ok; in HandleSoftKeyboard() 132 ctxt->isHandle = true; in HandleSoftKeyboard() 133 ctxt->SetState(ctxt->status); in HandleSoftKeyboard() 138 ctxt->SetErrorCode(errCode); in HandleSoftKeyboard() 141 ctxt->SetAction(std::move(input), std::move(output)); in HandleSoftKeyboard() [all …]
|
D | js_input_method.h | 70 napi_env env, napi_value argv, std::shared_ptr<SwitchInputMethodContext> ctxt); 72 napi_env env, napi_value argv, std::shared_ptr<SwitchInputMethodContext> ctxt);
|
D | js_get_input_method_setting.h | 115 …atus GetInputMethodProperty(napi_env env, napi_value argv, std::shared_ptr<ListInputContext> ctxt);
|
/base/time/time_service/framework/js/napi/common/include/ |
D | napi_async_work.h | 63 static napi_value Enqueue(napi_env env, ContextBase *ctxt, const std::string &name, 73 static void GenerateOutput(ContextBase *ctxt);
|