-- 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/TextTrackCue.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.TextTrackCue(
getTrack,
setId,
getId,
setStartTime,
getStartTime,
setEndTime,
getEndTime,
setPauseOnExit,
getPauseOnExit,
enter,
exit,
TextTrackCue,
castToTextTrackCue,
gTypeTextTrackCue,
TextTrackCueClass,
toTextTrackCue,
) 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 33 "./Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
getTrack ::
         (MonadIO m, TextTrackCueClass self) => self -> m (Maybe TextTrack)
getTrack self
  = liftIO
      (maybeNull (makeNewGObject mkTextTrack)
         ((\(TextTrackCue arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_cue_get_track argPtr1)
{-# LINE 42 "./Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.chs" #-}
            (toTextTrackCue self)))
 
setId ::
      (MonadIO m, TextTrackCueClass self, GlibString string) =>
        self -> string -> m ()
setId self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(TextTrackCue arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_cue_set_id argPtr1 arg2) (toTextTrackCue self)
             valPtr)
 
getId ::
      (MonadIO m, TextTrackCueClass self, GlibString string) =>
        self -> m string
getId self
  = liftIO
      (((\(TextTrackCue arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_cue_get_id argPtr1)
{-# LINE 60 "./Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.chs" #-}
          (toTextTrackCue self))
         >>=
         readUTFString)
 
setStartTime ::
             (MonadIO m, TextTrackCueClass self) => self -> Double -> m ()
setStartTime self val
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           (\(TextTrackCue arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_cue_set_start_time argPtr1 arg2 arg3)
{-# LINE 71 "./Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.chs" #-}
             (toTextTrackCue self)
             (realToFrac val)
             errorPtr_)
 
getStartTime ::
             (MonadIO m, TextTrackCueClass self) => self -> m Double
getStartTime self
  = liftIO
      (realToFrac <$>
         ((\(TextTrackCue arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_cue_get_start_time argPtr1)
{-# LINE 81 "./Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.chs" #-}
            (toTextTrackCue self)))
 
setEndTime ::
           (MonadIO m, TextTrackCueClass self) => self -> Double -> m ()
setEndTime self val
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           (\(TextTrackCue arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_cue_set_end_time argPtr1 arg2 arg3)
{-# LINE 90 "./Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.chs" #-}
             (toTextTrackCue self)
             (realToFrac val)
             errorPtr_)
 
getEndTime ::
           (MonadIO m, TextTrackCueClass self) => self -> m Double
getEndTime self
  = liftIO
      (realToFrac <$>
         ((\(TextTrackCue arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_cue_get_end_time argPtr1)
{-# LINE 100 "./Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.chs" #-}
            (toTextTrackCue self)))
 
setPauseOnExit ::
               (MonadIO m, TextTrackCueClass self) => self -> Bool -> m ()
setPauseOnExit self val
  = liftIO
      ((\(TextTrackCue arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_cue_set_pause_on_exit argPtr1 arg2)
{-# LINE 107 "./Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.chs" #-}
         (toTextTrackCue self)
         (fromBool val))
 
getPauseOnExit ::
               (MonadIO m, TextTrackCueClass self) => self -> m Bool
getPauseOnExit self
  = liftIO
      (toBool <$>
         ((\(TextTrackCue arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_text_track_cue_get_pause_on_exit argPtr1)
{-# LINE 116 "./Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.chs" #-}
            (toTextTrackCue self)))
 
enter :: (TextTrackCueClass self) => EventName self Event
enter = EventName "enter"
 
exit :: (TextTrackCueClass self) => EventName self Event
exit = EventName "exit"

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.h webkit_dom_text_track_cue_get_track"
  webkit_dom_text_track_cue_get_track :: ((Ptr TextTrackCue) -> (IO (Ptr TextTrack)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.h webkit_dom_text_track_cue_set_id"
  webkit_dom_text_track_cue_set_id :: ((Ptr TextTrackCue) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.h webkit_dom_text_track_cue_get_id"
  webkit_dom_text_track_cue_get_id :: ((Ptr TextTrackCue) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.h webkit_dom_text_track_cue_set_start_time"
  webkit_dom_text_track_cue_set_start_time :: ((Ptr TextTrackCue) -> (CDouble -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.h webkit_dom_text_track_cue_get_start_time"
  webkit_dom_text_track_cue_get_start_time :: ((Ptr TextTrackCue) -> (IO CDouble))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.h webkit_dom_text_track_cue_set_end_time"
  webkit_dom_text_track_cue_set_end_time :: ((Ptr TextTrackCue) -> (CDouble -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.h webkit_dom_text_track_cue_get_end_time"
  webkit_dom_text_track_cue_get_end_time :: ((Ptr TextTrackCue) -> (IO CDouble))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.h webkit_dom_text_track_cue_set_pause_on_exit"
  webkit_dom_text_track_cue_set_pause_on_exit :: ((Ptr TextTrackCue) -> (CInt -> (IO ())))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/TextTrackCue.h webkit_dom_text_track_cue_get_pause_on_exit"
  webkit_dom_text_track_cue_get_pause_on_exit :: ((Ptr TextTrackCue) -> (IO CInt))