-- 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/HTMLDocument.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.HTMLDocument(
close,
clear,
captureEvents,
releaseEvents,
getEmbeds,
getPlugins,
getScripts,
getWidth,
getHeight,
setDir,
getDir,
setDesignMode,
getDesignMode,
getCompatMode,
setBgColor,
getBgColor,
setFgColor,
getFgColor,
setAlinkColor,
getAlinkColor,
setLinkColor,
getLinkColor,
setVlinkColor,
getVlinkColor,
HTMLDocument,
castToHTMLDocument,
gTypeHTMLDocument,
HTMLDocumentClass,
toHTMLDocument,
) 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 43 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
close :: (MonadIO m, HTMLDocumentClass self) => self -> m ()
close self
  = liftIO
      ((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_close argPtr1) (toHTMLDocument self))
 
clear :: (MonadIO m, HTMLDocumentClass self) => self -> m ()
clear self
  = liftIO
      ((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_clear argPtr1) (toHTMLDocument self))
 
captureEvents ::
              (MonadIO m, HTMLDocumentClass self) => self -> m ()
captureEvents self
  = liftIO
      ((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_capture_events argPtr1)
{-# LINE 61 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
         (toHTMLDocument self))
 
releaseEvents ::
              (MonadIO m, HTMLDocumentClass self) => self -> m ()
releaseEvents self
  = liftIO
      ((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_release_events argPtr1)
{-# LINE 68 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
         (toHTMLDocument self))
 
getEmbeds ::
          (MonadIO m, HTMLDocumentClass self) =>
            self -> m (Maybe HTMLCollection)
getEmbeds self
  = liftIO
      (maybeNull (makeNewGObject mkHTMLCollection)
         ((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_embeds argPtr1)
{-# LINE 77 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
            (toHTMLDocument self)))
 
getPlugins ::
           (MonadIO m, HTMLDocumentClass self) =>
             self -> m (Maybe HTMLCollection)
getPlugins self
  = liftIO
      (maybeNull (makeNewGObject mkHTMLCollection)
         ((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_plugins argPtr1)
{-# LINE 86 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
            (toHTMLDocument self)))
 
getScripts ::
           (MonadIO m, HTMLDocumentClass self) =>
             self -> m (Maybe HTMLCollection)
getScripts self
  = liftIO
      (maybeNull (makeNewGObject mkHTMLCollection)
         ((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_scripts argPtr1)
{-# LINE 95 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
            (toHTMLDocument self)))
 
getWidth :: (MonadIO m, HTMLDocumentClass self) => self -> m Int
getWidth self
  = liftIO
      (fromIntegral <$>
         ((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_width argPtr1)
{-# LINE 102 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
            (toHTMLDocument self)))
 
getHeight :: (MonadIO m, HTMLDocumentClass self) => self -> m Int
getHeight self
  = liftIO
      (fromIntegral <$>
         ((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_height argPtr1)
{-# LINE 109 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
            (toHTMLDocument self)))
 
setDir ::
       (MonadIO m, HTMLDocumentClass self, GlibString string) =>
         self -> (Maybe string) -> m ()
setDir self val
  = liftIO
      (maybeWith withUTFString val $
         \ valPtr ->
           (\(HTMLDocument arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_set_dir argPtr1 arg2) (toHTMLDocument self)
             valPtr)
 
getDir ::
       (MonadIO m, HTMLDocumentClass self, GlibString string) =>
         self -> m (Maybe string)
getDir self
  = liftIO
      (((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_dir argPtr1)
{-# LINE 127 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
          (toHTMLDocument self))
         >>=
         maybePeek readUTFString)
 
setDesignMode ::
              (MonadIO m, HTMLDocumentClass self, GlibString string) =>
                self -> (Maybe string) -> m ()
setDesignMode self val
  = liftIO
      (maybeWith withUTFString val $
         \ valPtr ->
           (\(HTMLDocument arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_set_design_mode argPtr1 arg2)
{-# LINE 139 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
             (toHTMLDocument self)
             valPtr)
 
getDesignMode ::
              (MonadIO m, HTMLDocumentClass self, GlibString string) =>
                self -> m (Maybe string)
getDesignMode self
  = liftIO
      (((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_design_mode argPtr1)
{-# LINE 148 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
          (toHTMLDocument self))
         >>=
         maybePeek readUTFString)
 
getCompatMode ::
              (MonadIO m, HTMLDocumentClass self, GlibString string) =>
                self -> m string
getCompatMode self
  = liftIO
      (((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_compat_mode argPtr1)
{-# LINE 158 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
          (toHTMLDocument self))
         >>=
         readUTFString)
 
setBgColor ::
           (MonadIO m, HTMLDocumentClass self, GlibString string) =>
             self -> (Maybe string) -> m ()
setBgColor self val
  = liftIO
      (maybeWith withUTFString val $
         \ valPtr ->
           (\(HTMLDocument arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_set_bg_color argPtr1 arg2)
{-# LINE 170 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
             (toHTMLDocument self)
             valPtr)
 
getBgColor ::
           (MonadIO m, HTMLDocumentClass self, GlibString string) =>
             self -> m (Maybe string)
getBgColor self
  = liftIO
      (((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_bg_color argPtr1)
{-# LINE 179 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
          (toHTMLDocument self))
         >>=
         maybePeek readUTFString)
 
setFgColor ::
           (MonadIO m, HTMLDocumentClass self, GlibString string) =>
             self -> (Maybe string) -> m ()
setFgColor self val
  = liftIO
      (maybeWith withUTFString val $
         \ valPtr ->
           (\(HTMLDocument arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_set_fg_color argPtr1 arg2)
{-# LINE 191 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
             (toHTMLDocument self)
             valPtr)
 
getFgColor ::
           (MonadIO m, HTMLDocumentClass self, GlibString string) =>
             self -> m (Maybe string)
getFgColor self
  = liftIO
      (((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_fg_color argPtr1)
{-# LINE 200 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
          (toHTMLDocument self))
         >>=
         maybePeek readUTFString)
 
setAlinkColor ::
              (MonadIO m, HTMLDocumentClass self, GlibString string) =>
                self -> (Maybe string) -> m ()
setAlinkColor self val
  = liftIO
      (maybeWith withUTFString val $
         \ valPtr ->
           (\(HTMLDocument arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_set_alink_color argPtr1 arg2)
{-# LINE 212 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
             (toHTMLDocument self)
             valPtr)
 
getAlinkColor ::
              (MonadIO m, HTMLDocumentClass self, GlibString string) =>
                self -> m (Maybe string)
getAlinkColor self
  = liftIO
      (((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_alink_color argPtr1)
{-# LINE 221 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
          (toHTMLDocument self))
         >>=
         maybePeek readUTFString)
 
setLinkColor ::
             (MonadIO m, HTMLDocumentClass self, GlibString string) =>
               self -> (Maybe string) -> m ()
setLinkColor self val
  = liftIO
      (maybeWith withUTFString val $
         \ valPtr ->
           (\(HTMLDocument arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_set_link_color argPtr1 arg2)
{-# LINE 233 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
             (toHTMLDocument self)
             valPtr)
 
getLinkColor ::
             (MonadIO m, HTMLDocumentClass self, GlibString string) =>
               self -> m (Maybe string)
getLinkColor self
  = liftIO
      (((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_link_color argPtr1)
{-# LINE 242 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
          (toHTMLDocument self))
         >>=
         maybePeek readUTFString)
 
setVlinkColor ::
              (MonadIO m, HTMLDocumentClass self, GlibString string) =>
                self -> (Maybe string) -> m ()
setVlinkColor self val
  = liftIO
      (maybeWith withUTFString val $
         \ valPtr ->
           (\(HTMLDocument arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_set_vlink_color argPtr1 arg2)
{-# LINE 254 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
             (toHTMLDocument self)
             valPtr)
 
getVlinkColor ::
              (MonadIO m, HTMLDocumentClass self, GlibString string) =>
                self -> m (Maybe string)
getVlinkColor self
  = liftIO
      (((\(HTMLDocument arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_document_get_vlink_color argPtr1)
{-# LINE 263 "./Graphics/UI/Gtk/WebKit/DOM/HTMLDocument.chs" #-}
          (toHTMLDocument self))
         >>=
         maybePeek readUTFString)

foreign import ccall safe "webkit_dom_html_document_close"
  webkit_dom_html_document_close :: ((Ptr HTMLDocument) -> (IO ()))

foreign import ccall safe "webkit_dom_html_document_clear"
  webkit_dom_html_document_clear :: ((Ptr HTMLDocument) -> (IO ()))

foreign import ccall safe "webkit_dom_html_document_capture_events"
  webkit_dom_html_document_capture_events :: ((Ptr HTMLDocument) -> (IO ()))

foreign import ccall safe "webkit_dom_html_document_release_events"
  webkit_dom_html_document_release_events :: ((Ptr HTMLDocument) -> (IO ()))

foreign import ccall safe "webkit_dom_html_document_get_embeds"
  webkit_dom_html_document_get_embeds :: ((Ptr HTMLDocument) -> (IO (Ptr HTMLCollection)))

foreign import ccall safe "webkit_dom_html_document_get_plugins"
  webkit_dom_html_document_get_plugins :: ((Ptr HTMLDocument) -> (IO (Ptr HTMLCollection)))

foreign import ccall safe "webkit_dom_html_document_get_scripts"
  webkit_dom_html_document_get_scripts :: ((Ptr HTMLDocument) -> (IO (Ptr HTMLCollection)))

foreign import ccall safe "webkit_dom_html_document_get_width"
  webkit_dom_html_document_get_width :: ((Ptr HTMLDocument) -> (IO CLong))

foreign import ccall safe "webkit_dom_html_document_get_height"
  webkit_dom_html_document_get_height :: ((Ptr HTMLDocument) -> (IO CLong))

foreign import ccall safe "webkit_dom_html_document_set_dir"
  webkit_dom_html_document_set_dir :: ((Ptr HTMLDocument) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_document_get_dir"
  webkit_dom_html_document_get_dir :: ((Ptr HTMLDocument) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_document_set_design_mode"
  webkit_dom_html_document_set_design_mode :: ((Ptr HTMLDocument) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_document_get_design_mode"
  webkit_dom_html_document_get_design_mode :: ((Ptr HTMLDocument) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_document_get_compat_mode"
  webkit_dom_html_document_get_compat_mode :: ((Ptr HTMLDocument) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_document_set_bg_color"
  webkit_dom_html_document_set_bg_color :: ((Ptr HTMLDocument) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_document_get_bg_color"
  webkit_dom_html_document_get_bg_color :: ((Ptr HTMLDocument) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_document_set_fg_color"
  webkit_dom_html_document_set_fg_color :: ((Ptr HTMLDocument) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_document_get_fg_color"
  webkit_dom_html_document_get_fg_color :: ((Ptr HTMLDocument) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_document_set_alink_color"
  webkit_dom_html_document_set_alink_color :: ((Ptr HTMLDocument) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_document_get_alink_color"
  webkit_dom_html_document_get_alink_color :: ((Ptr HTMLDocument) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_document_set_link_color"
  webkit_dom_html_document_set_link_color :: ((Ptr HTMLDocument) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_document_get_link_color"
  webkit_dom_html_document_get_link_color :: ((Ptr HTMLDocument) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_document_set_vlink_color"
  webkit_dom_html_document_set_vlink_color :: ((Ptr HTMLDocument) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_document_get_vlink_color"
  webkit_dom_html_document_get_vlink_color :: ((Ptr HTMLDocument) -> (IO (Ptr CChar)))