xtest-0.2: Thin FFI bindings to X11 XTest library

Graphics.X11.XTest

Synopsis

Documentation

queryXTestSupport :: Display -> IO (Maybe (Int, Int, Int, Int))Source

Ask the X server if XTest extension is supported. Returns Nothing, if extension is not supported. Otherwise, it returns:

  • Event number for the first event for this extension (undefined for current version of XTest).
  • Error number for the first error for this extension (undefined for current version of XTest).
  • Major and
  • minor versions of the extension.

fakeMotionSource

Arguments

:: Display 
-> ScreenNumber 
-> Int

X

-> Int

Y

-> IO () 

Create fake pointer motion event.

fakeButtonPressSource

Arguments

:: Display 
-> Button

Mouse button number

-> IO () 

Create fake mouse button click event.

movePointerSource

Arguments

:: Display 
-> ScreenNumber 
-> XID

Root window XID

-> Int

delta X

-> Int

delta Y

-> IO () 

Move mouse pointer.

withGrabbedControl :: Display -> IO a -> IO aSource

Perform some IO actions while control grabbed by XTest

sendKeySource

Arguments

:: Display 
-> [KeySym]

Modifier keys (say, xK_Control_L). Set to [] if modifier is not needed.

-> KeySym

Key to press (say, xK_n).

-> IO () 

Send fake key press