begin ggemini lib integration

This commit is contained in:
yggverse 2024-10-23 10:52:25 +03:00
parent 3578928969
commit ef64e7e032
2 changed files with 161 additions and 182 deletions

View file

@ -1,38 +1,30 @@
use gtk::glib::GString;
// Page MIME type (not related with gemini status code)
// Useful for content renderer detection, etc
pub enum Mime {
TextGemini,
TextPlain,
ImagePng,
ImageGif,
ImageJpeg,
ImageWebp,
}
// Internal page status (not related with gemini status code)
// Useful for widgets composition
pub enum Status {
// SensitiveInput,
// Complete,
Connect,
// Connected,
// Connecting,
Failure,
Input,
Prepare,
// ProxyNegotiated,
// ProxyNegotiating,
Redirect,
Reload,
Request,
// Resolved,
// Resolving,
Response,
// @TODO SensitiveInput,
Success,
}
// TlsHandshaked,
// TlsHandshaking,
} // @TODO
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>,
}
@ -41,7 +33,6 @@ impl Meta {
Self {
title: None,
description: None,
mime: None,
status: None,
}
}