diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-09-19 00:16:46 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-09-19 00:16:46 +0200 |
commit | d0a216d89697f900729fd427a8dd833a123a6c25 (patch) | |
tree | 8a5f7cabf1335aeb3b64a15c3676c2bc02ea0b76 /src/XUtil.hsc | |
parent | f9f6390c7399bb67c2e965e7cf28a889ff986198 (diff) | |
parent | 8833a8166387075d75ee15690a58cbd2aacf2a67 (diff) | |
download | xmobar-d0a216d89697f900729fd427a8dd833a123a6c25.tar.gz xmobar-d0a216d89697f900729fd427a8dd833a123a6c25.tar.bz2 |
Merge branch 'screen_update' of git://github.com/skinner33/xmobar into skinner-screen_update
Conflicts:
NEWS
src/XUtil.hsc
Diffstat (limited to 'src/XUtil.hsc')
-rw-r--r-- | src/XUtil.hsc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/XUtil.hsc b/src/XUtil.hsc index 1de5e47..ea051f8 100644 --- a/src/XUtil.hsc +++ b/src/XUtil.hsc @@ -1,8 +1,8 @@ --- {-# OPTIONS -fglasgow-exts #-} +{-# LANGUAGE ForeignFunctionInterface #-} ----------------------------------------------------------------------------- -- | -- Module : XUtil --- Copyright : (C) 2007 Andrea Rossato +-- Copyright : (C) 2007, 2011 Andrea Rossato -- License : BSD3 -- -- Maintainer : andrea.rossato@unitn.it @@ -28,12 +28,15 @@ module XUtil , fi , withColors , DynPixel(..) + , xrrSelectInput + , xrrQueryExtension ) where import Control.Concurrent import Control.Monad.Trans import Data.IORef import Foreign +import Foreign.C.Types import Graphics.X11.Xlib hiding (textExtents, textWidth) import qualified Graphics.X11.Xlib as Xlib (textExtents, textWidth) import Graphics.X11.Xlib.Extras @@ -257,3 +260,12 @@ setupLocale = withCString "" (setlocale $ #const LC_ALL) >> return () setupLocale :: IO () setupLocale = return () #endif + +-- XRRSelectInput +#include <X11/extensions/Xrandr.h> +foreign import ccall unsafe "X11/extensions/Xrandr.h XRRSelectInput" + xrrSelectInput :: Display -> Window -> EventMask -> IO () + +-- XRRQueryExtension +foreign import ccall unsafe "X11/extensions/Xrandr.h XRRQueryExtension" + xrrQueryExtension :: Display -> Ptr CInt -> Ptr CInt -> IO (Bool) |