Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TestToolChainDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
dsq
TestToolChainDemo
Commits
d4f81780
Commit
d4f81780
authored
Feb 13, 2026
by
dsq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除重复文件
parent
625eabe6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
89 deletions
+6
-89
App.kt
composeApp/src/commonMain/kotlin/com.dong.demo013/App.kt
+4
-0
NativeFaultDemo.kt
...commonMain/kotlin/com.dong.demo013/Log/NativeFaultDemo.kt
+2
-2
Navigation.kt
...mmonMain/kotlin/com.dong.demo013/navigation/Navigation.kt
+0
-75
MainArkUIViewController.kt
...64Main/kotlin/com.dong.demo013/MainArkUIViewController.kt
+0
-1
libkn.so
harmonyApp/entry/libs/arm64-v8a/libkn.so
+0
-0
libkn_api.h
harmonyApp/entry/src/main/cpp/include/libkn_api.h
+0
-11
No files found.
composeApp/src/commonMain/kotlin/com.dong.demo013/App.kt
View file @
d4f81780
...
@@ -11,6 +11,7 @@ import com.dong.demo013.navigation.ComponentDemo
...
@@ -11,6 +11,7 @@ import com.dong.demo013.navigation.ComponentDemo
import
com.dong.demo013.navigation.ComposeGroup
import
com.dong.demo013.navigation.ComposeGroup
import
com.dong.demo013.navigation.Page
import
com.dong.demo013.navigation.Page
import
com.dong.maxhap.demos.FaultLogDemo
import
com.dong.maxhap.demos.FaultLogDemo
import
com.dong.maxhap.demos.NativeFaultDemo
@Composable
@Composable
internal
fun
App
()
{
internal
fun
App
()
{
...
@@ -162,6 +163,9 @@ internal fun DemoScreen(
...
@@ -162,6 +163,9 @@ internal fun DemoScreen(
"log_fault_demo"
->
{
"log_fault_demo"
->
{
FaultLogDemo
()
FaultLogDemo
()
}
}
"log_over_demo"
->
{
NativeFaultDemo
()
}
else
->
{
else
->
{
Text
(
Text
(
text
=
"暂未实现: ${demo.title}"
,
text
=
"暂未实现: ${demo.title}"
,
...
...
composeApp/src/commonMain/kotlin/com.dong.demo013/Log/NativeFault.kt
→
composeApp/src/commonMain/kotlin/com.dong.demo013/Log/NativeFault
Demo
.kt
View file @
d4f81780
// NativeFault.kt
// NativeFault
Demo
.kt
package
com.dong.maxhap.demos
package
com.dong.maxhap.demos
import
androidx.compose.foundation.layout.*
import
androidx.compose.foundation.layout.*
import
androidx.compose.material.Button
import
androidx.compose.material.Button
...
@@ -13,7 +13,7 @@ import androidx.compose.ui.unit.dp
...
@@ -13,7 +13,7 @@ import androidx.compose.ui.unit.dp
import
androidx.compose.ui.unit.sp
import
androidx.compose.ui.unit.sp
@Composable
@Composable
internal
fun
SimpleFaultTrigger
()
{
internal
fun
NativeFaultDemo
()
{
var
trigger
by
remember
{
mutableStateOf
(
false
)
}
var
trigger
by
remember
{
mutableStateOf
(
false
)
}
Column
(
Column
(
...
...
composeApp/src/commonMain/kotlin/com.dong.demo013/navigation/Navigation.kt
View file @
d4f81780
...
@@ -10,81 +10,6 @@ data class ComponentDemo(
...
@@ -10,81 +10,6 @@ data class ComponentDemo(
val
group
:
ComposeGroup
val
group
:
ComposeGroup
)
)
val
componentDemos
:
List
<
ComponentDemo
>
=
listOf
(
// Log
ComponentDemo
(
"log_test_demo"
,
"日志测试演示"
,
ComposeGroup
.
Foundation
),
ComponentDemo
(
"log_fault_demo"
,
"fault日志测试"
,
ComposeGroup
.
Foundation
),
)
val
groupTitles
:
Map
<
ComposeGroup
,
String
>
=
mapOf
(
ComposeGroup
.
Ui
to
"compose.ui"
,
ComposeGroup
.
Foundation
to
"compose.foundation"
,
ComposeGroup
.
Material
to
"compose.material"
,
ComposeGroup
.
Platform
to
"Platform"
,
)
fun
demosByGroup
():
Map
<
ComposeGroup
,
List
<
ComponentDemo
>>
{
val
standardDemos
=
ComposeGroup
.
entries
.
filter
{
it
!=
ComposeGroup
.
Platform
}
.
associateWith
{
g
->
componentDemos
.
filter
{
it
.
group
==
g
}
}
.
toMutableMap
()
val
platformDemos
=
com
.
dong
.
demo013
.
getPlatformDemoList
().
map
{
ComponentDemo
(
id
=
it
.
id
,
title
=
it
.
title
,
group
=
ComposeGroup
.
Platform
)
}
if
(
platformDemos
.
isNotEmpty
())
{
standardDemos
[
ComposeGroup
.
Platform
]
=
platformDemos
}
return
standardDemos
}
fun
demosJson
():
String
=
buildString
{
append
(
'['
)
componentDemos
.
forEachIndexed
{
index
,
demo
->
if
(
index
>
0
)
append
(
','
)
append
(
"{\"id\":\""
)
append
(
jsonEscape
(
demo
.
id
))
append
(
"\",\"title\":\""
)
append
(
jsonEscape
(
demo
.
title
))
append
(
"\",\"group\":\""
)
append
(
demo
.
group
.
name
)
append
(
"\"}"
)
}
append
(
']'
)
}
fun
groupTitlesJson
():
String
=
buildString
{
append
(
'{'
)
ComposeGroup
.
entries
.
forEachIndexed
{
index
,
group
->
if
(
index
>
0
)
append
(
','
)
append
(
'"'
)
append
(
group
.
name
)
append
(
"\":\""
)
append
(
jsonEscape
(
groupTitles
[
group
]
?:
group
.
name
))
append
(
'"'
)
}
append
(
'}'
)
}
private
fun
jsonEscape
(
input
:
String
):
String
=
buildString
(
input
.
length
)
{
input
.
forEach
{
ch
->
when
(
ch
)
{
'\\'
->
append
(
"\\\\"
)
'"'
->
append
(
"\\\""
)
'\n'
->
append
(
"\\n"
)
'\r'
->
append
(
"\\r"
)
'\t'
->
append
(
"\\t"
)
else
->
append
(
ch
)
}
}
}
sealed
interface
Page
{
sealed
interface
Page
{
data
object
Home
:
Page
data
object
Home
:
Page
data class
Detail
(
val
demo
:
ComponentDemo
)
:
Page
data class
Detail
(
val
demo
:
ComponentDemo
)
:
Page
...
...
composeApp/src/ohosArm64Main/kotlin/com.dong.demo013/MainArkUIViewController.kt
View file @
d4f81780
package
com.dong.demo013
package
com.dong.demo013
import
androidx.compose.ui.window.ComposeArkUIViewController
import
androidx.compose.ui.window.ComposeArkUIViewController
import
com.dong.demo013.navigation.ComponentDemo
import
kotlinx.cinterop.ExperimentalForeignApi
import
kotlinx.cinterop.ExperimentalForeignApi
import
kotlinx.coroutines.initMainHandler
import
kotlinx.coroutines.initMainHandler
import
platform.ohos.napi_env
import
platform.ohos.napi_env
...
...
harmonyApp/entry/libs/arm64-v8a/libkn.so
View file @
d4f81780
No preview for this file type
harmonyApp/entry/src/main/cpp/include/libkn_api.h
View file @
d4f81780
...
@@ -78,12 +78,6 @@ typedef struct {
...
@@ -78,12 +78,6 @@ typedef struct {
typedef
struct
{
typedef
struct
{
libkn_KNativePtr
pinned
;
libkn_KNativePtr
pinned
;
}
libkn_kref_com_dong_demo013_debug_debug
;
}
libkn_kref_com_dong_demo013_debug_debug
;
typedef
struct
{
libkn_KNativePtr
pinned
;
}
libkn_kref_kotlin_collections_List
;
typedef
struct
{
libkn_KNativePtr
pinned
;
}
libkn_kref_kotlin_collections_Map
;
typedef
struct
{
typedef
struct
{
libkn_KNativePtr
pinned
;
libkn_KNativePtr
pinned
;
}
libkn_kref_com_dong_demo013_navigation_ComposeGroup
;
}
libkn_kref_com_dong_demo013_navigation_ComposeGroup
;
...
@@ -262,14 +256,9 @@ typedef struct {
...
@@ -262,14 +256,9 @@ typedef struct {
}
Detail
;
}
Detail
;
libkn_KType
*
(
*
_type
)(
void
);
libkn_KType
*
(
*
_type
)(
void
);
}
Page
;
}
Page
;
libkn_kref_kotlin_collections_List
(
*
get_componentDemos
)();
libkn_kref_kotlin_collections_Map
(
*
get_groupTitles
)();
libkn_KInt
(
*
com_dong_demo013_navigation_ComponentDemo
$
stableprop_getter
)();
libkn_KInt
(
*
com_dong_demo013_navigation_ComponentDemo
$
stableprop_getter
)();
libkn_KInt
(
*
com_dong_demo013_navigation_Page_Detail
$
stableprop_getter
)();
libkn_KInt
(
*
com_dong_demo013_navigation_Page_Detail
$
stableprop_getter
)();
libkn_KInt
(
*
com_dong_demo013_navigation_Page_Home
$
stableprop_getter
)();
libkn_KInt
(
*
com_dong_demo013_navigation_Page_Home
$
stableprop_getter
)();
libkn_kref_kotlin_collections_Map
(
*
demosByGroup
)();
const
char
*
(
*
demosJson
)();
const
char
*
(
*
groupTitlesJson
)();
}
navigation
;
}
navigation
;
struct
{
struct
{
libkn_KType
*
(
*
_type
)(
void
);
libkn_KType
*
(
*
_type
)(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment