/* * Copyright (c) 2021-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file * @kit ArkUI */ /** * The challenge result based on input pattern for control pattern lock component. * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * The challenge result based on input pattern for control pattern lock component. * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ declare enum PatternLockChallengeResult { /** * The challenge result is correct. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * The challenge result is correct. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ CORRECT = 1, /** * The challenge result is wrong. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * The challenge result is wrong. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ WRONG = 2 } /** * Defines the options of active circle style. * * @interface CircleStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ declare interface CircleStyleOptions { /** * The circle color when cell is active state. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ color?: ResourceColor; /** * The circle radius when cell is active state. * * @type { ?LengthMetrics } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ radius?: LengthMetrics; /** * Enable the wave effect when cell is active. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ enableWaveEffect?: boolean; /** * Enable the activity circle style displayed in the foreground. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 15 */ enableForeground?: boolean; } /** * Provides methods for control pattern lock component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Provides methods for control pattern lock component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Provides methods for control pattern lock component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ declare class PatternLockController { /** * constructor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * constructor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * constructor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ constructor(); /** * Reset pattern lock. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Reset pattern lock. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Reset pattern lock. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ reset(); /** * Set challenge result. * @param { PatternLockChallengeResult } result - The challenge result based on input pattern. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Set challenge result. * @param { PatternLockChallengeResult } result - The challenge result based on input pattern. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ setChallengeResult(result: PatternLockChallengeResult): void; } /** * Provides an interface for generating PatternLock. * * @interface PatternLockInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Provides an interface for generating PatternLock. * * @interface PatternLockInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Provides an interface for generating PatternLock. * * @interface PatternLockInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ interface PatternLockInterface { /** * Constructor. * * @param { PatternLockController } [controller] - controller * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Constructor. * * @param { PatternLockController } [controller] controller * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Constructor. * * @param { PatternLockController } [controller] controller * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ (controller?: PatternLockController): PatternLockAttribute; } /** * Provides methods for attribute pattern lock component. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Provides methods for attribute pattern lock component. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Provides methods for attribute pattern lock component. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ declare class PatternLockAttribute extends CommonMethod { /** * The square side length of pattern lock component. * * @param { Length } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * The square side length of pattern lock component. * * @param { Length } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The square side length of pattern lock component. * * @param { Length } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ sideLength(value: Length): PatternLockAttribute; /** * Circle radius. * * @param { Length } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Circle radius. * * @param { Length } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Circle radius. * * @param { Length } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ circleRadius(value: Length): PatternLockAttribute; /** * The background color. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * The background color. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The background color. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ backgroundColor(value: ResourceColor): PatternLockAttribute; /** * Regular color. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Regular color. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Regular color. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ regularColor(value: ResourceColor): PatternLockAttribute; /** * The color when cell is selected. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * The color when cell is selected. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The color when cell is selected. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ selectedColor(value: ResourceColor): PatternLockAttribute; /** * The color when cell is active state. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * The color when cell is active state. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The color when cell is active state. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ activeColor(value: ResourceColor): PatternLockAttribute; /** * The path line color. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * The path line color. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The path line color. * * @param { ResourceColor } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ pathColor(value: ResourceColor): PatternLockAttribute; /** * The path line stroke width. * * @param { number | string } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * The path line stroke width. * * @param { number | string } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The path line stroke width. * * @param { number | string } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ pathStrokeWidth(value: number | string): PatternLockAttribute; /** * Called when the pattern input completed. * * @param { function } callback * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Called when the pattern input completed. * * @param { function } callback * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when the pattern input completed. * * @param { function } callback * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onPatternComplete(callback: (input: Array) => void): PatternLockAttribute; /** * Called when judging whether the input state can be reset by touch pattern lock. * * @param { boolean } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Called when judging whether the input state can be reset by touch pattern lock. * * @param { boolean } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Called when judging whether the input state can be reset by touch pattern lock. * * @param { boolean } value * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ autoReset(value: boolean): PatternLockAttribute; /** * Called when connecting to a grid dot. * @param { import('../api/@ohos.base').Callback } callback - A callback instance used when connection to a grid dot. * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Called when connecting to a grid dot. * @param { import('../api/@ohos.base').Callback } callback - A callback instance used when connection to a grid dot. * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ onDotConnect(callback: import('../api/@ohos.base').Callback): PatternLockAttribute; /** * The activate circle style. * * @param { Optional } options - the circle style setting options * @returns { PatternLockAttribute } PatternLockAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ activateCircleStyle(options: Optional): PatternLockAttribute; /** * Skip unselected point that the path passes through. * * @param { boolean } skipped * @returns { PatternLockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 15 */ skipUnselectedPoint(skipped: boolean): PatternLockAttribute; } /** * Defines PatternLock Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Defines PatternLock Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines PatternLock Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ declare const PatternLock: PatternLockInterface; /** * Defines PatternLock Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** * Defines PatternLock Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines PatternLock Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ declare const PatternLockInstance: PatternLockAttribute;