use std::cell::Cell; use crate::gtk; use glib::Properties; use gtk::glib; use gtk::prelude::*; use gtk::subclass::prelude::*; #[repr(usize)] #[derive(Clone)] pub enum HammingMode { Encrypt = 4, Decrypt = 7, } pub struct EventHandler { pub(crate) component: C, pub(crate) callback: F, } #[derive(Default, Copy, Clone)] pub struct SignalReduce(pub f64, pub f64, pub f64, pub f64, pub f64, pub f64); impl SignalReduce { pub fn new() -> Self { Self(0.0, 0.0, 0.0, 0.0, 0.0, 0.0) } } #[derive(Properties, Default)] #[properties(wrapper_type = super::ResultValue)] pub struct ResultValue { #[property(get, set)] value: Cell, } // 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 {}