/
Settings.swift
39 lines (36 loc) · 1.2 KB
/
Settings.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
The namespace for this package.
*/
public enum Settings {}
// TODO: Remove in the next major version.
// Preserve backwards compatibility.
@available(*, deprecated, renamed: "Settings")
public typealias Preferences = Settings
@available(*, deprecated, renamed: "SettingsPane")
public typealias PreferencePane = SettingsPane
@available(*, deprecated, renamed: "SettingsPaneConvertible")
public typealias PreferencePaneConvertible = SettingsPaneConvertible
@available(*, deprecated, renamed: "SettingsWindowController")
public typealias PreferencesWindowController = SettingsWindowController
@available(macOS 10.15, *)
extension Settings.Pane {
@available(*, deprecated, renamed: "asSettingsPane()")
public func asPreferencePane() -> PreferencePane {
asSettingsPane()
}
}
extension SettingsWindowController {
@available(*, deprecated, renamed: "init(panes:style:animated:hidesToolbarForSingleItem:)")
public convenience init(
preferencePanes: [PreferencePane],
style: Settings.Style = .toolbarItems,
animated: Bool = true,
hidesToolbarForSingleItem: Bool = true
) {
self.init(
panes: preferencePanes,
style: style,
animated: animated,
hidesToolbarForSingleItem: hidesToolbarForSingleItem)
}
}