draft auth action

This commit is contained in:
yggverse 2024-11-14 16:15:13 +02:00
parent f1b7fc9ac0
commit fc2baf7845
6 changed files with 61 additions and 6 deletions

View file

@ -1,11 +1,14 @@
mod auth;
mod load;
use auth::Auth;
use load::Load;
use std::rc::Rc;
/// [SimpleActionGroup](https://docs.gtk.org/gio/class.SimpleActionGroup.html) wrapper for `Browser` actions
pub struct Action {
// Actions
auth: Rc<Auth>,
load: Rc<Load>,
}
@ -15,12 +18,18 @@ impl Action {
/// Create new `Self`
pub fn new() -> Self {
Self {
auth: Rc::new(Auth::new()),
load: Rc::new(Load::new()),
}
}
// Getters
/// Get reference to `Auth` action
pub fn auth(&self) -> &Rc<Auth> {
&self.auth
}
/// Get reference to `Load` action
pub fn load(&self) -> &Rc<Load> {
&self.load