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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! Built-in layout messages.
//!
//! It is not a hard requirement for [Layout][0] implementations to handle each
//! of the messages provided by this module but wherever possible you should
//! attempt to do so if the semantics of the message make sense for the
//! layout you are writing.
//!
//! [0]: crate::core::layout::Layout
/// Mark a type as being usable as a [Message][0] for sending to a [Layout][1]
/// ```
/// use penrose::impl_message;
///
/// struct MyMessageType {
/// important_data: u8
/// }
///
/// impl_message!(MyMessageType);
/// ```
///
/// [0]: crate::core::layout::Message
/// [1]: crate::core::layout::Layout
/// Alter the number of clients contained in the main area of the [Layout][0].
///
/// [0]: crate::core::layout::Layout
;
impl_message!;
/// Expand the size of the main area of the [Layout][0].
///
/// [0]: crate::core::layout::Layout
;
impl_message!;
/// Shrink the size of the main area of the [Layout][0]
///
/// [0]: crate::core::layout::Layout
;
impl_message!;
/// Rotate the [Layout][0] to a new orientation
///
/// [0]: crate::core::layout::Layout
;
impl_message!;
/// Mirror the [Layout][0] over either the horizontal or vertical axis.
///
/// [0]: crate::core::layout::Layout
;
impl_message!;
/// Unwrap a [LayoutTransformer][0] to return the underlying [Layout][1].
///
/// Handling of this message is provided automatically by the [LayoutTransformer][0] trait.
///
/// [0]: crate::core::layout::LayoutTransformer
/// [1]: crate::core::layout::Layout
;
impl_message!;
/// A [Message][0] sent when a [Layout][1] is no longer visible (e.g. Layout changed on a visible
/// [Workspace][2] or the workspace itself becoming hidden).
///
/// [0]: crate::core::layout::Message
/// [1]: crate::core::layout::Layout
/// [2]: crate::pure::Workspace
;
impl_message!;