]> git.r.bdr.sh - rbdr/captura/blame_incremental - Captura/Scripting/ScriptedPreferences.swift
Add AppleScript support
[rbdr/captura] / Captura / Scripting / ScriptedPreferences.swift
... / ...
CommitLineData
1import Foundation
2
3class ScriptedPreferences: NSObject {
4 @objc dynamic var fps: Int {
5 get {
6 CapturaSettings.frameRate
7 }
8 set {
9 CapturaSettings.frameRate = newValue
10 }
11 }
12 @objc dynamic var outputs: String {
13 get {
14 CapturaSettings.outputFormats.toString()
15 }
16 set {
17 CapturaSettings.outputFormats = OutputFormatSetting(newValue) ?? .gifOnly
18 }
19 }
20
21 @objc dynamic var backend: String {
22 get {
23 CapturaSettings.backend?.absoluteString ?? ""
24 }
25 set {
26 CapturaSettings.backend = URL(string: newValue)
27 }
28 }
29
30 @objc dynamic var backend_output: String {
31 get {
32 CapturaSettings.backendFormat.toString()
33 }
34 set {
35 CapturaSettings.backendFormat = OutputFormatSetting(newValue) ?? .gifOnly
36 }
37 }
38
39 @objc dynamic var keep_local_files: Bool {
40 get {
41 CapturaSettings.shouldKeepLocalFiles
42 }
43 set {
44 CapturaSettings.shouldKeepLocalFiles = newValue
45 }
46 }
47}