api: make VideoModeHandle into VideoMode
The video mode is generally a static data and not a reference to some video mode. This changes the exclusive fullscreen API to match that an accept a monitor now.
This commit is contained in:
parent
5462f27dda
commit
ee245c569d
28 changed files with 247 additions and 475 deletions
|
|
@ -107,7 +107,7 @@ use std::os::raw::c_void;
|
|||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::monitor::{MonitorHandle, VideoModeHandle};
|
||||
use crate::monitor::{MonitorHandle, VideoMode};
|
||||
use crate::window::{Window, WindowAttributes};
|
||||
|
||||
/// Additional methods on [`Window`] that are specific to iOS.
|
||||
|
|
@ -384,10 +384,10 @@ pub trait MonitorHandleExtIOS {
|
|||
/// [`UIScreen`]: https://developer.apple.com/documentation/uikit/uiscreen?language=objc
|
||||
fn ui_screen(&self) -> *mut c_void;
|
||||
|
||||
/// Returns the preferred [`VideoModeHandle`] for this monitor.
|
||||
/// Returns the preferred [`VideoMode`] for this monitor.
|
||||
///
|
||||
/// This translates to a call to [`-[UIScreen preferredMode]`](https://developer.apple.com/documentation/uikit/uiscreen/1617823-preferredmode?language=objc).
|
||||
fn preferred_video_mode(&self) -> VideoModeHandle;
|
||||
fn preferred_video_mode(&self) -> VideoMode;
|
||||
}
|
||||
|
||||
impl MonitorHandleExtIOS for MonitorHandle {
|
||||
|
|
@ -399,8 +399,8 @@ impl MonitorHandleExtIOS for MonitorHandle {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn preferred_video_mode(&self) -> VideoModeHandle {
|
||||
VideoModeHandle { video_mode: self.inner.preferred_video_mode() }
|
||||
fn preferred_video_mode(&self) -> VideoMode {
|
||||
self.inner.preferred_video_mode()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue