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:
Mads Marquart 2024-05-27 14:49:22 +02:00 committed by GitHub
parent 5ea20fc905
commit d7abe0316e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 332 additions and 1056 deletions

View file

@ -1,6 +1,6 @@
#![allow(clippy::unnecessary_cast)]
use objc2::rc::{autoreleasepool, Id};
use objc2::rc::{autoreleasepool, Retained};
use objc2::{declare_class, mutability, ClassType, DeclaredClass};
use objc2_app_kit::{NSResponder, NSWindow};
use objc2_foundation::{MainThreadBound, MainThreadMarker, NSObject};
@ -11,9 +11,9 @@ use crate::error::OsError as RootOsError;
use crate::window::WindowAttributes;
pub(crate) struct Window {
window: MainThreadBound<Id<WinitWindow>>,
window: MainThreadBound<Retained<WinitWindow>>,
/// The window only keeps a weak reference to this, so we must keep it around here.
delegate: MainThreadBound<Id<WindowDelegate>>,
delegate: MainThreadBound<Retained<WindowDelegate>>,
}
impl Drop for Window {