1 /* 2 * Copyright (c) 2025 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 OHOS_ABILITY_RUNTIME_ANI_COMMON_START_OPTIONS_H 17 #define OHOS_ABILITY_RUNTIME_ANI_COMMON_START_OPTIONS_H 18 19 #include "start_options.h" 20 #include "ani_common_util.h" 21 #ifdef START_WINDOW_OPTIONS_WITH_PIXELMAP 22 #include "pixel_map_ani.h" 23 #include "image_ani_utils.h" 24 #endif 25 namespace OHOS { 26 namespace AppExecFwk { 27 bool UnwrapStartOptionsWithProcessOption(ani_env *env, ani_object param, AAFwk::StartOptions &startOptions); 28 bool UnwrapStartOptions(ani_env *env, ani_object param, AAFwk::StartOptions &startOptions); 29 bool UnwrapProcessOptions(ani_env *env, ani_object param, std::shared_ptr<AAFwk::ProcessOptions> &processOptions); 30 31 #ifdef START_WINDOW_OPTIONS_WITH_PIXELMAP 32 bool UnwrapPixelMapByPropertyName( 33 ani_env *env, ani_object EnvObject, const char *propertyName, std::shared_ptr<Media::PixelMap> &value); 34 bool UnwrapPixelMapFromAni(ani_env *env, ani_object param, std::shared_ptr<Media::PixelMap> &value); 35 #endif 36 37 bool UnwrapStartWindowOption(ani_env *env, ani_object param, 38 std::shared_ptr<AAFwk::StartWindowOption> &startWindowOption); 39 } // namespace AppExecFwk 40 } // namespace OHOS 41 #endif // OHOS_ABILITY_RUNTIME_ANI_COMMON_START_OPTIONS_H