/foundation/window/window_manager/interfaces/kits/cj/display_runtime/ |
H A D | cj_display_manager.cpp | 31 ret.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_SYSTEM_INNORMAL); in SetDisplayObject() 37 ret.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_SYSTEM_INNORMAL); in SetDisplayObject() 42 ret.code = static_cast<int32_t>(DmErrorCode::DM_OK); in SetDisplayObject() 50 ret.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_SYSTEM_INNORMAL); in SetDisplaysArrayObject() 117 RetStruct ret = {.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_SYSTEM_INNORMAL), .len = 0, .data = nullptr}; in GetDefaultDisplaySync() 121 ret.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_SCREEN); in GetDefaultDisplaySync() 127 ret.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_SCREEN); in GetDefaultDisplaySync() 138 RetStruct ret = {.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_SYSTEM_INNORMAL), .len = 0, .data = nullptr}; in GetAllDisplays() 141 ret.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_SCREEN); in GetAllDisplays() 151 RetStruct ret = {.code = static_cast<int32_t>(DmErrorCode in HasPrivateWindow() [all...] |
H A D | cj_display_impl.cpp | 288 RetStruct result = {.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_SYSTEM_INNORMAL), .len = 0, .data = nullptr}; in GetCutoutInfo() 291 result.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_SCREEN); in GetCutoutInfo() 295 result.code = static_cast<int32_t>(DmErrorCode::DM_OK); in GetCutoutInfo() 297 result.code = static_cast<int32_t>(DmErrorCode::DM_ERROR_SYSTEM_INNORMAL); in GetCutoutInfo()
|
/foundation/window/window_manager/previewer/include/ |
H A D | dm_common.h | 142 enum class DmErrorCode : int32_t { class 156 const std::map<DMError, DmErrorCode> DM_JS_TO_ERROR_CODE_MAP { 157 {DMError::DM_OK, DmErrorCode::DM_OK }, 158 {DMError::DM_ERROR_INVALID_PERMISSION, DmErrorCode::DM_ERROR_NO_PERMISSION }, 159 {DMError::DM_ERROR_INIT_DMS_PROXY_LOCKED, DmErrorCode::DM_ERROR_SYSTEM_INNORMAL }, 160 {DMError::DM_ERROR_IPC_FAILED, DmErrorCode::DM_ERROR_SYSTEM_INNORMAL }, 161 {DMError::DM_ERROR_REMOTE_CREATE_FAILED, DmErrorCode::DM_ERROR_SYSTEM_INNORMAL }, 162 {DMError::DM_ERROR_NULLPTR, DmErrorCode::DM_ERROR_INVALID_SCREEN }, 163 {DMError::DM_ERROR_INVALID_PARAM, DmErrorCode::DM_ERROR_INVALID_PARAM }, 164 {DMError::DM_ERROR_WRITE_INTERFACE_TOKEN_FAILED, DmErrorCode [all...] |
/foundation/window/window_manager/interfaces/kits/napi/screen_runtime/napi/ |
H A D | js_screen_manager.cpp | 164 if (res != DmErrorCode::DM_OK) {
in OnGetAllScreens() 172 static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_SCREEN),
in OnGetAllScreens() 217 DmErrorCode RegisterScreenListenerWithType(napi_env env, const std::string& type, napi_value value)
in RegisterScreenListenerWithType() 221 return DmErrorCode::DM_ERROR_INVALID_CALLING;
in RegisterScreenListenerWithType() 230 return DmErrorCode::DM_ERROR_INVALID_SCREEN;
in RegisterScreenListenerWithType() 233 DmErrorCode ret = DM_JS_TO_ERROR_CODE_MAP.at(
in RegisterScreenListenerWithType() 235 if (ret != DmErrorCode::DM_OK) {
in RegisterScreenListenerWithType() 242 return DmErrorCode::DM_ERROR_INVALID_CALLING;
in RegisterScreenListenerWithType() 246 return DmErrorCode::DM_OK;
in RegisterScreenListenerWithType() 249 DmErrorCode UnregisterAllScreenListenerWithTyp [all...] |
H A D | js_screen.cpp | 111 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnSetOrientation() 117 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnSetOrientation() 129 DmErrorCode ret = DM_JS_TO_ERROR_CODE_MAP.at(screen_->SetOrientation(orientation));
in OnSetOrientation() 130 if (ret == DmErrorCode::DM_OK) {
in OnSetOrientation() 177 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnSetScreenActiveMode() 189 DmErrorCode ret = DM_JS_TO_ERROR_CODE_MAP.at(screen_->SetScreenActiveMode(modeId));
in OnSetScreenActiveMode() 190 if (ret == DmErrorCode::DM_OK) {
in OnSetScreenActiveMode() 233 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnSetDensityDpi() 245 DmErrorCode ret = DM_JS_TO_ERROR_CODE_MAP.at(screen_->SetDensityDpi(densityDpi));
in OnSetDensityDpi() 246 if (ret == DmErrorCode in OnSetDensityDpi() [all...] |
/foundation/window/window_manager/interfaces/innerkits/dm/ |
H A D | dm_common.h | 166 enum class DmErrorCode : int32_t { class 180 const std::map<DMError, DmErrorCode> DM_JS_TO_ERROR_CODE_MAP { 181 {DMError::DM_OK, DmErrorCode::DM_OK }, 182 {DMError::DM_ERROR_INVALID_PERMISSION, DmErrorCode::DM_ERROR_NO_PERMISSION }, 183 {DMError::DM_ERROR_INIT_DMS_PROXY_LOCKED, DmErrorCode::DM_ERROR_SYSTEM_INNORMAL }, 184 {DMError::DM_ERROR_IPC_FAILED, DmErrorCode::DM_ERROR_SYSTEM_INNORMAL }, 185 {DMError::DM_ERROR_REMOTE_CREATE_FAILED, DmErrorCode::DM_ERROR_SYSTEM_INNORMAL }, 186 {DMError::DM_ERROR_NULLPTR, DmErrorCode::DM_ERROR_INVALID_SCREEN }, 187 {DMError::DM_ERROR_INVALID_PARAM, DmErrorCode::DM_ERROR_INVALID_PARAM }, 188 {DMError::DM_ERROR_WRITE_INTERFACE_TOKEN_FAILED, DmErrorCode [all...] |
H A D | display_manager.h | 224 std::shared_ptr<Media::PixelMap> GetScreenshot(DisplayId displayId, DmErrorCode* errorCode = nullptr);
233 std::shared_ptr<Media::PixelMap> GetSnapshotByPicker(Media::Rect &rect, DmErrorCode* errorCode = nullptr);
246 const Media::Size &size, int rotation, DmErrorCode* errorCode = nullptr);
|
/foundation/window/window_manager/interfaces/kits/napi/common/ |
H A D | js_err_utils.cpp | 182 static std::map<DmErrorCode, const char*> DM_ERROR_CODE_TO_ERROR_MSG_MAP { 183 {DmErrorCode::DM_OK, DM_ERROR_CODE_MSG_OK }, 184 {DmErrorCode::DM_ERROR_NO_PERMISSION, DM_ERROR_CODE_MSG_NO_PERMISSION }, 185 {DmErrorCode::DM_ERROR_NOT_SYSTEM_APP, DM_ERROR_CODE_MSG_NOT_SYSTEM_APP }, 186 {DmErrorCode::DM_ERROR_INVALID_PARAM, DM_ERROR_CODE_MSG_INVALID_PARAM }, 187 {DmErrorCode::DM_ERROR_DEVICE_NOT_SUPPORT, DM_ERROR_CODE_MSG_DEVICE_NOT_SUPPORT }, 188 {DmErrorCode::DM_ERROR_INVALID_SCREEN, DM_ERROR_CODE_MSG_INVALID_SCREEN }, 189 {DmErrorCode::DM_ERROR_INVALID_CALLING, DM_ERROR_CODE_MSG_INVALID_CALLING }, 190 {DmErrorCode::DM_ERROR_SYSTEM_INNORMAL, DM_ERROR_CODE_MSG_SYSTEM_INNORMAL }, 233 std::string JsErrUtils::GetErrorMsg(const DmErrorCode [all...] |
H A D | js_err_utils.h | 31 static napi_value CreateJsError(napi_env env, const DmErrorCode& errorCode, std::string msg = ""); 67 static std::string GetErrorMsg(const DmErrorCode& errorCode);
|
H A D | dm_napi_common.cpp | 90 void SetErrorInfo(napi_env env, Rosen::DmErrorCode wret, const std::string& errMessage, napi_value result[], int count) in SetErrorInfo() 104 void ProcessPromise(napi_env env, Rosen::DmErrorCode wret, napi_deferred deferred, napi_value result[], int count) in ProcessPromise() 111 if (wret == Rosen::DmErrorCode::DM_OK) { in ProcessPromise()
|
H A D | dm_napi_common.h | 52 void SetErrorInfo(napi_env env, Rosen::DmErrorCode wret, const std::string& errMessage, 54 void ProcessPromise(napi_env env, Rosen::DmErrorCode wret, napi_deferred deferred, 83 if (info->param->wret == Rosen::DmErrorCode::DM_OK) { in CompleteFunc()
|
/foundation/window/window_manager/interfaces/kits/napi/display_runtime/ |
H A D | js_display_manager.cpp | 197 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_SCREEN)));
in OnGetDefaultDisplaySync() 213 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnGetDisplayByIdSync() 220 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnGetDisplayByIdSync() 226 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnGetDisplayByIdSync() 232 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_SYSTEM_INNORMAL)));
in OnGetDisplayByIdSync() 282 static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_SCREEN), "Send event failed!"));
in NapiSendDmsEvent() 348 task.Reject(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_SYSTEM_INNORMAL),
in OnGetAllDisplayPhysicalResolution() 381 static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_SCREEN),
in OnGetAllDisplays() 566 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnRegisterDisplayManagerCallback() 572 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode in OnRegisterDisplayManagerCallback() [all...] |
H A D | js_display.cpp | 243 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnRegisterDisplayManagerCallback() 249 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnRegisterDisplayManagerCallback() 257 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnRegisterDisplayManagerCallback() 263 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnRegisterDisplayManagerCallback() 267 DmErrorCode ret = DM_JS_TO_ERROR_CODE_MAP.at(RegisterDisplayListenerWithType(env, cbType, value));
in OnRegisterDisplayManagerCallback() 268 if (ret != DmErrorCode::DM_OK) {
in OnRegisterDisplayManagerCallback() 271 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnRegisterDisplayManagerCallback() 317 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnUnregisterDisplayManagerCallback() 324 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM), errMsg));
in OnUnregisterDisplayManagerCallback() 328 DmErrorCode re in OnUnregisterDisplayManagerCallback() [all...] |
/foundation/window/window_manager/interfaces/kits/napi/screenshot/ |
H A D | native_screenshot_module.cpp | 47 DmErrorCode wret; 183 param->wret = DmErrorCode::DM_ERROR_INVALID_PARAM; in AsyncGetScreenshot() 198 if (param->image == nullptr && param->wret == DmErrorCode::DM_OK) { in AsyncGetScreenshot() 200 param->wret = DmErrorCode::DM_ERROR_INVALID_SCREEN; in AsyncGetScreenshot() 245 if (param->wret == DmErrorCode::DM_ERROR_INVALID_PARAM) { in Resolve() 247 napi_create_int32(env, (int32_t)DmErrorCode::DM_ERROR_INVALID_PARAM, &code); in Resolve() 251 } else if (param->wret != DmErrorCode::DM_OK) { in Resolve() 380 (int32_t)DmErrorCode::DM_ERROR_NO_PERMISSION, "DM_ERROR_NO_PERMISSION"); in ScreenshotModuleInit() 382 (int32_t)DmErrorCode::DM_ERROR_INVALID_PARAM, "DM_ERROR_INVALID_PARAM"); in ScreenshotModuleInit() 384 (int32_t)DmErrorCode in ScreenshotModuleInit() [all...] |
/foundation/window/window_manager/previewer/mock/ |
H A D | js_err_utils.h | 43 static inline napi_value CreateJsError(napi_env env, const DmErrorCode& errorCode, std::string msg = "") in CreateJsError() 89 static std::string GetErrorMsg(const DmErrorCode& errorCode) in GetErrorMsg()
|
/foundation/barrierfree/accessibility/services/test/mock/ |
H A D | mock_display_manager.cpp | 65 std::shared_ptr<Media::PixelMap> DisplayManager::GetScreenshot(DisplayId displayId, DmErrorCode* errorCode) in GetScreenshot() 71 const Media::Rect& rect, const Media::Size& size, int rotation, DmErrorCode* errorCode) in GetScreenshot()
|
/foundation/window/window_manager/window_scene/interfaces/kits/napi/screen_session_manager/ |
H A D | js_screen_session.cpp | 186 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM))); in OnSetScreenRotationLocked() 193 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM))); in OnSetScreenRotationLocked() 199 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM))); in OnSetScreenRotationLocked() 210 if (res == DmErrorCode::DM_OK) { in OnSetScreenRotationLocked() 222 static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_SCREEN), "Send event failed!")); in OnSetScreenRotationLocked() 243 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM))); in OnSetTouchEnabled() 250 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM))); in OnSetTouchEnabled() 256 napi_throw(env, CreateJsError(env, static_cast<int32_t>(DmErrorCode::DM_ERROR_INVALID_PARAM))); in OnSetTouchEnabled()
|
/foundation/window/window_manager/dmserver/include/ |
H A D | display_manager_service_inner.h | 44 std::shared_ptr<Media::PixelMap> GetDisplaySnapshot(DisplayId displayId, DmErrorCode* errorCode = nullptr) const;
|
H A D | display_manager_interface.h | 57 DmErrorCode* errorCode = nullptr) = 0;
58 virtual std::shared_ptr<Media::PixelMap> GetSnapshotByPicker(Media::Rect &rect, DmErrorCode* errorCode = nullptr)
in GetSnapshotByPicker() 60 *errorCode = DmErrorCode::DM_ERROR_DEVICE_NOT_SUPPORT;
in GetSnapshotByPicker()
|
H A D | display_manager_proxy.h | 45 DmErrorCode* errorCode = nullptr) override;
|
/foundation/window/window_manager/window_scene/screen_session_manager/include/zidl/ |
H A D | screen_session_manager_interface.h | 56 DmErrorCode* errorCode = nullptr) override { return nullptr; } 58 DmErrorCode* errorCode = nullptr) override 60 *errorCode = DmErrorCode::DM_ERROR_DEVICE_NOT_SUPPORT;
|
H A D | screen_session_manager_proxy.h | 103 virtual std::shared_ptr<Media::PixelMap> GetDisplaySnapshot(DisplayId displayId, DmErrorCode* errorCode) override; 104 virtual std::shared_ptr<Media::PixelMap> GetSnapshotByPicker(Media::Rect &rect, DmErrorCode* errorCode) override;
|
/foundation/window/window_manager/dmserver/src/ |
H A D | display_manager_service_inner.cpp | 122 DmErrorCode* errorCode) const
in GetDisplaySnapshot()
|
/foundation/window/window_manager/dmserver/test/unittest/ |
H A D | display_manager_service_inner_test.cpp | 122 DmErrorCode* errorCode = nullptr; in HWTEST_F()
|
/foundation/window/window_manager/dm/include/ |
H A D | display_manager_adapter.h | 62 virtual std::shared_ptr<Media::PixelMap> GetDisplaySnapshot(DisplayId displayId, DmErrorCode* errorCode = nullptr);
63 virtual std::shared_ptr<Media::PixelMap> GetSnapshotByPicker(Media::Rect &rect, DmErrorCode* errorCode = nullptr);
|