mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 14:49:07 -04:00
Bump MSRV to 1.85 and edition to 2024
This commit is contained in:
@@ -9,11 +9,11 @@ use std::{fmt, ptr};
|
||||
|
||||
use dispatch2::MainThreadBound;
|
||||
use dpi::PhysicalSize;
|
||||
use objc2::rc::Retained;
|
||||
use objc2::MainThreadMarker;
|
||||
use objc2::rc::Retained;
|
||||
use objc2_core_foundation::{
|
||||
kCFRunLoopCommonModes, CFAbsoluteTimeGetCurrent, CFRetained, CFRunLoop, CFRunLoopTimer, CGRect,
|
||||
CGSize,
|
||||
CFAbsoluteTimeGetCurrent, CFRetained, CFRunLoop, CFRunLoopTimer, CGRect, CGSize,
|
||||
kCFRunLoopCommonModes,
|
||||
};
|
||||
use objc2_ui_kit::{UIApplication, UICoordinateSpace, UIView};
|
||||
use winit_common::core_foundation::EventLoopProxy;
|
||||
|
||||
@@ -4,9 +4,9 @@ use std::sync::Arc;
|
||||
|
||||
use objc2::rc::Retained;
|
||||
use objc2::runtime::ProtocolObject;
|
||||
use objc2::{msg_send, ClassType, MainThreadMarker};
|
||||
use objc2::{ClassType, MainThreadMarker, msg_send};
|
||||
use objc2_core_foundation::{
|
||||
kCFRunLoopDefaultMode, CFIndex, CFRunLoop, CFRunLoopActivity, CFRunLoopObserver,
|
||||
CFIndex, CFRunLoop, CFRunLoopActivity, CFRunLoopObserver, kCFRunLoopDefaultMode,
|
||||
};
|
||||
use objc2_foundation::{NSNotificationCenter, NSObjectProtocol};
|
||||
use objc2_ui_kit::{
|
||||
@@ -26,7 +26,7 @@ use winit_core::event_loop::{
|
||||
use winit_core::monitor::MonitorHandle as CoreMonitorHandle;
|
||||
use winit_core::window::{Theme, Window as CoreWindow};
|
||||
|
||||
use super::app_state::{send_occluded_event_for_all_windows, AppState};
|
||||
use super::app_state::{AppState, send_occluded_event_for_all_windows};
|
||||
use super::notification_center::create_observer;
|
||||
use crate::monitor::MonitorHandle;
|
||||
use crate::window::Window;
|
||||
|
||||
@@ -4,10 +4,10 @@ use std::collections::VecDeque;
|
||||
use std::num::NonZeroU32;
|
||||
use std::{fmt, hash, ptr};
|
||||
|
||||
use dispatch2::{run_on_main, MainThreadBound};
|
||||
use dispatch2::{MainThreadBound, run_on_main};
|
||||
use dpi::PhysicalPosition;
|
||||
use objc2::rc::Retained;
|
||||
use objc2::{available, MainThreadMarker, Message};
|
||||
use objc2::{MainThreadMarker, Message, available};
|
||||
use objc2_foundation::NSInteger;
|
||||
use objc2_ui_kit::{UIScreen, UIScreenMode};
|
||||
use winit_core::monitor::{MonitorHandleProvider, VideoMode};
|
||||
@@ -190,7 +190,7 @@ impl MonitorHandle {
|
||||
Self { ui_screen: MainThreadBound::new(ui_screen, mtm) }
|
||||
}
|
||||
|
||||
pub fn video_modes_handles(&self) -> impl Iterator<Item = VideoModeHandle> {
|
||||
pub fn video_modes_handles(&self) -> impl Iterator<Item = VideoModeHandle> + 'static {
|
||||
run_on_main(|mtm| {
|
||||
let ui_screen = self.ui_screen(mtm);
|
||||
|
||||
@@ -203,7 +203,7 @@ impl MonitorHandle {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn video_modes(&self) -> impl Iterator<Item = VideoMode> {
|
||||
pub fn video_modes(&self) -> impl Iterator<Item = VideoMode> + 'static {
|
||||
self.video_modes_handles().map(|handle| handle.mode)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use std::cell::{Cell, RefCell};
|
||||
use dpi::PhysicalPosition;
|
||||
use objc2::rc::Retained;
|
||||
use objc2::runtime::{NSObjectProtocol, ProtocolObject};
|
||||
use objc2::{available, define_class, msg_send, sel, DefinedClass, MainThreadMarker};
|
||||
use objc2::{DefinedClass, MainThreadMarker, available, define_class, msg_send, sel};
|
||||
use objc2_core_foundation::{CGFloat, CGPoint, CGRect};
|
||||
use objc2_foundation::{NSObject, NSSet, NSString};
|
||||
use objc2_ui_kit::{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::cell::Cell;
|
||||
|
||||
use objc2::rc::Retained;
|
||||
use objc2::{available, define_class, msg_send, DefinedClass, MainThreadMarker};
|
||||
use objc2::{DefinedClass, MainThreadMarker, available, define_class, msg_send};
|
||||
use objc2_foundation::NSObject;
|
||||
use objc2_ui_kit::{
|
||||
UIDevice, UIInterfaceOrientationMask, UIRectEdge, UIResponder, UIStatusBarStyle,
|
||||
|
||||
@@ -9,7 +9,7 @@ use dpi::{
|
||||
Position, Size,
|
||||
};
|
||||
use objc2::rc::Retained;
|
||||
use objc2::{available, class, define_class, msg_send, MainThreadMarker};
|
||||
use objc2::{MainThreadMarker, available, class, define_class, msg_send};
|
||||
use objc2_core_foundation::{CGFloat, CGPoint, CGRect, CGSize};
|
||||
use objc2_foundation::{NSObject, NSObjectProtocol};
|
||||
use objc2_ui_kit::{
|
||||
|
||||
Reference in New Issue
Block a user