1/* 2 * Copyright (c) 2021 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 * Provides the interface for the marquee attributes. 18 * @since 8 19 */ 20interface MarqueeInterface { 21 /** 22 * Create marquee. 23 * @since 8 24 */ 25 (value: { start: boolean; step?: number; loop?: number; fromStart?: boolean; src: string }): MarqueeAttribute; 26} 27 28/** 29 * Declares marquee properties. 30 * @since 8 31 */ 32declare class MarqueeAttribute extends CommonMethod<MarqueeAttribute> { 33 /** 34 * Set marquee font Color. 35 * @since 8 36 */ 37 fontColor(value: ResourceColor): MarqueeAttribute; 38 39 /** 40 * Set marquee font size. 41 * @since 8 42 */ 43 fontSize(value: Length): MarqueeAttribute; 44 45 /** 46 * Set marquee allow scale. 47 * @since 8 48 */ 49 allowScale(value: boolean): MarqueeAttribute; 50 51 /** 52 * Set marquee font weight. 53 * @since 8 54 */ 55 fontWeight(value: number | FontWeight | string): MarqueeAttribute; 56 57 /** 58 * Set marquee font family. 59 * @since 8 60 */ 61 fontFamily(value: string | Resource): MarqueeAttribute; 62 63 /** 64 * Called when scrolling starts. 65 * @since 8 66 */ 67 onStart(event: () => void): MarqueeAttribute; 68 69 /** 70 * Called when scrolling to the bottom. 71 * @since 8 72 */ 73 onBounce(event: () => void): MarqueeAttribute; 74 75 /** 76 * Called when scrolling is complete. 77 * @since 8 78 */ 79 onFinish(event: () => void): MarqueeAttribute; 80} 81 82declare const Marquee: MarqueeInterface; 83declare const MarqueeInstance: MarqueeAttribute; 84