{-# LINE 1 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
{-# LANGUAGE CPP #-}
{- |
   Module      :  System.Win32.Automation.Input.Mouse
   Copyright   :  2013 shelarcy
   License     :  BSD-style

   Maintainer  :  shelarcy@gmail.com
   Stability   :  Provisional
   Portability :  Non-portable (Win32 API)

   Mouse input events
-}
module System.Win32.Automation.Input.Mouse where
import Foreign.Ptr               ( Ptr )
import Foreign.Storable          ( Storable(..) )
import System.Win32.Types        ( LONG, ULONG_PTR )
import System.Win32.Word         ( DWORD )





type PMOUSEINPUT = Ptr MOUSEINPUT

data MOUSEINPUT = MOUSEINPUT
     { MOUSEINPUT -> LONG
dx           :: LONG
     , MOUSEINPUT -> LONG
dy           :: LONG
     , MOUSEINPUT -> DWORD
mouseData    :: DWORD
     , MOUSEINPUT -> DWORD
dwFlags      :: DWORD
     , MOUSEINPUT -> DWORD
time         :: DWORD
     , MOUSEINPUT -> ULONG_PTR
dwExtraInfo :: ULONG_PTR
     } deriving Int -> MOUSEINPUT -> ShowS
[MOUSEINPUT] -> ShowS
MOUSEINPUT -> String
(Int -> MOUSEINPUT -> ShowS)
-> (MOUSEINPUT -> String)
-> ([MOUSEINPUT] -> ShowS)
-> Show MOUSEINPUT
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MOUSEINPUT] -> ShowS
$cshowList :: [MOUSEINPUT] -> ShowS
show :: MOUSEINPUT -> String
$cshow :: MOUSEINPUT -> String
showsPrec :: Int -> MOUSEINPUT -> ShowS
$cshowsPrec :: Int -> MOUSEINPUT -> ShowS
Show

instance Storable MOUSEINPUT where
    sizeOf :: MOUSEINPUT -> Int
sizeOf = Int -> MOUSEINPUT -> Int
forall a b. a -> b -> a
const (Int
32)
{-# LINE 36 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
    alignment _ = 8
{-# LINE 37 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
    poke buf input = do
        ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) buf (dx input)
{-# LINE 39 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) buf (dy input)
{-# LINE 40 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 8))   buf (mouseData input)
{-# LINE 41 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 12))     buf (dwFlags input)
{-# LINE 42 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 16))        buf (time input)
{-# LINE 43 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        ((\hsc_ptr -> pokeByteOff hsc_ptr 24)) buf (dwExtraInfo input)
{-# LINE 44 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
    peek buf = do
        dx' <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) buf
{-# LINE 46 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        dy' <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) buf
{-# LINE 47 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        mouseData'   <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) buf
{-# LINE 48 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        dwFlags'     <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) buf
{-# LINE 49 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        time'        <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) buf
{-# LINE 50 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        dwExtraInfo' <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) buf
{-# LINE 51 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}
        return $ MOUSEINPUT dx' dy' mouseData' dwFlags' time' dwExtraInfo'

xBUTTON1  :: DWORD
xBUTTON1 :: DWORD
xBUTTON1  =  DWORD
1
xBUTTON2  :: DWORD
xBUTTON2 :: DWORD
xBUTTON2  =  DWORD
2

{-# LINE 57 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}

mOUSEEVENTF_ABSOLUTE     :: DWORD
mOUSEEVENTF_ABSOLUTE :: DWORD
mOUSEEVENTF_ABSOLUTE     =  DWORD
32768
mOUSEEVENTF_MOVE         :: DWORD
mOUSEEVENTF_MOVE :: DWORD
mOUSEEVENTF_MOVE         =  DWORD
1
mOUSEEVENTF_LEFTDOWN     :: DWORD
mOUSEEVENTF_LEFTDOWN :: DWORD
mOUSEEVENTF_LEFTDOWN     =  DWORD
2
mOUSEEVENTF_LEFTUP       :: DWORD
mOUSEEVENTF_LEFTUP :: DWORD
mOUSEEVENTF_LEFTUP       =  DWORD
4
mOUSEEVENTF_RIGHTDOWN    :: DWORD
mOUSEEVENTF_RIGHTDOWN :: DWORD
mOUSEEVENTF_RIGHTDOWN    =  DWORD
8
mOUSEEVENTF_RIGHTUP      :: DWORD
mOUSEEVENTF_RIGHTUP :: DWORD
mOUSEEVENTF_RIGHTUP      =  DWORD
16
mOUSEEVENTF_MIDDLEDOWN   :: DWORD
mOUSEEVENTF_MIDDLEDOWN :: DWORD
mOUSEEVENTF_MIDDLEDOWN   =  DWORD
32
mOUSEEVENTF_MIDDLEUP     :: DWORD
mOUSEEVENTF_MIDDLEUP :: DWORD
mOUSEEVENTF_MIDDLEUP     =  DWORD
64
mOUSEEVENTF_WHEEL        :: DWORD
mOUSEEVENTF_WHEEL :: DWORD
mOUSEEVENTF_WHEEL        =  DWORD
2048
mOUSEEVENTF_XDOWN        :: DWORD
mOUSEEVENTF_XDOWN :: DWORD
mOUSEEVENTF_XDOWN        =  DWORD
128
mOUSEEVENTF_XUP          :: DWORD
mOUSEEVENTF_XUP :: DWORD
mOUSEEVENTF_XUP          =  DWORD
256

{-# LINE 71 "libraries\\Win32\\System\\Win32\\Automation\\Input\\Mouse.hsc" #-}

{-
 , mOUSEEVENTF_VIRTUALDESK = MOUSEEVENTF_VIRTUALDESK -- I don't know why we can't find this
 , mOUSEEVENTF_HWHEEL      = MOUSEEVENTF_HWHEEL
 , mOUSEEVENTF_MOVE_NOCOALESCE = MOUSEEVENTF_MOVE_NOCOALESCE
-}