-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add UiConfiguration.layoutDirection and populate it on all platforms (#…
- Loading branch information
1 parent
51b797c
commit 41b14f6
Showing
13 changed files
with
153 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ final class app.cash.redwood.ui/Size { // app.cash.redwood.ui/Size|null[0] | |
final fun <get-width>(): app.cash.redwood.ui/Dp // app.cash.redwood.ui/Size.width.<get-width>|<get-width>(){}[0] | ||
} | ||
final class app.cash.redwood.ui/UiConfiguration { // app.cash.redwood.ui/UiConfiguration|null[0] | ||
constructor <init>(kotlin/Boolean = ..., app.cash.redwood.ui/Margin = ..., app.cash.redwood.ui/Size = ..., kotlin/Double = ...) // app.cash.redwood.ui/UiConfiguration.<init>|<init>(kotlin.Boolean;app.cash.redwood.ui.Margin;app.cash.redwood.ui.Size;kotlin.Double){}[0] | ||
constructor <init>(kotlin/Boolean = ..., app.cash.redwood.ui/Margin = ..., app.cash.redwood.ui/Size = ..., kotlin/Double = ..., app.cash.redwood.ui/LayoutDirection = ...) // app.cash.redwood.ui/UiConfiguration.<init>|<init>(kotlin.Boolean;app.cash.redwood.ui.Margin;app.cash.redwood.ui.Size;kotlin.Double;app.cash.redwood.ui.LayoutDirection){}[0] | ||
final fun equals(kotlin/Any?): kotlin/Boolean // app.cash.redwood.ui/UiConfiguration.equals|equals(kotlin.Any?){}[0] | ||
final fun hashCode(): kotlin/Int // app.cash.redwood.ui/UiConfiguration.hashCode|hashCode(){}[0] | ||
final fun toString(): kotlin/String // app.cash.redwood.ui/UiConfiguration.toString|toString(){}[0] | ||
|
@@ -110,16 +110,28 @@ final class app.cash.redwood.ui/UiConfiguration { // app.cash.redwood.ui/UiConfi | |
} | ||
final object Companion { // app.cash.redwood.ui/UiConfiguration.Companion|null[0] | ||
final fun serializer(): kotlinx.serialization/KSerializer<app.cash.redwood.ui/UiConfiguration> // app.cash.redwood.ui/UiConfiguration.Companion.serializer|serializer(){}[0] | ||
final val $childSerializers // app.cash.redwood.ui/UiConfiguration.Companion.$childSerializers|{}$childSerializers[0] | ||
} | ||
final val darkMode // app.cash.redwood.ui/UiConfiguration.darkMode|{}darkMode[0] | ||
final fun <get-darkMode>(): kotlin/Boolean // app.cash.redwood.ui/UiConfiguration.darkMode.<get-darkMode>|<get-darkMode>(){}[0] | ||
final val density // app.cash.redwood.ui/UiConfiguration.density|{}density[0] | ||
final fun <get-density>(): kotlin/Double // app.cash.redwood.ui/UiConfiguration.density.<get-density>|<get-density>(){}[0] | ||
final val layoutDirection // app.cash.redwood.ui/UiConfiguration.layoutDirection|{}layoutDirection[0] | ||
final fun <get-layoutDirection>(): app.cash.redwood.ui/LayoutDirection // app.cash.redwood.ui/UiConfiguration.layoutDirection.<get-layoutDirection>|<get-layoutDirection>(){}[0] | ||
final val safeAreaInsets // app.cash.redwood.ui/UiConfiguration.safeAreaInsets|{}safeAreaInsets[0] | ||
final fun <get-safeAreaInsets>(): app.cash.redwood.ui/Margin // app.cash.redwood.ui/UiConfiguration.safeAreaInsets.<get-safeAreaInsets>|<get-safeAreaInsets>(){}[0] | ||
final val viewportSize // app.cash.redwood.ui/UiConfiguration.viewportSize|{}viewportSize[0] | ||
final fun <get-viewportSize>(): app.cash.redwood.ui/Size // app.cash.redwood.ui/UiConfiguration.viewportSize.<get-viewportSize>|<get-viewportSize>(){}[0] | ||
} | ||
final enum class app.cash.redwood.ui/LayoutDirection : kotlin/Enum<app.cash.redwood.ui/LayoutDirection> { // app.cash.redwood.ui/LayoutDirection|null[0] | ||
enum entry Auto // app.cash.redwood.ui/LayoutDirection.Auto|null[0] | ||
enum entry Ltr // app.cash.redwood.ui/LayoutDirection.Ltr|null[0] | ||
enum entry Rtl // app.cash.redwood.ui/LayoutDirection.Rtl|null[0] | ||
final fun valueOf(kotlin/String): app.cash.redwood.ui/LayoutDirection // app.cash.redwood.ui/LayoutDirection.valueOf|valueOf#static(kotlin.String){}[0] | ||
final fun values(): kotlin/Array<app.cash.redwood.ui/LayoutDirection> // app.cash.redwood.ui/LayoutDirection.values|values#static(){}[0] | ||
final val entries // app.cash.redwood.ui/LayoutDirection.entries|#static{}entries[0] | ||
final fun <get-entries>(): kotlin.enums/EnumEntries<app.cash.redwood.ui/LayoutDirection> // app.cash.redwood.ui/LayoutDirection.entries.<get-entries>|<get-entries>#static(){}[0] | ||
} | ||
final fun (app.cash.redwood.ui/Dp).app.cash.redwood.ui/toPlatformDp(): kotlin/Double // app.cash.redwood.ui/toPlatformDp|[email protected](){}[0] | ||
final fun (app.cash.redwood.ui/Dp.Companion).app.cash.redwood.ui/fromPlatformDp(kotlin/Double): app.cash.redwood.ui/Dp // app.cash.redwood.ui/fromPlatformDp|[email protected](kotlin.Double){}[0] | ||
final fun app.cash.redwood.ui/Margin(app.cash.redwood.ui/Dp = ...): app.cash.redwood.ui/Margin // app.cash.redwood.ui/Margin|Margin(app.cash.redwood.ui.Dp){}[0] | ||
|
27 changes: 27 additions & 0 deletions
27
redwood-runtime/src/commonMain/kotlin/app/cash/redwood/ui/LayoutDirection.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (C) 2024 Square, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package app.cash.redwood.ui | ||
|
||
public enum class LayoutDirection { | ||
/** Horizontal layout direction from left to right. */ | ||
Ltr, | ||
|
||
/** Horizontal layout direction from right to left. */ | ||
Rtl, | ||
|
||
/** Horizontal layout direction is automatically inferred from included text. */ | ||
Auto, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters