1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Proc macros for use in the main Penrose crate
use TokenStream;
use stubbed_companion_trait_inner;
use validate_user_bindings_inner;
/// This is an internal macro that is used as part of `gen_keybindings` to validate user provided
/// key bindings at compile time using xmodmap.
///
/// It is not intended for use outside of that context and may be modified and updated without
/// announcing breaking API changes.
///
/// ```no_run
/// # use penrose_proc::validate_user_bindings;
/// validate_user_bindings!(
/// ( "M-a", "M-b" )
/// (
/// ( ( "M-{}", "M-S-{}" ) ( "1", "2", "3" ) )
/// )
/// );
/// ```
/// Auto derive a dummy implementation of the marked trait for use in test cases.
///
/// This is _not_ a full blown mocking implemention, it simply allows for quickly setting default
/// return values on trait methods you don't need for a given test case and allows for easily
/// testing functionality that only makes use of a handful of methods.
///
/// Wherever possible, you should always prefer breaking traits down into small, composible units
/// instead of "mega-traits" but in the case of `XConn` and some of its component parts, further
/// granularity isn't really desirable.