1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::geometry::Window;

#[derive(Default)]
pub struct CaptureState {
    active: bool,
    area: Window,
}

impl CaptureState {
    pub fn is_capturing(&self) -> bool {
        self.active
    }
    pub fn set_capture(&mut self, state: bool) {
        self.active = state
    }
    pub fn set_area(&mut self, area: Window) {
        self.area = area
    }
    pub fn get_area(&self) -> Window {
        self.area
    }
}