summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-02-06 21:15:56 +0100
committerder richter <der.richter@gmx.de>2024-02-15 00:11:55 +0100
commit1883f2f7a0c8ec8561fa9bb7e3aeeb1e46eadbea (patch)
treed71d5d41500a5f1a077249380f2ee675144ded37
parent80cde2671ce9304520465c94321721abf6114843 (diff)
downloadmpv-1883f2f7a0c8ec8561fa9bb7e3aeeb1e46eadbea.tar.bz2
mpv-1883f2f7a0c8ec8561fa9bb7e3aeeb1e46eadbea.tar.xz
mac/remote: move class local struct and enum definition to extension
the class local struct and enum are moved to an extension to separate their definition and usage.
-rw-r--r--osdep/macos/remote_command_center.swift4
1 files changed, 3 insertions, 1 deletions
diff --git a/osdep/macos/remote_command_center.swift b/osdep/macos/remote_command_center.swift
index 55e52c021a..9840f5f617 100644
--- a/osdep/macos/remote_command_center.swift
+++ b/osdep/macos/remote_command_center.swift
@@ -17,7 +17,7 @@
import MediaPlayer
-class RemoteCommandCenter: NSObject {
+extension RemoteCommandCenter {
enum KeyType {
case normal
case repeatable
@@ -33,7 +33,9 @@ class RemoteCommandCenter: NSObject {
self.type = type
}
}
+}
+class RemoteCommandCenter: NSObject {
var configs: [MPRemoteCommand:Config] = [
MPRemoteCommandCenter.shared().pauseCommand: Config(key: MP_KEY_PAUSEONLY),
MPRemoteCommandCenter.shared().playCommand: Config(key: MP_KEY_PLAYONLY),