-- 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/Attr.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.Attr
       (attrGetName, attrGetSpecified, attrSetValue, attrGetValue,
        attrGetOwnerElement, attrGetIsId, DOMAttr, DOMAttrClass,
        castToDOMAttr, gTypeDOMAttr, toDOMAttr)
       where
import System.Glib.FFI
import System.Glib.UTFString
import Control.Applicative
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 9 "./Graphics/UI/Gtk/WebKit/DOM/Attr.chs" #-}
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventM
 
attrGetName ::
            (DOMAttrClass self, GlibString string) => self -> IO string
attrGetName self
  = ((\(DOMAttr arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_attr_get_name argPtr1) (toDOMAttr self)) >>=
      readUTFString
 
attrGetSpecified :: (DOMAttrClass self) => self -> IO Bool
attrGetSpecified self
  = toBool <$>
      ((\(DOMAttr arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_attr_get_specified argPtr1) (toDOMAttr self))
 
attrSetValue ::
             (DOMAttrClass self, GlibString string) => self -> string -> IO ()
attrSetValue self val
  = propagateGError $
      \ errorPtr_ ->
        withUTFString val $
          \ valPtr ->
            (\(DOMAttr arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_attr_set_value argPtr1 arg2 arg3) (toDOMAttr self) valPtr
          errorPtr_
 
attrGetValue ::
             (DOMAttrClass self, GlibString string) => self -> IO string
attrGetValue self
  = ((\(DOMAttr arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_attr_get_value argPtr1) (toDOMAttr self)) >>=
      readUTFString
 
attrGetOwnerElement ::
                    (DOMAttrClass self) => self -> IO (Maybe Element)
attrGetOwnerElement self
  = maybeNull (makeNewGObject mkElement)
      ((\(DOMAttr arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_attr_get_owner_element argPtr1) (toDOMAttr self))
 
attrGetIsId :: (DOMAttrClass self) => self -> IO Bool
attrGetIsId self
  = toBool <$>
      ((\(DOMAttr arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_attr_get_is_id argPtr1) (toDOMAttr self))

foreign import ccall safe "webkit_dom_attr_get_name"
  webkit_dom_attr_get_name :: ((Ptr DOMAttr) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_attr_get_specified"
  webkit_dom_attr_get_specified :: ((Ptr DOMAttr) -> (IO CInt))

foreign import ccall safe "webkit_dom_attr_set_value"
  webkit_dom_attr_set_value :: ((Ptr DOMAttr) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_attr_get_value"
  webkit_dom_attr_get_value :: ((Ptr DOMAttr) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_attr_get_owner_element"
  webkit_dom_attr_get_owner_element :: ((Ptr DOMAttr) -> (IO (Ptr Element)))

foreign import ccall safe "webkit_dom_attr_get_is_id"
  webkit_dom_attr_get_is_id :: ((Ptr DOMAttr) -> (IO CInt))