module Graphics.UI.Gtk.WebKit.DOM.TreeWalker(
getRoot,
getWhatToShow,
getFilter,
getExpandEntityReferences,
setCurrentNode,
getCurrentNode,
TreeWalker,
castToTreeWalker,
gTypeTreeWalker,
TreeWalkerClass,
toTreeWalker,
) 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
import Graphics.UI.Gtk.WebKit.DOM.Enums
getRoot ::
(MonadIO m, TreeWalkerClass self) => self -> m (Maybe Node)
getRoot self
= liftIO
(maybeNull (makeNewGObject mkNode)
((\(TreeWalker arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_tree_walker_get_root argPtr1) (toTreeWalker self)))
getWhatToShow ::
(MonadIO m, TreeWalkerClass self) => self -> m Word
getWhatToShow self
= liftIO
(fromIntegral <$>
((\(TreeWalker arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_tree_walker_get_what_to_show argPtr1)
(toTreeWalker self)))
getFilter ::
(MonadIO m, TreeWalkerClass self) => self -> m (Maybe NodeFilter)
getFilter self
= liftIO
(maybeNull (makeNewGObject mkNodeFilter)
((\(TreeWalker arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_tree_walker_get_filter argPtr1) (toTreeWalker self)))
getExpandEntityReferences ::
(MonadIO m, TreeWalkerClass self) => self -> m Bool
getExpandEntityReferences self
= liftIO
(toBool <$>
((\(TreeWalker arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_tree_walker_get_expand_entity_references argPtr1)
(toTreeWalker self)))
setCurrentNode ::
(MonadIO m, NodeClass val, TreeWalkerClass self) =>
self -> Maybe val -> m ()
setCurrentNode self val
= liftIO
(propagateGError $
\ errorPtr_ ->
(\(TreeWalker arg1) (Node arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_dom_tree_walker_set_current_node argPtr1 argPtr2 arg3)
(toTreeWalker self)
(maybe (Node nullForeignPtr) toNode val)
errorPtr_)
getCurrentNode ::
(MonadIO m, TreeWalkerClass self) => self -> m (Maybe Node)
getCurrentNode self
= liftIO
(maybeNull (makeNewGObject mkNode)
((\(TreeWalker arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_tree_walker_get_current_node argPtr1)
(toTreeWalker self)))
foreign import ccall safe "webkit_dom_tree_walker_get_root"
webkit_dom_tree_walker_get_root :: ((Ptr TreeWalker) -> (IO (Ptr Node)))
foreign import ccall safe "webkit_dom_tree_walker_get_what_to_show"
webkit_dom_tree_walker_get_what_to_show :: ((Ptr TreeWalker) -> (IO CULong))
foreign import ccall safe "webkit_dom_tree_walker_get_filter"
webkit_dom_tree_walker_get_filter :: ((Ptr TreeWalker) -> (IO (Ptr NodeFilter)))
foreign import ccall safe "webkit_dom_tree_walker_get_expand_entity_references"
webkit_dom_tree_walker_get_expand_entity_references :: ((Ptr TreeWalker) -> (IO CInt))
foreign import ccall safe "webkit_dom_tree_walker_set_current_node"
webkit_dom_tree_walker_set_current_node :: ((Ptr TreeWalker) -> ((Ptr Node) -> ((Ptr (Ptr ())) -> (IO ()))))
foreign import ccall safe "webkit_dom_tree_walker_get_current_node"
webkit_dom_tree_walker_get_current_node :: ((Ptr TreeWalker) -> (IO (Ptr Node)))