|
| Graphics.HGL.Window | | Portability | non-portable (requires concurrency) | | Stability | provisional | | Maintainer | libraries@haskell.org |
|
|
|
|
|
| Description |
| Windows in a simple graphics library.
|
|
| Synopsis |
|
|
|
|
| Windows
|
|
|
|
|
| Title of a window.
|
|
|
| How to draw in a window.
| | Constructors | | DoubleBuffered | use a double buffer to reduce flicker.
You should probably use this for animations.
| | Unbuffered | draw directly to the window.
This runs slightly faster but is more prone
to flicker.
|
|
|
|
|
| :: Title | title of the window
| | -> Maybe Point | the optional initial position of a window
| | -> Size | initial size of the window
| | -> RedrawMode | how to display a graphic on the window
| | -> Maybe Time | the time between ticks (in milliseconds) of an
optional timer associated with the window
| | -> IO Window | | | General window creation.
|
|
|
|
| The position of the top left corner of the window on the screen,
and the size of the window.
|
|
|
| Close the window.
|
|
| Drawing in a window
|
|
|
| Set the current drawing in a window.
|
|
|
| Get the current drawing in a window.
|
|
|
| Update the drawing for a window.
Note that this does not force a redraw.
|
|
|
|
| Events in a window
|
|
|
A user interface event.
Notes:
- Programmers should assume that the Event datatype will be
extended in the not-too-distant future and that individual events
may change slightly. As a minimum, you should add a "match anything"
alternative to any function which pattern matches against Events.
- X11 systems typically have three button mice. Button 1 is used as the
left button, button 3 as the right button and button 2 (the middle
button) is ignored.
| | Constructors | | Char | a properly translated character, sent after
a key press.
| | char :: Char | the character represented by a key combination
|
| | Key | occurs when a key was pressed or released.
| | keysym :: Key | representation of the keyboard keys pressed
| | isDown :: Bool | if True, the key was pressed;
otherwise it was released
|
| | Button | occurs when a mouse button is pressed or released.
| | pt :: Point | the position of the mouse cursor
| | isLeft :: Bool | if True, it was the left button
| | isDown :: Bool | if True, the key was pressed;
otherwise it was released
|
| | MouseMove | occurs when the mouse is moved inside the window.
| | pt :: Point | the position of the mouse cursor
|
| | Resize | occurs when the window is resized.
| | Closed | occurs when the window is closed.
|
|
|
|
|
| Wait for the next event on the given window.
|
|
|
| Check for a pending event on the given window.
|
|
| Timer ticks
|
|
| Timers that tick at regular intervals are set up by openWindowEx.
|
|
|
| Wait for the next tick event from the timer on the given window.
|
|
|
| Time in milliseconds since some arbitrary epoch.
|
|
| Produced by Haddock version 2.6.0 |