static-text: add new utility
This commit is contained in:
parent
8f57f72d14
commit
97f7b68369
10 changed files with 150 additions and 15 deletions
|
|
@ -4,6 +4,7 @@ use {
|
|||
ifs::wl_surface::WlSurface,
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
utils::static_text::StaticText,
|
||||
wire::{WpContentTypeV1Id, wp_content_type_v1::*},
|
||||
},
|
||||
jay_config::window::{
|
||||
|
|
@ -26,6 +27,16 @@ pub enum ContentType {
|
|||
Game,
|
||||
}
|
||||
|
||||
impl StaticText for ContentType {
|
||||
fn text(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Photo => "Photo",
|
||||
Self::Video => "Video",
|
||||
Self::Game => "Game",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait ContentTypeExt {
|
||||
fn to_config(&self) -> ConfigContentType;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue