diff --git a/harmony/splash_screen.har b/harmony/splash_screen.har index fbadf968ae886331a7bb814f1363cfea55d9a2fb..f4303ace82bd2c17f76c8b54820997e9b9c4837e 100644 Binary files a/harmony/splash_screen.har and b/harmony/splash_screen.har differ diff --git a/harmony/splash_screen/hvigorfile.ts b/harmony/splash_screen/hvigorfile.ts index dcf8c985dffd2987fabc13175a294d94ffa2a1cb..7024715b6924639d73e1efe6b9695d8c0b2d2a9a 100644 --- a/harmony/splash_screen/hvigorfile.ts +++ b/harmony/splash_screen/hvigorfile.ts @@ -1,23 +1,5 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. export { harTasks } from '@ohos/hvigor-ohos-plugin'; \ No newline at end of file diff --git a/harmony/splash_screen/index.ets b/harmony/splash_screen/index.ets index 223be4db18f35ae81c9501cdb8f36b8b021ea1df..99898eaabb16ee03a09a38d6fb622aa557d559c5 100644 --- a/harmony/splash_screen/index.ets +++ b/harmony/splash_screen/index.ets @@ -1,23 +1,5 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. export * from "./src/main/ets/SplashScreenView" diff --git a/harmony/splash_screen/src/main/cpp/SplashScreenPackage.h b/harmony/splash_screen/src/main/cpp/SplashScreenPackage.h index c997b0567feefdaa7a4afcb3960ca6288ee96480..a3185712fabd912df8528a03d359cb24963fc3f4 100644 --- a/harmony/splash_screen/src/main/cpp/SplashScreenPackage.h +++ b/harmony/splash_screen/src/main/cpp/SplashScreenPackage.h @@ -1,24 +1,6 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. #pragma once diff --git a/harmony/splash_screen/src/main/ets/Logger.ts b/harmony/splash_screen/src/main/ets/Logger.ts index af6b0dfeb1d1883cdc328d4145dd223583b2d3f3..24566e39ea2c98f711f78cafff00ff28f7b2260a 100644 --- a/harmony/splash_screen/src/main/ets/Logger.ts +++ b/harmony/splash_screen/src/main/ets/Logger.ts @@ -1,24 +1,6 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. import hilog from '@ohos.hilog'; diff --git a/harmony/splash_screen/src/main/ets/SplashScreen.ts b/harmony/splash_screen/src/main/ets/SplashScreen.ts index 5a2b8c8f2ee8917e5b815218ca7f5b7da2d4d4b8..e8cea2424be336a53fca60fa8f32c83203a80e8d 100644 --- a/harmony/splash_screen/src/main/ets/SplashScreen.ts +++ b/harmony/splash_screen/src/main/ets/SplashScreen.ts @@ -1,24 +1,6 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. import { TurboModule, TurboModuleContext } from '@rnoh/react-native-openharmony/ts'; import { TM } from './generated/ts' @@ -58,7 +40,7 @@ export class SplashScreen extends TurboModule implements TM.SplashScreen.Spec { const imageSource = image.createImageSource(buffer) // 创建PixelMap const pixelMap = await imageSource.createPixelMap() - this.startWindowIcon = pixelMap; + SplashScreen.startWindowIcon = pixelMap; // 创建子窗口 windowStage.createSubWindow("SplashScreenWindow", (err, data) => { @@ -66,26 +48,26 @@ export class SplashScreen extends TurboModule implements TM.SplashScreen.Spec { Logger.error('Failed to create the subwindow. Cause: ' + JSON.stringify(err)); return; } - this.splashWindow = data; + SplashScreen.splashWindow = data; // 设置子窗口全屏 - this.splashWindow.setFullScreen(true); + SplashScreen.splashWindow.setFullScreen(true); // 为子窗口加载对应的目标页面 - this.splashWindow.setUIContent(pageUrl, (err) => { + SplashScreen.splashWindow.setUIContent(pageUrl, (err) => { if (err.code) { Logger.error('Failed to load the content. Cause:' + JSON.stringify(err)); return; } // 显示子窗口 - this.splashWindow.showWindow((err) => { + SplashScreen.splashWindow.showWindow((err) => { if (err.code) { Logger.error('Failed to show the window. Cause: ' + JSON.stringify(err)); return; } Logger.debug('Succeeded in showing the window.'); }); - this.splashWindow.setWindowBackgroundColor(backgroundColor) + SplashScreen.splashWindow.setWindowBackgroundColor(backgroundColor) }); }) } diff --git a/harmony/splash_screen/src/main/ets/SplashScreenPackage.ts b/harmony/splash_screen/src/main/ets/SplashScreenPackage.ts index 03bb0fe0d8bd06caa0952a903bb22938e923ad16..d0cf6b825bc6abf0564d7dd05834a7c94c93d3aa 100644 --- a/harmony/splash_screen/src/main/ets/SplashScreenPackage.ts +++ b/harmony/splash_screen/src/main/ets/SplashScreenPackage.ts @@ -1,24 +1,6 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. import { RNPackage, TurboModuleContext, TurboModulesFactory } from '@rnoh/react-native-openharmony/ts'; import type { TurboModule } from '@rnoh/react-native-openharmony/ts'; diff --git a/harmony/splash_screen/src/main/ets/SplashScreenView.ets b/harmony/splash_screen/src/main/ets/SplashScreenView.ets index 05a9a3eb47edb139e8e4e9a98a54f1c6de05dc96..ce355ecea43eba447f988fc59b75474a90323566 100644 --- a/harmony/splash_screen/src/main/ets/SplashScreenView.ets +++ b/harmony/splash_screen/src/main/ets/SplashScreenView.ets @@ -1,24 +1,6 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. import { SplashScreen } from './SplashScreen' diff --git a/harmony/splash_screen/ts.ts b/harmony/splash_screen/ts.ts index fdf018dcd86d241e94ece5409e2412673bcf7ccd..06ec58778fc00bd3b549955e927e6780e297839c 100644 --- a/harmony/splash_screen/ts.ts +++ b/harmony/splash_screen/ts.ts @@ -1,24 +1,6 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. export * from "./src/main/ets/SplashScreenPackage" export * from "./src/main/ets/SplashScreen" \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 9d742af23f7452a4f36eda6bc2a8b8dfe0436383..123182353eee623119c3542117499d763aaa1cbd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,24 +1,6 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. import { Platform } from "react-native"; diff --git a/index.js b/index.js index b767ee08b06823160570bebf14889ee09e649074..4db9bb905bcdbd0847e9469c2b517d3d8777a611 100755 --- a/index.js +++ b/index.js @@ -1,24 +1,6 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ + // Copyright (c) 2016 Jia PengHui. All rights reserved. + // Use of this source code is governed by a MIT license that can be + // found in the LICENSE file. /** * SplashScreen diff --git a/src/RNSplashScreenModule.ts b/src/RNSplashScreenModule.ts index 466810cf84b4cb25495e02c2a25e0bd670f5ae3c..576ca7fa9bf112f22a7e27fdec612116177ef087 100644 --- a/src/RNSplashScreenModule.ts +++ b/src/RNSplashScreenModule.ts @@ -1,24 +1,6 @@ -/** - * Copyright (C) 2024 Huawei Device Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ +// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport' import { TurboModuleRegistry } from 'react-native';