mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-31 03:13:40 +00:00
macos: use xcodeproj
This commit is contained in:
19
macos/Sources/ContentView.swift
Normal file
19
macos/Sources/ContentView.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
Image(systemName: "globe")
|
||||
.imageScale(.large)
|
||||
.foregroundColor(.accentColor)
|
||||
Text("Hello, world!")
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import SwiftUI
|
||||
import GhosttyKit
|
||||
|
||||
@main
|
||||
struct MyApp: App {
|
||||
@State private var num = ghostty_hello()
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
Text(String(num))
|
||||
.font(.largeTitle)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ContentView: View {
|
||||
var body: some View {
|
||||
Text("Ghostty")
|
||||
.font(.largeTitle)
|
||||
}
|
||||
}
|
||||
13
macos/Sources/GhosttyApp.swift
Normal file
13
macos/Sources/GhosttyApp.swift
Normal file
@@ -0,0 +1,13 @@
|
||||
import SwiftUI
|
||||
import GhosttyKit
|
||||
|
||||
@main
|
||||
struct GhosttyApp: App {
|
||||
@State private var num = ghostty_hello()
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
Text(String(num)).font(.largeTitle)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user