{-# LANGUAGE CPP #-}
module System.Console.Terminal.Size
( Window(..)
, size
#if !defined(mingw32_HOST_OS)
, fdSize
, hSize
#endif
) where
import System.Console.Terminal.Common
#if defined(mingw32_HOST_OS)
import qualified System.Console.Terminal.Windows as Host
#else
import qualified System.Console.Terminal.Posix as Host
import System.Posix.Types(Fd)
import System.IO(Handle)
#endif
size :: Integral n => IO (Maybe (Window n))
size :: IO (Maybe (Window n))
size = IO (Maybe (Window n))
forall n. Integral n => IO (Maybe (Window n))
Host.size
#if !defined(mingw32_HOST_OS)
fdSize :: Integral n => Fd -> IO (Maybe (Window n))
fdSize :: Fd -> IO (Maybe (Window n))
fdSize = Fd -> IO (Maybe (Window n))
forall n. Integral n => Fd -> IO (Maybe (Window n))
Host.fdSize
hSize :: Integral n => Handle -> IO (Maybe (Window n))
hSize :: Handle -> IO (Maybe (Window n))
hSize = Handle -> IO (Maybe (Window n))
forall n. Integral n => Handle -> IO (Maybe (Window n))
Host.hSize
#endif