1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef WINDOW_STAGE_IMPL_H 17 #define WINDOW_STAGE_IMPL_H 18 19 #include "ffi_remote_data.h" 20 #include "window_scene.h" 21 #include "window_utils.h" 22 23 namespace OHOS { 24 namespace Rosen { 25 class CJWindowStageImpl : public OHOS::FFI::FFIData { 26 public: CJWindowStageImpl(const std::shared_ptr<WindowScene> & windowScene)27 explicit CJWindowStageImpl(const std::shared_ptr<WindowScene>& windowScene): windowScene_(windowScene) {} 28 int32_t GetMainWindow(int64_t& windowId); 29 int32_t CreateSubWindow(std::string name, int64_t& windowId); 30 RetStruct GetSubWindow(); 31 int32_t OnLoadContent(const std::string& contexUrl, const std::string& storageJson, bool isLoadedByName); 32 int32_t DisableWindowDecor(); 33 int32_t SetShowOnLockScreen(bool showOnLockScreen); 34 static std::shared_ptr<CJWindowStageImpl> CreateCJWindowStage(std::shared_ptr<WindowScene> windowScene); 35 private: 36 std::weak_ptr<Rosen::WindowScene> windowScene_; 37 }; 38 } 39 } 40 #endif // WINDOW_STAGE_IMPL_H 41