dear_imgui_rs/utils/
general.rs1use super::counts::non_negative_count_from_i32;
2use crate::sys;
3
4impl crate::ui::Ui {
5 #[doc(alias = "GetTime")]
7 pub fn time(&self) -> f64 {
8 unsafe { sys::igGetTime() }
9 }
10
11 #[doc(alias = "GetFrameCount")]
13 pub fn frame_count(&self) -> usize {
14 non_negative_count_from_i32("Ui::frame_count()", unsafe { sys::igGetFrameCount() })
15 }
16
17 #[doc(alias = "CalcItemWidth")]
19 pub fn calc_item_width(&self) -> f32 {
20 unsafe { sys::igCalcItemWidth() }
21 }
22}