use gtk::{glib, gdk_pixbuf};
use gstreamer_player as gst_player;
use std::cell::RefCell;
use crate::config::ModuleConfig;

pub struct ModuleState {
    pub animation: Option<gdk_pixbuf::PixbufAnimation>,
    pub audio_uri: Option<String>,
    pub config: ModuleConfig,
}

pub struct WindowData {
    pub sprites: Vec<gtk::Image>,
    pub active_players: Vec<gst_player::Player>,
    pub ready_players: Vec<gst_player::Player>,
    pub fixed: gtk::Fixed,
    pub signal_id: Option<glib::SignalHandlerId>,
}

thread_local! {
    pub static MODULE_STATE: RefCell<ModuleState> = const { RefCell::new(ModuleState {
        animation: None,
        audio_uri: None,
        config: ModuleConfig { deadzone: None },
    }) };
}
