[go: nahoru, domu]

blob: 5ba5e010cbc6516a165f06a7ad6854dc1f6b10ac [file] [log] [blame]
Mihai Popa8b99ffb2019-11-26 18:45:57 +00001/*
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
17package androidx.ui.core
18
Andrey Kulikov47f0e1a2020-01-28 13:52:46 +000019import androidx.ui.unit.Density
George Mount842c8c12020-01-08 16:03:42 -080020
Mihai Popa8b99ffb2019-11-26 18:45:57 +000021/**
Mihai Popabbf5ddd2020-05-28 20:44:17 +010022 * 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 Popa8b99ffb2019-11-26 18:45:57 +000026 */
27interface ParentDataModifier : Modifier.Element {
28 /**
Mihai Popabbf5ddd2020-05-28 20:44:17 +010029 * Provides a parentData, given the [parentData] already provided through the modifier's chain.
Mihai Popa8b99ffb2019-11-26 18:45:57 +000030 */
Mihai Popabbf5ddd2020-05-28 20:44:17 +010031 fun Density.modifyParentData(parentData: Any?): Any?
Mihai Popa8b99ffb2019-11-26 18:45:57 +000032}