// Generated using `moon info`, DON'T EDIT IT package "chandra/desktop/lib/battery" import { "chandra/desktop/interface/chandra/desktop/theme", "chandra/desktop/interface/chandra/desktop/types", "moonbitlang/core/debug", } // Values pub let config : BatteryConfig pub let critical_percent : Int32 pub fn info() -> (String, String, Int32, Int32, Int32) pub fn long_time(Int32) -> String pub let low_percent : Int32 pub fn panel_text(Reading, BatteryConfig) -> String pub let popup_w : Int32 pub fn render(@types.Size, @theme.Tokens, Reading, BatteryConfig, open? : Bool) -> Array[@types.DrawOp] pub fn render_popup(@theme.Tokens, Reading, warning? : Bool) -> (Int32, Int32, Array[@types.DrawOp]) pub fn short_time(Int32) -> String pub let state_charging : Int32 pub let state_discharging : Int32 pub let state_full : Int32 pub let state_none : Int32 pub let state_not_charging : Int32 // Errors // Types and methods pub(all) struct BatteryConfig { mut show_percent : Bool mut show_time : Bool mut plug_without_battery : Bool } pub fn BatteryConfig::items(Self) -> Array[ConfigEntry] pub fn BatteryConfig::new() -> Self pub fn BatteryConfig::set(Self, String, String) -> Bool #derive(Eq, @debug.Debug) pub(all) struct ConfigEntry { key : String label : String choices : Array[String] value : String } pub(all) struct LowWarning { mut fired : Bool } pub fn LowWarning::new() -> Self pub fn LowWarning::update(Self, Reading) -> Bool #derive(Eq, @debug.Debug) pub(all) struct Reading { percent : Int32 state : Int32 secs_left : Int32 } pub fn Reading::describe(Self) -> String pub fn Reading::has_battery(Self) -> Bool pub fn Reading::level(Self) -> Int32 // Type aliases // Traits