aboutsummaryrefslogtreecommitdiff
path: root/Sources/SwiftLVGLDemo
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2024-08-09 14:55:07 -0600
committerNavan Chauhan <navanchauhan@gmail.com>2024-08-09 14:55:07 -0600
commitd3769010aa3a2975167e97f12da8cc0d8091438f (patch)
tree9304ab3d40cb9d955a8d8cdfcd4e850dd69015ed /Sources/SwiftLVGLDemo
parentc736b833f360576bc0c436bb65eebc4ce05b708a (diff)
swift-format
Diffstat (limited to 'Sources/SwiftLVGLDemo')
-rw-r--r--Sources/SwiftLVGLDemo/Main.swift50
1 files changed, 25 insertions, 25 deletions
diff --git a/Sources/SwiftLVGLDemo/Main.swift b/Sources/SwiftLVGLDemo/Main.swift
index 2e53d4d..66d369c 100644
--- a/Sources/SwiftLVGLDemo/Main.swift
+++ b/Sources/SwiftLVGLDemo/Main.swift
@@ -3,31 +3,31 @@ import SwiftLVGL
@main
struct Main {
- static func main() {
- lv_init()
- let _ = lv_sdl_window_create(480, 480)
- let _ = lv_sdl_mouse_create()
-
- var myCounter: Int = 0
-
- let label = LVGLLabel("", alignment: .bottomMid)
- let button = LVGLButton("Click Me", eventType: .pressed) { event in
- if let event = event, event.eventCode == .pressed {
- myCounter += 1
- label.setText("You clicked the button \(myCounter) times")
- }
- }
- let _ = LVGLButton("Shift Button", alignment: .bottomRight, eventType: .pressed) { event in
- button.align(alignment: .leftMid)
- }
-
- let _ = LVGLSlider("", alignment: .topMid, yOffset: 50)
+ static func main() {
+ lv_init()
+ let _ = lv_sdl_window_create(480, 480)
+ let _ = lv_sdl_mouse_create()
- let _ = LVGLSwitch(alignment: .rightMid)
-
- while true {
- lv_timer_handler()
- usleep(5000)
- }
+ var myCounter: Int = 0
+
+ let label = LVGLLabel("", alignment: .bottomMid)
+ let button = LVGLButton("Click Me", eventType: .pressed) { event in
+ if let event = event, event.eventCode == .pressed {
+ myCounter += 1
+ label.setText("You clicked the button \(myCounter) times")
+ }
+ }
+ let _ = LVGLButton("Shift Button", alignment: .bottomRight, eventType: .pressed) { event in
+ button.align(alignment: .leftMid)
+ }
+
+ let _ = LVGLSlider("", alignment: .topMid, yOffset: 50)
+
+ let _ = LVGLSwitch(alignment: .rightMid)
+
+ while true {
+ lv_timer_handler()
+ usleep(5000)
}
+ }
}