chore: surface task helper
This commit is contained in:
parent
0ee5131670
commit
5938776c26
2 changed files with 5 additions and 0 deletions
|
|
@ -587,6 +587,7 @@ impl Core {
|
||||||
self.app_type
|
self.app_type
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
#[cfg(feature = "winit")]
|
#[cfg(feature = "winit")]
|
||||||
pub fn blur(
|
pub fn blur(
|
||||||
&self,
|
&self,
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,10 @@ pub enum Action {
|
||||||
Task(Arc<dyn Fn() -> Task<Action> + Send + Sync>),
|
Task(Arc<dyn Fn() -> Task<Action> + Send + Sync>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn surface_task<M: Send + Sync + 'static>(action: Action) -> Task<crate::Action<M>> {
|
||||||
|
crate::task::message(crate::Action::Cosmic(crate::app::Action::Surface(action)))
|
||||||
|
}
|
||||||
|
|
||||||
impl std::fmt::Debug for Action {
|
impl std::fmt::Debug for Action {
|
||||||
#[cold]
|
#[cold]
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue