-- 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/NamedNodeMap.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.NamedNodeMap
       (namedNodeMapGetNamedItem, namedNodeMapSetNamedItem,
        namedNodeMapRemoveNamedItem, namedNodeMapItem,
        namedNodeMapGetNamedItemNS, namedNodeMapSetNamedItemNS,
        namedNodeMapRemoveNamedItemNS, namedNodeMapGetLength, NamedNodeMap,
        NamedNodeMapClass, castToNamedNodeMap, gTypeNamedNodeMap,
        toNamedNodeMap)
       where
import System.Glib.FFI
import System.Glib.UTFString
import Control.Applicative
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 12 "./Graphics/UI/Gtk/WebKit/DOM/NamedNodeMap.chs" #-}
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventM
 
namedNodeMapGetNamedItem ::
                         (NamedNodeMapClass self, GlibString string) =>
                           self -> string -> IO (Maybe Node)
namedNodeMapGetNamedItem self name
  = maybeNull (makeNewGObject mkNode)
      (withUTFString name $
         \ namePtr ->
           (\(NamedNodeMap arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_named_node_map_get_named_item argPtr1 arg2)
{-# LINE 23 "./Graphics/UI/Gtk/WebKit/DOM/NamedNodeMap.chs" #-}
             (toNamedNodeMap self)
             namePtr)
 
namedNodeMapSetNamedItem ::
                         (NamedNodeMapClass self, NodeClass node) =>
                           self -> Maybe node -> IO (Maybe Node)
namedNodeMapSetNamedItem self node
  = maybeNull (makeNewGObject mkNode)
      (propagateGError $
         \ errorPtr_ ->
           (\(NamedNodeMap arg1) (Node arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_dom_named_node_map_set_named_item argPtr1 argPtr2 arg3)
{-# LINE 34 "./Graphics/UI/Gtk/WebKit/DOM/NamedNodeMap.chs" #-}
             (toNamedNodeMap self)
             (maybe (Node nullForeignPtr) toNode node)
             errorPtr_)
 
namedNodeMapRemoveNamedItem ::
                            (NamedNodeMapClass self, GlibString string) =>
                              self -> string -> IO (Maybe Node)
namedNodeMapRemoveNamedItem self name
  = maybeNull (makeNewGObject mkNode)
      (propagateGError $
         \ errorPtr_ ->
           withUTFString name $
             \ namePtr ->
               (\(NamedNodeMap arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_named_node_map_remove_named_item argPtr1 arg2 arg3)
{-# LINE 48 "./Graphics/UI/Gtk/WebKit/DOM/NamedNodeMap.chs" #-}
                 (toNamedNodeMap self)
                 namePtr
             errorPtr_)
 
namedNodeMapItem ::
                 (NamedNodeMapClass self) => self -> Word -> IO (Maybe Node)
namedNodeMapItem self index
  = maybeNull (makeNewGObject mkNode)
      ((\(NamedNodeMap arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_named_node_map_item argPtr1 arg2) (toNamedNodeMap self)
         (fromIntegral index))
 
namedNodeMapGetNamedItemNS ::
                           (NamedNodeMapClass self, GlibString string) =>
                             self -> string -> string -> IO (Maybe Node)
namedNodeMapGetNamedItemNS self namespaceURI localName
  = maybeNull (makeNewGObject mkNode)
      (withUTFString localName $
         \ localNamePtr ->
           withUTFString namespaceURI $
             \ namespaceURIPtr ->
               (\(NamedNodeMap arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_named_node_map_get_named_item_ns argPtr1 arg2 arg3)
{-# LINE 69 "./Graphics/UI/Gtk/WebKit/DOM/NamedNodeMap.chs" #-}
                 (toNamedNodeMap self)
                 namespaceURIPtr
             localNamePtr)
 
namedNodeMapSetNamedItemNS ::
                           (NamedNodeMapClass self, NodeClass node) =>
                             self -> Maybe node -> IO (Maybe Node)
namedNodeMapSetNamedItemNS self node
  = maybeNull (makeNewGObject mkNode)
      (propagateGError $
         \ errorPtr_ ->
           (\(NamedNodeMap arg1) (Node arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_dom_named_node_map_set_named_item_ns argPtr1 argPtr2 arg3)
{-# LINE 81 "./Graphics/UI/Gtk/WebKit/DOM/NamedNodeMap.chs" #-}
             (toNamedNodeMap self)
             (maybe (Node nullForeignPtr) toNode node)
             errorPtr_)
 
namedNodeMapRemoveNamedItemNS ::
                              (NamedNodeMapClass self, GlibString string) =>
                                self -> string -> string -> IO (Maybe Node)
namedNodeMapRemoveNamedItemNS self namespaceURI localName
  = maybeNull (makeNewGObject mkNode)
      (propagateGError $
         \ errorPtr_ ->
           withUTFString localName $
             \ localNamePtr ->
               withUTFString namespaceURI $
                 \ namespaceURIPtr ->
                   (\(NamedNodeMap arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_named_node_map_remove_named_item_ns argPtr1 arg2 arg3 arg4)
{-# LINE 97 "./Graphics/UI/Gtk/WebKit/DOM/NamedNodeMap.chs" #-}
                     (toNamedNodeMap self)
                     namespaceURIPtr
                 localNamePtr
             errorPtr_)
 
namedNodeMapGetLength ::
                      (NamedNodeMapClass self) => self -> IO Word
namedNodeMapGetLength self
  = fromIntegral <$>
      ((\(NamedNodeMap arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_named_node_map_get_length argPtr1)
{-# LINE 107 "./Graphics/UI/Gtk/WebKit/DOM/NamedNodeMap.chs" #-}
         (toNamedNodeMap self))

foreign import ccall safe "webkit_dom_named_node_map_get_named_item"
  webkit_dom_named_node_map_get_named_item :: ((Ptr NamedNodeMap) -> ((Ptr CChar) -> (IO (Ptr Node))))

foreign import ccall safe "webkit_dom_named_node_map_set_named_item"
  webkit_dom_named_node_map_set_named_item :: ((Ptr NamedNodeMap) -> ((Ptr Node) -> ((Ptr (Ptr ())) -> (IO (Ptr Node)))))

foreign import ccall safe "webkit_dom_named_node_map_remove_named_item"
  webkit_dom_named_node_map_remove_named_item :: ((Ptr NamedNodeMap) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO (Ptr Node)))))

foreign import ccall safe "webkit_dom_named_node_map_item"
  webkit_dom_named_node_map_item :: ((Ptr NamedNodeMap) -> (CULong -> (IO (Ptr Node))))

foreign import ccall safe "webkit_dom_named_node_map_get_named_item_ns"
  webkit_dom_named_node_map_get_named_item_ns :: ((Ptr NamedNodeMap) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO (Ptr Node)))))

foreign import ccall safe "webkit_dom_named_node_map_set_named_item_ns"
  webkit_dom_named_node_map_set_named_item_ns :: ((Ptr NamedNodeMap) -> ((Ptr Node) -> ((Ptr (Ptr ())) -> (IO (Ptr Node)))))

foreign import ccall safe "webkit_dom_named_node_map_remove_named_item_ns"
  webkit_dom_named_node_map_remove_named_item_ns :: ((Ptr NamedNodeMap) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO (Ptr Node))))))

foreign import ccall safe "webkit_dom_named_node_map_get_length"
  webkit_dom_named_node_map_get_length :: ((Ptr NamedNodeMap) -> (IO CULong))