-- 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/ApplicationCache.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.ApplicationCache(
update,
swapCache,
abort,
pattern UNCACHED,
pattern IDLE,
pattern CHECKING,
pattern DOWNLOADING,
pattern UPDATEREADY,
pattern OBSOLETE,
getStatus,
checking,
error,
noUpdate,
downloading,
progress,
updateReady,
cached,
obsolete,
ApplicationCache,
castToApplicationCache,
gTypeApplicationCache,
ApplicationCacheClass,
toApplicationCache,
) 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 37 "./Graphics/UI/Gtk/WebKit/DOM/ApplicationCache.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
update :: (MonadIO m, ApplicationCacheClass self) => self -> m ()
update self
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           (\(ApplicationCache arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_dom_application_cache_update argPtr1 arg2)
{-# LINE 46 "./Graphics/UI/Gtk/WebKit/DOM/ApplicationCache.chs" #-}
             (toApplicationCache self)
             errorPtr_)
 
swapCache ::
          (MonadIO m, ApplicationCacheClass self) => self -> m ()
swapCache self
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           (\(ApplicationCache arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_dom_application_cache_swap_cache argPtr1 arg2)
{-# LINE 56 "./Graphics/UI/Gtk/WebKit/DOM/ApplicationCache.chs" #-}
             (toApplicationCache self)
             errorPtr_)
 
abort :: (MonadIO m, ApplicationCacheClass self) => self -> m ()
abort self
  = liftIO
      ((\(ApplicationCache arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_dom_application_cache_abort argPtr1)
{-# LINE 63 "./Graphics/UI/Gtk/WebKit/DOM/ApplicationCache.chs" #-}
         (toApplicationCache self))
pattern UNCACHED = 0
pattern IDLE = 1
pattern CHECKING = 2
pattern DOWNLOADING = 3
pattern UPDATEREADY = 4
pattern OBSOLETE = 5
 
getStatus ::
          (MonadIO m, ApplicationCacheClass self) => self -> m Word
getStatus self
  = liftIO
      (fromIntegral <$>
         ((\(ApplicationCache arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_dom_application_cache_get_status argPtr1)
{-# LINE 77 "./Graphics/UI/Gtk/WebKit/DOM/ApplicationCache.chs" #-}
            (toApplicationCache self)))
 
checking :: (ApplicationCacheClass self) => EventName self Event
checking = EventName "checking"
 
error :: (ApplicationCacheClass self) => EventName self UIEvent
error = EventName "error"
 
noUpdate :: (ApplicationCacheClass self) => EventName self Event
noUpdate = EventName "noupdate"
 
downloading :: (ApplicationCacheClass self) => EventName self Event
downloading = EventName "downloading"
 
progress :: (ApplicationCacheClass self) => EventName self Event
progress = EventName "progress"
 
updateReady :: (ApplicationCacheClass self) => EventName self Event
updateReady = EventName "updateready"
 
cached :: (ApplicationCacheClass self) => EventName self Event
cached = EventName "cached"
 
obsolete :: (ApplicationCacheClass self) => EventName self Event
obsolete = EventName "obsolete"

foreign import ccall safe "webkit_dom_dom_application_cache_update"
  webkit_dom_dom_application_cache_update :: ((Ptr ApplicationCache) -> ((Ptr (Ptr ())) -> (IO ())))

foreign import ccall safe "webkit_dom_dom_application_cache_swap_cache"
  webkit_dom_dom_application_cache_swap_cache :: ((Ptr ApplicationCache) -> ((Ptr (Ptr ())) -> (IO ())))

foreign import ccall safe "webkit_dom_dom_application_cache_abort"
  webkit_dom_dom_application_cache_abort :: ((Ptr ApplicationCache) -> (IO ()))

foreign import ccall safe "webkit_dom_dom_application_cache_get_status"
  webkit_dom_dom_application_cache_get_status :: ((Ptr ApplicationCache) -> (IO CUShort))