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