Returns button state reader for this device
(&self)
| 180 | |
| 181 | /// Returns button state reader for this device |
| 182 | pub fn get_reader(&self) -> Arc<AsyncDeviceStateReader> { |
| 183 | Arc::new(AsyncDeviceStateReader { |
| 184 | device: self.clone(), |
| 185 | states: Mutex::new(DeviceState { |
| 186 | buttons: vec![false; self.kind.key_count() as usize + self.kind.touchpoint_count() as usize], |
| 187 | encoders: vec![false; self.kind.encoder_count() as usize], |
| 188 | }), |
| 189 | }) |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | /// Button reader that keeps state of the Stream Deck and returns events instead of full states |
nothing calls this directly
no outgoing calls
no test coverage detected