Safe Haskell | None |
---|
This module defines the basic interface to all user interface backends.
- class UIBackend uiBackend where
- type WidgetPlacement uiBackend :: *
- type WindowPlacement uiBackend :: *
- initialize :: uiBackend -> IO ()
- handleEvents :: uiBackend -> IO ()
- requestQuitting :: uiBackend -> IO ()
- finalize :: uiBackend -> IO ()
- topLevel :: uiBackend -> Placement Window uiBackend
Documentation
class UIBackend uiBackend whereSource
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.
type WidgetPlacement uiBackend :: *Source
type WindowPlacement uiBackend :: *Source
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 uiBackendSource
Yields the placement of top-level windows.