-- 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/CSSRule.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.CSSRule
       (cUNKNOWN_RULE, cSTYLE_RULE, cCHARSET_RULE, cIMPORT_RULE,
        cMEDIA_RULE, cFONT_FACE_RULE, cPAGE_RULE, cWEBKIT_KEYFRAMES_RULE,
        cWEBKIT_KEYFRAME_RULE, cssRuleSetCssText, cssRuleGetCssText,
        cssRuleGetParentStyleSheet, cssRuleGetParentRule, CSSRule,
        CSSRuleClass, castToCSSRule, gTypeCSSRule, toCSSRule)
       where
import System.Glib.FFI
import System.Glib.UTFString
import Control.Applicative
import Graphics.UI.Gtk.WebKit.Types
{-# LINE 11 "./Graphics/UI/Gtk/WebKit/DOM/CSSRule.chs" #-}
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventM
cUNKNOWN_RULE = 0
cSTYLE_RULE = 1
cCHARSET_RULE = 2
cIMPORT_RULE = 3
cMEDIA_RULE = 4
cFONT_FACE_RULE = 5
cPAGE_RULE = 6
cWEBKIT_KEYFRAMES_RULE = 7
cWEBKIT_KEYFRAME_RULE = 8
 
cssRuleSetCssText ::
                  (CSSRuleClass self, GlibString string) => self -> string -> IO ()
cssRuleSetCssText self val
  = propagateGError $
      \ errorPtr_ ->
        withUTFString val $
          \ valPtr ->
            (\(CSSRule arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_rule_set_css_text argPtr1 arg2 arg3) (toCSSRule self) valPtr
          errorPtr_
 
cssRuleGetCssText ::
                  (CSSRuleClass self, GlibString string) => self -> IO string
cssRuleGetCssText self
  = ((\(CSSRule arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_rule_get_css_text argPtr1) (toCSSRule self))
      >>=
      readUTFString
 
cssRuleGetParentStyleSheet ::
                           (CSSRuleClass self) => self -> IO (Maybe CSSStyleSheet)
cssRuleGetParentStyleSheet self
  = maybeNull (makeNewGObject mkCSSStyleSheet)
      ((\(CSSRule arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_rule_get_parent_style_sheet argPtr1)
{-# LINE 45 "./Graphics/UI/Gtk/WebKit/DOM/CSSRule.chs" #-}
         (toCSSRule self))
 
cssRuleGetParentRule ::
                     (CSSRuleClass self) => self -> IO (Maybe CSSRule)
cssRuleGetParentRule self
  = maybeNull (makeNewGObject mkCSSRule)
      ((\(CSSRule arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_rule_get_parent_rule argPtr1) (toCSSRule self))

foreign import ccall safe "webkit_dom_css_rule_set_css_text"
  webkit_dom_css_rule_set_css_text :: ((Ptr CSSRule) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_css_rule_get_css_text"
  webkit_dom_css_rule_get_css_text :: ((Ptr CSSRule) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_css_rule_get_parent_style_sheet"
  webkit_dom_css_rule_get_parent_style_sheet :: ((Ptr CSSRule) -> (IO (Ptr CSSStyleSheet)))

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