MCPcopy Create free account
hub / github.com/Recordscript/recordscript / primary

Method primary

libs/scrap/src/common/android.rs:114–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112
113impl Display {
114 pub fn primary() -> io::Result<Display> {
115 let mut size = SCREEN_SIZE.lock().unwrap();
116 if size.0 == 0 || size.1 == 0 {
117 *size = get_size().unwrap_or_default();
118 }
119 Ok(Display {
120 default: true,
121 rect: Rect {
122 x: 0,
123 y: 0,
124 w: size.0,
125 h: size.1,
126 },
127 })
128 }
129
130 pub fn all() -> io::Result<Vec<Display>> {
131 Ok(vec![Display::primary()?])

Callers

nothing calls this directly

Calls 1

get_sizeFunction · 0.85

Tested by

no test coverage detected