Skip to content

Commit

Permalink
add dummy WinMsg types outside of Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenesvk committed May 27, 2024
1 parent 29ed32c commit aea7fe6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions parser/src/cfg/linux.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#[derive(Default, Debug, Clone, PartialEq, Eq, Hash)]
pub struct WinMsg {}
2 changes: 2 additions & 0 deletions parser/src/cfg/macos.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#[derive(Default, Debug, Clone, PartialEq, Eq, Hash)]
pub struct WinMsg {}
8 changes: 8 additions & 0 deletions parser/src/cfg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2263,6 +2263,14 @@ fn parse_push_message(ac_params: &[SExpr], s: &ParserState) -> Result<&'static K
pub mod windows;
#[cfg(any(target_os = "windows", target_os = "unknown"))]
pub use windows::*;
#[cfg(any(target_os = "linux"))]
pub mod linux;
#[cfg(any(target_os = "linux"))]
pub use linux::*;
#[cfg(any(target_os = "macos"))]
pub mod macos;
#[cfg(any(target_os = "macos"))]
pub use macos::*;

fn to_simple_expr(params: &[SExpr], s: &ParserState) -> Vec<SimpleSExpr> {
let mut result: Vec<SimpleSExpr> = Vec::new();
Expand Down
3 changes: 0 additions & 3 deletions parser/src/custom_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! When adding a new custom action, the macro section of the config.adoc documentation may need to
//! be updated, to include the new action to the documented list of supported actions in macro.

#[cfg(any(target_os = "windows", target_os = "unknown"))]
use crate::cfg::WinMsg;
use anyhow::{anyhow, Result};
use core::fmt;
Expand All @@ -16,9 +15,7 @@ pub enum CustomAction {
Cmd(Vec<String>),
CmdOutputKeys(Vec<String>),
PushMessage(Vec<SimpleSExpr>),
#[cfg(any(target_os = "windows", target_os = "unknown"))]
WinSendMessage(WinMsg),
#[cfg(any(target_os = "windows", target_os = "unknown"))]
WinPostMessage(WinMsg),
Unicode(char),
Mouse(Btn),
Expand Down

0 comments on commit aea7fe6

Please sign in to comment.