module Graphics.UI.Gtk.WebKit.DOM.TextTrack(
removeCue,
getId,
getLabel,
setMode,
getMode,
getCues,
getActiveCues,
cueChange,
TextTrack,
castToTextTrack,
gTypeTextTrack,
TextTrackClass,
toTextTrack,
) 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
removeCue ::
(MonadIO m, TextTrackClass self, TextTrackCueClass cue) =>
self -> Maybe cue -> m ()
removeCue self cue
= liftIO
(propagateGError $
\ errorPtr_ ->
(\(TextTrack arg1) (TextTrackCue arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_dom_text_track_remove_cue argPtr1 argPtr2 arg3) (toTextTrack self)
(maybe (TextTrackCue nullForeignPtr) toTextTrackCue cue)
errorPtr_)
getId ::
(MonadIO m, TextTrackClass self, GlibString string) =>
self -> m string
getId self
= liftIO
(((\(TextTrack arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_get_id argPtr1) (toTextTrack self)) >>=
readUTFString)
getLabel ::
(MonadIO m, TextTrackClass self, GlibString string) =>
self -> m string
getLabel self
= liftIO
(((\(TextTrack arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_get_label argPtr1) (toTextTrack self))
>>=
readUTFString)
setMode ::
(MonadIO m, TextTrackClass self) => self -> TextTrackMode -> m ()
setMode self val
= liftIO
(withUTFString (enumToString val) $
\ valPtr ->
(\(TextTrack arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_set_mode argPtr1 arg2) (toTextTrack self)
valPtr)
getMode ::
(MonadIO m, TextTrackClass self) => self -> m TextTrackMode
getMode self
= liftIO
(stringToEnum <$>
(((\(TextTrack arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_get_mode argPtr1) (toTextTrack self)) >>=
readUTFString))
getCues ::
(MonadIO m, TextTrackClass self) =>
self -> m (Maybe TextTrackCueList)
getCues self
= liftIO
(maybeNull (makeNewGObject mkTextTrackCueList)
((\(TextTrack arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_get_cues argPtr1) (toTextTrack self)))
getActiveCues ::
(MonadIO m, TextTrackClass self) =>
self -> m (Maybe TextTrackCueList)
getActiveCues self
= liftIO
(maybeNull (makeNewGObject mkTextTrackCueList)
((\(TextTrack arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_get_active_cues argPtr1)
(toTextTrack self)))
cueChange :: (TextTrackClass self) => EventName self Event
cueChange = EventName "cuechange"
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrack.h webkit_dom_text_track_remove_cue"
webkit_dom_text_track_remove_cue :: ((Ptr TextTrack) -> ((Ptr TextTrackCue) -> ((Ptr (Ptr ())) -> (IO ()))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrack.h webkit_dom_text_track_get_id"
webkit_dom_text_track_get_id :: ((Ptr TextTrack) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrack.h webkit_dom_text_track_get_label"
webkit_dom_text_track_get_label :: ((Ptr TextTrack) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrack.h webkit_dom_text_track_set_mode"
webkit_dom_text_track_set_mode :: ((Ptr TextTrack) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrack.h webkit_dom_text_track_get_mode"
webkit_dom_text_track_get_mode :: ((Ptr TextTrack) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrack.h webkit_dom_text_track_get_cues"
webkit_dom_text_track_get_cues :: ((Ptr TextTrack) -> (IO (Ptr TextTrackCueList)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrack.h webkit_dom_text_track_get_active_cues"
webkit_dom_text_track_get_active_cues :: ((Ptr TextTrack) -> (IO (Ptr TextTrackCueList)))