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
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)
(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)
(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)
(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)
(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))