autocommit 2022-01-03 18:56:52 CET
This commit is contained in:
parent
fc887b339e
commit
30376c595c
39 changed files with 3157 additions and 309 deletions
|
|
@ -39,7 +39,7 @@ impl WlShmGlobal {
|
|||
client: client.clone(),
|
||||
});
|
||||
client.add_client_obj(&obj)?;
|
||||
for &format in Format::formats() {
|
||||
for &format in client.state.formats.values() {
|
||||
client
|
||||
.event(Box::new(FormatE {
|
||||
obj: obj.clone(),
|
||||
|
|
@ -80,25 +80,6 @@ impl WlShmObj {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
||||
pub enum Format {
|
||||
Argb8888,
|
||||
Xrgb8888,
|
||||
}
|
||||
|
||||
impl Format {
|
||||
fn uint(self) -> u32 {
|
||||
match self {
|
||||
Format::Argb8888 => 0,
|
||||
Format::Xrgb8888 => 1,
|
||||
}
|
||||
}
|
||||
|
||||
fn formats() -> &'static [Format] {
|
||||
&[Format::Argb8888, Format::Xrgb8888]
|
||||
}
|
||||
}
|
||||
|
||||
bind!(WlShmGlobal);
|
||||
|
||||
impl Global for WlShmGlobal {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue