{-# LANGUAGE DeriveDataTypeable, RecordWildCards #-}
module Graphics.UI.Threepenny.Core (
-- * Synopsis
-- | Core functionality of the Threepenny GUI library.
-- * Server
-- $server
Config(..), defaultConfig, startGUI,
loadFile, loadDirectory,
-- * Browser Window
Window, title, cookies, getRequestLocation,
-- * DOM elements
-- | Create and manipulate DOM elements.
Element, mkElement, getWindow, delete, (#+), string,
getHead, getBody,
children, text, html, attr, style, value,
getValuesList,
getElementsByTagName, getElementByTagName,
getElementsById, getElementById,
getElementsByClassName,
-- * Layout
-- | Combinators for quickly creating layouts.
-- They can be adjusted with CSS later on.
grid, row, column,
-- * Events
-- | For a list of predefined events, see "Graphics.UI.Threepenny.Events".
EventData(..), domEvent, on, disconnect,
module Reactive.Threepenny,
-- * Attributes
-- | For a list of predefined attributes, see "Graphics.UI.Threepenny.Attributes".
(#), (#.), element,
Attr, WriteAttr, ReadAttr, ReadWriteAttr(..),
set, sink, get, mkReadWriteAttr, mkWriteAttr, mkReadAttr,
-- * JavaScript FFI
-- | Direct interface to JavaScript in the browser window.
debug, clear,
ToJS, FFI, ffi, JSFunction, runFunction, callFunction,
callDeferredFunction, atomic,
-- * Internal and oddball functions
updateElement, manifestElement, fromProp,
audioPlay, audioStop,
) where
import Data.Dynamic
import Data.IORef
import qualified Data.Map as Map
import Data.Maybe (listToMaybe)
import Data.Functor
import Data.String (fromString)
import Control.Concurrent.MVar
import Control.Monad
import Control.Monad.IO.Class
import Network.URI
import Text.JSON
import Reactive.Threepenny
import qualified Graphics.UI.Threepenny.Internal.Core as Core
import Graphics.UI.Threepenny.Internal.Core
(getRequestLocation,
ToJS, FFI, ffi, JSFunction,
debug, clear, callFunction, runFunction, callDeferredFunction, atomic, )
import qualified Graphics.UI.Threepenny.Internal.Types as Core
import Graphics.UI.Threepenny.Internal.Types
(Window, Config, defaultConfig, EventData, Session(..))
{-----------------------------------------------------------------------------
Server
------------------------------------------------------------------------------}
{- $server
To display the user interface, you have to start a server using 'startGUI'.
Then, visit the URL