Remove custom definition of Core Foundation runloop functionality (#2479)

Use the definitions that `core_foundation` exposes (almost the same, except `CFRunLoopSourceContext::perform` is not nullable, so we account for that as well).
This commit is contained in:
Mads Marquart 2022-09-08 21:03:25 +02:00 committed by GitHub
parent fb248eaadc
commit d8c0ee733b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 66 additions and 236 deletions

View file

@ -11,6 +11,7 @@ use std::{
time::Instant,
};
use core_foundation::runloop::{CFRunLoopGetMain, CFRunLoopWakeUp};
use objc2::foundation::{is_main_thread, NSSize};
use objc2::rc::autoreleasepool;
use once_cell::sync::Lazy;
@ -24,7 +25,7 @@ use crate::{
event::{EventProxy, EventWrapper},
event_loop::PanicInfo,
menu,
observer::{CFRunLoopGetMain, CFRunLoopWakeUp, EventLoopWaker},
observer::EventLoopWaker,
util::Never,
window::WinitWindow,
},