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:
parent
fb248eaadc
commit
d8c0ee733b
7 changed files with 66 additions and 236 deletions
|
|
@ -9,6 +9,12 @@ use std::{
|
|||
time::Instant,
|
||||
};
|
||||
|
||||
use core_foundation::base::CFRelease;
|
||||
use core_foundation::date::CFAbsoluteTimeGetCurrent;
|
||||
use core_foundation::runloop::{
|
||||
kCFRunLoopCommonModes, CFRunLoopAddTimer, CFRunLoopGetMain, CFRunLoopRef, CFRunLoopTimerCreate,
|
||||
CFRunLoopTimerInvalidate, CFRunLoopTimerRef, CFRunLoopTimerSetNextFireDate,
|
||||
};
|
||||
use objc2::foundation::{NSInteger, NSUInteger};
|
||||
use objc2::runtime::Object;
|
||||
use objc2::{class, msg_send, sel};
|
||||
|
|
@ -20,12 +26,7 @@ use crate::{
|
|||
event_loop::ControlFlow,
|
||||
platform_impl::platform::{
|
||||
event_loop::{EventHandler, EventProxy, EventWrapper, Never},
|
||||
ffi::{
|
||||
id, kCFRunLoopCommonModes, CFAbsoluteTimeGetCurrent, CFRelease, CFRunLoopAddTimer,
|
||||
CFRunLoopGetMain, CFRunLoopRef, CFRunLoopTimerCreate, CFRunLoopTimerInvalidate,
|
||||
CFRunLoopTimerRef, CFRunLoopTimerSetNextFireDate, CGRect, CGSize,
|
||||
NSOperatingSystemVersion,
|
||||
},
|
||||
ffi::{id, CGRect, CGSize, NSOperatingSystemVersion},
|
||||
},
|
||||
window::WindowId as RootWindowId,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue