Home
last modified time | relevance | path

Searched refs:ctxt (Results 1 - 14 of 14) sorted by relevance

/base/time/time_service/framework/js/napi/common/src/
H A Dnapi_work.cpp74 napi_value NapiWork::AsyncEnqueue(napi_env env, ContextBase *ctxt, const std::string &name, in AsyncEnqueue() argument
77 if (ctxt->status != napi_ok) { in AsyncEnqueue()
78 auto message = CODE_TO_MESSAGE.find(ctxt->errCode)->second + ". Error message: " + ctxt->errMessage; in AsyncEnqueue()
79 NapiUtils::ThrowError(env, message.c_str(), ctxt->errCode); in AsyncEnqueue()
80 delete ctxt; in AsyncEnqueue()
83 ctxt->execute = std::move(execute); in AsyncEnqueue()
84 ctxt->complete = std::move(complete); in AsyncEnqueue()
86 if (ctxt->callbackRef == nullptr) { in AsyncEnqueue()
87 napi_create_promise(ctxt in AsyncEnqueue()
127 GenerateOutput(ContextBase *ctxt) GenerateOutput() argument
166 SyncEnqueue(napi_env env, ContextBase *ctxt, const std::string &name, NapiExecute execute, NapiComplete complete) SyncEnqueue() argument
190 GenerateOutputSync(napi_env env, ContextBase *ctxt) GenerateOutputSync() argument
[all...]
/base/inputmethod/imf/frameworks/js/napi/inputmethodability/
H A Djs_keyboard_controller_engine.cpp89 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()
104 AsyncCall asyncCall(env, info, ctxt, 1); in Hide()
110 auto ctxt in HideKeyboard() local
126 auto ctxt = std::make_shared<ExitContext>(); ExitCurrentInputType() local
[all...]
H A Djs_text_input_client_engine.cpp77 auto ctxt = std::make_shared<MoveCursorContext>(); in MoveCursor() local
78 auto input = [ctxt](napi_env env, size_t argc, napi_value *argv, napi_value self) -> napi_status { in MoveCursor()
82 auto status = JsUtils::GetValue(env, argv[0], ctxt->num); in MoveCursor()
84 PARAM_CHECK_RETURN(env, ctxt->num >= 0, "direction should be not less than 0!", TYPE_NONE, in MoveCursor()
88 auto exec = [ctxt](AsyncCall::Context *ctx) { in MoveCursor()
89 int32_t code = InputMethodAbility::GetInstance()->MoveCursor(ctxt->num); in MoveCursor()
91 ctxt->status = napi_ok; in MoveCursor()
92 ctxt->SetState(ctxt->status); in MoveCursor()
94 ctxt in MoveCursor()
175 GetSelectRange(napi_env env, napi_value argv, std::shared_ptr<SelectContext> ctxt) GetSelectRange() argument
193 GetSelectMovement(napi_env env, napi_value argv, std::shared_ptr<SelectContext> ctxt) GetSelectMovement() argument
210 auto ctxt = std::make_shared<SendKeyFunctionContext>(); SendKeyFunction() local
239 auto ctxt = std::make_shared<SendPrivateCommandContext>(); SendPrivateCommand() local
295 auto ctxt = std::make_shared<DeleteForwardContext>(); DeleteForward() local
349 auto ctxt = std::make_shared<DeleteBackwardContext>(); DeleteBackward() local
381 auto ctxt = std::make_shared<InsertTextContext>(); InsertText() local
463 auto ctxt = std::make_shared<GetForwardContext>(); GetForward() local
523 auto ctxt = std::make_shared<GetBackwardContext>(); GetBackward() local
569 auto ctxt = std::make_shared<GetEditorAttributeContext>(); GetEditorAttribute() local
598 auto ctxt = std::make_shared<SelectContext>(); SelectByRange() local
633 auto ctxt = std::make_shared<SelectContext>(); SelectByRangeSync() local
657 auto ctxt = std::make_shared<SelectContext>(); SelectByMovementSync() local
674 auto ctxt = std::make_shared<SelectContext>(); SelectByMovement() local
702 auto ctxt = std::make_shared<SendExtendActionContext>(); SendExtendAction() local
728 auto ctxt = std::make_shared<GetTextIndexAtCursorContext>(); GetTextIndexAtCursor() local
755 auto ctxt = std::make_shared<SetPreviewTextContext>(); SetPreviewText() local
815 auto ctxt = std::make_shared<FinishTextPreviewContext>(); FinishTextPreview() local
864 auto ctxt = std::make_shared<GetCallingWindowInfoContext>(); GetCallingWindowInfo() local
[all...]
H A Djs_panel.cpp117 auto ctxt = std::make_shared<PanelContentContext>(env, info); in SetUiContent() local
118 auto input = [ctxt](napi_env env, size_t argc, napi_value *argv, napi_value self) -> napi_status { in SetUiContent()
122 PARAM_CHECK_RETURN(env, JsUtils::GetValue(env, argv[0], ctxt->path) == napi_ok, in SetUiContent()
135 ctxt->contentStorage = contentStorage; in SetUiContent()
141 auto exec = [ctxt](AsyncCall::Context *ctx) { ctxt->SetState(napi_ok); }; in SetUiContent()
142 auto output = [ctxt](napi_env env, napi_value *result) -> napi_status { in SetUiContent()
143 CHECK_RETURN(ctxt->inputMethodPanel != nullptr, "inputMethodPanel is nullptr!", napi_generic_failure); in SetUiContent()
144 auto code = ctxt->inputMethodPanel->SetUiContent(ctxt in SetUiContent()
160 auto ctxt = std::make_shared<PanelContentContext>(env, info); Resize() local
205 auto ctxt = std::make_shared<PanelContentContext>(env, info); MoveTo() local
259 auto ctxt = std::make_shared<PanelContentContext>(env, info); Show() local
277 auto ctxt = std::make_shared<PanelContentContext>(env, info); Hide() local
412 CheckParam(napi_env env, size_t argc, napi_value *argv, std::shared_ptr<PanelContentContext> ctxt) CheckParam() argument
443 auto ctxt = std::make_shared<PanelContentContext>(env, info); AdjustPanelRect() local
[all...]
H A Djs_input_method_engine_setting.cpp382 auto ctxt = std::make_shared<PanelContext>(); in CreatePanel() local
383 auto input = [ctxt](napi_env env, size_t argc, napi_value *argv, napi_value self) -> napi_status { in CreatePanel()
389 napi_status status = GetContext(env, argv[0], ctxt->context); in CreatePanel()
397 status = JsUtils::GetValue(env, argv[1], ctxt->panelInfo); in CreatePanel()
402 auto exec = [ctxt](AsyncCall::Context *ctx) { in CreatePanel()
403 auto ret = InputMethodAbility::GetInstance()->CreatePanel(ctxt->context, ctxt->panelInfo, ctxt->panel); in CreatePanel()
404 ctxt->SetErrorCode(ret); in CreatePanel()
406 ctxt in CreatePanel()
431 auto ctxt = std::make_shared<PanelContext>(); DestroyPanel() local
[all...]
H A Djs_panel.h116 std::shared_ptr<PanelContentContext> ctxt);
H A Djs_text_input_client_engine.h399 static napi_status GetSelectRange(napi_env env, napi_value argv, std::shared_ptr<SelectContext> ctxt);
400 static napi_status GetSelectMovement(napi_env env, napi_value argv, std::shared_ptr<SelectContext> ctxt);
/base/inputmethod/imf/frameworks/js/napi/inputmethodclient/
H A Djs_input_method.cpp47 std::shared_ptr<SwitchInputMethodContext> ctxt) in GetInputMethodProperty()
58 status = JsUtils::GetValue(env, result, ctxt->packageName); in GetInputMethodProperty()
62 status = JsUtils::GetValue(env, result, ctxt->methodId); in GetInputMethodProperty()
64 if (ctxt->packageName.empty() || ctxt->methodId.empty()) { in GetInputMethodProperty()
67 status = JsUtils::GetValue(env, result, ctxt->packageName); in GetInputMethodProperty()
72 status = JsUtils::GetValue(env, result, ctxt->methodId); in GetInputMethodProperty()
75 PARAM_CHECK_RETURN(env, (!ctxt->packageName.empty() && !ctxt->methodId.empty()), in GetInputMethodProperty()
77 IMSA_HILOGD("methodId: %{public}s, packageName: %{public}s.", ctxt in GetInputMethodProperty()
46 GetInputMethodProperty(napi_env env, napi_value argv, std::shared_ptr<SwitchInputMethodContext> ctxt) GetInputMethodProperty() argument
81 GetInputMethodSubProperty(napi_env env, napi_value argv, std::shared_ptr<SwitchInputMethodContext> ctxt) GetInputMethodSubProperty() argument
236 auto ctxt = std::make_shared<SwitchInputMethodContext>(); SwitchInputMethod() local
335 auto ctxt = std::make_shared<SwitchInputMethodContext>(); SwitchCurrentInputMethodSubtype() local
371 auto ctxt = std::make_shared<SwitchInputMethodContext>(); SwitchCurrentInputMethodAndSubtype() local
[all...]
H A Djs_get_input_method_setting.cpp163 std::shared_ptr<ListInputContext> ctxt) in GetInputMethodProperty()
171 JsUtils::GetValue(env, result, ctxt->property.name); in GetInputMethodProperty()
175 JsUtils::GetValue(env, result, ctxt->property.id); in GetInputMethodProperty()
177 if (ctxt->property.name.empty() || ctxt->property.id.empty()) { in GetInputMethodProperty()
180 JsUtils::GetValue(env, result, ctxt->property.name); in GetInputMethodProperty()
184 JsUtils::GetValue(env, result, ctxt->property.id); in GetInputMethodProperty()
186 PARAM_CHECK_RETURN(env, (!ctxt->property.name.empty() && !ctxt->property.id.empty()), in GetInputMethodProperty()
188 IMSA_HILOGD("methodId: %{public}s, packageName: %{public}s.", ctxt in GetInputMethodProperty()
162 GetInputMethodProperty(napi_env env, napi_value argv, std::shared_ptr<ListInputContext> ctxt) GetInputMethodProperty() argument
196 auto ctxt = std::make_shared<ListInputContext>(); ListInputMethod() local
224 auto ctxt = std::make_shared<ListInputContext>(); GetInputMethods() local
280 auto ctxt = std::make_shared<ListInputContext>(); GetAllInputMethods() local
319 auto ctxt = std::make_shared<DisplayOptionalInputMethodContext>(); DisplayOptionalInputMethod() local
341 auto ctxt = std::make_shared<DisplayOptionalInputMethodContext>(); ShowOptionalInputMethods() local
371 auto ctxt = std::make_shared<ListInputContext>(); ListInputMethodSubtype() local
405 auto ctxt = std::make_shared<ListInputContext>(); ListCurrentInputMethodSubtype() local
[all...]
H A Djs_get_input_method_controller.cpp443 auto ctxt = std::make_shared<HandleContext>(); in HandleSoftKeyboard() local
444 auto input = [ctxt](napi_env env, size_t argc, napi_value *argv, napi_value self) -> napi_status { in HandleSoftKeyboard()
447 auto output = [ctxt, isOutput](napi_env env, napi_value *result) -> napi_status { in HandleSoftKeyboard()
451 napi_status status = napi_get_boolean(env, ctxt->isHandle, result); in HandleSoftKeyboard()
455 auto exec = [ctxt, callback, needThrowException](AsyncCall::Context *ctx) { in HandleSoftKeyboard()
459 ctxt->status = napi_ok; in HandleSoftKeyboard()
460 ctxt->isHandle = true; in HandleSoftKeyboard()
461 ctxt->SetState(ctxt->status); in HandleSoftKeyboard()
465 ctxt in HandleSoftKeyboard()
537 auto ctxt = std::make_shared<AttachContext>(); Attach() local
[all...]
H A Djs_input_method.h73 std::shared_ptr<SwitchInputMethodContext> ctxt);
75 std::shared_ptr<SwitchInputMethodContext> ctxt);
H A Djs_get_input_method_setting.h122 static napi_status GetInputMethodProperty(napi_env env, napi_value argv, std::shared_ptr<ListInputContext> ctxt);
/base/inputmethod/imf/frameworks/js/napi/keyboardpanelmanager/
H A Djs_keyboard_panel_manager.cpp77 auto ctxt = std::make_shared<PanelManagerContext>(); in ConnectSystemCmd() local
79 auto exec = [ctxt, env, manager](AsyncCall::Context *ctx) { in ConnectSystemCmd()
81 ctxt->SetErrorCode(ret); in ConnectSystemCmd()
83 ctxt->SetState(napi_ok); in ConnectSystemCmd()
86 AsyncCall asyncCall(env, info, ctxt, 0); in ConnectSystemCmd()
191 auto ctxt = std::make_shared<SmartMenuContext>(); in GetSmartMenuCfg() local
192 auto output = [ctxt](napi_env env, napi_value *result) -> napi_status { in GetSmartMenuCfg()
193 *result = JsUtil::GetValue(env, ctxt->smartMenu); in GetSmartMenuCfg()
196 auto exec = [ctxt](AsyncCall::Context *ctx) { in GetSmartMenuCfg()
197 ctxt in GetSmartMenuCfg()
208 auto ctxt = std::make_shared<SendPrivateCommandContext>(); SendPrivateCommand() local
[all...]
/base/time/time_service/framework/js/napi/common/include/
H A Dnapi_work.h63 static napi_value AsyncEnqueue(napi_env env, ContextBase *ctxt, const std::string &name,
65 static napi_value SyncEnqueue(napi_env env, ContextBase *ctxt, const std::string &name,
75 static void GenerateOutput(ContextBase *ctxt);
76 static napi_value GenerateOutputSync(napi_env env, ContextBase *ctxt);

Completed in 10 milliseconds