-- 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/HTMLElement.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.HTMLElement(
insertAdjacentElement,
insertAdjacentHTML,
insertAdjacentText,
click,
setTitle,
getTitle,
setLang,
getLang,
setTranslate,
getTranslate,
setDir,
getDir,
setTabIndex,
getTabIndex,
setDraggable,
getDraggable,
setWebkitdropzone,
getWebkitdropzone,
setHidden,
getHidden,
setAccessKey,
getAccessKey,
setInnerText,
getInnerText,
setOuterText,
getOuterText,
getChildren,
setContentEditable,
getContentEditable,
getIsContentEditable,
setSpellcheck,
getSpellcheck,
HTMLElement,
castToHTMLElement,
gTypeHTMLElement,
HTMLElementClass,
toHTMLElement,
) 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 51 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
insertAdjacentElement ::
                      (MonadIO m, HTMLElementClass self, ElementClass element,
                       GlibString string) =>
                        self -> string -> Maybe element -> m (Maybe Element)
insertAdjacentElement self where' element
  = liftIO
      (maybeNull (makeNewGObject mkElement)
         (propagateGError $
            \ errorPtr_ ->
              withUTFString where' $
                \ wherePtr ->
                  (\(HTMLElement arg1) arg2 (Element arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->webkit_dom_html_element_insert_adjacent_element argPtr1 arg2 argPtr3 arg4)
{-# LINE 66 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
                    (toHTMLElement self)
                    wherePtr
                (maybe (Element nullForeignPtr) toElement element)
                errorPtr_))
 
insertAdjacentHTML ::
                   (MonadIO m, HTMLElementClass self, GlibString string) =>
                     self -> string -> string -> m ()
insertAdjacentHTML self where' html
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           withUTFString html $
             \ htmlPtr ->
               withUTFString where' $
                 \ wherePtr ->
                   (\(HTMLElement arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_insert_adjacent_html argPtr1 arg2 arg3 arg4)
{-# LINE 83 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
                     (toHTMLElement self)
                     wherePtr
                 htmlPtr
             errorPtr_)
 
insertAdjacentText ::
                   (MonadIO m, HTMLElementClass self, GlibString string) =>
                     self -> string -> string -> m ()
insertAdjacentText self where' text
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           withUTFString text $
             \ textPtr ->
               withUTFString where' $
                 \ wherePtr ->
                   (\(HTMLElement arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_insert_adjacent_text argPtr1 arg2 arg3 arg4)
{-# LINE 100 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
                     (toHTMLElement self)
                     wherePtr
                 textPtr
             errorPtr_)
 
click :: (MonadIO m, HTMLElementClass self) => self -> m ()
click self
  = liftIO
      ((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_click argPtr1) (toHTMLElement self))
 
setTitle ::
         (MonadIO m, HTMLElementClass self, GlibString string) =>
           self -> string -> m ()
setTitle self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_title argPtr1 arg2) (toHTMLElement self)
             valPtr)
 
getTitle ::
         (MonadIO m, HTMLElementClass self, GlibString string) =>
           self -> m string
getTitle self
  = liftIO
      (((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_title argPtr1)
{-# LINE 126 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
          (toHTMLElement self))
         >>=
         readUTFString)
 
setLang ::
        (MonadIO m, HTMLElementClass self, GlibString string) =>
          self -> string -> m ()
setLang self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_lang argPtr1 arg2) (toHTMLElement self)
             valPtr)
 
getLang ::
        (MonadIO m, HTMLElementClass self, GlibString string) =>
          self -> m string
getLang self
  = liftIO
      (((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_lang argPtr1) (toHTMLElement self))
         >>=
         readUTFString)
 
setTranslate ::
             (MonadIO m, HTMLElementClass self) => self -> Bool -> m ()
setTranslate self val
  = liftIO
      ((\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_translate argPtr1 arg2)
{-# LINE 154 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
         (toHTMLElement self)
         (fromBool val))
 
getTranslate ::
             (MonadIO m, HTMLElementClass self) => self -> m Bool
getTranslate self
  = liftIO
      (toBool <$>
         ((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_translate argPtr1)
{-# LINE 163 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
            (toHTMLElement self)))
 
setDir ::
       (MonadIO m, HTMLElementClass self, GlibString string) =>
         self -> string -> m ()
setDir self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_dir argPtr1 arg2) (toHTMLElement self)
             valPtr)
 
getDir ::
       (MonadIO m, HTMLElementClass self, GlibString string) =>
         self -> m string
getDir self
  = liftIO
      (((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_dir argPtr1) (toHTMLElement self))
         >>=
         readUTFString)
 
setTabIndex ::
            (MonadIO m, HTMLElementClass self) => self -> Int -> m ()
setTabIndex self val
  = liftIO
      ((\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_tab_index argPtr1 arg2)
{-# LINE 189 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
         (toHTMLElement self)
         (fromIntegral val))
 
getTabIndex :: (MonadIO m, HTMLElementClass self) => self -> m Int
getTabIndex self
  = liftIO
      (fromIntegral <$>
         ((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_tab_index argPtr1)
{-# LINE 197 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
            (toHTMLElement self)))
 
setDraggable ::
             (MonadIO m, HTMLElementClass self) => self -> Bool -> m ()
setDraggable self val
  = liftIO
      ((\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_draggable argPtr1 arg2)
{-# LINE 204 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
         (toHTMLElement self)
         (fromBool val))
 
getDraggable ::
             (MonadIO m, HTMLElementClass self) => self -> m Bool
getDraggable self
  = liftIO
      (toBool <$>
         ((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_draggable argPtr1)
{-# LINE 213 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
            (toHTMLElement self)))
 
setWebkitdropzone ::
                  (MonadIO m, HTMLElementClass self, GlibString string) =>
                    self -> string -> m ()
setWebkitdropzone self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_webkitdropzone argPtr1 arg2)
{-# LINE 223 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
             (toHTMLElement self)
             valPtr)
 
getWebkitdropzone ::
                  (MonadIO m, HTMLElementClass self, GlibString string) =>
                    self -> m string
getWebkitdropzone self
  = liftIO
      (((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_webkitdropzone argPtr1)
{-# LINE 232 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
          (toHTMLElement self))
         >>=
         readUTFString)
 
setHidden ::
          (MonadIO m, HTMLElementClass self) => self -> Bool -> m ()
setHidden self val
  = liftIO
      ((\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_hidden argPtr1 arg2) (toHTMLElement self)
         (fromBool val))
 
getHidden :: (MonadIO m, HTMLElementClass self) => self -> m Bool
getHidden self
  = liftIO
      (toBool <$>
         ((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_hidden argPtr1)
{-# LINE 248 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
            (toHTMLElement self)))
 
setAccessKey ::
             (MonadIO m, HTMLElementClass self, GlibString string) =>
               self -> string -> m ()
setAccessKey self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_access_key argPtr1 arg2)
{-# LINE 258 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
             (toHTMLElement self)
             valPtr)
 
getAccessKey ::
             (MonadIO m, HTMLElementClass self, GlibString string) =>
               self -> m string
getAccessKey self
  = liftIO
      (((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_access_key argPtr1)
{-# LINE 267 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
          (toHTMLElement self))
         >>=
         readUTFString)
 
setInnerText ::
             (MonadIO m, HTMLElementClass self, GlibString string) =>
               self -> (Maybe string) -> m ()
setInnerText self val
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           maybeWith withUTFString val $
             \ valPtr ->
               (\(HTMLElement arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_inner_text argPtr1 arg2 arg3)
{-# LINE 281 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
                 (toHTMLElement self)
                 valPtr
             errorPtr_)
 
getInnerText ::
             (MonadIO m, HTMLElementClass self, GlibString string) =>
               self -> m (Maybe string)
getInnerText self
  = liftIO
      (((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_inner_text argPtr1)
{-# LINE 291 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
          (toHTMLElement self))
         >>=
         maybePeek readUTFString)
 
setOuterText ::
             (MonadIO m, HTMLElementClass self, GlibString string) =>
               self -> (Maybe string) -> m ()
setOuterText self val
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           maybeWith withUTFString val $
             \ valPtr ->
               (\(HTMLElement arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_outer_text argPtr1 arg2 arg3)
{-# LINE 305 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
                 (toHTMLElement self)
                 valPtr
             errorPtr_)
 
getOuterText ::
             (MonadIO m, HTMLElementClass self, GlibString string) =>
               self -> m (Maybe string)
getOuterText self
  = liftIO
      (((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_outer_text argPtr1)
{-# LINE 315 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
          (toHTMLElement self))
         >>=
         maybePeek readUTFString)
 
getChildren ::
            (MonadIO m, HTMLElementClass self) =>
              self -> m (Maybe HTMLCollection)
getChildren self
  = liftIO
      (maybeNull (makeNewGObject mkHTMLCollection)
         ((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_children argPtr1)
{-# LINE 326 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
            (toHTMLElement self)))
 
setContentEditable ::
                   (MonadIO m, HTMLElementClass self, GlibString string) =>
                     self -> (Maybe string) -> m ()
setContentEditable self val
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           maybeWith withUTFString val $
             \ valPtr ->
               (\(HTMLElement arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_content_editable argPtr1 arg2 arg3)
{-# LINE 338 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
                 (toHTMLElement self)
                 valPtr
             errorPtr_)
 
getContentEditable ::
                   (MonadIO m, HTMLElementClass self, GlibString string) =>
                     self -> m (Maybe string)
getContentEditable self
  = liftIO
      (((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_content_editable argPtr1)
{-# LINE 348 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
          (toHTMLElement self))
         >>=
         maybePeek readUTFString)
 
getIsContentEditable ::
                     (MonadIO m, HTMLElementClass self) => self -> m Bool
getIsContentEditable self
  = liftIO
      (toBool <$>
         ((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_is_content_editable argPtr1)
{-# LINE 358 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
            (toHTMLElement self)))
 
setSpellcheck ::
              (MonadIO m, HTMLElementClass self) => self -> Bool -> m ()
setSpellcheck self val
  = liftIO
      ((\(HTMLElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_spellcheck argPtr1 arg2)
{-# LINE 365 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
         (toHTMLElement self)
         (fromBool val))
 
getSpellcheck ::
              (MonadIO m, HTMLElementClass self) => self -> m Bool
getSpellcheck self
  = liftIO
      (toBool <$>
         ((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_spellcheck argPtr1)
{-# LINE 374 "./Graphics/UI/Gtk/WebKit/DOM/HTMLElement.chs" #-}
            (toHTMLElement self)))

foreign import ccall safe "webkit_dom_html_element_insert_adjacent_element"
  webkit_dom_html_element_insert_adjacent_element :: ((Ptr HTMLElement) -> ((Ptr CChar) -> ((Ptr Element) -> ((Ptr (Ptr ())) -> (IO (Ptr Element))))))

foreign import ccall safe "webkit_dom_html_element_insert_adjacent_html"
  webkit_dom_html_element_insert_adjacent_html :: ((Ptr HTMLElement) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ())))))

foreign import ccall safe "webkit_dom_html_element_insert_adjacent_text"
  webkit_dom_html_element_insert_adjacent_text :: ((Ptr HTMLElement) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ())))))

foreign import ccall safe "webkit_dom_html_element_click"
  webkit_dom_html_element_click :: ((Ptr HTMLElement) -> (IO ()))

foreign import ccall safe "webkit_dom_html_element_set_title"
  webkit_dom_html_element_set_title :: ((Ptr HTMLElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_title"
  webkit_dom_html_element_get_title :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_element_set_lang"
  webkit_dom_html_element_set_lang :: ((Ptr HTMLElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_lang"
  webkit_dom_html_element_get_lang :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_element_set_translate"
  webkit_dom_html_element_set_translate :: ((Ptr HTMLElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_translate"
  webkit_dom_html_element_get_translate :: ((Ptr HTMLElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_element_set_dir"
  webkit_dom_html_element_set_dir :: ((Ptr HTMLElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_dir"
  webkit_dom_html_element_get_dir :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_element_set_tab_index"
  webkit_dom_html_element_set_tab_index :: ((Ptr HTMLElement) -> (CLong -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_tab_index"
  webkit_dom_html_element_get_tab_index :: ((Ptr HTMLElement) -> (IO CLong))

foreign import ccall safe "webkit_dom_html_element_set_draggable"
  webkit_dom_html_element_set_draggable :: ((Ptr HTMLElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_draggable"
  webkit_dom_html_element_get_draggable :: ((Ptr HTMLElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_element_set_webkitdropzone"
  webkit_dom_html_element_set_webkitdropzone :: ((Ptr HTMLElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_webkitdropzone"
  webkit_dom_html_element_get_webkitdropzone :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_element_set_hidden"
  webkit_dom_html_element_set_hidden :: ((Ptr HTMLElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_hidden"
  webkit_dom_html_element_get_hidden :: ((Ptr HTMLElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_element_set_access_key"
  webkit_dom_html_element_set_access_key :: ((Ptr HTMLElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_access_key"
  webkit_dom_html_element_get_access_key :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_element_set_inner_text"
  webkit_dom_html_element_set_inner_text :: ((Ptr HTMLElement) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_html_element_get_inner_text"
  webkit_dom_html_element_get_inner_text :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_element_set_outer_text"
  webkit_dom_html_element_set_outer_text :: ((Ptr HTMLElement) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_html_element_get_outer_text"
  webkit_dom_html_element_get_outer_text :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_element_get_children"
  webkit_dom_html_element_get_children :: ((Ptr HTMLElement) -> (IO (Ptr HTMLCollection)))

foreign import ccall safe "webkit_dom_html_element_set_content_editable"
  webkit_dom_html_element_set_content_editable :: ((Ptr HTMLElement) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_html_element_get_content_editable"
  webkit_dom_html_element_get_content_editable :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_element_get_is_content_editable"
  webkit_dom_html_element_get_is_content_editable :: ((Ptr HTMLElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_element_set_spellcheck"
  webkit_dom_html_element_set_spellcheck :: ((Ptr HTMLElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_element_get_spellcheck"
  webkit_dom_html_element_get_spellcheck :: ((Ptr HTMLElement) -> (IO CInt))