pub struct LinuxPlatform { /* private fields */ }Expand description
Direct Linux X11 / Wayland (dlopen-loaded) + Vulkan platform backend.
Implementations§
Source§impl LinuxPlatform
X11/Wayland system event injection helpers for LinuxPlatform.
impl LinuxPlatform
X11/Wayland system event injection helpers for LinuxPlatform.
Sourcepub fn push_system_event(&mut self, event: SystemEvent)
pub fn push_system_event(&mut self, event: SystemEvent)
Enqueues a normalized Linux SystemEvent to be drained on the next poll_events() tick.
§Arguments
&Self- Mutable Linux platform backend.SystemEvent- System event to enqueue.
Source§impl LinuxPlatform
impl LinuxPlatform
pub fn get_windows(&self) -> &HashMap<WindowId, LinuxWindowRecord>
pub fn get_mut_windows(&mut self) -> &mut HashMap<WindowId, LinuxWindowRecord>
pub fn set_windows( &mut self, val: HashMap<WindowId, LinuxWindowRecord>, ) -> &mut Self
pub fn get_pending_events(&self) -> &Vec<WindowEvent>
pub fn get_mut_pending_events(&mut self) -> &mut Vec<WindowEvent>
pub fn set_pending_events(&mut self, val: Vec<WindowEvent>) -> &mut Self
pub fn get_mut_clipboard_cache(&mut self) -> &mut Option<String>
pub fn set_clipboard_cache(&mut self, val: Option<String>) -> &mut Self
pub fn get_mut_pump_paused(&mut self) -> &mut bool
Trait Implementations§
Source§impl Clone for LinuxPlatform
impl Clone for LinuxPlatform
Source§impl Debug for LinuxPlatform
impl Debug for LinuxPlatform
Source§impl Default for LinuxPlatform
Default initialization for LinuxPlatform.
impl Default for LinuxPlatform
Default initialization for LinuxPlatform.
Source§impl PlatformBackend for LinuxPlatform
PlatformBackend implementation for native Linux.
impl PlatformBackend for LinuxPlatform
PlatformBackend implementation for native Linux.
Source§fn kind(&self) -> PlatformKind
fn kind(&self) -> PlatformKind
Source§fn capabilities(&self) -> PlatformCapabilities
fn capabilities(&self) -> PlatformCapabilities
Source§fn create_window(
&mut self,
config: &WindowConfig,
) -> Result<WindowState, PlatformError>
fn create_window( &mut self, config: &WindowConfig, ) -> Result<WindowState, PlatformError>
Source§fn window_state(&self, id: WindowId) -> Option<WindowState>
fn window_state(&self, id: WindowId) -> Option<WindowState>
Source§fn raw_window_handle(&self, id: WindowId) -> RawWindowHandle
fn raw_window_handle(&self, id: WindowId) -> RawWindowHandle
Source§fn poll_events(&mut self) -> Vec<WindowEvent>
fn poll_events(&mut self) -> Vec<WindowEvent>
Source§fn wait_for_events(&mut self) -> Vec<WindowEvent>
fn wait_for_events(&mut self) -> Vec<WindowEvent>
Source§fn set_frame_pump_paused(&mut self, paused: bool)
fn set_frame_pump_paused(&mut self, paused: bool)
Updates Linux background frame-pump pause state.
§Arguments
&Self- Mutable Linux platform.bool-truewhen paused in background;falsewhen active.
Source§fn is_frame_pump_paused(&self) -> bool
fn is_frame_pump_paused(&self) -> bool
Source§fn present_framebuffer(
&mut self,
id: WindowId,
framebuffer: &Framebuffer,
) -> Result<(), PlatformError>
fn present_framebuffer( &mut self, id: WindowId, framebuffer: &Framebuffer, ) -> Result<(), PlatformError>
Source§fn read_clipboard(&self) -> Option<String>
fn read_clipboard(&self) -> Option<String>
Source§fn write_clipboard(&mut self, text: &str) -> Result<(), PlatformError>
fn write_clipboard(&mut self, text: &str) -> Result<(), PlatformError>
Source§fn system_theme(&self) -> ThemeMode
fn system_theme(&self) -> ThemeMode
Source§fn display_refresh_rate_hz(&self) -> f32
fn display_refresh_rate_hz(&self) -> f32
Source§fn present_framebuffer_region(
&mut self,
id: WindowId,
framebuffer: &Framebuffer,
_damage: DamageRegion,
) -> Result<(), PlatformError>
fn present_framebuffer_region( &mut self, id: WindowId, framebuffer: &Framebuffer, _damage: DamageRegion, ) -> Result<(), PlatformError>
Presents a damaged sub-region of a CPU-rendered RGBA8
Framebuffer when supported by the backend. Read moreSource§impl WindowController for LinuxPlatform
WindowController implementation for Linux X11 / Wayland.
impl WindowController for LinuxPlatform
WindowController implementation for Linux X11 / Wayland.
Source§fn apply_command(&mut self, command: WindowCommand) -> Result<(), PlatformError>
fn apply_command(&mut self, command: WindowCommand) -> Result<(), PlatformError>
Auto Trait Implementations§
impl Forget for LinuxPlatform
impl Freeze for LinuxPlatformwhere
*const u8 is !null: Freeze,
PhantomData<(WindowId, LinuxWindowRecord)>: Freeze,
PhantomData<WindowEvent>: Freeze,
PhantomData<u8>: Freeze,
impl Move for LinuxPlatform
impl RefUnwindSafe for LinuxPlatform
impl Send for LinuxPlatform
impl Sync for LinuxPlatform
impl Unpin for LinuxPlatform
impl UnsafeUnpin for LinuxPlatformwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(WindowId, LinuxWindowRecord)>: UnsafeUnpin,
PhantomData<WindowEvent>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for LinuxPlatformwhere
HashMap<WindowId, LinuxWindowRecord>: UnwindSafe,
RawVecInner: UnwindSafe,
HashMap<String, String>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more