Struct riddle_platform_winit::PlatformSystem [−][src]
The winit platform system core state, along with PlatformMainThreadState
.
Mostly used to lookup Window
by WindowId
, and subscribe to PlatformEvent
s.
Implementations
impl PlatformSystem
[src]
pub fn event_pub(&self) -> &EventPub<PlatformEvent>
[src]
Get the PlatformEvent
publisher, so that other systems can consume events.
Example
let rdl = RiddleLib::new()?; let subscriber: EventSub<PlatformEvent> = EventSub::new(); // Attach subscriber to the platform event stream rdl.state().platform().event_pub().attach(&subscriber);
pub fn lookup_window(&self, window_id: WindowId) -> Option<WindowHandle>
[src]
Get a WindowHandle
associated with a WindowId
, if one exists.
Example
let rdl = RiddleLib::new()?; let window = WindowBuilder::new().build(rdl.context())?; let window_id = window.id(); assert!(WindowHandle::eq(&window, &rdl.state().platform().lookup_window(window_id).unwrap()));
Trait Implementations
impl CloneHandle for PlatformSystem
[src]
type Handle = PlatformSystemHandle
The type which represents a strong reference, and which may be dereferenced as Self. Read more
type WeakHandle = PlatformSystemWeak
The type which represents a weak reference.
fn clone_handle(&self) -> PlatformSystemHandle
[src]
fn clone_weak_handle(&self) -> PlatformSystemWeak
[src]
impl PlatformSystemExt for PlatformSystem
[src]
Auto Trait Implementations
impl RefUnwindSafe for PlatformSystem
impl Send for PlatformSystem
impl Sync for PlatformSystem
impl Unpin for PlatformSystem
impl UnwindSafe for PlatformSystem
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,