1/* 2 * Copyright (c) 2022-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/** 17 * @file 18 * @kit AbilityKit 19 */ 20 21import contextConstant from "./@ohos.app.ability.contextConstant"; 22import image from "./@ohos.multimedia.image"; 23 24/** 25 * StartOptions is the basic communication component of the system. 26 * 27 * @syscap SystemCapability.Ability.AbilityRuntime.Core 28 * @stagemodelonly 29 * @since 9 30 */ 31/** 32 * StartOptions is the basic communication component of the system. 33 * 34 * @syscap SystemCapability.Ability.AbilityRuntime.Core 35 * @stagemodelonly 36 * @atomicservice 37 * @since 11 38 */ 39export default class StartOptions { 40 /** 41 * The type of {@link ohos.app.ability.AbilityConstant#WindowMode} 42 * {@link ohos.app.ability.AbilityConstant#WindowMode.WINDOW_MODE_SPLIT_PRIMARY} and 43 * {@link ohos.app.ability.AbilityConstant#WindowMode.WINDOW_MODE_SPLIT_SECONDARY} are 44 * valid only in intra-app redirection scenarios. 45 * 46 * @type { ?number } 47 * @syscap SystemCapability.Ability.AbilityRuntime.Core 48 * @stagemodelonly 49 * @since 12 50 */ 51 windowMode?: number; 52 53 /** 54 * The type of displayId 55 * 56 * @type { ?number } 57 * @syscap SystemCapability.Ability.AbilityRuntime.Core 58 * @stagemodelonly 59 * @since 9 60 */ 61 /** 62 * The type of displayId 63 * 64 * @type { ?number } 65 * @syscap SystemCapability.Ability.AbilityRuntime.Core 66 * @stagemodelonly 67 * @atomicservice 68 * @since 11 69 */ 70 displayId?: number; 71 72 /** 73 * The target ability with animation or without 74 * 75 * @type { ?boolean } 76 * @syscap SystemCapability.Ability.AbilityRuntime.Core 77 * @stagemodelonly 78 * @since 11 79 */ 80 withAnimation?: boolean; 81 82 /** 83 * The left position of window rectangle 84 * 85 * @type { ?number } 86 * @syscap SystemCapability.Ability.AbilityRuntime.Core 87 * @stagemodelonly 88 * @since 11 89 */ 90 windowLeft?: number; 91 92 /** 93 * The top position of window rectangle 94 * 95 * @type { ?number } 96 * @syscap SystemCapability.Ability.AbilityRuntime.Core 97 * @stagemodelonly 98 * @since 11 99 */ 100 windowTop?: number; 101 102 /** 103 * The width of window rectangle 104 * 105 * @type { ?number } 106 * @syscap SystemCapability.Ability.AbilityRuntime.Core 107 * @stagemodelonly 108 * @since 11 109 */ 110 windowWidth?: number; 111 112 /** 113 * The height of window rectangle 114 * 115 * @type { ?number } 116 * @syscap SystemCapability.Ability.AbilityRuntime.Core 117 * @stagemodelonly 118 * @since 11 119 */ 120 windowHeight?: number; 121 122 /** 123 * Indicates the cold startup window is focused. 124 * 125 * @type { ?boolean } 126 * @syscap SystemCapability.Ability.AbilityRuntime.Core 127 * @systemapi 128 * @stagemodelonly 129 * @since 12 130 */ 131 windowFocused?: boolean; 132 133 /** 134 * The process mode. 135 * This property only takes effect when calling UIAbilityContext.startAbility. 136 * The properties processMode and startupVisibility must be set simultaneously. 137 * 138 * @type { ?contextConstant.ProcessMode } 139 * @syscap SystemCapability.Ability.AbilityRuntime.Core 140 * @stagemodelonly 141 * @since 12 142 */ 143 processMode?: contextConstant.ProcessMode; 144 145 /** 146 * The ability visibility after the new process startup. 147 * This property only takes effect when calling UIAbilityContext.startAbility. 148 * The properties processMode and startupVisibility must be set simultaneously. 149 * 150 * @type { ?contextConstant.StartupVisibility } 151 * @syscap SystemCapability.Ability.AbilityRuntime.Core 152 * @stagemodelonly 153 * @since 12 154 */ 155 startupVisibility?: contextConstant.StartupVisibility; 156 157 /** 158 * The start window Icon. 159 * 160 * @type { ?image.PixelMap } 161 * @syscap SystemCapability.Ability.AbilityRuntime.Core 162 * @stagemodelonly 163 * @since 14 164 */ 165 startWindowIcon?: image.PixelMap; 166 167 /** 168 * The start window backgroundColor. 169 * 170 * @type { ?string } 171 * @syscap SystemCapability.Ability.AbilityRuntime.Core 172 * @stagemodelonly 173 * @since 14 174 */ 175 startWindowBackgroundColor?: string; 176}