From b1d12226b510a95634e34267caf89bcb945fce91 Mon Sep 17 00:00:00 2001 From: soundflix <80773469+soundflix@users.noreply.github.com> Date: Wed, 23 Nov 2022 01:30:40 +0100 Subject: [PATCH] changed toValue / from to public --- ZMAX/Sources/Extensions.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZMAX/Sources/Extensions.swift b/ZMAX/Sources/Extensions.swift index 6e536da..03cfb21 100644 --- a/ZMAX/Sources/Extensions.swift +++ b/ZMAX/Sources/Extensions.swift @@ -208,13 +208,13 @@ extension AXUIElement { // for conversion AXValue (wrapper) <> wrapped value // from: https://github.com/keith/ModMove/blob/main/ModMove/AXValue%2BHelper.swift extension AXValue { - func toValue() -> T? { + public func toValue() -> T? { let pointer = UnsafeMutablePointer.allocate(capacity: 1) let success = AXValueGetValue(self, AXValueGetType(self), pointer) return success ? pointer.pointee : nil } - static func from(value: T, type: AXValueType) -> AXValue? { + public static func from(value: T, type: AXValueType) -> AXValue? { let pointer = UnsafeMutablePointer.allocate(capacity: 1) pointer.pointee = value return AXValueCreate(type, pointer)