1
0

setup_app.swift 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // Copyright 2026 Aarav Ravindra Kharade
  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. // ═══════════════════════════════════════════════════════════════════
  17. // ArkOS Setup App (ui_test)
  18. // ═══════════════════════════════════════════════════════════════════
  19. // The first user-facing application shown after the boot splash
  20. // animation completes. Renders a welcome screen with navigation
  21. // buttons using the ArkGraphics display client library.
  22. //
  23. // This app runs as a system service defined in uitest.serve:
  24. // name=uitest
  25. // exec=/system/ui_test
  26. // autostart=true
  27. // respawn=true
  28. // deps=display
  29. //
  30. // It depends on the display service (ui_daemon) being started first.
  31. // The ArkGraphics client handles connection retry automatically.
  32. //
  33. // Screen Layout (1024x768):
  34. // ┌──────────────────────────────────┐
  35. // │ Status Bar (time, battery, net) │ 30px
  36. // ├──────────────────────────────────┤
  37. // │ │
  38. // │ [ Get started ] │ centered
  39. // │ [ Start -> ] │ centered
  40. // │ │
  41. // └──────────────────────────────────┘
  42. //
  43. // This app runs as a system service defined in uitest.serve:
  44. // name=uitest
  45. // `ark.ui.basic` components are built directly into the binary
  46. @main
  47. struct SetupApp: App {
  48. typealias Backend = GtkBackend
  49. let backend = GtkBackend()
  50. init() {}
  51. var body: some Scene {
  52. WindowGroup("Setup") {
  53. VStack {
  54. Text("Welcome to ARK-OS")
  55. .padding(.bottom, 20)
  56. Button("Get Started ->") {
  57. print("Get Started clicked!")
  58. }
  59. }
  60. .padding(100)
  61. }
  62. }
  63. }