wip: use toplevel protocols

This commit is contained in:
Ashley Wulber 2022-07-19 11:33:19 -04:00
parent 647a402206
commit 560ebc0bf5
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
20 changed files with 1073 additions and 623 deletions

View file

@ -3,32 +3,25 @@
use std::path::PathBuf;
use gtk4::glib;
use serde::{Deserialize, Serialize};
use std::future::Future;
use crate::wayland::Toplevel;
pub const DEST: &str = "com.System76.PopShell";
pub const PATH: &str = "/com/System76/PopShell";
#[derive(Debug)]
pub enum Event {
WindowList,
pub enum AppListEvent {
WindowList(Vec<Toplevel>),
Activate((u32, u32)),
Close((u32, u32)),
Favorite((String, bool)),
RefreshFromCache,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Item {
pub(crate) entity: (u32, u32),
pub(crate) name: String,
pub(crate) description: String,
pub(crate) desktop_entry: String,
Refresh,
}
#[derive(Clone, Debug, Default, glib::Boxed)]
#[boxed_type(name = "BoxedWindowList")]
pub struct BoxedWindowList(pub Vec<Item>);
pub struct BoxedWindowList(pub Vec<Toplevel>);
pub fn data_path() -> PathBuf {
let mut path = glib::user_data_dir();