Copyright | (c) University of Glasgow 2023 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Esa Ilari Vuokko <ei@vuokko.info> |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
A collection of FFI declarations for interfacing with Win32 Console API (WindowsString variant)
Synopsis
- getConsoleMode :: HANDLE -> IO DWORD
- setConsoleMode :: HANDLE -> DWORD -> IO ()
- eNABLE_ECHO_INPUT :: DWORD
- eNABLE_EXTENDED_FLAGS :: DWORD
- eNABLE_INSERT_MODE :: DWORD
- eNABLE_LINE_INPUT :: DWORD
- eNABLE_MOUSE_INPUT :: DWORD
- eNABLE_PROCESSED_INPUT :: DWORD
- eNABLE_QUICK_EDIT_MODE :: DWORD
- eNABLE_WINDOW_INPUT :: DWORD
- eNABLE_VIRTUAL_TERMINAL_INPUT :: DWORD
- eNABLE_PROCESSED_OUTPUT :: DWORD
- eNABLE_WRAP_AT_EOL_OUTPUT :: DWORD
- eNABLE_VIRTUAL_TERMINAL_PROCESSING :: DWORD
- dISABLE_NEWLINE_AUTO_RETURN :: DWORD
- eNABLE_LVB_GRID_WORLDWIDE :: DWORD
- getConsoleCP :: IO UINT
- setConsoleCP :: UINT -> IO ()
- getConsoleOutputCP :: IO UINT
- setConsoleOutputCP :: UINT -> IO ()
- type CtrlEvent = DWORD
- cTRL_C_EVENT :: CtrlEvent
- cTRL_BREAK_EVENT :: CtrlEvent
- generateConsoleCtrlEvent :: CtrlEvent -> DWORD -> IO ()
- commandLineToArgv :: WindowsString -> IO [WindowsString]
- getCommandLineW :: IO LPWSTR
- getArgs :: IO [WindowsString]
- data CONSOLE_SCREEN_BUFFER_INFO = CONSOLE_SCREEN_BUFFER_INFO {}
- data CONSOLE_SCREEN_BUFFER_INFOEX = CONSOLE_SCREEN_BUFFER_INFOEX {}
- data COORD = COORD {}
- data SMALL_RECT = SMALL_RECT {}
- type COLORREF = Word32
- getConsoleScreenBufferInfo :: HANDLE -> IO CONSOLE_SCREEN_BUFFER_INFO
- getCurrentConsoleScreenBufferInfo :: IO CONSOLE_SCREEN_BUFFER_INFO
- getConsoleScreenBufferInfoEx :: HANDLE -> IO CONSOLE_SCREEN_BUFFER_INFOEX
- getCurrentConsoleScreenBufferInfoEx :: IO CONSOLE_SCREEN_BUFFER_INFOEX
- getEnv :: WindowsString -> IO (Maybe WindowsString)
- getEnvironment :: IO [(WindowsString, WindowsString)]
Console mode
getConsoleMode :: HANDLE -> IO DWORD Source #
setConsoleMode :: HANDLE -> DWORD -> IO () Source #
Console code pages
getConsoleCP :: IO UINT Source #
setConsoleCP :: UINT -> IO () Source #
getConsoleOutputCP :: IO UINT Source #
setConsoleOutputCP :: UINT -> IO () Source #
Ctrl events
generateConsoleCtrlEvent :: CtrlEvent -> DWORD -> IO () Source #
Command line
commandLineToArgv :: WindowsString -> IO [WindowsString] Source #
This function can be used to parse command line arguments and return the split up arguments as elements in a list.
getCommandLineW :: IO LPWSTR Source #
getArgs :: IO [WindowsString] Source #
Based on GetCommandLineW
. This behaves slightly different
than getArgs
. See the online documentation:
https://learn.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-getcommandlinew
Screen buffer
data CONSOLE_SCREEN_BUFFER_INFO Source #
CONSOLE_SCREEN_BUFFER_INFO | |
|
Instances
data CONSOLE_SCREEN_BUFFER_INFOEX Source #
CONSOLE_SCREEN_BUFFER_INFOEX | |
|
Instances
Instances
Eq COORD Source # | |
Show COORD Source # | |
Storable COORD Source # | |
Defined in System.Win32.Console.Internal peekElemOff :: Ptr COORD -> Int -> IO COORD pokeElemOff :: Ptr COORD -> Int -> COORD -> IO () peekByteOff :: Ptr b -> Int -> IO COORD pokeByteOff :: Ptr b -> Int -> COORD -> IO () |
data SMALL_RECT Source #
Instances
Eq SMALL_RECT Source # | |
Defined in System.Win32.Console.Internal (==) :: SMALL_RECT -> SMALL_RECT -> Bool (/=) :: SMALL_RECT -> SMALL_RECT -> Bool | |
Show SMALL_RECT Source # | |
Defined in System.Win32.Console.Internal showsPrec :: Int -> SMALL_RECT -> ShowS show :: SMALL_RECT -> String showList :: [SMALL_RECT] -> ShowS | |
Storable SMALL_RECT Source # | |
Defined in System.Win32.Console.Internal sizeOf :: SMALL_RECT -> Int alignment :: SMALL_RECT -> Int peekElemOff :: Ptr SMALL_RECT -> Int -> IO SMALL_RECT pokeElemOff :: Ptr SMALL_RECT -> Int -> SMALL_RECT -> IO () peekByteOff :: Ptr b -> Int -> IO SMALL_RECT pokeByteOff :: Ptr b -> Int -> SMALL_RECT -> IO () peek :: Ptr SMALL_RECT -> IO SMALL_RECT poke :: Ptr SMALL_RECT -> SMALL_RECT -> IO () |
Env
getEnv :: WindowsString -> IO (Maybe WindowsString) Source #
getEnvironment :: IO [(WindowsString, WindowsString)] Source #