aboutsummaryrefslogtreecommitdiffstats
path: root/src/events.rs
blob: f66e6a274564c93b887d3c1756d23b235c0ba265 (plain)
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

#[deriving(Clone,Show)]
pub enum Event {
    /// The position of the window has changed.
    PositionChanged(uint, uint),

    /// The size of the window has changed.
    SizeChanged(uint, uint),

    /// The window has been closed.
    Closed,

    /// The cursor has moved on the window.
    /// 
    /// The parameter are the (x,y) coords in pixels relative to the top-left corner of the window.
    CursorPositionChanged(uint, uint),

    /// The window gained or lost focus.
    /// 
    /// The parameter is true if the window has gained focus, and false if it has lost focus.
    Focused(bool),

    /// The window has been turned into an icon or restored.
    /// 
    /// The parameter is true if the window has been iconified, and false if it has been restored.
    Iconified(bool),

    /// The system asked that the content of this window must be redrawn.
    NeedRefresh,

    /// The size of the framebuffer of the window has changed.
    FramebufferSizeChanged(uint, uint),
}