summaryrefslogtreecommitdiffhomepage
path: root/src/XUtil.hsc
diff options
context:
space:
mode:
Diffstat (limited to 'src/XUtil.hsc')
-rw-r--r--src/XUtil.hsc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/XUtil.hsc b/src/XUtil.hsc
index 6511b10..cb0c89a 100644
--- a/src/XUtil.hsc
+++ b/src/XUtil.hsc
@@ -1,4 +1,4 @@
-{-# OPTIONS -fglasgow-exts #-}
+{-# LANGUAGE ForeignFunctionInterface #-}
-----------------------------------------------------------------------------
-- |
-- Module : XUtil
@@ -28,13 +28,15 @@ module XUtil
, fi
, withColors
, DynPixel(..)
- , xrrSelectInput
+ , 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
@@ -263,3 +265,7 @@ setupLocale = return ()
#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)