hbro-0.9.0.0: Minimal KISS compliant browser

Safe HaskellNone

Hbro.Types

Synopsis

Documentation

type K = KT IOSource

Base type for high-level actions, mnemonics: K(it) from WebKit

newtype KT m a Source

Constructors

KT (ReaderT Environment m a) 

Instances

MonadTrans KT 
Monad m => MonadReader Environment (KT m) 
Monad m => Monad (KT m) 
Functor m => Functor (KT m) 
MonadFix m => MonadFix (KT m) 
MonadIO m => MonadIO (KT m) 

data Environment Source

The whole set of parameters, elements and states of the application

Constructors

Environment 

Fields

mState :: IORef (Map String Dynamic)
 
mOptions :: CliOptions

Commandline options

mConfig :: Config

Custom configuration provided by user

mGUI :: GUI

Graphical widgets

mContext :: Context

ZeroMQ context

Instances

data CliOptions Source

Set of commandline options

Constructors

CliOptions 

Fields

mURI :: Maybe String

URI to load at start-up

mVanilla :: Bool

Bypass custom configuration file

mRecompile :: Bool

Force recompilation and do not launch browser

mDenyReconf :: Bool

Do not recompile browser even if configuration file has changed

mForceReconf :: Bool

Force recompilation even if configuration file hasn't changed

mDyreDebug :: Bool

Look for a custom configuration file in current working directory

mMasterBinary :: Maybe String

Path to the master binary, used by Dyre

data Config Source

Custom parameters provided by the user

Constructors

Config 

Fields

mSocketDir :: RefDirs -> FilePath

Directory where 0MQ sockets will be created (/tmp for example)

mUIFile :: RefDirs -> FilePath

Path to XML file describing UI (used by GtkBuilder)

mHomePage :: String

Startup page

mWebSettings :: [AttrOp WebSettings]

WebSettings' attributes to use with webkit (see Webkit.WebSettings documentation) mKeyEventHandler :: KeyEventCallback -> ConnectId WebView -> WebView -> EventM EKey Bool, -- ^ Key event handler, which forwards keystrokes to mKeyEventCallback mKeyEventCallback :: Environment -> KeyEventCallback, -- ^ Main key event callback, assumed to deal with each keystroke separately

mCommands :: CommandsList

Commands recognized through 0MQ sockets

mHooks :: Hooks

Set of functions triggered on specific events

data Hooks Source

Set of functions to be triggered when some events occur

Constructors

Hooks 

Fields

mBackForward :: URI -> WebPolicyDecision -> K ()

Previous/next page has been requested

mDownload :: URI -> String -> Int -> K ()

A download has been requested

mFormResubmitted :: URI -> WebPolicyDecision -> K ()

A form has been resubmitted

mFormSubmitted :: URI -> WebPolicyDecision -> K ()

A form has been submitted

mKeyPressed :: String -> K ()
 
mLinkClicked :: Button -> URI -> WebPolicyDecision -> K ()

A link has been clicked

mLoadFinished :: K ()

Load has finished

mMIMEDisposition :: URI -> String -> WebPolicyDecision -> K ()
 
mNewWindow :: URI -> K ()

A new window has been requested

mOtherNavigation :: URI -> WebPolicyDecision -> K ()
 
mReload :: URI -> WebPolicyDecision -> K ()

A reload of the current page has been requested

mStartUp :: K ()

At start-up

mTitleChanged :: String -> K ()

Title has changed

data GUI Source

Graphical elements

Constructors

GUI 

Fields

mWindow :: Window

Main window

mInspectorWindow :: Window

Web-inspector window

mScrollWindow :: ScrolledWindow

ScrolledWindow containing the webview

mWebView :: WebView

Browser's webview

mPromptBar :: PromptBar

Prompt bar

mStatusBar :: HBox

Status bar's horizontal box

mNotificationBar :: NotificationBar

Bar used to display various notifications

mBuilder :: Builder

Builder object created from XML file

data PromptBar Source

Prompt-bar elements

Constructors

PromptBar 

Fields

mBox :: HBox

Layout box

mDescription :: Label

Description of current prompt

mEntry :: Entry

Prompt entry

mCallbackRef :: IORef (String -> K ())
 
mIncrementalCallbackRef :: IORef (String -> K ())
 

data NotificationBar Source

Notification-bar elements

Constructors

NotificationBar 

Fields

mLabel :: Label

Content

mTimer :: IORef (Maybe HandlerId)

Timer handler

data RefDirs Source

Set of reference directories, typically used to build FilePath-s

Constructors

RefDirs 

Fields

mHome :: FilePath

Home directory

mTemporary :: FilePath

Temporary files directory

mConfiguration :: FilePath

Configuration directory

mData :: FilePath

Data directory

type KeysList = [(String, K ())]Source

List of bound keys. All callbacks are fed with the Environment instance.

data Button Source

Constructors

ButtonL 
ButtonM 
ButtonR 

data Direction Source

Constructors

Forward 
Backward 

data Wrap Source

Constructors

Wrap 
NoWrap