Skip to content

Commit a1c75e2

Browse files
committed
Support SDL_GetWindowTitle/SDL_SetWindowTitle
1 parent 79e193e commit a1c75e2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Sources/SDL/Window.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,21 @@ public final class SDLWindow {
104104
return SDL_SetWindowDisplayMode(internalPointer, nil) >= 0
105105
}
106106
}
107+
108+
/// Set the title of a window
109+
public var title: String {
110+
111+
get {
112+
113+
return String(cString: SDL_GetWindowTitle(internalPointer))
114+
115+
}
116+
set {
117+
118+
SDL_SetWindowTitle(internalPointer, newValue)
119+
120+
}
121+
}
107122
}
108123

109124
// MARK: - Supporting Types

0 commit comments

Comments
 (0)