summaryrefslogtreecommitdiffstats
path: root/osdep/mac/app_hub.swift
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-03-26 00:06:42 +0100
committerder richter <der.richter@gmx.de>2024-03-29 14:20:40 +0100
commit1acca1d3c4c5952911a4b6ea4b8102898a244b57 (patch)
tree4757c6581cd5febaae3fc4dd28c5ef9ba1f61eed /osdep/mac/app_hub.swift
parent86aea966d92053e3aca364a802c5619da2e7d428 (diff)
downloadmpv-1acca1d3c4c5952911a4b6ea4b8102898a244b57.tar.bz2
mpv-1acca1d3c4c5952911a4b6ea4b8102898a244b57.tar.xz
mac/apphub: move app icon into AppHub
split up AppHub header in obj-c and c parts and make it a bidirectional bridging.
Diffstat (limited to 'osdep/mac/app_hub.swift')
-rw-r--r--osdep/mac/app_hub.swift7
1 files changed, 7 insertions, 0 deletions
diff --git a/osdep/mac/app_hub.swift b/osdep/mac/app_hub.swift
index a668948603..e77bf9381e 100644
--- a/osdep/mac/app_hub.swift
+++ b/osdep/mac/app_hub.swift
@@ -70,4 +70,11 @@ class AppHub: NSObject {
remote?.stop()
#endif
}
+
+ func getIcon() -> NSImage {
+ guard let iconData = app_bridge_icon(), let icon = NSImage(data: iconData) else {
+ return NSImage(size: NSSize(width: 1, height: 1))
+ }
+ return icon
+ }
}