gpt4 book ai didi

swift - CGEventCreateScrollWheelEvent 快速

转载 作者:行者123 更新时间:2023-11-30 10:23:25 26 4
gpt4 key购买 nike

尝试弄清楚如何从 swift 调用 CGEventCreateScrollWheelEvent

看起来它已从文档中删除:

旧文档:https://developer.apple.com/library/mac/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html

新文档:https://developer.apple.com/library/prerelease/mac/documentation/Carbon/Reference/QuartzEventServicesRef/index.html

没有说明用什么来替换它。有人知道创建滚轮事件的另一种方法吗?

最佳答案

根据 Swift 开发人员的说法,C variadic functions are not compatible with Swift variadics ,所以你将无法直接调用它。此时唯一的解决方法是用 C 或 Obj-C 编写一个非可变参数包装器,并从 Swift 中调用它。

关于swift - CGEventCreateScrollWheelEvent 快速,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24252697/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com