1
0
Fork 0
forked from wry/wry

static-text: add new utility

This commit is contained in:
Julian Orth 2026-03-07 12:23:01 +01:00
parent 8f57f72d14
commit 97f7b68369
10 changed files with 150 additions and 15 deletions

View file

@ -15,7 +15,7 @@ use {
state::State,
theme::Color,
tree::{Node, OutputNode, Transform},
utils::{clonecell::UnsafeCellCloneSafe, errorfmt::ErrorFmt},
utils::{clonecell::UnsafeCellCloneSafe, errorfmt::ErrorFmt, static_text::StaticText},
video::{
Modifier,
dmabuf::DmaBuf,
@ -47,6 +47,12 @@ pub enum GfxApi {
Vulkan,
}
impl StaticText for GfxApi {
fn text(&self) -> &'static str {
self.to_str()
}
}
impl TryFrom<ConfigGfxApi> for GfxApi {
type Error = ();