2022-01-19 16:00:02 -05:00
|
|
|
use crate::window_inner::AppLibraryWindowInner;
|
2022-01-14 17:53:11 -05:00
|
|
|
use gtk4::glib;
|
2021-12-30 16:54:35 -05:00
|
|
|
use gtk4::subclass::prelude::*;
|
2021-12-02 12:49:01 -05:00
|
|
|
use once_cell::sync::OnceCell;
|
|
|
|
|
|
|
|
|
|
// Object holding the state
|
2021-12-31 16:03:47 -05:00
|
|
|
#[derive(Default)]
|
2022-01-19 16:00:02 -05:00
|
|
|
|
2022-01-14 17:53:11 -05:00
|
|
|
pub struct AppLibraryWindow {
|
2022-01-19 16:00:02 -05:00
|
|
|
pub(super) inner: OnceCell<AppLibraryWindowInner>,
|
2021-12-02 12:49:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The central trait for subclassing a GObject
|
|
|
|
|
#[glib::object_subclass]
|
2022-01-14 17:53:11 -05:00
|
|
|
impl ObjectSubclass for AppLibraryWindow {
|
2021-12-02 12:49:01 -05:00
|
|
|
// `NAME` needs to match `class` attribute of template
|
2022-01-14 17:53:11 -05:00
|
|
|
const NAME: &'static str = "AppLibraryWindow";
|
|
|
|
|
type Type = super::AppLibraryWindow;
|
2021-12-30 16:54:35 -05:00
|
|
|
type ParentType = gtk4::ApplicationWindow;
|
2021-12-02 12:49:01 -05:00
|
|
|
}
|
2021-12-29 17:31:01 -05:00
|
|
|
|
2021-12-02 12:49:01 -05:00
|
|
|
// Trait shared by all GObjects
|
2022-01-14 17:53:11 -05:00
|
|
|
impl ObjectImpl for AppLibraryWindow {}
|
2021-12-29 17:31:01 -05:00
|
|
|
|
2021-12-02 12:49:01 -05:00
|
|
|
// Trait shared by all widgets
|
2022-01-14 17:53:11 -05:00
|
|
|
impl WidgetImpl for AppLibraryWindow {}
|
2021-12-02 12:49:01 -05:00
|
|
|
|
|
|
|
|
// Trait shared by all windows
|
2022-01-19 16:00:02 -05:00
|
|
|
impl WindowImpl for AppLibraryWindow {}
|
2021-12-02 12:49:01 -05:00
|
|
|
|
|
|
|
|
// Trait shared by all application
|
2022-01-14 17:53:11 -05:00
|
|
|
impl ApplicationWindowImpl for AppLibraryWindow {}
|