| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| POSIX Terminal support | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Synopsis | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Terminal support | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Terminal attributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getTerminalAttributes :: Fd -> IO TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getTerminalAttributes fd calls tcgetattr to obtain the TerminalAttributes associated with Fd fd. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data TerminalState | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setTerminalAttributes :: Fd -> TerminalAttributes -> TerminalState -> IO () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setTerminalAttributes fd attr ts calls tcsetattr to change the TerminalAttributes associated with Fd fd to attr, when the terminal is in the state indicated by ts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data TerminalMode | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withoutMode :: TerminalAttributes -> TerminalMode -> TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withMode :: TerminalAttributes -> TerminalMode -> TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| terminalMode :: TerminalMode -> TerminalAttributes -> Bool | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bitsPerByte :: TerminalAttributes -> Int | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withBits :: TerminalAttributes -> Int -> TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data ControlCharacter | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| controlChar :: TerminalAttributes -> ControlCharacter -> Maybe Char | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withCC :: TerminalAttributes -> (ControlCharacter, Char) -> TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withoutCC :: TerminalAttributes -> ControlCharacter -> TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inputTime :: TerminalAttributes -> Int | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withTime :: TerminalAttributes -> Int -> TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| minInput :: TerminalAttributes -> Int | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withMinInput :: TerminalAttributes -> Int -> TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data BaudRate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inputSpeed :: TerminalAttributes -> BaudRate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withInputSpeed :: TerminalAttributes -> BaudRate -> TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| outputSpeed :: TerminalAttributes -> BaudRate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withOutputSpeed :: TerminalAttributes -> BaudRate -> TerminalAttributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Terminal operations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sendBreak :: Fd -> Int -> IO () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sendBreak fd duration calls tcsendbreak to transmit a continuous stream of zero-valued bits on Fd fd for the specified implementation-dependent duration. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| drainOutput :: Fd -> IO () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| drainOutput fd calls tcdrain to block until all output written to Fd fd has been transmitted. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data QueueSelector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| discardData :: Fd -> QueueSelector -> IO () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| discardData fd queues calls tcflush to discard pending input and/or output for Fd fd, as indicated by the QueueSelector queues. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| data FlowAction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| controlFlow :: Fd -> FlowAction -> IO () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| controlFlow fd action calls tcflow to control the flow of data on Fd fd, as indicated by action. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Process groups | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getTerminalProcessGroupID :: Fd -> IO ProcessGroupID | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getTerminalProcessGroupID fd calls tcgetpgrp to obtain the ProcessGroupID of the foreground process group associated with the terminal attached to Fd fd. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setTerminalProcessGroupID :: Fd -> ProcessGroupID -> IO () | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setTerminalProcessGroupID fd pgid calls tcsetpgrp to set the ProcessGroupID of the foreground process group associated with the terminal attached to Fd fd to pgid. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Testing a file descriptor | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| queryTerminal :: Fd -> IO Bool | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| queryTerminal fd calls isatty to determine whether or not Fd fd is associated with a terminal. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getTerminalName :: Fd -> IO FilePath | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getTerminalName fd calls ttyname to obtain a name associated with the terminal for Fd fd. If fd is associated with a terminal, getTerminalName returns the name of the terminal. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getControllingTerminalName :: IO FilePath | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getControllingTerminalName calls ctermid to obtain a name associated with the controlling terminal for the process. If a controlling terminal exists, getControllingTerminalName returns the name of the controlling terminal. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Produced by Haddock version 0.8 |