summaryrefslogtreecommitdiffstats
path: root/lib/Graphics/X11/Xlib/Extras/Extra.hs
blob: 7633f8d33e75d8bd347dd42e4cece7fd25e43bcf (plain)
1
2
3
4
5
6
7
8
9
10
11
module Graphics.X11.Xlib.Extras.Extra where

import Codec.Binary.UTF8.String (decode)
import Foreign.C.String.Extra (castCCharToWord8)
import Graphics.X11.Xlib.Extras (getWindowProperty8)
import qualified Graphics.X11 as X11


getWindowPropertyString :: X11.Display -> X11.Atom -> X11.Window -> IO (Maybe String)
getWindowPropertyString d a w =
    fmap (decode . map castCCharToWord8) <$> getWindowProperty8 d a w