-- 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/CSSStyleSheet.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.CSSStyleSheet
       (cssStyleSheetInsertRule, cssStyleSheetDeleteRule,
        cssStyleSheetAddRule, cssStyleSheetRemoveRule,
        cssStyleSheetGetOwnerRule, cssStyleSheetGetCssRules,
        cssStyleSheetGetRules, CSSStyleSheet, CSSStyleSheetClass,
        castToCSSStyleSheet, gTypeCSSStyleSheet, toCSSStyleSheet)
       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/CSSStyleSheet.chs" #-}
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventM
 
cssStyleSheetInsertRule ::
                        (CSSStyleSheetClass self, GlibString string) =>
                          self -> string -> Word -> IO Word
cssStyleSheetInsertRule self rule index
  = fromIntegral <$>
      (propagateGError $
         \ errorPtr_ ->
           withUTFString rule $
             \ rulePtr ->
               (\(CSSStyleSheet arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_sheet_insert_rule argPtr1 arg2 arg3 arg4)
{-# LINE 24 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleSheet.chs" #-}
                 (toCSSStyleSheet self)
                 rulePtr
             (fromIntegral index)
             errorPtr_)
 
cssStyleSheetDeleteRule ::
                        (CSSStyleSheetClass self) => self -> Word -> IO ()
cssStyleSheetDeleteRule self index
  = propagateGError $
      \ errorPtr_ ->
        (\(CSSStyleSheet arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_sheet_delete_rule argPtr1 arg2 arg3)
{-# LINE 35 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleSheet.chs" #-}
          (toCSSStyleSheet self)
          (fromIntegral index)
          errorPtr_
 
cssStyleSheetAddRule ::
                     (CSSStyleSheetClass self, GlibString string) =>
                       self -> string -> string -> Word -> IO Int
cssStyleSheetAddRule self selector style index
  = fromIntegral <$>
      (propagateGError $
         \ errorPtr_ ->
           withUTFString style $
             \ stylePtr ->
               withUTFString selector $
                 \ selectorPtr ->
                   (\(CSSStyleSheet arg1) arg2 arg3 arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_sheet_add_rule argPtr1 arg2 arg3 arg4 arg5)
{-# LINE 51 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleSheet.chs" #-}
                     (toCSSStyleSheet self)
                     selectorPtr
                 stylePtr
             (fromIntegral index)
             errorPtr_)
 
cssStyleSheetRemoveRule ::
                        (CSSStyleSheetClass self) => self -> Word -> IO ()
cssStyleSheetRemoveRule self index
  = propagateGError $
      \ errorPtr_ ->
        (\(CSSStyleSheet arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_sheet_remove_rule argPtr1 arg2 arg3)
{-# LINE 63 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleSheet.chs" #-}
          (toCSSStyleSheet self)
          (fromIntegral index)
          errorPtr_
 
cssStyleSheetGetOwnerRule ::
                          (CSSStyleSheetClass self) => self -> IO (Maybe CSSRule)
cssStyleSheetGetOwnerRule self
  = maybeNull (makeNewGObject mkCSSRule)
      ((\(CSSStyleSheet arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_sheet_get_owner_rule argPtr1)
{-# LINE 72 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleSheet.chs" #-}
         (toCSSStyleSheet self))
 
cssStyleSheetGetCssRules ::
                         (CSSStyleSheetClass self) => self -> IO (Maybe CSSRuleList)
cssStyleSheetGetCssRules self
  = maybeNull (makeNewGObject mkCSSRuleList)
      ((\(CSSStyleSheet arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_sheet_get_css_rules argPtr1)
{-# LINE 79 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleSheet.chs" #-}
         (toCSSStyleSheet self))
 
cssStyleSheetGetRules ::
                      (CSSStyleSheetClass self) => self -> IO (Maybe CSSRuleList)
cssStyleSheetGetRules self
  = maybeNull (makeNewGObject mkCSSRuleList)
      ((\(CSSStyleSheet arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_css_style_sheet_get_rules argPtr1)
{-# LINE 86 "./Graphics/UI/Gtk/WebKit/DOM/CSSStyleSheet.chs" #-}
         (toCSSStyleSheet self))

foreign import ccall safe "webkit_dom_css_style_sheet_insert_rule"
  webkit_dom_css_style_sheet_insert_rule :: ((Ptr CSSStyleSheet) -> ((Ptr CChar) -> (CULong -> ((Ptr (Ptr ())) -> (IO CULong)))))

foreign import ccall safe "webkit_dom_css_style_sheet_delete_rule"
  webkit_dom_css_style_sheet_delete_rule :: ((Ptr CSSStyleSheet) -> (CULong -> ((Ptr (Ptr ())) -> (IO ()))))

foreign import ccall safe "webkit_dom_css_style_sheet_add_rule"
  webkit_dom_css_style_sheet_add_rule :: ((Ptr CSSStyleSheet) -> ((Ptr CChar) -> ((Ptr CChar) -> (CULong -> ((Ptr (Ptr ())) -> (IO CLong))))))

foreign import ccall safe "webkit_dom_css_style_sheet_remove_rule"
  webkit_dom_css_style_sheet_remove_rule :: ((Ptr CSSStyleSheet) -> (CULong -> ((Ptr (Ptr ())) -> (IO ()))))

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

foreign import ccall safe "webkit_dom_css_style_sheet_get_css_rules"
  webkit_dom_css_style_sheet_get_css_rules :: ((Ptr CSSStyleSheet) -> (IO (Ptr CSSRuleList)))

foreign import ccall safe "webkit_dom_css_style_sheet_get_rules"
  webkit_dom_css_style_sheet_get_rules :: ((Ptr CSSStyleSheet) -> (IO (Ptr CSSRuleList)))