Update objc2 to v0.2.2 (#3702)
- Use new `bitflags!` support. - Use `objc2-ui-kit`. - Change usage of `Id` to `Retained`.
This commit is contained in:
parent
5ea20fc905
commit
d7abe0316e
37 changed files with 332 additions and 1056 deletions
|
|
@ -357,7 +357,7 @@ impl MonitorHandleExtIOS for MonitorHandle {
|
|||
fn ui_screen(&self) -> *mut c_void {
|
||||
// SAFETY: The marker is only used to get the pointer of the screen
|
||||
let mtm = unsafe { objc2_foundation::MainThreadMarker::new_unchecked() };
|
||||
objc2::rc::Id::as_ptr(self.inner.ui_screen(mtm)) as *mut c_void
|
||||
objc2::rc::Retained::as_ptr(self.inner.ui_screen(mtm)) as *mut c_void
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ impl MonitorHandleExtMacOS for MonitorHandle {
|
|||
fn ns_screen(&self) -> Option<*mut c_void> {
|
||||
// SAFETY: We only use the marker to get a pointer
|
||||
let mtm = unsafe { objc2_foundation::MainThreadMarker::new_unchecked() };
|
||||
self.inner.ns_screen(mtm).map(|s| objc2::rc::Id::as_ptr(&s) as _)
|
||||
self.inner.ns_screen(mtm).map(|s| objc2::rc::Retained::as_ptr(&s) as _)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue