diff --git a/src/lib.rs b/src/lib.rs index 9b23766..04ef480 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1537,7 +1537,7 @@ impl VmcExtSettingColor { } #[derive(Debug)] -struct VmcExtSettingWin { +pub struct VmcExtSettingWin { is_top_most: bool, is_transparent: bool, 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 { + 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)] struct VmcExtConfig { path: String,