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


{-# LINE 1 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.CSSStyleDeclaration
       (cssStyleDeclarationGetPropertyValue,
        cssStyleDeclarationRemoveProperty,
        cssStyleDeclarationGetPropertyPriority,
        cssStyleDeclarationSetProperty, cssStyleDeclarationItem,
        cssStyleDeclarationGetPropertyShorthand,
        cssStyleDeclarationIsPropertyImplicit,
        cssStyleDeclarationSetCssText, cssStyleDeclarationGetCssText,
        cssStyleDeclarationGetLength, cssStyleDeclarationGetParentRule,
        CSSStyleDeclaration, CSSStyleDeclarationClass,
        castToCSSStyleDeclaration, gTypeCSSStyleDeclaration,
        toCSSStyleDeclaration)
       where
import System.Glib.FFI
import System.Glib.UTFString
import Control.Applicative
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 17 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventM
 
cssStyleDeclarationGetPropertyValue ::
                                    (CSSStyleDeclarationClass self) => self -> String -> IO String
cssStyleDeclarationGetPropertyValue self propertyName
  = (withUTFString propertyName $
       \ propertyNamePtr ->
         (\(CSSStyleDeclaration arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_get_property_value argPtr1 arg2)
{-# LINE 26 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
           (toCSSStyleDeclaration self)
           propertyNamePtr)
      >>=
      readUTFString
 
cssStyleDeclarationRemoveProperty ::
                                  (CSSStyleDeclarationClass self) => self -> String -> IO String
cssStyleDeclarationRemoveProperty self propertyName
  = (propagateGError $
       \ errorPtr_ ->
         withUTFString propertyName $
           \ propertyNamePtr ->
             (\(CSSStyleDeclaration arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_remove_property argPtr1 arg2 arg3)
{-# LINE 39 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
               (toCSSStyleDeclaration self)
               propertyNamePtr
           errorPtr_)
      >>=
      readUTFString
 
cssStyleDeclarationGetPropertyPriority ::
                                       (CSSStyleDeclarationClass self) =>
                                         self -> String -> IO String
cssStyleDeclarationGetPropertyPriority self propertyName
  = (withUTFString propertyName $
       \ propertyNamePtr ->
         (\(CSSStyleDeclaration arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_get_property_priority argPtr1 arg2)
{-# LINE 52 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
           (toCSSStyleDeclaration self)
           propertyNamePtr)
      >>=
      readUTFString
 
cssStyleDeclarationSetProperty ::
                               (CSSStyleDeclarationClass self) =>
                                 self -> String -> String -> String -> IO ()
cssStyleDeclarationSetProperty self propertyName value priority
  = propagateGError $
      \ errorPtr_ ->
        withUTFString priority $
          \ priorityPtr ->
            withUTFString value $
              \ valuePtr ->
                withUTFString propertyName $
                  \ propertyNamePtr ->
                    (\(CSSStyleDeclaration arg1) arg2 arg3 arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_set_property argPtr1 arg2 arg3 arg4 arg5)
{-# LINE 70 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
                      (toCSSStyleDeclaration self)
                      propertyNamePtr
                  valuePtr
              priorityPtr
          errorPtr_
 
cssStyleDeclarationItem ::
                        (CSSStyleDeclarationClass self) => self -> Word -> IO String
cssStyleDeclarationItem self index
  = ((\(CSSStyleDeclaration arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_item argPtr1 arg2)
{-# LINE 80 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
       (toCSSStyleDeclaration self)
       (fromIntegral index))
      >>=
      readUTFString
 
cssStyleDeclarationGetPropertyShorthand ::
                                        (CSSStyleDeclarationClass self) =>
                                          self -> String -> IO String
cssStyleDeclarationGetPropertyShorthand self propertyName
  = (withUTFString propertyName $
       \ propertyNamePtr ->
         (\(CSSStyleDeclaration arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_get_property_shorthand argPtr1 arg2)
{-# LINE 92 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
           (toCSSStyleDeclaration self)
           propertyNamePtr)
      >>=
      readUTFString
 
cssStyleDeclarationIsPropertyImplicit ::
                                      (CSSStyleDeclarationClass self) => self -> String -> IO Bool
cssStyleDeclarationIsPropertyImplicit self propertyName
  = toBool <$>
      (withUTFString propertyName $
         \ propertyNamePtr ->
           (\(CSSStyleDeclaration arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_is_property_implicit argPtr1 arg2)
{-# LINE 104 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
             (toCSSStyleDeclaration self)
             propertyNamePtr)
 
cssStyleDeclarationSetCssText ::
                              (CSSStyleDeclarationClass self) => self -> String -> IO ()
cssStyleDeclarationSetCssText self val
  = propagateGError $
      \ errorPtr_ ->
        withUTFString val $
          \ valPtr ->
            (\(CSSStyleDeclaration arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_set_css_text argPtr1 arg2 arg3)
{-# LINE 115 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
              (toCSSStyleDeclaration self)
              valPtr
          errorPtr_
 
cssStyleDeclarationGetCssText ::
                              (CSSStyleDeclarationClass self) => self -> IO String
cssStyleDeclarationGetCssText self
  = ((\(CSSStyleDeclaration arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_get_css_text argPtr1)
{-# LINE 123 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
       (toCSSStyleDeclaration self))
      >>=
      readUTFString
 
cssStyleDeclarationGetLength ::
                             (CSSStyleDeclarationClass self) => self -> IO Word
cssStyleDeclarationGetLength self
  = fromIntegral <$>
      ((\(CSSStyleDeclaration arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_get_length argPtr1)
{-# LINE 132 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
         (toCSSStyleDeclaration self))
 
cssStyleDeclarationGetParentRule ::
                                 (CSSStyleDeclarationClass self) => self -> IO (Maybe CSSRule)
cssStyleDeclarationGetParentRule self
  = maybeNull (makeNewGObject mkCSSRule)
      ((\(CSSStyleDeclaration arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_declaration_get_parent_rule argPtr1)
{-# LINE 139 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleDeclaration.chs" #-}
         (toCSSStyleDeclaration self))

foreign import ccall safe "webkit_dom_css_style_declaration_get_property_value"
  webkit_dom_css_style_declaration_get_property_value :: ((Ptr CSSStyleDeclaration) -> ((Ptr CChar) -> (IO (Ptr CChar))))

foreign import ccall safe "webkit_dom_css_style_declaration_remove_property"
  webkit_dom_css_style_declaration_remove_property :: ((Ptr CSSStyleDeclaration) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO (Ptr CChar)))))

foreign import ccall safe "webkit_dom_css_style_declaration_get_property_priority"
  webkit_dom_css_style_declaration_get_property_priority :: ((Ptr CSSStyleDeclaration) -> ((Ptr CChar) -> (IO (Ptr CChar))))

foreign import ccall safe "webkit_dom_css_style_declaration_set_property"
  webkit_dom_css_style_declaration_set_property :: ((Ptr CSSStyleDeclaration) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))))

foreign import ccall safe "webkit_dom_css_style_declaration_item"
  webkit_dom_css_style_declaration_item :: ((Ptr CSSStyleDeclaration) -> (CULong -> (IO (Ptr CChar))))

foreign import ccall safe "webkit_dom_css_style_declaration_get_property_shorthand"
  webkit_dom_css_style_declaration_get_property_shorthand :: ((Ptr CSSStyleDeclaration) -> ((Ptr CChar) -> (IO (Ptr CChar))))

foreign import ccall safe "webkit_dom_css_style_declaration_is_property_implicit"
  webkit_dom_css_style_declaration_is_property_implicit :: ((Ptr CSSStyleDeclaration) -> ((Ptr CChar) -> (IO CInt)))

foreign import ccall safe "webkit_dom_css_style_declaration_set_css_text"
  webkit_dom_css_style_declaration_set_css_text :: ((Ptr CSSStyleDeclaration) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_css_style_declaration_get_css_text"
  webkit_dom_css_style_declaration_get_css_text :: ((Ptr CSSStyleDeclaration) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_css_style_declaration_get_length"
  webkit_dom_css_style_declaration_get_length :: ((Ptr CSSStyleDeclaration) -> (IO CULong))

foreign import ccall safe "webkit_dom_css_style_declaration_get_parent_rule"
  webkit_dom_css_style_declaration_get_parent_rule :: ((Ptr CSSStyleDeclaration) -> (IO (Ptr CSSRule)))