diff options
author | Alexander Polakov <plhk@sdf.org> | 2013-02-03 19:41:26 +0400 |
---|---|---|
committer | Alexander Polakov <plhk@sdf.org> | 2013-02-03 19:41:26 +0400 |
commit | 43c1dd26c41fcc8400a40cc434cb0851119ea76d (patch) | |
tree | 80053db0d470041e64add213e4f58793f41073c1 /src/XUtil.hsc | |
parent | a27d4b833b9492dc17a785709b33096a8f116dc0 (diff) | |
download | xmobar-43c1dd26c41fcc8400a40cc434cb0851119ea76d.tar.gz xmobar-43c1dd26c41fcc8400a40cc434cb0851119ea76d.tar.bz2 |
Fixes for previous
Diffstat (limited to 'src/XUtil.hsc')
-rw-r--r-- | src/XUtil.hsc | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/XUtil.hsc b/src/XUtil.hsc index 720e895..164a309 100644 --- a/src/XUtil.hsc +++ b/src/XUtil.hsc @@ -17,8 +17,6 @@ module XUtil , initFont , initCoreFont , initUtf8Font - , loadBitmap - , drawBitmap , textExtents , textWidth , printString @@ -41,10 +39,7 @@ import qualified Graphics.X11.Xlib as Xlib (textExtents, textWidth) import Graphics.X11.Xlib.Extras import System.Mem.Weak ( addFinalizer ) import System.Posix.Types (Fd(..)) -import System.Directory (doesFileExist) import System.IO -import XGraphic -import Types #if defined XFT || defined UTF8 # if __GLASGOW_HASKELL__ < 612 @@ -158,25 +153,6 @@ textExtents (Xft xftfont) _ = do return (ascent, descent) #endif -loadBitmap :: Display -> Drawable -> FilePath -> IO (Maybe Bitmap) -loadBitmap d w p = do - exist <- doesFileExist p - if exist - then do - (bw, bh, bp, _, _) <- readBitmapFile d w p - addFinalizer bp (freePixmap d bp) - return $ Just $ Bitmap bw bh bp - else - return Nothing - -drawBitmap :: Display -> Drawable -> XFont -> GC -> String -> String - -> Position -> Position -> Bitmap -> IO () -drawBitmap d p _ gc fc bc x y i = do - withColors d [fc, bc] $ \[fc', bc'] -> do - setForeground d gc fc' - setBackground d gc bc' - io $ copyPlane d (pixmap i) p gc 0 0 (width i) (height i) x (y - (fi $ height i)) 1 - printString :: Display -> Drawable -> XFont -> GC -> String -> String -> Position -> Position -> String -> IO () printString d p (Core fs) gc fc bc x y s = do |