Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试为 定义自定义输入源CFRunLoop,我已经阅读了 Apple 编写的线程编程指南文档,这个问题是我唯一无法理解的问题。
CFRunLoop
那么,我想知道CFRunLoopScheduleCallBack函数的目的是什么或者如何实现这个函数?
CFRunLoopScheduleCallBack
当您的源代码添加到运行循环时,将调用此回调。如果您不需要在此事件上运行任何自定义代码,则可以将其留空。
你像这样实现它:
void MyCallBack (void *info, CFRunLoopRef rl, CFStringRef mode) { // code }