summaryrefslogtreecommitdiffstats
path: root/tv/2configs/xserver/xmonad/Util/XUtils.hs
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-10-31 00:13:32 +0100
committerlassulus <lass@aidsballs.de>2015-10-31 00:13:32 +0100
commit5b4a34062462311973bb1798fe3e4538e6eb5706 (patch)
tree31ac952feeb3f534b57fc48c6ae2f71795be2f43 /tv/2configs/xserver/xmonad/Util/XUtils.hs
parent611f8ef25b4c3984f2f7de7362c4869d1f2f124f (diff)
parentbcaf3771d9503f1b0d01a2c15ca0712ee454342f (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'tv/2configs/xserver/xmonad/Util/XUtils.hs')
-rw-r--r--tv/2configs/xserver/xmonad/Util/XUtils.hs47
1 files changed, 0 insertions, 47 deletions
diff --git a/tv/2configs/xserver/xmonad/Util/XUtils.hs b/tv/2configs/xserver/xmonad/Util/XUtils.hs
deleted file mode 100644
index de1d8247c..000000000
--- a/tv/2configs/xserver/xmonad/Util/XUtils.hs
+++ /dev/null
@@ -1,47 +0,0 @@
-module Util.XUtils
- ( shapeWindow
- , withGC
- , withPixmap
- , withPixmapAndGC
- ) where
-
-import Control.Exception ( bracket )
-import Foreign.C.Types ( CInt )
-import Graphics.X11.Xlib
-import Graphics.X11.Xlib.Extras
-import Graphics.X11.Xshape
-
-
-shapeWindow :: Display -> Window -> (Pixmap -> GC -> IO ()) -> IO ()
-shapeWindow d w f = do
- wa <- getWindowAttributes d w
-
- let width = fromIntegral $ wa_width wa
- height = fromIntegral $ wa_height wa
-
- withPixmapAndGC d w width height 1 $ \ p g -> do
-
- setForeground d g 0
- fillRectangle d p g 0 0 width height
-
- setForeground d g 1
-
- f p g
-
- xshapeCombineMask d w shapeBounding 0 0 p shapeSet
-
-
-withGC :: Display -> Drawable -> (GC -> IO ()) -> IO ()
-withGC d p =
- bracket (createGC d p) (freeGC d)
-
-
-withPixmap :: Display -> Drawable -> Dimension -> Dimension -> CInt -> (Pixmap -> IO ()) -> IO ()
-withPixmap d p w h depth =
- bracket (createPixmap d p w h depth) (freePixmap d)
-
-
-withPixmapAndGC :: Display -> Drawable -> Dimension -> Dimension -> CInt -> (Pixmap -> GC -> IO ()) -> IO ()
-withPixmapAndGC d w width height depth f =
- withPixmap d w width height depth $ \ p ->
- withGC d p $ \ g -> f p g