Mihai Popa | 8b99ffb | 2019-11-26 18:45:57 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package androidx.ui.core |
| 18 | |
Andrey Kulikov | 47f0e1a | 2020-01-28 13:52:46 +0000 | [diff] [blame] | 19 | import androidx.ui.unit.Density |
George Mount | 842c8c1 | 2020-01-08 16:03:42 -0800 | [diff] [blame] | 20 | |
Mihai Popa | 8b99ffb | 2019-11-26 18:45:57 +0000 | [diff] [blame] | 21 | /** |
Mihai Popa | bbf5ddd | 2020-05-28 20:44:17 +0100 | [diff] [blame] | 22 | * A [Modifier] that provides data to the parent [Layout]. This can be read from within the |
| 23 | * the [Layout] during measurement and positioning, via [IntrinsicMeasurable.parentData]. |
| 24 | * Th parent data is commonly used to inform the parent how the child [Layout] should be measured |
| 25 | * and positioned. |
Mihai Popa | 8b99ffb | 2019-11-26 18:45:57 +0000 | [diff] [blame] | 26 | */ |
| 27 | interface ParentDataModifier : Modifier.Element { |
| 28 | /** |
Mihai Popa | bbf5ddd | 2020-05-28 20:44:17 +0100 | [diff] [blame] | 29 | * Provides a parentData, given the [parentData] already provided through the modifier's chain. |
Mihai Popa | 8b99ffb | 2019-11-26 18:45:57 +0000 | [diff] [blame] | 30 | */ |
Mihai Popa | bbf5ddd | 2020-05-28 20:44:17 +0100 | [diff] [blame] | 31 | fun Density.modifyParentData(parentData: Any?): Any? |
Mihai Popa | 8b99ffb | 2019-11-26 18:45:57 +0000 | [diff] [blame] | 32 | } |