|
|
|
@ -53,8 +53,14 @@ static napi_value InitHighContrastText(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, highContrastTextValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, highContrastTextValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return highContrastTextValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -76,8 +82,14 @@ static napi_value InitInvertColor(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, invertColorValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, invertColorValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return invertColorValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -99,8 +111,14 @@ static napi_value InitDaltonizationState(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, daltonizationStateValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, daltonizationStateValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return daltonizationStateValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -123,8 +141,14 @@ static napi_value InitDaltonizationColorFilter(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, daltonizationColorFilterValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, daltonizationColorFilterValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return daltonizationColorFilterValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -146,8 +170,14 @@ static napi_value InitContentTimeout(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, contentTimeoutValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, contentTimeoutValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return contentTimeoutValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -169,8 +199,14 @@ static napi_value InitAnimationOff(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, animationOffValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, animationOffValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return animationOffValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -192,8 +228,14 @@ static napi_value InitBrightnessDiscount(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, brightnessDiscountValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, brightnessDiscountValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return brightnessDiscountValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -215,8 +257,14 @@ static napi_value InitScreenMagnifier(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, screenMagnifierValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, screenMagnifierValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return screenMagnifierValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -238,8 +286,14 @@ static napi_value InitAudioMono(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, audioMonoValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, audioMonoValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return audioMonoValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -261,8 +315,14 @@ static napi_value InitAudioBalance(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, audioBalanceValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, audioBalanceValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return audioBalanceValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -284,8 +344,14 @@ static napi_value InitMouseKey(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, mouseKeyValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, mouseKeyValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return mouseKeyValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -307,8 +373,14 @@ static napi_value InitMouseAutoClick(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, mouseAutoClickValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, mouseAutoClickValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return mouseAutoClickValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -330,8 +402,14 @@ static napi_value InitShortKey(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, shortKeyValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, shortKeyValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return shortKeyValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -353,8 +431,14 @@ static napi_value InitShortKeyTarget(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, shortKeyTargetValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, shortKeyTargetValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return shortKeyTargetValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -376,8 +460,14 @@ static napi_value InitShortKeyMultiTarget(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, shortKeyMultiTargetValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, shortKeyMultiTargetValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return shortKeyMultiTargetValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -399,8 +489,14 @@ static napi_value InitCaptionsState(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, captionsValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, captionsValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return captionsValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -422,8 +518,14 @@ static napi_value InitCaptionsStyle(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, captionsStyleValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, captionsStyleValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return captionsStyleValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -445,8 +547,14 @@ static napi_value InitClickResponseTime(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, clickResponseTimeValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, clickResponseTimeValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return clickResponseTimeValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -468,8 +576,14 @@ static napi_value InitIgnoreRepeatClickState(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, ignoreRepeatClickStateValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, ignoreRepeatClickStateValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return ignoreRepeatClickStateValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -491,8 +605,14 @@ static napi_value InitIgnoreRepeatClickTime(napi_env env)
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
nativeObj->SetEnv(env);
|
|
|
|
|
NAPI_CALL(env, napi_wrap(env, ignoreRepeatClickTimeValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr));
|
|
|
|
|
napi_status sts = napi_wrap(env, ignoreRepeatClickTimeValue, reinterpret_cast<void*>(nativeObj),
|
|
|
|
|
NAccessibilityConfigClass::Destructor, nullptr, nullptr);
|
|
|
|
|
if (sts != napi_ok) {
|
|
|
|
|
delete nativeObj;
|
|
|
|
|
nativeObj = nullptr;
|
|
|
|
|
HILOG_ERROR("failed to wrap JS object");
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
return ignoreRepeatClickTimeValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|