-- GENERATED by C->Haskell Compiler, version 0.13.12 (gtk2hs branch) "Bin IO", 27 May 2012 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.MouseEvent
       (mouseEventInitMouseEvent, mouseEventGetScreenX,
        mouseEventGetScreenY, mouseEventGetClientX, mouseEventGetClientY,
        mouseEventGetCtrlKey, mouseEventGetShiftKey, mouseEventGetAltKey,
        mouseEventGetMetaKey, mouseEventGetButton,
        mouseEventGetRelatedTarget, mouseEventGetMovementX,
        mouseEventGetMovementY, mouseEventGetOffsetX, mouseEventGetOffsetY,
        mouseEventGetX, mouseEventGetY, mouseEventGetFromElement,
        mouseEventGetToElement, MouseEvent, MouseEventClass,
        castToMouseEvent, gTypeMouseEvent, toMouseEvent)
       where
import System.Glib.FFI
import System.Glib.UTFString
import Control.Applicative
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 15 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
import System.Glib.GError
 
mouseEventInitMouseEvent ::
                         (MouseEventClass self, DOMWindowClass view,
                          EventTargetClass relatedTarget, GlibString string) =>
                           self ->
                             string ->
                               Bool ->
                                 Bool ->
                                   Maybe view ->
                                     Int ->
                                       Int ->
                                         Int ->
                                           Int ->
                                             Int ->
                                               Bool ->
                                                 Bool ->
                                                   Bool ->
                                                     Bool -> Word -> Maybe relatedTarget -> IO ()
mouseEventInitMouseEvent self type' canBubble cancelable view
  detail screenX screenY clientX clientY ctrlKey altKey shiftKey
  metaKey button relatedTarget
  = withUTFString type' $
      \ typePtr ->
        (\(MouseEvent arg1) arg2 arg3 arg4 (DOMWindow arg5) arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 (EventTarget arg16) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->withForeignPtr arg16 $ \argPtr16 ->webkit_dom_mouse_event_init_mouse_event argPtr1 arg2 arg3 arg4 argPtr5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 argPtr16)
{-# LINE 40 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
          (toMouseEvent self)
          typePtr
      (fromBool canBubble)
      (fromBool cancelable)
      (maybe (DOMWindow nullForeignPtr) toDOMWindow view)
      (fromIntegral detail)
      (fromIntegral screenX)
      (fromIntegral screenY)
      (fromIntegral clientX)
      (fromIntegral clientY)
      (fromBool ctrlKey)
      (fromBool altKey)
      (fromBool shiftKey)
      (fromBool metaKey)
      (fromIntegral button)
      (maybe (EventTarget nullForeignPtr) toEventTarget relatedTarget)
 
mouseEventGetScreenX :: (MouseEventClass self) => self -> IO Int
mouseEventGetScreenX self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_screen_x argPtr1)
{-# LINE 61 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetScreenY :: (MouseEventClass self) => self -> IO Int
mouseEventGetScreenY self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_screen_y argPtr1)
{-# LINE 67 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetClientX :: (MouseEventClass self) => self -> IO Int
mouseEventGetClientX self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_client_x argPtr1)
{-# LINE 73 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetClientY :: (MouseEventClass self) => self -> IO Int
mouseEventGetClientY self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_client_y argPtr1)
{-# LINE 79 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetCtrlKey :: (MouseEventClass self) => self -> IO Bool
mouseEventGetCtrlKey self
  = toBool <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_ctrl_key argPtr1)
{-# LINE 85 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetShiftKey :: (MouseEventClass self) => self -> IO Bool
mouseEventGetShiftKey self
  = toBool <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_shift_key argPtr1)
{-# LINE 91 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetAltKey :: (MouseEventClass self) => self -> IO Bool
mouseEventGetAltKey self
  = toBool <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_alt_key argPtr1) (toMouseEvent self))
 
mouseEventGetMetaKey :: (MouseEventClass self) => self -> IO Bool
mouseEventGetMetaKey self
  = toBool <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_meta_key argPtr1)
{-# LINE 102 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetButton :: (MouseEventClass self) => self -> IO Word
mouseEventGetButton self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_button argPtr1) (toMouseEvent self))
 
mouseEventGetRelatedTarget ::
                           (MouseEventClass self) => self -> IO (Maybe EventTarget)
mouseEventGetRelatedTarget self
  = maybeNull (makeNewGObject mkEventTarget)
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_related_target argPtr1)
{-# LINE 114 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetMovementX :: (MouseEventClass self) => self -> IO Int
mouseEventGetMovementX self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_webkit_movement_x argPtr1)
{-# LINE 120 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetMovementY :: (MouseEventClass self) => self -> IO Int
mouseEventGetMovementY self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_webkit_movement_y argPtr1)
{-# LINE 126 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetOffsetX :: (MouseEventClass self) => self -> IO Int
mouseEventGetOffsetX self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_offset_x argPtr1)
{-# LINE 132 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetOffsetY :: (MouseEventClass self) => self -> IO Int
mouseEventGetOffsetY self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_offset_y argPtr1)
{-# LINE 138 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetX :: (MouseEventClass self) => self -> IO Int
mouseEventGetX self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_x argPtr1) (toMouseEvent self))
 
mouseEventGetY :: (MouseEventClass self) => self -> IO Int
mouseEventGetY self
  = fromIntegral <$>
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_y argPtr1) (toMouseEvent self))
 
mouseEventGetFromElement ::
                         (MouseEventClass self) => self -> IO (Maybe Node)
mouseEventGetFromElement self
  = maybeNull (makeNewGObject mkNode)
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_from_element argPtr1)
{-# LINE 155 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))
 
mouseEventGetToElement ::
                       (MouseEventClass self) => self -> IO (Maybe Node)
mouseEventGetToElement self
  = maybeNull (makeNewGObject mkNode)
      ((\(MouseEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_mouse_event_get_to_element argPtr1)
{-# LINE 162 "./Graphics/UI/Gtk/WebKit/DOM/MouseEvent.chs" #-}
         (toMouseEvent self))

foreign import ccall safe "webkit_dom_mouse_event_init_mouse_event"
  webkit_dom_mouse_event_init_mouse_event :: ((Ptr MouseEvent) -> ((Ptr CChar) -> (CInt -> (CInt -> ((Ptr DOMWindow) -> (CLong -> (CLong -> (CLong -> (CLong -> (CLong -> (CInt -> (CInt -> (CInt -> (CInt -> (CUShort -> ((Ptr EventTarget) -> (IO ())))))))))))))))))

foreign import ccall safe "webkit_dom_mouse_event_get_screen_x"
  webkit_dom_mouse_event_get_screen_x :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_screen_y"
  webkit_dom_mouse_event_get_screen_y :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_client_x"
  webkit_dom_mouse_event_get_client_x :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_client_y"
  webkit_dom_mouse_event_get_client_y :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_ctrl_key"
  webkit_dom_mouse_event_get_ctrl_key :: ((Ptr MouseEvent) -> (IO CInt))

foreign import ccall safe "webkit_dom_mouse_event_get_shift_key"
  webkit_dom_mouse_event_get_shift_key :: ((Ptr MouseEvent) -> (IO CInt))

foreign import ccall safe "webkit_dom_mouse_event_get_alt_key"
  webkit_dom_mouse_event_get_alt_key :: ((Ptr MouseEvent) -> (IO CInt))

foreign import ccall safe "webkit_dom_mouse_event_get_meta_key"
  webkit_dom_mouse_event_get_meta_key :: ((Ptr MouseEvent) -> (IO CInt))

foreign import ccall safe "webkit_dom_mouse_event_get_button"
  webkit_dom_mouse_event_get_button :: ((Ptr MouseEvent) -> (IO CUShort))

foreign import ccall safe "webkit_dom_mouse_event_get_related_target"
  webkit_dom_mouse_event_get_related_target :: ((Ptr MouseEvent) -> (IO (Ptr EventTarget)))

foreign import ccall safe "webkit_dom_mouse_event_get_webkit_movement_x"
  webkit_dom_mouse_event_get_webkit_movement_x :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_webkit_movement_y"
  webkit_dom_mouse_event_get_webkit_movement_y :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_offset_x"
  webkit_dom_mouse_event_get_offset_x :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_offset_y"
  webkit_dom_mouse_event_get_offset_y :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_x"
  webkit_dom_mouse_event_get_x :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_y"
  webkit_dom_mouse_event_get_y :: ((Ptr MouseEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_mouse_event_get_from_element"
  webkit_dom_mouse_event_get_from_element :: ((Ptr MouseEvent) -> (IO (Ptr Node)))

foreign import ccall safe "webkit_dom_mouse_event_get_to_element"
  webkit_dom_mouse_event_get_to_element :: ((Ptr MouseEvent) -> (IO (Ptr Node)))