System.Win32.Console

Win32-2.14.2.1: A binding to Windows Win32 API.

Copyright | (c) University of Glasgow 2006
License | BSD-style (see the file LICENSE)
Maintainer | Esa Ilari Vuokko <ei@vuokko.info>
Stability | provisional
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell2010

System.Win32.Console

Contents

- Console mode
- Console code pages
- Ctrl events
- Command line
- Screen buffer
- Env
- Console I/O

Description

A collection of FFI declarations for interfacing with Win32 Console API

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 :: String -> IO [String]
- getCommandLineW :: IO LPWSTR
- getArgs :: IO [String]
- data CONSOLE_SCREEN_BUFFER_INFO = CONSOLE_SCREEN_BUFFER_INFO {
  - dwSize :: COORD
  - dwCursorPosition :: COORD
  - wAttributes :: WORD
  - srWindow :: SMALL_RECT
  - dwMaximumWindowSize :: COORD
  }
- data CONSOLE_SCREEN_BUFFER_INFOEX = CONSOLE_SCREEN_BUFFER_INFOEX {
  - dwSizeEx :: COORD
  - dwCursorPositionEx :: COORD
  - wAttributesEx :: WORD
  - srWindowEx :: SMALL_RECT
  - dwMaximumWindowSizeEx :: COORD
  - wPopupAttributes :: WORD
  - bFullscreenSupported :: BOOL
  - colorTable :: [COLORREF]
  }
- data COORD = COORD {
  - xPos :: SHORT
  - yPos :: SHORT
  }
- data SMALL_RECT = SMALL_RECT {
  - leftPos :: SHORT
  - topPos :: SHORT
  - rightPos :: SHORT
  - bottomPos :: SHORT
  }
- 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 :: String -> IO (Maybe String)
- getEnvironment :: IO [(String, String)]
- data KEY_EVENT_RECORD = KEY_EVENT_RECORD {
  - keyDown :: BOOL
  - repeatCount :: WORD
  - virtualKeyCode :: WORD
  - virtualScanCode :: WORD
  - uChar :: CWchar
  - controlKeyStateK :: DWORD
  }
- data MOUSE_EVENT_RECORD = MOUSE_EVENT_RECORD {
  - mousePosition :: COORD
  - buttonState :: DWORD
  - controlKeyStateM :: DWORD
  - eventFlags :: DWORD
  }
- newtype WINDOW_BUFFER_SIZE_RECORD = WINDOW_BUFFER_SIZE_RECORD {
  - windowSize :: COORD
  }
- newtype MENU_EVENT_RECORD = MENU_EVENT_RECORD {
  - commandId :: UINT
  }
- newtype FOCUS_EVENT_RECORD = FOCUS_EVENT_RECORD {
  - setFocus :: BOOL
  }
- data INPUT_RECORD
  - = KeyEvent KEY_EVENT_RECORD
  - | MouseEvent MOUSE_EVENT_RECORD
  - | WindowBufferSizeEvent WINDOW_BUFFER_SIZE_RECORD
  - | MenuEvent MENU_EVENT_RECORD
  - | FocusEvent FOCUS_EVENT_RECORD
- readConsoleInput :: HANDLE -> Int -> Ptr INPUT_RECORD -> IO Int

# Console mode

getConsoleMode :: HANDLE -> IO DWORD Source #

setConsoleMode :: HANDLE -> DWORD -> IO () Source #

eNABLE_ECHO_INPUT :: DWORD Source #

eNABLE_EXTENDED_FLAGS :: DWORD Source #

eNABLE_INSERT_MODE :: DWORD Source #

eNABLE_LINE_INPUT :: DWORD Source #

eNABLE_MOUSE_INPUT :: DWORD Source #

eNABLE_PROCESSED_INPUT :: DWORD Source #

eNABLE_QUICK_EDIT_MODE :: DWORD Source #

eNABLE_WINDOW_INPUT :: DWORD Source #

eNABLE_VIRTUAL_TERMINAL_INPUT :: DWORD Source #

eNABLE_PROCESSED_OUTPUT :: DWORD Source #

eNABLE_WRAP_AT_EOL_OUTPUT :: DWORD Source #

eNABLE_VIRTUAL_TERMINAL_PROCESSING :: DWORD Source #

dISABLE_NEWLINE_AUTO_RETURN :: DWORD Source #

eNABLE_LVB_GRID_WORLDWIDE :: DWORD Source #

# Console code pages

getConsoleCP :: IO UINT Source #

setConsoleCP :: UINT -> IO () Source #

getConsoleOutputCP :: IO UINT Source #

setConsoleOutputCP :: UINT -> IO () Source #

# Ctrl events

type CtrlEvent = DWORD Source #

cTRL_C_EVENT :: CtrlEvent Source #

cTRL_BREAK_EVENT :: CtrlEvent Source #

generateConsoleCtrlEvent :: CtrlEvent -> DWORD -> IO () Source #

# Command line

commandLineToArgv :: String -> IO [String] 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 [String] 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 #

Constructors

CONSOLE_SCREEN_BUFFER_INFO |
Fields dwSize :: COORD dwCursorPosition :: COORD wAttributes :: WORD srWindow :: SMALL_RECT dwMaximumWindowSize :: COORD

#### Instances

Instances details

Eq CONSOLE_SCREEN_BUFFER_INFO Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: CONSOLE_SCREEN_BUFFER_INFO -> CONSOLE_SCREEN_BUFFER_INFO -> Bool # (/=) :: CONSOLE_SCREEN_BUFFER_INFO -> CONSOLE_SCREEN_BUFFER_INFO -> Bool #
Storable CONSOLE_SCREEN_BUFFER_INFO Source # |
Instance details Defined in System.Win32.Console.Internal Methods sizeOf :: CONSOLE_SCREEN_BUFFER_INFO -> Int # alignment :: CONSOLE_SCREEN_BUFFER_INFO -> Int # peekElemOff :: Ptr CONSOLE_SCREEN_BUFFER_INFO -> Int -> IO CONSOLE_SCREEN_BUFFER_INFO # pokeElemOff :: Ptr CONSOLE_SCREEN_BUFFER_INFO -> Int -> CONSOLE_SCREEN_BUFFER_INFO -> IO () # peekByteOff :: Ptr b -> Int -> IO CONSOLE_SCREEN_BUFFER_INFO # pokeByteOff :: Ptr b -> Int -> CONSOLE_SCREEN_BUFFER_INFO -> IO () # peek :: Ptr CONSOLE_SCREEN_BUFFER_INFO -> IO CONSOLE_SCREEN_BUFFER_INFO # poke :: Ptr CONSOLE_SCREEN_BUFFER_INFO -> CONSOLE_SCREEN_BUFFER_INFO -> IO () #
Show CONSOLE_SCREEN_BUFFER_INFO Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> CONSOLE_SCREEN_BUFFER_INFO -> ShowS # show :: CONSOLE_SCREEN_BUFFER_INFO -> String # showList :: [CONSOLE_SCREEN_BUFFER_INFO] -> ShowS #

data CONSOLE_SCREEN_BUFFER_INFOEX Source #

Constructors

CONSOLE_SCREEN_BUFFER_INFOEX |
Fields dwSizeEx :: COORD dwCursorPositionEx :: COORD wAttributesEx :: WORD srWindowEx :: SMALL_RECT dwMaximumWindowSizeEx :: COORD wPopupAttributes :: WORD bFullscreenSupported :: BOOL colorTable :: [COLORREF] Only the first 16 `COLORREF` values passed to the Windows Console API. If fewer than 16 values, the remainder are padded with `0` when passed to the API.

#### Instances

Instances details

Eq CONSOLE_SCREEN_BUFFER_INFOEX Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: CONSOLE_SCREEN_BUFFER_INFOEX -> CONSOLE_SCREEN_BUFFER_INFOEX -> Bool # (/=) :: CONSOLE_SCREEN_BUFFER_INFOEX -> CONSOLE_SCREEN_BUFFER_INFOEX -> Bool #
Storable CONSOLE_SCREEN_BUFFER_INFOEX Source # |
Instance details Defined in System.Win32.Console.Internal Methods sizeOf :: CONSOLE_SCREEN_BUFFER_INFOEX -> Int # alignment :: CONSOLE_SCREEN_BUFFER_INFOEX -> Int # peekElemOff :: Ptr CONSOLE_SCREEN_BUFFER_INFOEX -> Int -> IO CONSOLE_SCREEN_BUFFER_INFOEX # pokeElemOff :: Ptr CONSOLE_SCREEN_BUFFER_INFOEX -> Int -> CONSOLE_SCREEN_BUFFER_INFOEX -> IO () # peekByteOff :: Ptr b -> Int -> IO CONSOLE_SCREEN_BUFFER_INFOEX # pokeByteOff :: Ptr b -> Int -> CONSOLE_SCREEN_BUFFER_INFOEX -> IO () # peek :: Ptr CONSOLE_SCREEN_BUFFER_INFOEX -> IO CONSOLE_SCREEN_BUFFER_INFOEX # poke :: Ptr CONSOLE_SCREEN_BUFFER_INFOEX -> CONSOLE_SCREEN_BUFFER_INFOEX -> IO () #
Show CONSOLE_SCREEN_BUFFER_INFOEX Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> CONSOLE_SCREEN_BUFFER_INFOEX -> ShowS # show :: CONSOLE_SCREEN_BUFFER_INFOEX -> String # showList :: [CONSOLE_SCREEN_BUFFER_INFOEX] -> ShowS #

data COORD Source #

Constructors

COORD |
Fields xPos :: SHORT yPos :: SHORT

#### Instances

Instances details

Eq COORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: COORD -> COORD -> Bool # (/=) :: COORD -> COORD -> Bool #
Storable COORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods sizeOf :: COORD -> Int # alignment :: COORD -> Int # peekElemOff :: Ptr COORD -> Int -> IO COORD # pokeElemOff :: Ptr COORD -> Int -> COORD -> IO () # peekByteOff :: Ptr b -> Int -> IO COORD # pokeByteOff :: Ptr b -> Int -> COORD -> IO () # peek :: Ptr COORD -> IO COORD # poke :: Ptr COORD -> COORD -> IO () #
Show COORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> COORD -> ShowS # show :: COORD -> String # showList :: [COORD] -> ShowS #

data SMALL_RECT Source #

Constructors

SMALL_RECT |
Fields leftPos :: SHORT topPos :: SHORT rightPos :: SHORT bottomPos :: SHORT

#### Instances

Instances details

Eq SMALL_RECT Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: SMALL_RECT -> SMALL_RECT -> Bool # (/=) :: SMALL_RECT -> SMALL_RECT -> Bool #
Storable SMALL_RECT Source # |
Instance details Defined in System.Win32.Console.Internal Methods 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 () #
Show SMALL_RECT Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> SMALL_RECT -> ShowS # show :: SMALL_RECT -> String # showList :: [SMALL_RECT] -> ShowS #

type COLORREF = Word32 Source #

getConsoleScreenBufferInfo :: HANDLE -> IO CONSOLE_SCREEN_BUFFER_INFO Source #

getCurrentConsoleScreenBufferInfo :: IO CONSOLE_SCREEN_BUFFER_INFO Source #

getConsoleScreenBufferInfoEx :: HANDLE -> IO CONSOLE_SCREEN_BUFFER_INFOEX Source #

getCurrentConsoleScreenBufferInfoEx :: IO CONSOLE_SCREEN_BUFFER_INFOEX Source #

# Env

getEnv :: String -> IO (Maybe String) Source #

getEnvironment :: IO [(String, String)] Source #

# Console I/O

data KEY_EVENT_RECORD Source #

This type represents a keyboard input event. The structure is documented here: https://learn.microsoft.com/en-us/windows/console/key-event-record-str

Constructors

KEY_EVENT_RECORD |
Fields keyDown :: BOOL repeatCount :: WORD virtualKeyCode :: WORD virtualScanCode :: WORD uChar :: CWchar controlKeyStateK :: DWORD

#### Instances

Instances details

Eq KEY_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: KEY_EVENT_RECORD -> KEY_EVENT_RECORD -> Bool # (/=) :: KEY_EVENT_RECORD -> KEY_EVENT_RECORD -> Bool #
Storable KEY_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods sizeOf :: KEY_EVENT_RECORD -> Int # alignment :: KEY_EVENT_RECORD -> Int # peekElemOff :: Ptr KEY_EVENT_RECORD -> Int -> IO KEY_EVENT_RECORD # pokeElemOff :: Ptr KEY_EVENT_RECORD -> Int -> KEY_EVENT_RECORD -> IO () # peekByteOff :: Ptr b -> Int -> IO KEY_EVENT_RECORD # pokeByteOff :: Ptr b -> Int -> KEY_EVENT_RECORD -> IO () # peek :: Ptr KEY_EVENT_RECORD -> IO KEY_EVENT_RECORD # poke :: Ptr KEY_EVENT_RECORD -> KEY_EVENT_RECORD -> IO () #
Show KEY_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> KEY_EVENT_RECORD -> ShowS # show :: KEY_EVENT_RECORD -> String # showList :: [KEY_EVENT_RECORD] -> ShowS #

data MOUSE_EVENT_RECORD Source #

This type represents a mouse event. The structure is documented here: https://learn.microsoft.com/en-us/windows/console/mouse-event-record-str

Constructors

MOUSE_EVENT_RECORD |
Fields mousePosition :: COORD buttonState :: DWORD controlKeyStateM :: DWORD eventFlags :: DWORD

#### Instances

Instances details

Eq MOUSE_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: MOUSE_EVENT_RECORD -> MOUSE_EVENT_RECORD -> Bool # (/=) :: MOUSE_EVENT_RECORD -> MOUSE_EVENT_RECORD -> Bool #
Storable MOUSE_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods sizeOf :: MOUSE_EVENT_RECORD -> Int # alignment :: MOUSE_EVENT_RECORD -> Int # peekElemOff :: Ptr MOUSE_EVENT_RECORD -> Int -> IO MOUSE_EVENT_RECORD # pokeElemOff :: Ptr MOUSE_EVENT_RECORD -> Int -> MOUSE_EVENT_RECORD -> IO () # peekByteOff :: Ptr b -> Int -> IO MOUSE_EVENT_RECORD # pokeByteOff :: Ptr b -> Int -> MOUSE_EVENT_RECORD -> IO () # peek :: Ptr MOUSE_EVENT_RECORD -> IO MOUSE_EVENT_RECORD # poke :: Ptr MOUSE_EVENT_RECORD -> MOUSE_EVENT_RECORD -> IO () #
Show MOUSE_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> MOUSE_EVENT_RECORD -> ShowS # show :: MOUSE_EVENT_RECORD -> String # showList :: [MOUSE_EVENT_RECORD] -> ShowS #

newtype WINDOW_BUFFER_SIZE_RECORD Source #

This type represents a window size change event. The structure is documented here: https://learn.microsoft.com/en-us/windows/console/window-buffer-size-record-str

Constructors

WINDOW_BUFFER_SIZE_RECORD |
Fields windowSize :: COORD

#### Instances

Instances details

Eq WINDOW_BUFFER_SIZE_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: WINDOW_BUFFER_SIZE_RECORD -> WINDOW_BUFFER_SIZE_RECORD -> Bool # (/=) :: WINDOW_BUFFER_SIZE_RECORD -> WINDOW_BUFFER_SIZE_RECORD -> Bool #
Storable WINDOW_BUFFER_SIZE_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods sizeOf :: WINDOW_BUFFER_SIZE_RECORD -> Int # alignment :: WINDOW_BUFFER_SIZE_RECORD -> Int # peekElemOff :: Ptr WINDOW_BUFFER_SIZE_RECORD -> Int -> IO WINDOW_BUFFER_SIZE_RECORD # pokeElemOff :: Ptr WINDOW_BUFFER_SIZE_RECORD -> Int -> WINDOW_BUFFER_SIZE_RECORD -> IO () # peekByteOff :: Ptr b -> Int -> IO WINDOW_BUFFER_SIZE_RECORD # pokeByteOff :: Ptr b -> Int -> WINDOW_BUFFER_SIZE_RECORD -> IO () # peek :: Ptr WINDOW_BUFFER_SIZE_RECORD -> IO WINDOW_BUFFER_SIZE_RECORD # poke :: Ptr WINDOW_BUFFER_SIZE_RECORD -> WINDOW_BUFFER_SIZE_RECORD -> IO () #
Show WINDOW_BUFFER_SIZE_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> WINDOW_BUFFER_SIZE_RECORD -> ShowS # show :: WINDOW_BUFFER_SIZE_RECORD -> String # showList :: [WINDOW_BUFFER_SIZE_RECORD] -> ShowS #

newtype MENU_EVENT_RECORD Source #

This type represents a window menu event. (Current ignored by VTY). The structure is documented here: https://learn.microsoft.com/en-us/windows/console/menu-event-record-str

Constructors

MENU_EVENT_RECORD |
Fields commandId :: UINT

#### Instances

Instances details

Eq MENU_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: MENU_EVENT_RECORD -> MENU_EVENT_RECORD -> Bool # (/=) :: MENU_EVENT_RECORD -> MENU_EVENT_RECORD -> Bool #
Storable MENU_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods sizeOf :: MENU_EVENT_RECORD -> Int # alignment :: MENU_EVENT_RECORD -> Int # peekElemOff :: Ptr MENU_EVENT_RECORD -> Int -> IO MENU_EVENT_RECORD # pokeElemOff :: Ptr MENU_EVENT_RECORD -> Int -> MENU_EVENT_RECORD -> IO () # peekByteOff :: Ptr b -> Int -> IO MENU_EVENT_RECORD # pokeByteOff :: Ptr b -> Int -> MENU_EVENT_RECORD -> IO () # peek :: Ptr MENU_EVENT_RECORD -> IO MENU_EVENT_RECORD # poke :: Ptr MENU_EVENT_RECORD -> MENU_EVENT_RECORD -> IO () #
Show MENU_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> MENU_EVENT_RECORD -> ShowS # show :: MENU_EVENT_RECORD -> String # showList :: [MENU_EVENT_RECORD] -> ShowS #

newtype FOCUS_EVENT_RECORD Source #

This type represents a window focus change event. The structure is documented here: https://learn.microsoft.com/en-us/windows/console/focus-event-record-str

Constructors

FOCUS_EVENT_RECORD |
Fields setFocus :: BOOL

#### Instances

Instances details

Eq FOCUS_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: FOCUS_EVENT_RECORD -> FOCUS_EVENT_RECORD -> Bool # (/=) :: FOCUS_EVENT_RECORD -> FOCUS_EVENT_RECORD -> Bool #
Storable FOCUS_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods sizeOf :: FOCUS_EVENT_RECORD -> Int # alignment :: FOCUS_EVENT_RECORD -> Int # peekElemOff :: Ptr FOCUS_EVENT_RECORD -> Int -> IO FOCUS_EVENT_RECORD # pokeElemOff :: Ptr FOCUS_EVENT_RECORD -> Int -> FOCUS_EVENT_RECORD -> IO () # peekByteOff :: Ptr b -> Int -> IO FOCUS_EVENT_RECORD # pokeByteOff :: Ptr b -> Int -> FOCUS_EVENT_RECORD -> IO () # peek :: Ptr FOCUS_EVENT_RECORD -> IO FOCUS_EVENT_RECORD # poke :: Ptr FOCUS_EVENT_RECORD -> FOCUS_EVENT_RECORD -> IO () #
Show FOCUS_EVENT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> FOCUS_EVENT_RECORD -> ShowS # show :: FOCUS_EVENT_RECORD -> String # showList :: [FOCUS_EVENT_RECORD] -> ShowS #

data INPUT_RECORD Source #

Description of a Windows console input event. Documented here: https://learn.microsoft.com/en-us/windows/console/input-record-str

Constructors

KeyEvent KEY_EVENT_RECORD |
MouseEvent MOUSE_EVENT_RECORD |
WindowBufferSizeEvent WINDOW_BUFFER_SIZE_RECORD |
MenuEvent MENU_EVENT_RECORD |
FocusEvent FOCUS_EVENT_RECORD |

#### Instances

Instances details

Eq INPUT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods (==) :: INPUT_RECORD -> INPUT_RECORD -> Bool # (/=) :: INPUT_RECORD -> INPUT_RECORD -> Bool #
Storable INPUT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods sizeOf :: INPUT_RECORD -> Int # alignment :: INPUT_RECORD -> Int # peekElemOff :: Ptr INPUT_RECORD -> Int -> IO INPUT_RECORD # pokeElemOff :: Ptr INPUT_RECORD -> Int -> INPUT_RECORD -> IO () # peekByteOff :: Ptr b -> Int -> IO INPUT_RECORD # pokeByteOff :: Ptr b -> Int -> INPUT_RECORD -> IO () # peek :: Ptr INPUT_RECORD -> IO INPUT_RECORD # poke :: Ptr INPUT_RECORD -> INPUT_RECORD -> IO () #
Show INPUT_RECORD Source # |
Instance details Defined in System.Win32.Console.Internal Methods showsPrec :: Int -> INPUT_RECORD -> ShowS # show :: INPUT_RECORD -> String # showList :: [INPUT_RECORD] -> ShowS #

readConsoleInput :: HANDLE -> Int -> Ptr INPUT_RECORD -> IO Int Source #

Reads all available input records up to the amount specified by the len parameter.