-- 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/XPathExpression.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.XPathExpression
       (xPathExpressionEvaluate, XPathExpression, XPathExpressionClass,
        castToXPathExpression, gTypeXPathExpression, toXPathExpression)
       where
import System.Glib.FFI
import System.Glib.UTFString
import Control.Applicative
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 8 "./Graphics/UI/Gtk/WebKit/DOM/XPathExpression.chs" #-}
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventM
 
xPathExpressionEvaluate ::
                        (XPathExpressionClass self, NodeClass contextNode,
                         XPathResultClass inResult) =>
                          self ->
                            Maybe contextNode ->
                              Word -> Maybe inResult -> IO (Maybe XPathResult)
xPathExpressionEvaluate self contextNode type' inResult
  = maybeNull (makeNewGObject mkXPathResult)
      (propagateGError $
         \ errorPtr_ ->
           (\(XPathExpression arg1) (Node arg2) arg3 (XPathResult arg4) arg5 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg4 $ \argPtr4 ->webkit_dom_xpath_expression_evaluate argPtr1 argPtr2 arg3 argPtr4 arg5)
{-# LINE 22 "./Graphics/UI/Gtk/WebKit/DOM/XPathExpression.chs" #-}
             (toXPathExpression self)
             (maybe (Node nullForeignPtr) toNode contextNode)
             (fromIntegral type')
             (maybe (XPathResult nullForeignPtr) toXPathResult inResult)
             errorPtr_)

foreign import ccall safe "webkit_dom_xpath_expression_evaluate"
  webkit_dom_xpath_expression_evaluate :: ((Ptr XPathExpression) -> ((Ptr Node) -> (CUShort -> ((Ptr XPathResult) -> ((Ptr (Ptr ())) -> (IO (Ptr XPathResult)))))))