grapefruit-ui-0.1.0.7: Declarative user interface programming

Safe HaskellNone
LanguageHaskell98

Graphics.UI.Grapefruit.Backend

Description

This module defines the basic interface to all user interface backends.

Synopsis

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.

Associated Types

type WidgetPlacement uiBackend :: * Source #

WidgetPlacement uiBackend provides the result of Placement Widget uiBackend.

type WindowPlacement uiBackend :: * Source #

WindowPlacement uiBackend provides the result of Placement Window uiBackend.

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.