Nikolay Igotti | 9ea0c1f | 2020-06-30 12:27:21 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2020 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 | package androidx.ui.core |
| 17 | |
| 18 | import androidx.compose.Composable |
| 19 | import androidx.compose.Composition |
| 20 | import androidx.compose.CompositionReference |
| 21 | import androidx.compose.ExperimentalComposeApi |
| 22 | import androidx.compose.Recomposer |
| 23 | import androidx.ui.util.annotation.MainThread |
| 24 | |
| 25 | @OptIn(ExperimentalLayoutNodeApi::class) |
| 26 | internal expect fun actualSubcomposeInto( |
| 27 | container: LayoutNode, |
| 28 | recomposer: Recomposer, |
| 29 | parent: CompositionReference?, |
| 30 | composable: @Composable () -> Unit |
| 31 | ): Composition |
| 32 | |
| 33 | @OptIn(ExperimentalComposeApi::class, ExperimentalLayoutNodeApi::class) |
| 34 | @MainThread |
| 35 | fun subcomposeInto( |
| 36 | container: LayoutNode, |
| 37 | recomposer: Recomposer, |
| 38 | parent: CompositionReference? = null, |
| 39 | composable: @Composable () -> Unit |
| 40 | ): Composition = actualSubcomposeInto(container, recomposer, parent, composable) |