2{-# LANGUAGE FlexibleInstances #-}
3-----------------------------------------------------------------------------
5-- Module : Language.Javascript.JSaddle.Properties
6-- Copyright : (c) Hamish Mackenzie
9-- Maintainer : Hamish Mackenzie <Hamish.K.Mackenzie@googlemail.com>
13-----------------------------------------------------------------------------
15module Language.Javascript.JSaddle.Types (
20 , JSPropertyAttributes
28import Control.Monad.Trans.Reader (ReaderT(..))
31import JavaScript.Object.Internal (Object(..))
32import JavaScript.Array (MutableJSArray)
33import Data.Word (Word(..))
34import GHCJS.Nullable (Nullable(..))
36import Foreign.ForeignPtr (ForeignPtr)
37import Graphics.UI.Gtk.WebKit.JavaScriptCore.JSBase
38 (OpaqueJSString, JSValueRefRef,
39 JSContextRef, JSPropertyNameArrayRef, OpaqueJSValue)
40import Graphics.UI.Gtk.WebKit.JavaScriptCore.JSObjectRef (JSPropertyAttributes)
41import Foreign.C (CUInt(..))
45newtype JSPropertyNameArray = JSPropertyNameArray { unJSPropertyNameArrayRef :: JSVal }
46type JSPropertyAttributes = Word
50type JSVal = ForeignPtr OpaqueJSValue
51type MutableJSArray = JSValueRefRef
52type JSPropertyNameArray = JSPropertyNameArrayRef
54newtype Object = Object (ForeignPtr OpaqueJSValue)
55type JSString = ForeignPtr OpaqueJSString
56newtype Nullable a = Nullable a
59-- | The @JSM@ monad keeps track of the JavaScript context.
61-- Given a @JSM@ function and a 'JSContextRef' you can run the
62-- function like this...
64-- > runReaderT jsmFunction javaScriptContext
66-- For an example of how to set up WebKitGTK+ see tests/TestJSaddle.hs
67type JSM = ReaderT JSContextRef IO
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list