File tree Expand file tree Collapse file tree 8 files changed +25
-9
lines changed
composeApp/src/commonMain/kotlin/utils
androidMain/kotlin/top/yukonga/miuix/kmp/extra
commonMain/kotlin/top/yukonga/miuix/kmp
desktopMain/kotlin/top/yukonga/miuix/kmp/extra
iosMain/kotlin/top/yukonga/miuix/kmp/extra
wasmJsMain/kotlin/top/yukonga/miuix/kmp/extra Expand file tree Collapse file tree 8 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ import kotlinx.coroutines.Dispatchers
1313import kotlinx.coroutines.withContext
1414import top.yukonga.miuix.kmp.basic.Text
1515
16- // This is a simple FPS monitor that displays the current frames per second.
16+ /* *
17+ * A simple FPS monitor that displays the current frames per second.
18+ */
1719@Composable
1820fun FPSMonitor (modifier : Modifier = Modifier ) {
1921 var fps by remember { mutableStateOf(0 ) }
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import android.annotation.SuppressLint
44import androidx.compose.runtime.MutableState
55import androidx.compose.ui.Modifier
66
7- /* *Returns modifier to be used for the current platform */
7+ /* *
8+ * Returns modifier to be used for the current platform.
9+ */
810@SuppressLint(" ModifierFactoryExtensionFunction" )
911actual fun modifierPlatform (modifier : Modifier , isHovered : MutableState <Boolean >): Modifier = modifier
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ import top.yukonga.miuix.kmp.utils.squircleshape.SquircleShape
3838 *
3939 * @param value The input [TextFieldValue] to be shown in the text field.
4040 * @param onValueChange The callback that is triggered when the input service updates values in
41- * * [TextFieldValue]. An updated [TextFieldValue] comes as a parameter of the callback.
41+ * [TextFieldValue]. An updated [TextFieldValue] comes as a parameter of the callback.
4242 * @param modifier The modifier to be applied to the [TextField].
4343 * @param insideMargin The margin inside the [TextField].
4444 * @param backgroundColor The background color of the [TextField].
Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ import top.yukonga.miuix.kmp.utils.getWindowSize
6767import top.yukonga.miuix.kmp.utils.squircleshape.SquircleShape
6868import kotlin.math.roundToInt
6969
70- /* *Returns modifier to be used for the current platform */
70+ /* *
71+ * Returns modifier to be used for the current platform.
72+ */
7173expect fun modifierPlatform (modifier : Modifier , isHovered : MutableState <Boolean >): Modifier
7274
7375/* *
Original file line number Diff line number Diff line change @@ -13,15 +13,19 @@ enum class Platform {
1313 WasmJs
1414}
1515
16- /* * Returns the current platform name */
16+ /* *
17+ * Returns the current platform name.
18+ */
1719expect fun platform (): Platform
1820
1921/* *
2022 * Window size data class.
2123 */
2224data class WindowSize (val width : Int , val height : Int )
2325
24- /* * Returns the current window size */
26+ /* *
27+ * Returns the current window size.
28+ */
2529@Composable
2630expect fun getWindowSize (): WindowSize
2731
Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ import androidx.compose.ui.Modifier
66import androidx.compose.ui.input.pointer.PointerEventType
77import androidx.compose.ui.input.pointer.onPointerEvent
88
9- /* *Returns modifier to be used for the current platform */
9+ /* *
10+ * Returns modifier to be used for the current platform.
11+ */
1012@OptIn(ExperimentalComposeUiApi ::class )
1113actual fun modifierPlatform (modifier : Modifier , isHovered : MutableState <Boolean >): Modifier = modifier
1214 .onPointerEvent(PointerEventType .Move ) {
Original file line number Diff line number Diff line change @@ -3,5 +3,7 @@ package top.yukonga.miuix.kmp.extra
33import androidx.compose.runtime.MutableState
44import androidx.compose.ui.Modifier
55
6- /* *Returns modifier to be used for the current platform */
6+ /* *
7+ * Returns modifier to be used for the current platform.
8+ */
79actual fun modifierPlatform (modifier : Modifier , isHovered : MutableState <Boolean >): Modifier = modifier
Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ import androidx.compose.ui.Modifier
66import androidx.compose.ui.input.pointer.PointerEventType
77import androidx.compose.ui.input.pointer.onPointerEvent
88
9- /* *Returns modifier to be used for the current platform */
9+ /* *
10+ * Returns modifier to be used for the current platform.
11+ */
1012@OptIn(ExperimentalComposeUiApi ::class )
1113actual fun modifierPlatform (modifier : Modifier , isHovered : MutableState <Boolean >): Modifier = modifier
1214 .onPointerEvent(PointerEventType .Move ) {
You can’t perform that action at this time.
0 commit comments