• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 grid item style.
23 *
24 * @enum { number }
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @crossplatform
27 * @since 11
28 */
29/**
30 * Defines the grid item style.
31 *
32 * @enum { number }
33 * @syscap SystemCapability.ArkUI.ArkUI.Full
34 * @crossplatform
35 * @atomicservice
36 * @since 12
37 */
38declare enum GridItemStyle {
39  /**
40   * Show none style.
41   *
42   * @syscap SystemCapability.ArkUI.ArkUI.Full
43   * @crossplatform
44   * @since 11
45   */
46  /**
47   * Show none style.
48   *
49   * @syscap SystemCapability.ArkUI.ArkUI.Full
50   * @crossplatform
51   * @atomicservice
52   * @since 12
53   */
54  NONE = 0,
55
56  /**
57   * Show plain style.
58   *
59   * @syscap SystemCapability.ArkUI.ArkUI.Full
60   * @crossplatform
61   * @since 11
62   */
63  /**
64   * Show plain style.
65   *
66   * @syscap SystemCapability.ArkUI.ArkUI.Full
67   * @crossplatform
68   * @atomicservice
69   * @since 12
70   */
71  PLAIN = 1,
72}
73
74/**
75 * Defines the grid item options.
76 *
77 * @interface GridItemOptions
78 * @syscap SystemCapability.ArkUI.ArkUI.Full
79 * @crossplatform
80 * @since 11
81 */
82/**
83 * Defines the grid item options.
84 *
85 * @interface GridItemOptions
86 * @syscap SystemCapability.ArkUI.ArkUI.Full
87 * @crossplatform
88 * @atomicservice
89 * @since 12
90 */
91declare interface GridItemOptions {
92  /**
93   * Describes the GridItem style.
94   *
95   * @type { ?GridItemStyle }
96   * @syscap SystemCapability.ArkUI.ArkUI.Full
97   * @crossplatform
98   * @since 11
99   */
100  /**
101   * Describes the GridItem style.
102   *
103   * @type { ?GridItemStyle }
104   * @syscap SystemCapability.ArkUI.ArkUI.Full
105   * @crossplatform
106   * @atomicservice
107   * @since 12
108   */
109  style?: GridItemStyle;
110}
111
112/**
113 * Mesh container for static fixed-size layout scenarios.
114 *
115 * @interface GridItemInterface
116 * @syscap SystemCapability.ArkUI.ArkUI.Full
117 * @since 7
118 */
119/**
120 * Mesh container for static fixed-size layout scenarios.
121 *
122 * @interface GridItemInterface
123 * @syscap SystemCapability.ArkUI.ArkUI.Full
124 * @crossplatform
125 * @since 10
126 */
127/**
128 * Mesh container for static fixed-size layout scenarios.
129 *
130 * @interface GridItemInterface
131 * @syscap SystemCapability.ArkUI.ArkUI.Full
132 * @crossplatform
133 * @atomicservice
134 * @since 11
135 */
136interface GridItemInterface {
137  /**
138   * Return to get GridItem.
139   *
140   * @returns { GridItemAttribute }
141   * @syscap SystemCapability.ArkUI.ArkUI.Full
142   * @since 7
143   */
144  /**
145   * Return to get GridItem.
146   *
147   * @returns { GridItemAttribute }
148   * @syscap SystemCapability.ArkUI.ArkUI.Full
149   * @crossplatform
150   * @since 10
151   */
152  /**
153   * Return to get GridItem.
154   *
155   * @param { GridItemOptions } value - Defines the grid item options.
156   * @returns { GridItemAttribute }
157   * @syscap SystemCapability.ArkUI.ArkUI.Full
158   * @crossplatform
159   * @atomicservice
160   * @since 11
161   */
162  (value?: GridItemOptions): GridItemAttribute;
163}
164
165/**
166 * @extends CommonMethod<GridItemAttribute>
167 * @syscap SystemCapability.ArkUI.ArkUI.Full
168 * @since 7
169 */
170/**
171 * @extends CommonMethod<GridItemAttribute>
172 * @syscap SystemCapability.ArkUI.ArkUI.Full
173 * @crossplatform
174 * @since 10
175 */
176/**
177 * @extends CommonMethod<GridItemAttribute>
178 * @syscap SystemCapability.ArkUI.ArkUI.Full
179 * @crossplatform
180 * @atomicservice
181 * @since 11
182 */
183declare class GridItemAttribute extends CommonMethod<GridItemAttribute> {
184  /**
185   * This parameter specifies the start line number of the current element.
186   *
187   * @param { number } value
188   * @returns { GridItemAttribute }
189   * @syscap SystemCapability.ArkUI.ArkUI.Full
190   * @since 7
191   */
192  /**
193   * This parameter specifies the start line number of the current element.
194   *
195   * @param { number } value
196   * @returns { GridItemAttribute }
197   * @syscap SystemCapability.ArkUI.ArkUI.Full
198   * @crossplatform
199   * @since 10
200   */
201  /**
202   * This parameter specifies the start line number of the current element.
203   *
204   * @param { number } value
205   * @returns { GridItemAttribute }
206   * @syscap SystemCapability.ArkUI.ArkUI.Full
207   * @crossplatform
208   * @atomicservice
209   * @since 11
210   */
211  rowStart(value: number): GridItemAttribute;
212
213  /**
214   * Specifies the end line number of the current element.
215   *
216   * @param { number } value
217   * @returns { GridItemAttribute }
218   * @syscap SystemCapability.ArkUI.ArkUI.Full
219   * @since 7
220   */
221  /**
222   * Specifies the end line number of the current element.
223   *
224   * @param { number } value
225   * @returns { GridItemAttribute }
226   * @syscap SystemCapability.ArkUI.ArkUI.Full
227   * @crossplatform
228   * @since 10
229   */
230  /**
231   * Specifies the end line number of the current element.
232   *
233   * @param { number } value
234   * @returns { GridItemAttribute }
235   * @syscap SystemCapability.ArkUI.ArkUI.Full
236   * @crossplatform
237   * @atomicservice
238   * @since 11
239   */
240  rowEnd(value: number): GridItemAttribute;
241
242  /**
243   * This parameter specifies the start column number of the current element.
244   *
245   * @param { number } value
246   * @returns { GridItemAttribute }
247   * @syscap SystemCapability.ArkUI.ArkUI.Full
248   * @since 7
249   */
250  /**
251   * This parameter specifies the start column number of the current element.
252   *
253   * @param { number } value
254   * @returns { GridItemAttribute }
255   * @syscap SystemCapability.ArkUI.ArkUI.Full
256   * @crossplatform
257   * @since 10
258   */
259  /**
260   * This parameter specifies the start column number of the current element.
261   *
262   * @param { number } value
263   * @returns { GridItemAttribute }
264   * @syscap SystemCapability.ArkUI.ArkUI.Full
265   * @crossplatform
266   * @atomicservice
267   * @since 11
268   */
269  columnStart(value: number): GridItemAttribute;
270
271  /**
272   * This parameter specifies the end column number of the current element.
273   *
274   * @param { number } value
275   * @returns { GridItemAttribute }
276   * @syscap SystemCapability.ArkUI.ArkUI.Full
277   * @since 7
278   */
279  /**
280   * This parameter specifies the end column number of the current element.
281   *
282   * @param { number } value
283   * @returns { GridItemAttribute }
284   * @syscap SystemCapability.ArkUI.ArkUI.Full
285   * @crossplatform
286   * @since 10
287   */
288  /**
289   * This parameter specifies the end column number of the current element.
290   *
291   * @param { number } value
292   * @returns { GridItemAttribute }
293   * @syscap SystemCapability.ArkUI.ArkUI.Full
294   * @crossplatform
295   * @atomicservice
296   * @since 11
297   */
298  columnEnd(value: number): GridItemAttribute;
299
300  /**
301   * This parameter specifies whether to recreate the node when the component build is triggered.
302   *
303   * @param { boolean } value
304   * @returns { GridItemAttribute }
305   * @syscap SystemCapability.ArkUI.ArkUI.Full
306   * @since 7
307   * @deprecated since 9
308   */
309  forceRebuild(value: boolean): GridItemAttribute;
310
311  /**
312   * Called when judging whether it is selectable.
313   *
314   * @param { boolean } value
315   * @returns { GridItemAttribute }
316   * @syscap SystemCapability.ArkUI.ArkUI.Full
317   * @since 8
318   */
319  /**
320   * Called when judging whether it is selectable.
321   *
322   * @param { boolean } value
323   * @returns { GridItemAttribute }
324   * @syscap SystemCapability.ArkUI.ArkUI.Full
325   * @crossplatform
326   * @since 10
327   */
328  /**
329   * Called when judging whether it is selectable.
330   *
331   * @param { boolean } value
332   * @returns { GridItemAttribute }
333   * @syscap SystemCapability.ArkUI.ArkUI.Full
334   * @crossplatform
335   * @atomicservice
336   * @since 11
337   */
338  selectable(value: boolean): GridItemAttribute;
339
340  /**
341   * Called when judging whether it is selected.
342   * This parameter supports $$ for two-way binding of variables.
343   *
344   * @param { boolean } value - if the gridItem is selected.
345   * @returns { GridItemAttribute } the attribute of the gridItem.
346   * @syscap SystemCapability.ArkUI.ArkUI.Full
347   * @crossplatform
348   * @since 10
349   */
350  /**
351   * Called when judging whether it is selected.
352   * This parameter supports $$ for two-way binding of variables.
353   *
354   * @param { boolean } value - if the gridItem is selected.
355   * @returns { GridItemAttribute } the attribute of the gridItem.
356   * @syscap SystemCapability.ArkUI.ArkUI.Full
357   * @crossplatform
358   * @atomicservice
359   * @since 11
360   */
361  selected(value: boolean): GridItemAttribute;
362
363  /**
364   * Called when the gridItem is selected.
365   *
366   * @param { function } event
367   * @returns { GridItemAttribute }
368   * @syscap SystemCapability.ArkUI.ArkUI.Full
369   * @since 8
370   */
371  /**
372   * Called when the gridItem is selected.
373   *
374   * @param { function } event
375   * @returns { GridItemAttribute }
376   * @syscap SystemCapability.ArkUI.ArkUI.Full
377   * @crossplatform
378   * @since 10
379   */
380  /**
381   * Called when the gridItem is selected.
382   *
383   * @param { function } event
384   * @returns { GridItemAttribute }
385   * @syscap SystemCapability.ArkUI.ArkUI.Full
386   * @crossplatform
387   * @atomicservice
388   * @since 11
389   */
390  onSelect(event: (isSelected: boolean) => void): GridItemAttribute;
391}
392
393/**
394 * Defines GridItem Component.
395 *
396 * @syscap SystemCapability.ArkUI.ArkUI.Full
397 * @since 7
398 */
399/**
400 * Defines GridItem Component.
401 *
402 * @syscap SystemCapability.ArkUI.ArkUI.Full
403 * @crossplatform
404 * @since 10
405 */
406/**
407 * Defines GridItem Component.
408 *
409 * @syscap SystemCapability.ArkUI.ArkUI.Full
410 * @crossplatform
411 * @atomicservice
412 * @since 11
413 */
414declare const GridItem: GridItemInterface
415
416/**
417 * Defines GridItem Component instance.
418 *
419 * @syscap SystemCapability.ArkUI.ArkUI.Full
420 * @since 7
421 */
422/**
423 * Defines GridItem Component instance.
424 *
425 * @syscap SystemCapability.ArkUI.ArkUI.Full
426 * @crossplatform
427 * @since 10
428 */
429/**
430 * Defines GridItem Component instance.
431 *
432 * @syscap SystemCapability.ArkUI.ArkUI.Full
433 * @crossplatform
434 * @atomicservice
435 * @since 11
436 */
437declare const GridItemInstance: GridItemAttribute;
438