Safe Haskell | None |
---|---|
Language | Haskell98 |
Graphics.UI.Grapefruit.Backend
Description
This module defines the basic interface to all user interface backends.
- class UIBackend uiBackend where
- type WidgetPlacement uiBackend :: *
- type WindowPlacement uiBackend :: *
Documentation
class UIBackend uiBackend where Source #
The class of all user interface backends.
A backend is represented by a type. This technique allows the class system to be used to
manage different implementations of the same interface. UIBackend
declares an interface to
basic functionality and is implemented by all user interface backends. Subclasses of
UIBackend
extend the basic interface. A backend can be an instance of only some of these
subclasses when some functionality is not yet implemented or cannot be provided by the
backend. Backend types are typically used as phantom parameters. However, in some cases, an
explicit value of a backend type is needed as a function argument. Therefore, a backend is
usually a single-value type whose only value is named like the type.
All associated types and methods of UIBackend
are used internally by Grapefruit and should
not be used directly by the user.
Minimal complete definition
initialize, handleEvents, requestQuitting, finalize, topLevel
Associated Types
type WidgetPlacement uiBackend :: * Source #
type WindowPlacement uiBackend :: * Source #
Methods
initialize :: uiBackend -> IO () Source #
Initializes the backend.
handleEvents :: uiBackend -> IO () Source #
Executes the event handling loop.
requestQuitting :: uiBackend -> IO () Source #
Asks the event handling loop to quit.
finalize :: uiBackend -> IO () Source #
Finalizes the backend.
topLevel :: uiBackend -> Placement Window uiBackend Source #
Yields the placement of top-level windows.