1/* 2 * Copyright (c) 2021-2023 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 ArkUI 19 */ 20 21/** 22 * Defines the ColorMode of device. 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 7 27 */ 28/** 29 * Defines the ColorMode of device. 30 * 31 * @enum { number } 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @atomicservice 34 * @since arkts {'1.1':'11','1.2':'20'} 35 * @arkts 1.1&1.2 36 */ 37declare enum ColorMode { 38 /** 39 * Light mode. 40 * 41 * @syscap SystemCapability.ArkUI.ArkUI.Full 42 * @since 7 43 */ 44 /** 45 * Light mode. 46 * 47 * @syscap SystemCapability.ArkUI.ArkUI.Full 48 * @atomicservice 49 * @since arkts {'1.1':'11','1.2':'20'} 50 * @arkts 1.1&1.2 51 */ 52 LIGHT = 0, 53 54 /** 55 * Dark mode. 56 * 57 * @syscap SystemCapability.ArkUI.ArkUI.Full 58 * @since 7 59 */ 60 /** 61 * Dark mode. 62 * 63 * @syscap SystemCapability.ArkUI.ArkUI.Full 64 * @atomicservice 65 * @since arkts {'1.1':'11','1.2':'20'} 66 * @arkts 1.1&1.2 67 */ 68 DARK, 69} 70 71/** 72 * Defines the LayoutDirection of device. 73 * 74 * @enum { number } 75 * @syscap SystemCapability.ArkUI.ArkUI.Full 76 * @since 7 77 */ 78/** 79 * Defines the LayoutDirection of device. 80 * 81 * @enum { number } 82 * @syscap SystemCapability.ArkUI.ArkUI.Full 83 * @atomicservice 84 * @since arkts {'1.1':'11','1.2':'20'} 85 * @arkts 1.1&1.2 86 */ 87declare enum LayoutDirection { 88 /** 89 * Elements are laid out from left to right. 90 * 91 * @syscap SystemCapability.ArkUI.ArkUI.Full 92 * @since 7 93 */ 94 /** 95 * Elements are laid out from left to right. 96 * 97 * @syscap SystemCapability.ArkUI.ArkUI.Full 98 * @atomicservice 99 * @since arkts {'1.1':'11','1.2':'20'} 100 * @arkts 1.1&1.2 101 */ 102 LTR, 103 104 /** 105 * Elements are laid out from right to left. 106 * 107 * @syscap SystemCapability.ArkUI.ArkUI.Full 108 * @since 7 109 */ 110 /** 111 * Elements are laid out from right to left. 112 * 113 * @syscap SystemCapability.ArkUI.ArkUI.Full 114 * @atomicservice 115 * @since arkts {'1.1':'11','1.2':'20'} 116 * @arkts 1.1&1.2 117 */ 118 RTL, 119 120 /** 121 * Elements are laid out from auto. 122 * 123 * @syscap SystemCapability.ArkUI.ArkUI.Full 124 * @since 8 125 */ 126 /** 127 * Elements are laid out from auto. 128 * 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @atomicservice 131 * @since arkts {'1.1':'11','1.2':'20'} 132 * @arkts 1.1&1.2 133 */ 134 Auto, 135} 136 137/** 138 * Defines the base class of storage. 139 * 140 * @syscap SystemCapability.ArkUI.ArkUI.Full 141 * @systemapi 142 * @since arkts {'1.1':'7','1.2':'20'} 143 * @arkts 1.1&1.2 144 */ 145declare class Storage { 146 /** 147 * Constructor parameters. 148 * 149 * @param { boolean } needCrossThread 150 * @param { string } file 151 * @syscap SystemCapability.ArkUI.ArkUI.Full 152 * @systemapi 153 * @since arkts {'1.1':'7','1.2':'20'} 154 * @arkts 1.1&1.2 155 */ 156 constructor(needCrossThread?: boolean, file?: string); 157 158 /** 159 * Called when data is obtained. 160 * 161 * @param { string } key 162 * @returns { string | undefined } 163 * @syscap SystemCapability.ArkUI.ArkUI.Full 164 * @systemapi 165 * @since arkts {'1.1':'7','1.2':'20'} 166 * @arkts 1.1&1.2 167 */ 168 get(key: string): string | undefined; 169 170 /** 171 * Called when setting. 172 * 173 * @param { string } key 174 * @param { any } val 175 * @syscap SystemCapability.ArkUI.ArkUI.Full 176 * @systemapi 177 * @since 7 178 */ 179 set(key: string, val: any): void; 180 181 /** 182 * Called when setting. 183 * 184 * @param { string } key 185 * @param { Object | undefined | null } val 186 * @syscap SystemCapability.ArkUI.ArkUI.Full 187 * @systemapi 188 * @since 20 189 * @arkts 1.2 190 */ 191 set(key: string, val: Object | undefined | null): void; 192 193 /** 194 * Called when data is cleared. 195 * 196 * @syscap SystemCapability.ArkUI.ArkUI.Full 197 * @systemapi 198 * @since arkts {'1.1':'7','1.2':'20'} 199 * @arkts 1.1&1.2 200 */ 201 clear(): void; 202 203 /** 204 * Called when data is deleted. 205 * 206 * @param { string } key 207 * @syscap SystemCapability.ArkUI.ArkUI.Full 208 * @systemapi 209 * @since arkts {'1.1':'7','1.2':'20'} 210 * @arkts 1.1&1.2 211 */ 212 delete(key: string): void; 213} 214