This repository has been archived on 2025-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
2024-08-02 00:09:26 +03:00
|
|
|
use std::cell::Cell;
|
|
|
|
|
|
|
|
use crate::gtk;
|
|
|
|
|
|
|
|
use glib::Properties;
|
|
|
|
use gtk::glib;
|
|
|
|
use gtk::prelude::*;
|
|
|
|
use gtk::subclass::prelude::*;
|
|
|
|
|
2024-07-19 22:05:55 +03:00
|
|
|
#[repr(usize)]
|
|
|
|
#[derive(Clone)]
|
|
|
|
pub enum HammingMode {
|
|
|
|
Encrypt = 4,
|
|
|
|
Decrypt = 7,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct EventHandler<F, C> {
|
|
|
|
pub(crate) component: C,
|
|
|
|
pub(crate) callback: F,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub type SchemeCharacteristics = (f64, f64, f64, f64, f64, f64);
|
2024-08-02 00:09:26 +03:00
|
|
|
|
|
|
|
#[derive(Properties, Default)]
|
|
|
|
#[properties(wrapper_type = super::ResultValue)]
|
|
|
|
pub struct ResultValue {
|
|
|
|
#[property(get, set)]
|
|
|
|
value: Cell<f64>,
|
|
|
|
}
|
|
|
|
|
|
|
|
// The central trait for subclassing a GObject
|
|
|
|
#[glib::object_subclass]
|
|
|
|
impl ObjectSubclass for ResultValue {
|
|
|
|
const NAME: &'static str = "MyGtkAppCustomButton";
|
|
|
|
type Type = super::ResultValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[glib::derived_properties]
|
|
|
|
impl ObjectImpl for ResultValue {}
|