Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
API functions for windows.
Synopsis
- closeWindow :: Member Rpc r => Window -> Sem r ()
- cursor :: Member Rpc r => Window -> Sem r (Int, Int)
- currentCursor :: Member Rpc r => Sem r (Int, Int)
- windowLine :: Member Rpc r => Window -> Sem r Int
- currentLine :: Member Rpc r => Sem r Int
- setCursor :: Member Rpc r => Window -> Int -> Int -> Sem r ()
- setCurrentCursor :: Member Rpc r => Int -> Int -> Sem r ()
- setLine :: Member Rpc r => Window -> Int -> Sem r ()
- setCurrentLine :: Member Rpc r => Int -> Sem r ()
- redraw :: Member Rpc r => Sem r ()
- findMainWindow :: Member Rpc r => Sem r (Maybe Window)
- ensureMainWindow :: Member Rpc r => Sem r Window
- saveView :: Member Rpc r => Sem r WindowView
- restoreView :: Member Rpc r => PartialWindowView -> Sem r ()
- windowExec :: Member Rpc r => Window -> Text -> Sem r ()
Documentation
closeWindow :: Member Rpc r => Window -> Sem r () Source #
Close a window if it is valid and not the last one.
cursor :: Member Rpc r => Window -> Sem r (Int, Int) Source #
Get the zero-based position of the cursor in a window.
currentCursor :: Member Rpc r => Sem r (Int, Int) Source #
Get the zero-based position of the cursor in the active window.
windowLine :: Member Rpc r => Window -> Sem r Int Source #
Get the zero-based line number of the cursor in a window.
currentLine :: Member Rpc r => Sem r Int Source #
Get the zero-based line number of the cursor in the active window.
setCursor :: Member Rpc r => Window -> Int -> Int -> Sem r () Source #
Set the zero-based position of the cursor in a window.
setCurrentCursor :: Member Rpc r => Int -> Int -> Sem r () Source #
Set the zero-based position of the cursor in the current window.
setLine :: Member Rpc r => Window -> Int -> Sem r () Source #
Set the zero-based line number of the cursor in a window, using the beginning of the line for the column.
setCurrentLine :: Member Rpc r => Int -> Sem r () Source #
Set the zero-based line number of the cursor in the current window, using the beginning of the line for the column.
findMainWindow :: Member Rpc r => Sem r (Maybe Window) Source #
A main window means here any non-window that may be used to edit a file, i.e. one with an empty buftype
.
ensureMainWindow :: Member Rpc r => Sem r Window Source #
Create a new window at the top if no existing window has empty buftype
.
Focuses the window.
restoreView :: Member Rpc r => PartialWindowView -> Sem r () Source #
Call winrestview
with a previously obtained view from saveView
.