-- 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/UIEvent.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.UIEvent
       (uiEventInitUIEvent, uiEventGetView, uiEventGetDetail,
        uiEventGetKeyCode, uiEventGetCharCode, uiEventGetLayerX,
        uiEventGetLayerY, uiEventGetPageX, uiEventGetPageY,
        uiEventGetWhich, UIEvent, UIEventClass, castToUIEvent,
        gTypeUIEvent, toUIEvent)
       where
import System.Glib.FFI
import System.Glib.UTFString
import Control.Applicative
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 11 "./Graphics/UI/Gtk/WebKit/DOM/UIEvent.chs" #-}
import System.Glib.GError
 
uiEventInitUIEvent ::
                   (UIEventClass self, DOMWindowClass view, GlibString string) =>
                     self -> string -> Bool -> Bool -> Maybe view -> Int -> IO ()
uiEventInitUIEvent self type' canBubble cancelable view detail
  = withUTFString type' $
      \ typePtr ->
        (\(UIEvent arg1) arg2 arg3 arg4 (DOMWindow arg5) arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->webkit_dom_ui_event_init_ui_event argPtr1 arg2 arg3 arg4 argPtr5 arg6) (toUIEvent self)
          typePtr
      (fromBool canBubble)
      (fromBool cancelable)
      (maybe (DOMWindow nullForeignPtr) toDOMWindow view)
      (fromIntegral detail)
 
uiEventGetView ::
               (UIEventClass self) => self -> IO (Maybe DOMWindow)
uiEventGetView self
  = maybeNull (makeNewGObject mkDOMWindow)
      ((\(UIEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_ui_event_get_view argPtr1) (toUIEvent self))
 
uiEventGetDetail :: (UIEventClass self) => self -> IO Int
uiEventGetDetail self
  = fromIntegral <$>
      ((\(UIEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_ui_event_get_detail argPtr1) (toUIEvent self))
 
uiEventGetKeyCode :: (UIEventClass self) => self -> IO Int
uiEventGetKeyCode self
  = fromIntegral <$>
      ((\(UIEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_ui_event_get_key_code argPtr1) (toUIEvent self))
 
uiEventGetCharCode :: (UIEventClass self) => self -> IO Int
uiEventGetCharCode self
  = fromIntegral <$>
      ((\(UIEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_ui_event_get_char_code argPtr1) (toUIEvent self))
 
uiEventGetLayerX :: (UIEventClass self) => self -> IO Int
uiEventGetLayerX self
  = fromIntegral <$>
      ((\(UIEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_ui_event_get_layer_x argPtr1) (toUIEvent self))
 
uiEventGetLayerY :: (UIEventClass self) => self -> IO Int
uiEventGetLayerY self
  = fromIntegral <$>
      ((\(UIEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_ui_event_get_layer_y argPtr1) (toUIEvent self))
 
uiEventGetPageX :: (UIEventClass self) => self -> IO Int
uiEventGetPageX self
  = fromIntegral <$>
      ((\(UIEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_ui_event_get_page_x argPtr1) (toUIEvent self))
 
uiEventGetPageY :: (UIEventClass self) => self -> IO Int
uiEventGetPageY self
  = fromIntegral <$>
      ((\(UIEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_ui_event_get_page_y argPtr1) (toUIEvent self))
 
uiEventGetWhich :: (UIEventClass self) => self -> IO Int
uiEventGetWhich self
  = fromIntegral <$>
      ((\(UIEvent arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_ui_event_get_which argPtr1) (toUIEvent self))

foreign import ccall safe "webkit_dom_ui_event_init_ui_event"
  webkit_dom_ui_event_init_ui_event :: ((Ptr UIEvent) -> ((Ptr CChar) -> (CInt -> (CInt -> ((Ptr DOMWindow) -> (CLong -> (IO ())))))))

foreign import ccall safe "webkit_dom_ui_event_get_view"
  webkit_dom_ui_event_get_view :: ((Ptr UIEvent) -> (IO (Ptr DOMWindow)))

foreign import ccall safe "webkit_dom_ui_event_get_detail"
  webkit_dom_ui_event_get_detail :: ((Ptr UIEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_ui_event_get_key_code"
  webkit_dom_ui_event_get_key_code :: ((Ptr UIEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_ui_event_get_char_code"
  webkit_dom_ui_event_get_char_code :: ((Ptr UIEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_ui_event_get_layer_x"
  webkit_dom_ui_event_get_layer_x :: ((Ptr UIEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_ui_event_get_layer_y"
  webkit_dom_ui_event_get_layer_y :: ((Ptr UIEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_ui_event_get_page_x"
  webkit_dom_ui_event_get_page_x :: ((Ptr UIEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_ui_event_get_page_y"
  webkit_dom_ui_event_get_page_y :: ((Ptr UIEvent) -> (IO CLong))

foreign import ccall safe "webkit_dom_ui_event_get_which"
  webkit_dom_ui_event_get_which :: ((Ptr UIEvent) -> (IO CLong))