代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/interface_sdk-js 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* Copyright (c) 2024 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
*/
/**
* Defines the struct of Theme.
*
* @interface Theme
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export declare interface Theme {
/**
* Define tokens associated with color resources.
*
* @type { Colors }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
colors: Colors;
}
/**
* Defines the struct of Colors.
*
* @interface Colors
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export declare interface Colors {
/**
* System brand Color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
brand: ResourceColor;
/**
* System warning Color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
warning: ResourceColor;
/**
* System alert Color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
alert: ResourceColor;
/**
* System confirm Color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
confirm: ResourceColor;
/**
* First level text color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontPrimary: ResourceColor;
/**
* Secondary text color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontSecondary: ResourceColor;
/**
* tertiary text color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontTertiary: ResourceColor;
/**
* Fourth text color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontFourth: ResourceColor;
/**
* Emphasize text color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontEmphasize: ResourceColor;
/**
* First level text inversion, used on colored backgrounds.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontOnPrimary: ResourceColor;
/**
* Secondary level text inversion, used on colored backgrounds.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontOnSecondary: ResourceColor;
/**
* Tertiary level text inversion, used on colored backgrounds.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontOnTertiary: ResourceColor;
/**
* Fourth level text inversion, used on colored backgrounds.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
fontOnFourth: ResourceColor;
/**
* First level icon color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconPrimary: ResourceColor;
/**
* Secondary level icon color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconSecondary: ResourceColor;
/**
* Tertiary level icon color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconTertiary: ResourceColor;
/**
* Fourth level icon color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconFourth: ResourceColor;
/**
* Emphasize level icon color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconEmphasize: ResourceColor;
/**
* Secondary emphasize level icon color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconSubEmphasize: ResourceColor;
/**
* First level icon reversed, used on a colored background.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconOnPrimary: ResourceColor;
/**
* Secondary level icon reversed, used on a colored background.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconOnSecondary: ResourceColor;
/**
* Tertiary level icon reversed, used on a colored background.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconOnTertiary: ResourceColor;
/**
* Fourth level icon reversed, used on a colored background.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
iconOnFourth: ResourceColor;
/**
* System Primary level background color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
backgroundPrimary: ResourceColor;
/**
* System Secondary level background color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
backgroundSecondary: ResourceColor;
/**
* System tertiary level background color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
backgroundTertiary: ResourceColor;
/**
* System fourth level background color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
backgroundFourth: ResourceColor;
/**
* System emphasize level background color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
backgroundEmphasize: ResourceColor;
/**
* CompForegroundPrimary color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compForegroundPrimary: ResourceColor;
/**
* CompBackgroundPrimary color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compBackgroundPrimary: ResourceColor;
/**
* CompBackgroundPrimaryTran color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compBackgroundPrimaryTran: ResourceColor;
/**
* CompBackgroundPrimaryContrary color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compBackgroundPrimaryContrary: ResourceColor;
/**
* CompBackgroundGray color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compBackgroundGray: ResourceColor;
/**
* 10% black universal control background.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compBackgroundSecondary: ResourceColor;
/**
* 5% black universal control background.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compBackgroundTertiary: ResourceColor;
/**
* 100% bright brand background color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compBackgroundEmphasize: ResourceColor;
/**
* Black neutral high gloss color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compBackgroundNeutral: ResourceColor;
/**
* 20% High gloss brand background color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compEmphasizeSecondary: ResourceColor;
/**
* 10% High gloss brand background color.
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compEmphasizeTertiary: ResourceColor;
/**
* Universal Division Line Color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compDivider: ResourceColor;
/**
* CompCommonContrary Color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compCommonContrary: ResourceColor;
/**
* CompBackgroundFocus Color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compBackgroundFocus: ResourceColor;
/**
* CompFocusedPrimary Color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compFocusedPrimary: ResourceColor;
/**
* CompFocusedSecondary Color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compFocusedSecondary: ResourceColor;
/**
* CompFocusedTertiary Color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
compFocusedTertiary: ResourceColor;
/**
* Hover interactive color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
interactiveHover: ResourceColor;
/**
* Pressed interactive color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
interactivePressed: ResourceColor;
/**
* Focus interactive color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
interactiveFocus: ResourceColor;
/**
* Active interactive color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
interactiveActive: ResourceColor;
/**
* Select interactive color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
interactiveSelect: ResourceColor;
/**
* Click interactive color
*
* @type { ResourceColor }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
interactiveClick: ResourceColor;
}
/**
* Defines the struct of CustomTheme.
*
* @interface CustomTheme
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export declare interface CustomTheme {
/**
* Define tokens associated with color resources..
*
* @type { ?CustomColors }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
colors?: CustomColors;
}
/**
* Defines the struct of CustomColors.
*
* @typedef { Partial<Colors> } CustomColors
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export declare type CustomColors = Partial<Colors>;
/**
* Class ThemeControl provides the Theme management for whole Ability and pages.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
export declare class ThemeControl {
/**
* Sets the default Theme:
* - for whole Ability when invoked from the Ability level code.
* - for the ArkUI page and for later opened pages when invoked at the ArkUI page level.
*
* @param { CustomTheme } theme
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 12
*/
static setDefaultTheme(theme: CustomTheme): void;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。