// Objective-C symbols missing from iOS Foundation and Metal. #import #import "fx.h" #ifdef FX_LIB_FOUNDATION @interface NSAppleEventManager : NSObject @end @implementation NSAppleEventManager + (instancetype)sharedAppleEventManager { static NSAppleEventManager *m; static dispatch_once_t o; dispatch_once(&o, ^{ m = [self new]; }); return m; } - (void)setEventHandler:(id)handler andSelector:(SEL)sel forEventClass:(uint32_t)c andEventID:(uint32_t)e { } - (void)removeEventHandlerForEventClass:(uint32_t)c andEventID:(uint32_t)e { } @end #endif #ifdef FX_LIB_METAL #import FX_EXPORT NSArray *MTLCopyAllDevicesWithObserver(id *observer, void (^handler)(id, NSString *)) { if (observer) *observer = nil; id device = MTLCreateSystemDefaultDevice(); return device ? @[device] : @[]; } FX_EXPORT void MTLRemoveDeviceObserver(id observer) { } #endif