- data Environment = Environment {
- envFrame :: Frame
- envDaemonClient :: Client
- envWindowList :: TVar WindowList
- envWindowNodeList :: TVar WindowNodeList
- envTabbar :: TVar Tabbar
- envBufferList :: TVar BufferList
- envSignalBoxList :: TVar SignalBoxList
- envPageIdCounter :: TVar PageId
- envSignalBoxIdCounter :: TVar SignalBoxId
- envFocusNotifierList :: TVar FocusNotifierList
- envInitBox :: VBox
- envInitInteractivebar :: Interactivebar
- envAnythingPopupWindow :: PopupWindow
- envAnythingProcessId :: TVar ProcessID
- envAnythingKeyPressId :: TVar AnythingKeyPressId
- envTooltipCounter :: TVar Int
- envTooltipSet :: TVar (Set Tooltip)
- envLocalInteractiveLock :: MVar (Either Text [String])
- envLocalInteractiveTrack :: TVar [(String, String)]
- envLocalInteractiveReturn :: TVar [String]
- envGlobalInteractiveLock :: MVar (Either Text [String])
- envGlobalInteractiveTrack :: TVar [(String, String)]
- envGlobalInteractiveReturn :: TVar [String]
- envTabCloseHistory :: TVar TabCloseHistory
- envBufferHistory :: TVar [BufferHistory]
- data TabCloseHistory = TabCloseHistory [(PageModeName, PageType, PagePath)]
- type Keymap = Map Text Action
- data Action = forall a b . (ActionInputArgs a, ActionOutputArgs b) => Action {}
- class ActionInputArgs a where
- envGet :: Environment -> IO a
- class ActionOutputArgs b where
- envPut :: Environment -> b -> IO ()
- data SignalBox = SignalBox {}
- type SignalBoxList = Set SignalBox
- data WindowNode = WindowNode {}
- type WindowNodeId = Int
- data WindowNodeType
- = TNodeLeft
- | TNodeRight
- | TNodeRoot
- data WindowNodeDirection
- data ZoomDirection
- type WindowNodeList = SetList WindowNode
- data Window = Window {}
- type WindowList = ListZipper Window
- data WindowListSelectDirection
- type WindowId = WindowNodeId
- type WindowListTuple = (WindowList, WindowNodeList)
- type WindowNodeArgs = (WindowNodeList, Container)
- type WindowArgs = (WindowList, WindowNodeList, Container)
- type WindowNodeAttr = (Maybe WindowNodeId, Maybe WindowNodeId, Maybe WindowNodeId, Maybe WindowNodeId, WindowNodeType, WindowNodeDirection)
- newtype Tabbar = Tabbar (Map (WindowId, PageModeName) (Seq Tab))
- data Tab = Tab {}
- data UIFrame = UIFrame {}
- data FocusStatus
- data AnythingStartupFun = AnythingStartupFun (IO ())
Documentation
data Environment Source
Environment.
data TabCloseHistory Source
Tab close history for undo close action.
type Keymap = Map Text ActionSource
Keymap
| The design of Keymap
is do a friendly, easy keymap interface.
Action just wrap to taken polymorphism function.
It won't store polymorphism function.
You can use Action
wrap any polymorphism functions that
input argument is instance of ActionInputArgs and
output argument is instance of ActionOutputArgs.
forall a b . (ActionInputArgs a, ActionOutputArgs b) => Action | |
class ActionInputArgs a whereSource
ActionInputArgs is class to implement polymorphism keymap function.
Example, you have functions:
foo :: (Arg1, (Arg2, Arg3)) -> IO () bar :: (Arg1, (Arg2, (Arg3, Arg4))) -> IO ()
you can write your keymap with below:
keymap :: Keymap keymap = M.fromList [M-1 ==> foo ,M-2 ==> bar]
See? It's so flexible.
envGet :: Environment -> IO aSource
class ActionOutputArgs b whereSource
ActionOutputArgs is class to implement polymorphism result.
This class is very useful when you want transform pure function to Keymap
.
You can return any result that instance of ActionOutputArgs
,
then system will write those value back to Environment
.
If you want update those value (such as TVar) yourself, just return `()`.
envPut :: Environment -> b -> IO ()Source
SignalBox
build when create socket.
Pick info when receive dbus signal.
Delete after create new page.
type SignalBoxList = Set SignalBoxSource
type WindowNodeId = IntSource
data WindowNodeType Source
data ZoomDirection Source
Window contain GtkNotebook for contain tabs.
type WindowList = ListZipper WindowSource
type WindowId = WindowNodeIdSource
type WindowListTuple = (WindowList, WindowNodeList)Source
type WindowNodeArgs = (WindowNodeList, Container)Source
type WindowArgs = (WindowList, WindowNodeList, Container)Source
type WindowNodeAttr = (Maybe WindowNodeId, Maybe WindowNodeId, Maybe WindowNodeId, Maybe WindowNodeId, WindowNodeType, WindowNodeDirection)Source
Tabbar Contain all tab in windows. For update tab information in windows. PageId for synchronization with different window. Tabbar corresponding Notebook status.
Tab | |
|
UIFrame.
data FocusStatus Source
Focus status.