wip: applet workspaces
This commit is contained in:
parent
464338585c
commit
2cbaaae069
20 changed files with 669 additions and 0 deletions
32
applets/cosmic-applet-workspaces/src/window/imp.rs
Normal file
32
applets/cosmic-applet-workspaces/src/window/imp.rs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// SPDX-License-Identifier: MPL-2.0-only
|
||||
|
||||
use gtk4::{glib, subclass::prelude::*};
|
||||
use once_cell::sync::OnceCell;
|
||||
use crate::{workspace_list::WorkspaceList};
|
||||
|
||||
// Object holding the state
|
||||
#[derive(Default)]
|
||||
pub struct CosmicWorkspacesWindow {
|
||||
pub(super) inner: OnceCell<WorkspaceList>,
|
||||
}
|
||||
|
||||
// The central trait for subclassing a GObject
|
||||
#[glib::object_subclass]
|
||||
impl ObjectSubclass for CosmicWorkspacesWindow {
|
||||
// `NAME` needs to match `class` attribute of template
|
||||
const NAME: &'static str = "CosmicWorkspacesWindow";
|
||||
type Type = super::CosmicWorkspacesWindow;
|
||||
type ParentType = gtk4::ApplicationWindow;
|
||||
}
|
||||
|
||||
// Trait shared by all GObjects
|
||||
impl ObjectImpl for CosmicWorkspacesWindow {}
|
||||
|
||||
// Trait shared by all widgets
|
||||
impl WidgetImpl for CosmicWorkspacesWindow {}
|
||||
|
||||
// Trait shared by all windows
|
||||
impl WindowImpl for CosmicWorkspacesWindow {}
|
||||
|
||||
// Trait shared by all application
|
||||
impl ApplicationWindowImpl for CosmicWorkspacesWindow {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue