Skip to main content

ferroui_base/input/
window_decorations_element_role.rs

1/// Defines the cross-platform role of a visual element for non-client
2/// hit-testing. Used to mark elements as titlebar drag areas, resize grips,
3/// etc.
4#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
5#[repr(i32)]
6pub enum WindowDecorationsElementRole {
7    /// No special role. The element is invisible to chrome hit-testing.
8    #[default]
9    None = 0,
10
11    /// An interactive element that is part of the decorations chrome (e.g.,
12    /// a caption button). Set by themes on decoration template elements.
13    /// Input is passed through to the element rather than being intercepted
14    /// for non-client actions.
15    DecorationsElement = 1,
16
17    /// An interactive element set by user code that should receive input
18    /// even when overlapping chrome areas. Has the same effect as
19    /// [`DecorationsElement`](Self::DecorationsElement) but is intended for
20    /// use by application developers.
21    User = 2,
22
23    /// The element acts as a titlebar drag area. Clicking and dragging on
24    /// this element initiates a platform window move.
25    TitleBar = 3,
26
27    /// Resize grip for the north (top) edge.
28    ResizeN = 4,
29
30    /// Resize grip for the south (bottom) edge.
31    ResizeS = 5,
32
33    /// Resize grip for the east (right) edge.
34    ResizeE = 6,
35
36    /// Resize grip for the west (left) edge.
37    ResizeW = 7,
38
39    /// Resize grip for the northeast corner.
40    ResizeNE = 8,
41
42    /// Resize grip for the northwest corner.
43    ResizeNW = 9,
44
45    /// Resize grip for the southeast corner.
46    ResizeSE = 10,
47
48    /// Resize grip for the southwest corner.
49    ResizeSW = 11,
50
51    /// The element acts as the window close button. On Win32, maps to the
52    /// system close behavior. On other platforms, treated as an interactive
53    /// decoration element.
54    CloseButton = 12,
55
56    /// The element acts as the window minimize button. On Win32, maps to
57    /// the system minimize behavior. On other platforms, treated as an
58    /// interactive decoration element.
59    MinimizeButton = 13,
60
61    /// The element acts as the window maximize/restore button. On Win32,
62    /// maps to the system maximize behavior. On other platforms, treated as
63    /// an interactive decoration element.
64    MaximizeButton = 14,
65
66    /// The element acts as the window fullscreen toggle button. Treated as
67    /// an interactive decoration element on all platforms.
68    FullScreenButton = 15,
69}