Skip to content

Instantly share code, notes, and snippets.

@naota
Created February 24, 2014 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naota/9182300 to your computer and use it in GitHub Desktop.
Save naota/9182300 to your computer and use it in GitHub Desktop.
setButtonEvent :: XEventPtr -> Window -> Window -> Window ->
ButtonMask -> Button ->
CInt -> CInt -> CInt -> CInt -> Bool ->
IO ()
setButtonEvent p win root subwin state button x y xroot yroot sameScreen = do
setKeyEvent p win root subwin 0 0 sameScreen
(`pokeByteOff` 64) p (x :: CInt)
(`pokeByteOff` 68) p (y :: CInt)
(`pokeByteOff` 72) p (xroot :: CInt)
(`pokeByteOff` 76) p (yroot :: CInt)
(`pokeByteOff` 80) p state
(`pokeByteOff` 84) p button
return ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment