Win32-2.3.0.2: A binding to part of the Win32 library

Copyright(c) Alastair Reid, 1997-2003
LicenseBSD-style (see the file libraries/base/LICENSE)
MaintainerEsa Ilari Vuokko <ei@vuokko.info>
Stabilityprovisional
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell98

System.Win32.Types

Description

A collection of FFI declarations for interfacing with Win32.

Synopsis

Documentation

type BOOL = Bool

type BYTE = Word8

type UCHAR = CUChar

type USHORT = Word16

type UINT = Word32

type INT = Int32

type WORD = Word16

type DWORD = Word32

type LONG = Int32

type FLOAT = Float

type UINT_PTR = Word

type DDWORD = Word64

type MbINT = Maybe INT

type ATOM = UINT

type WPARAM = UINT

type LPARAM = LONG

type LRESULT = LONG

type SIZE_T = DWORD

type HRESULT = LONG

type Addr = Ptr ()

type LPVOID = Ptr ()

type LPBOOL = Ptr BOOL

type LPBYTE = Ptr BYTE

type LPSTR = Ptr CChar

type LPCSTR = LPSTR

maybePtr :: Maybe (Ptr a) -> Ptr a

ptrToMaybe :: Ptr a -> Maybe (Ptr a)

maybeNum :: Num a => Maybe a -> a

numToMaybe :: (Eq a, Num a) => a -> Maybe a

withTString :: String -> (LPTSTR -> IO a) -> IO a

withTStringLen :: String -> ((LPTSTR, Int) -> IO a) -> IO a

type TCHAR = CWchar

type HANDLE = Ptr ()

type PKEY = HANDLE

type HINSTANCE = Ptr ()

type HMODULE = Ptr ()

type ErrCode = DWORD

failIf :: (a -> Bool) -> String -> IO a -> IO a

failIf_ :: (a -> Bool) -> String -> IO a -> IO ()

failIfNull :: String -> IO (Ptr a) -> IO (Ptr a)

failIfZero :: (Eq a, Num a) => String -> IO a -> IO a

localFree :: Ptr a -> IO (Ptr a)

type LCID = DWORD

type LANGID = WORD

type SortID = WORD

nullPtr :: Ptr a Source

The constant nullPtr contains a distinguished value of Ptr that is not associated with a valid memory location.