module Graphics.Aosd.Options where
import Graphics.Aosd.AOSD_H
import Foreign.C.Types
data XClassHint = XClassHint { resName, resClass :: String }
deriving(Show)
data Transparency = None | Fake | Composite
deriving(Show)
data Position = Min
| Center
| Max
deriving(Show,Enum,Bounded)
data AosdOptions = AosdOptions {
classHint :: Maybe XClassHint,
transparency :: Maybe Transparency,
xPos :: Position,
yPos :: Position,
offset :: (CInt,CInt),
hideUponMouseEvent :: Maybe Bool,
mouseEventCB :: Maybe (C'AosdMouseEvent -> IO ())
}
toAosdTransparency :: Transparency -> C'AosdTransparency
toAosdTransparency None = c'TRANSPARENCY_NONE
toAosdTransparency Fake = c'TRANSPARENCY_FAKE
toAosdTransparency Composite = c'TRANSPARENCY_COMPOSITE
defaultOpts :: AosdOptions
defaultOpts =
AosdOptions {
classHint = Nothing,
transparency = Just Composite,
xPos = Center,
yPos = Center,
offset = (0,0),
hideUponMouseEvent = Just True,
mouseEventCB = Nothing
}
data FlashDurations = FlashDurations {
inMillis :: CUInt
, fullMillis :: CUInt
, outMillis :: CUInt
}
deriving(Show)
symDurations ::
CUInt
-> CUInt
-> FlashDurations
symDurations fadeMillis fullMillis_ = FlashDurations fadeMillis fullMillis_ fadeMillis