mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
normalize tab items component
This commit is contained in:
parent
47e2bc4617
commit
65502c247d
29 changed files with 427 additions and 117 deletions
42
src/app/browser/window/tab/item/page/meta.rs
Normal file
42
src/app/browser/window/tab/item/page/meta.rs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
use gtk::glib::GString;
|
||||
|
||||
// Page MIME type (not related with gemini status code)
|
||||
// Useful for content renderer detection, etc
|
||||
pub enum Mime {
|
||||
TextGemini,
|
||||
TextPlain,
|
||||
}
|
||||
|
||||
// Internal page status (not related with gemini status code)
|
||||
// Useful for widgets composition
|
||||
pub enum Status {
|
||||
Connect,
|
||||
Failure,
|
||||
Prepare,
|
||||
Redirect,
|
||||
Reload,
|
||||
Request,
|
||||
Response,
|
||||
Success,
|
||||
}
|
||||
|
||||
pub struct Meta {
|
||||
// Text meta data for page
|
||||
// Useful to update window title, label text, etc
|
||||
pub title: Option<GString>,
|
||||
pub description: Option<GString>,
|
||||
// Enums
|
||||
pub mime: Option<Mime>,
|
||||
pub status: Option<Status>,
|
||||
}
|
||||
|
||||
impl Meta {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
title: None,
|
||||
description: None,
|
||||
mime: None,
|
||||
status: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue