Remove EventLoopExtIOS::idiom and ios::Idiom (#2924)

Introduced in 3a7350c with unclear motivation.

Nowadays, this feature is incomplete and unsound, and the equivalent
functionality can be trivially achieved outside of `winit` using
`objc2-ui-kit`.
This commit is contained in:
Mads Marquart 2024-06-24 22:56:20 +02:00 committed by GitHub
parent 8bdd4d620e
commit 82d9bbe559
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 48 deletions

View file

@ -15,14 +15,13 @@ use core_foundation::runloop::{
use objc2::rc::Retained;
use objc2::{msg_send_id, ClassType};
use objc2_foundation::{MainThreadMarker, NSString};
use objc2_ui_kit::{UIApplication, UIApplicationMain, UIDevice, UIScreen, UIUserInterfaceIdiom};
use objc2_ui_kit::{UIApplication, UIApplicationMain, UIScreen};
use super::app_state::EventLoopHandler;
use crate::application::ApplicationHandler;
use crate::error::EventLoopError;
use crate::event::Event;
use crate::event_loop::{ActiveEventLoop as RootActiveEventLoop, ControlFlow, DeviceEvents};
use crate::platform::ios::Idiom;
use crate::window::{CustomCursor, CustomCursorSource};
use super::app_delegate::AppDelegate;
@ -222,20 +221,6 @@ impl EventLoop {
}
}
// EventLoopExtIOS
impl EventLoop {
pub fn idiom(&self) -> Idiom {
match UIDevice::currentDevice(self.mtm).userInterfaceIdiom() {
UIUserInterfaceIdiom::Unspecified => Idiom::Unspecified,
UIUserInterfaceIdiom::Phone => Idiom::Phone,
UIUserInterfaceIdiom::Pad => Idiom::Pad,
UIUserInterfaceIdiom::TV => Idiom::TV,
UIUserInterfaceIdiom::CarPlay => Idiom::CarPlay,
_ => Idiom::Unspecified,
}
}
}
pub struct EventLoopProxy {
proxy_wake_up: Arc<AtomicBool>,
source: CFRunLoopSourceRef,