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


{-# LINE 1 "./Graphics/UI/Gtk/WebKit/DOM/NodeIterator.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.NodeIterator(
detach,
getRoot,
getWhatToShow,
getFilter,
getExpandEntityReferences,
getReferenceNode,
getPointerBeforeReferenceNode,
NodeIterator,
castToNodeIterator,
gTypeNodeIterator,
NodeIteratorClass,
toNodeIterator,
) where
import Prelude hiding (drop, error, print)
import Data.Typeable (Typeable)
import Foreign.Marshal (maybePeek, maybeWith)
import System.Glib.FFI (maybeNull, withForeignPtr, nullForeignPtr, Ptr, nullPtr, castPtr, Word, Int64, Word64, CChar(..), CInt(..), CUInt(..), CLong(..), CULong(..), CLLong(..), CULLong(..), CShort(..), CUShort(..), CFloat(..), CDouble(..), toBool, fromBool)
import System.Glib.UTFString (GlibString(..), readUTFString)
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Monad.IO.Class (MonadIO(..))
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventTargetClosures
import Graphics.UI.Gtk.WebKit.DOM.EventM
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 26 "./Graphics/UI/Gtk/WebKit/DOM/NodeIterator.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
detach :: (MonadIO m, NodeIteratorClass self) => self -> m ()
detach self
  = liftIO
      ((\(NodeIterator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_node_iterator_detach argPtr1) (toNodeIterator self))
 
getRoot ::
        (MonadIO m, NodeIteratorClass self) => self -> m (Maybe Node)
getRoot self
  = liftIO
      (maybeNull (makeNewGObject mkNode)
         ((\(NodeIterator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_node_iterator_get_root argPtr1)
{-# LINE 40 "./Graphics/UI/Gtk/WebKit/DOM/NodeIterator.chs" #-}
            (toNodeIterator self)))
 
getWhatToShow ::
              (MonadIO m, NodeIteratorClass self) => self -> m Word
getWhatToShow self
  = liftIO
      (fromIntegral <$>
         ((\(NodeIterator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_node_iterator_get_what_to_show argPtr1)
{-# LINE 48 "./Graphics/UI/Gtk/WebKit/DOM/NodeIterator.chs" #-}
            (toNodeIterator self)))
 
getFilter ::
          (MonadIO m, NodeIteratorClass self) => self -> m (Maybe NodeFilter)
getFilter self
  = liftIO
      (maybeNull (makeNewGObject mkNodeFilter)
         ((\(NodeIterator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_node_iterator_get_filter argPtr1)
{-# LINE 56 "./Graphics/UI/Gtk/WebKit/DOM/NodeIterator.chs" #-}
            (toNodeIterator self)))
 
getExpandEntityReferences ::
                          (MonadIO m, NodeIteratorClass self) => self -> m Bool
getExpandEntityReferences self
  = liftIO
      (toBool <$>
         ((\(NodeIterator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_node_iterator_get_expand_entity_references argPtr1)
{-# LINE 64 "./Graphics/UI/Gtk/WebKit/DOM/NodeIterator.chs" #-}
            (toNodeIterator self)))
 
getReferenceNode ::
                 (MonadIO m, NodeIteratorClass self) => self -> m (Maybe Node)
getReferenceNode self
  = liftIO
      (maybeNull (makeNewGObject mkNode)
         ((\(NodeIterator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_node_iterator_get_reference_node argPtr1)
{-# LINE 72 "./Graphics/UI/Gtk/WebKit/DOM/NodeIterator.chs" #-}
            (toNodeIterator self)))
 
getPointerBeforeReferenceNode ::
                              (MonadIO m, NodeIteratorClass self) => self -> m Bool
getPointerBeforeReferenceNode self
  = liftIO
      (toBool <$>
         ((\(NodeIterator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_node_iterator_get_pointer_before_reference_node argPtr1)
{-# LINE 81 "./Graphics/UI/Gtk/WebKit/DOM/NodeIterator.chs" #-}
            (toNodeIterator self)))

foreign import ccall safe "webkit_dom_node_iterator_detach"
  webkit_dom_node_iterator_detach :: ((Ptr NodeIterator) -> (IO ()))

foreign import ccall safe "webkit_dom_node_iterator_get_root"
  webkit_dom_node_iterator_get_root :: ((Ptr NodeIterator) -> (IO (Ptr Node)))

foreign import ccall safe "webkit_dom_node_iterator_get_what_to_show"
  webkit_dom_node_iterator_get_what_to_show :: ((Ptr NodeIterator) -> (IO CULong))

foreign import ccall safe "webkit_dom_node_iterator_get_filter"
  webkit_dom_node_iterator_get_filter :: ((Ptr NodeIterator) -> (IO (Ptr NodeFilter)))

foreign import ccall safe "webkit_dom_node_iterator_get_expand_entity_references"
  webkit_dom_node_iterator_get_expand_entity_references :: ((Ptr NodeIterator) -> (IO CInt))

foreign import ccall safe "webkit_dom_node_iterator_get_reference_node"
  webkit_dom_node_iterator_get_reference_node :: ((Ptr NodeIterator) -> (IO (Ptr Node)))

foreign import ccall safe "webkit_dom_node_iterator_get_pointer_before_reference_node"
  webkit_dom_node_iterator_get_pointer_before_reference_node :: ((Ptr NodeIterator) -> (IO CInt))