Macでもモニタ名取得は容易ではなさそうなためオミット。

This commit is contained in:
Kirurobo
2020-12-10 21:03:34 +09:00
parent d8612481fe
commit 687c8277f0
3 changed files with 0 additions and 18 deletions

View File

@@ -108,10 +108,6 @@ UNIWINC_EXPORT BOOL GetMonitorRectangle(SInt32 monitorIndex, Float32* x, Float32
return [LibUniWinC getMonitorRectangleWithMonitorIndex:monitorIndex x:x y:y width:width height:height];
}
UNIWINC_EXPORT BOOL GetMonitorName(SInt32 monitorIndex, void* nameString) {
return [LibUniWinC getMonitorNameWithMonitorIndex: monitorIndex name: nameString];
}
UNIWINC_EXPORT BOOL RegisterMonitorChangedCallback(IntCallback callback) {
return [LibUniWinC registerMonitorChangedCallbackWithCallback: callback];
}

View File

@@ -639,20 +639,6 @@ public class LibUniWinC : NSObject {
return true
}
@objc public static func getMonitorName(monitorIndex: Int32, name: UnsafeMutableRawPointer) -> Bool {
let screen = NSScreen.screens[monitorIndices[Int(monitorIndex)]]
let utf16Name = screen.localizedName.utf16
let buffer = UnsafeMutablePointer<uint16>.allocate(capacity: utf16Name.count + 1)
let result = _copyUTF16ToBuffer(text: utf16Name, buffer: buffer)
buffer.deallocate()
return result
}
@objc public static func registerMonitorChangedCallback(callback: @escaping intCallback) -> Bool {
monitorChangedCallback = callback
return true