create constructors for VmcExtSettingWin

This commit is contained in:
Cassandra de la Cruz-Munoz 2024-01-01 13:52:58 -05:00
parent 63eed6d8ab
commit 971d6c9455
Signed by: cassdlcm
GPG Key ID: BFEBACEA812DDA70

View File

@ -1537,7 +1537,7 @@ impl VmcExtSettingColor {
} }
#[derive(Debug)] #[derive(Debug)]
struct VmcExtSettingWin { pub struct VmcExtSettingWin {
is_top_most: bool, is_top_most: bool,
is_transparent: bool, is_transparent: bool,
window_click_through: i32, window_click_through: i32,
@ -1611,6 +1611,18 @@ impl VmcMessage for VmcExtSettingWin {
} }
} }
impl VmcExtSettingWin {
pub fn new(is_top_most: bool, is_transparent: bool, window_click_through: i32, hide_border: i32) -> MsgNewResult<Self> {
Ok(Self { is_top_most, is_transparent, window_click_through, hide_border})
}
pub fn new_vmc_message(is_top_most: bool, is_transparent: bool, window_click_through: i32, hide_border: i32) -> TraitMsgNewResult {
match Self::new(is_top_most, is_transparent, window_click_through, hide_border) {
Ok(val) => Ok(Box::new(val)),
Err(val) => Err(val)
}
}
}
#[derive(Debug)] #[derive(Debug)]
struct VmcExtConfig { struct VmcExtConfig {
path: String, path: String,