-- 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/CharacterData.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.CharacterData
       (characterDataSubstringData, characterDataAppendData,
        characterDataInsertData, characterDataDeleteData,
        characterDataReplaceData, characterDataSetData,
        characterDataGetData, characterDataGetLength,
        CharacterData, CharacterDataClass,
        castToCharacterData, gTypeCharacterData, toCharacterData)
       where
import System.Glib.FFI
import System.Glib.UTFString
import Control.Applicative
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 12 "./Graphics/UI/Gtk/WebKit/DOM/CharacterData.chs" #-}
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventM
 
characterDataSubstringData ::
                           (CharacterDataClass self, GlibString string) =>
                             self -> Word -> Word -> IO string
characterDataSubstringData self offset length
  = (propagateGError $
       \ errorPtr_ ->
         (\(CharacterData arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_character_data_substring_data argPtr1 arg2 arg3 arg4)
{-# LINE 22 "./Graphics/UI/Gtk/WebKit/DOM/CharacterData.chs" #-}
           (toCharacterData self)
           (fromIntegral offset)
           (fromIntegral length)
           errorPtr_)
      >>=
      readUTFString
 
characterDataAppendData ::
                        (CharacterDataClass self, GlibString string) =>
                          self -> string -> IO ()
characterDataAppendData self data'
  = propagateGError $
      \ errorPtr_ ->
        withUTFString data' $
          \ dataPtr ->
            (\(CharacterData arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_character_data_append_data argPtr1 arg2 arg3)
{-# LINE 38 "./Graphics/UI/Gtk/WebKit/DOM/CharacterData.chs" #-}
              (toCharacterData self)
              dataPtr
          errorPtr_
 
characterDataInsertData ::
                        (CharacterDataClass self, GlibString string) =>
                          self -> Word -> string -> IO ()
characterDataInsertData self offset data'
  = propagateGError $
      \ errorPtr_ ->
        withUTFString data' $
          \ dataPtr ->
            (\(CharacterData arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_character_data_insert_data argPtr1 arg2 arg3 arg4)
{-# LINE 51 "./Graphics/UI/Gtk/WebKit/DOM/CharacterData.chs" #-}
              (toCharacterData self)
              (fromIntegral offset)
              dataPtr
          errorPtr_
 
characterDataDeleteData ::
                        (CharacterDataClass self) => self -> Word -> Word -> IO ()
characterDataDeleteData self offset length
  = propagateGError $
      \ errorPtr_ ->
        (\(CharacterData arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_character_data_delete_data argPtr1 arg2 arg3 arg4)
{-# LINE 62 "./Graphics/UI/Gtk/WebKit/DOM/CharacterData.chs" #-}
          (toCharacterData self)
          (fromIntegral offset)
          (fromIntegral length)
          errorPtr_
 
characterDataReplaceData ::
                         (CharacterDataClass self, GlibString string) =>
                           self -> Word -> Word -> string -> IO ()
characterDataReplaceData self offset length data'
  = propagateGError $
      \ errorPtr_ ->
        withUTFString data' $
          \ dataPtr ->
            (\(CharacterData arg1) arg2 arg3 arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_character_data_replace_data argPtr1 arg2 arg3 arg4 arg5)
{-# LINE 76 "./Graphics/UI/Gtk/WebKit/DOM/CharacterData.chs" #-}
              (toCharacterData self)
              (fromIntegral offset)
              (fromIntegral length)
              dataPtr
          errorPtr_
 
characterDataSetData ::
                     (CharacterDataClass self, GlibString string) =>
                       self -> string -> IO ()
characterDataSetData self val
  = propagateGError $
      \ errorPtr_ ->
        withUTFString val $
          \ valPtr ->
            (\(CharacterData arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_character_data_set_data argPtr1 arg2 arg3)
{-# LINE 91 "./Graphics/UI/Gtk/WebKit/DOM/CharacterData.chs" #-}
              (toCharacterData self)
              valPtr
          errorPtr_
 
characterDataGetData ::
                     (CharacterDataClass self, GlibString string) => self -> IO string
characterDataGetData self
  = ((\(CharacterData arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_character_data_get_data argPtr1)
{-# LINE 99 "./Graphics/UI/Gtk/WebKit/DOM/CharacterData.chs" #-}
       (toCharacterData self))
      >>=
      readUTFString
 
characterDataGetLength ::
                       (CharacterDataClass self) => self -> IO Word
characterDataGetLength self
  = fromIntegral <$>
      ((\(CharacterData arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_character_data_get_length argPtr1)
{-# LINE 108 "./Graphics/UI/Gtk/WebKit/DOM/CharacterData.chs" #-}
         (toCharacterData self))

foreign import ccall safe "webkit_dom_character_data_substring_data"
  webkit_dom_character_data_substring_data :: ((Ptr CharacterData) -> (CULong -> (CULong -> ((Ptr (Ptr ())) -> (IO (Ptr CChar))))))

foreign import ccall safe "webkit_dom_character_data_append_data"
  webkit_dom_character_data_append_data :: ((Ptr CharacterData) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_character_data_insert_data"
  webkit_dom_character_data_insert_data :: ((Ptr CharacterData) -> (CULong -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ())))))

foreign import ccall safe "webkit_dom_character_data_delete_data"
  webkit_dom_character_data_delete_data :: ((Ptr CharacterData) -> (CULong -> (CULong -> ((Ptr (Ptr ())) -> (IO ())))))

foreign import ccall safe "webkit_dom_character_data_replace_data"
  webkit_dom_character_data_replace_data :: ((Ptr CharacterData) -> (CULong -> (CULong -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))))

foreign import ccall safe "webkit_dom_character_data_set_data"
  webkit_dom_character_data_set_data :: ((Ptr CharacterData) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_character_data_get_data"
  webkit_dom_character_data_get_data :: ((Ptr CharacterData) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_character_data_get_length"
  webkit_dom_character_data_get_length :: ((Ptr CharacterData) -> (IO CULong))