-- GENERATED by C->Haskell Compiler, version 0.13.12 (gtk2hs branch) "Bin IO", 27 May 2012 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "./Graphics/UI/Gtk/WebKit/DOM/MediaList.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.MediaList
       (mediaListItem, mediaListDeleteMedium, mediaListAppendMedium,
        mediaListSetMediaText, mediaListGetMediaText, mediaListGetLength,
        MediaList, MediaListClass, castToMediaList, gTypeMediaList,
        toMediaList)
       where
import System.Glib.FFI
import System.Glib.UTFString
import Control.Applicative
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 10 "./Graphics/UI/Gtk/WebKit/DOM/MediaList.chs" #-}
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventM
 
mediaListItem ::
              (MediaListClass self, GlibString string) =>
                self -> Word -> IO string
mediaListItem self index
  = ((\(MediaList arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_media_list_item argPtr1 arg2) (toMediaList self)
       (fromIntegral index))
      >>=
      readUTFString
 
mediaListDeleteMedium ::
                      (MediaListClass self, GlibString string) => self -> string -> IO ()
mediaListDeleteMedium self oldMedium
  = propagateGError $
      \ errorPtr_ ->
        withUTFString oldMedium $
          \ oldMediumPtr ->
            (\(MediaList arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_media_list_delete_medium argPtr1 arg2 arg3) (toMediaList self)
              oldMediumPtr
          errorPtr_
 
mediaListAppendMedium ::
                      (MediaListClass self, GlibString string) => self -> string -> IO ()
mediaListAppendMedium self newMedium
  = propagateGError $
      \ errorPtr_ ->
        withUTFString newMedium $
          \ newMediumPtr ->
            (\(MediaList arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_media_list_append_medium argPtr1 arg2 arg3) (toMediaList self)
              newMediumPtr
          errorPtr_
 
mediaListSetMediaText ::
                      (MediaListClass self, GlibString string) => self -> string -> IO ()
mediaListSetMediaText self val
  = propagateGError $
      \ errorPtr_ ->
        withUTFString val $
          \ valPtr ->
            (\(MediaList arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_media_list_set_media_text argPtr1 arg2 arg3) (toMediaList self)
              valPtr
          errorPtr_
 
mediaListGetMediaText ::
                      (MediaListClass self, GlibString string) => self -> IO string
mediaListGetMediaText self
  = ((\(MediaList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_media_list_get_media_text argPtr1)
{-# LINE 59 "./Graphics/UI/Gtk/WebKit/DOM/MediaList.chs" #-}
       (toMediaList self))
      >>=
      readUTFString
 
mediaListGetLength :: (MediaListClass self) => self -> IO Word
mediaListGetLength self
  = fromIntegral <$>
      ((\(MediaList arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_media_list_get_length argPtr1) (toMediaList self))

foreign import ccall safe "webkit_dom_media_list_item"
  webkit_dom_media_list_item :: ((Ptr MediaList) -> (CULong -> (IO (Ptr CChar))))

foreign import ccall safe "webkit_dom_media_list_delete_medium"
  webkit_dom_media_list_delete_medium :: ((Ptr MediaList) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_media_list_append_medium"
  webkit_dom_media_list_append_medium :: ((Ptr MediaList) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_media_list_set_media_text"
  webkit_dom_media_list_set_media_text :: ((Ptr MediaList) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_media_list_get_media_text"
  webkit_dom_media_list_get_media_text :: ((Ptr MediaList) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_media_list_get_length"
  webkit_dom_media_list_get_length :: ((Ptr MediaList) -> (IO CULong))