wzrd

An ICCCM & EWMH compliant X11 reparenting, dynamic window manager, written in Rust
git clone git://git.deurzen.net/wzrd
Log | Files | Refs | LICENSE

event.rs (2338B)


      1 pub use crate::Result;
      2 
      3 use crate::geometry::Dim;
      4 use crate::geometry::Pos;
      5 use crate::geometry::Region;
      6 use crate::input::Grip;
      7 use crate::input::KeyEvent;
      8 use crate::input::MouseEvent;
      9 use crate::screen::Screen;
     10 use crate::window::Window;
     11 use crate::window::WindowState;
     12 use crate::window::WindowType;
     13 
     14 #[derive(Debug, Clone)]
     15 pub enum Event {
     16     Mouse {
     17         event: MouseEvent,
     18         on_root: bool,
     19     },
     20     Key {
     21         event: KeyEvent,
     22     },
     23     MapRequest {
     24         window: Window,
     25         ignore: bool,
     26     },
     27     Map {
     28         window: Window,
     29         ignore: bool,
     30     },
     31     Enter {
     32         window: Window,
     33         root_rpos: Pos,
     34         window_rpos: Pos,
     35     },
     36     Leave {
     37         window: Window,
     38         root_rpos: Pos,
     39         window_rpos: Pos,
     40     },
     41     Destroy {
     42         window: Window,
     43     },
     44     Expose {
     45         window: Window,
     46     },
     47     Unmap {
     48         window: Window,
     49         ignore: bool,
     50     },
     51     StateRequest {
     52         window: Window,
     53         state: WindowState,
     54         action: ToggleAction,
     55         on_root: bool,
     56     },
     57     FocusRequest {
     58         window: Window,
     59         on_root: bool,
     60     },
     61     CloseRequest {
     62         window: Window,
     63         on_root: bool,
     64     },
     65     WorkspaceRequest {
     66         window: Option<Window>,
     67         index: usize,
     68         on_root: bool,
     69     },
     70     PlacementRequest {
     71         window: Window,
     72         pos: Option<Pos>,
     73         dim: Option<Dim>,
     74         on_root: bool,
     75     },
     76     GripRequest {
     77         window: Window,
     78         pos: Pos,
     79         grip: Option<Grip>,
     80         on_root: bool,
     81     },
     82     RestackRequest {
     83         window: Window,
     84         sibling: Window,
     85         mode: StackMode,
     86         on_root: bool,
     87     },
     88     Configure {
     89         window: Window,
     90         region: Region,
     91         on_root: bool,
     92     },
     93     Property {
     94         window: Window,
     95         kind: PropertyKind,
     96         on_root: bool,
     97     },
     98     FrameExtentsRequest {
     99         window: Window,
    100         on_root: bool,
    101     },
    102     ScreenChange,
    103 }
    104 
    105 #[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
    106 pub enum StackMode {
    107     Above,
    108     Below,
    109 }
    110 
    111 #[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
    112 pub enum ToggleAction {
    113     Toggle,
    114     Add,
    115     Remove,
    116 }
    117 
    118 #[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
    119 pub enum PropertyKind {
    120     Name,
    121     Class,
    122     Size,
    123     Strut,
    124 }