{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.WebKit2WebExtension.Objects.DOMCSSRule
    ( 

-- * Exported types
    DOMCSSRule(..)                          ,
    IsDOMCSSRule                            ,
    toDOMCSSRule                            ,
    noDOMCSSRule                            ,


 -- * Methods
-- ** getCssText #method:getCssText#
    DOMCSSRuleGetCssTextMethodInfo          ,
    dOMCSSRuleGetCssText                    ,


-- ** getParentRule #method:getParentRule#
    DOMCSSRuleGetParentRuleMethodInfo       ,
    dOMCSSRuleGetParentRule                 ,


-- ** getParentStyleSheet #method:getParentStyleSheet#
    DOMCSSRuleGetParentStyleSheetMethodInfo ,
    dOMCSSRuleGetParentStyleSheet           ,


-- ** getRuleType #method:getRuleType#
    DOMCSSRuleGetRuleTypeMethodInfo         ,
    dOMCSSRuleGetRuleType                   ,


-- ** setCssText #method:setCssText#
    DOMCSSRuleSetCssTextMethodInfo          ,
    dOMCSSRuleSetCssText                    ,




 -- * Properties
-- ** cssText #attr:cssText#
    DOMCSSRuleCssTextPropertyInfo           ,
    clearDOMCSSRuleCssText                  ,
    constructDOMCSSRuleCssText              ,
    dOMCSSRuleCssText                       ,
    getDOMCSSRuleCssText                    ,
    setDOMCSSRuleCssText                    ,


-- ** parentRule #attr:parentRule#
    DOMCSSRuleParentRulePropertyInfo        ,
    dOMCSSRuleParentRule                    ,
    getDOMCSSRuleParentRule                 ,


-- ** parentStyleSheet #attr:parentStyleSheet#
    DOMCSSRuleParentStyleSheetPropertyInfo  ,
    dOMCSSRuleParentStyleSheet              ,
    getDOMCSSRuleParentStyleSheet           ,


-- ** type #attr:type#
    DOMCSSRuleTypePropertyInfo              ,
    dOMCSSRuleType                          ,
    getDOMCSSRuleType                       ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMCSSStyleSheet as WebKit2WebExtension.DOMCSSStyleSheet
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMObject as WebKit2WebExtension.DOMObject

newtype DOMCSSRule = DOMCSSRule (ManagedPtr DOMCSSRule)
foreign import ccall "webkit_dom_css_rule_get_type"
    c_webkit_dom_css_rule_get_type :: IO GType

instance GObject DOMCSSRule where
    gobjectType _ = c_webkit_dom_css_rule_get_type
    

class GObject o => IsDOMCSSRule o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError DOMCSSRule a) =>
    IsDOMCSSRule a
#endif
instance IsDOMCSSRule DOMCSSRule
instance WebKit2WebExtension.DOMObject.IsDOMObject DOMCSSRule
instance GObject.Object.IsObject DOMCSSRule

toDOMCSSRule :: IsDOMCSSRule o => o -> IO DOMCSSRule
toDOMCSSRule = unsafeCastTo DOMCSSRule

noDOMCSSRule :: Maybe DOMCSSRule
noDOMCSSRule = Nothing

type family ResolveDOMCSSRuleMethod (t :: Symbol) (o :: *) :: * where
    ResolveDOMCSSRuleMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDOMCSSRuleMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDOMCSSRuleMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDOMCSSRuleMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDOMCSSRuleMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDOMCSSRuleMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDOMCSSRuleMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDOMCSSRuleMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDOMCSSRuleMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDOMCSSRuleMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveDOMCSSRuleMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveDOMCSSRuleMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDOMCSSRuleMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDOMCSSRuleMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDOMCSSRuleMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDOMCSSRuleMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDOMCSSRuleMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDOMCSSRuleMethod "getCssText" o = DOMCSSRuleGetCssTextMethodInfo
    ResolveDOMCSSRuleMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDOMCSSRuleMethod "getParentRule" o = DOMCSSRuleGetParentRuleMethodInfo
    ResolveDOMCSSRuleMethod "getParentStyleSheet" o = DOMCSSRuleGetParentStyleSheetMethodInfo
    ResolveDOMCSSRuleMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDOMCSSRuleMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDOMCSSRuleMethod "getRuleType" o = DOMCSSRuleGetRuleTypeMethodInfo
    ResolveDOMCSSRuleMethod "setCssText" o = DOMCSSRuleSetCssTextMethodInfo
    ResolveDOMCSSRuleMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDOMCSSRuleMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDOMCSSRuleMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveDOMCSSRuleMethod t DOMCSSRule, O.MethodInfo info DOMCSSRule p) => O.IsLabelProxy t (DOMCSSRule -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDOMCSSRuleMethod t DOMCSSRule, O.MethodInfo info DOMCSSRule p) => O.IsLabel t (DOMCSSRule -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

-- VVV Prop "css-text"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

getDOMCSSRuleCssText :: (MonadIO m, IsDOMCSSRule o) => o -> m (Maybe T.Text)
getDOMCSSRuleCssText obj = liftIO $ getObjectPropertyString obj "css-text"

setDOMCSSRuleCssText :: (MonadIO m, IsDOMCSSRule o) => o -> T.Text -> m ()
setDOMCSSRuleCssText obj val = liftIO $ setObjectPropertyString obj "css-text" (Just val)

constructDOMCSSRuleCssText :: (IsDOMCSSRule o) => T.Text -> IO (GValueConstruct o)
constructDOMCSSRuleCssText val = constructObjectPropertyString "css-text" (Just val)

clearDOMCSSRuleCssText :: (MonadIO m, IsDOMCSSRule o) => o -> m ()
clearDOMCSSRuleCssText obj = liftIO $ setObjectPropertyString obj "css-text" (Nothing :: Maybe T.Text)

data DOMCSSRuleCssTextPropertyInfo
instance AttrInfo DOMCSSRuleCssTextPropertyInfo where
    type AttrAllowedOps DOMCSSRuleCssTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMCSSRuleCssTextPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint DOMCSSRuleCssTextPropertyInfo = IsDOMCSSRule
    type AttrGetType DOMCSSRuleCssTextPropertyInfo = (Maybe T.Text)
    type AttrLabel DOMCSSRuleCssTextPropertyInfo = "css-text"
    type AttrOrigin DOMCSSRuleCssTextPropertyInfo = DOMCSSRule
    attrGet _ = getDOMCSSRuleCssText
    attrSet _ = setDOMCSSRuleCssText
    attrConstruct _ = constructDOMCSSRuleCssText
    attrClear _ = clearDOMCSSRuleCssText

-- VVV Prop "parent-rule"
   -- Type: TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getDOMCSSRuleParentRule :: (MonadIO m, IsDOMCSSRule o) => o -> m (Maybe DOMCSSRule)
getDOMCSSRuleParentRule obj = liftIO $ getObjectPropertyObject obj "parent-rule" DOMCSSRule

data DOMCSSRuleParentRulePropertyInfo
instance AttrInfo DOMCSSRuleParentRulePropertyInfo where
    type AttrAllowedOps DOMCSSRuleParentRulePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMCSSRuleParentRulePropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMCSSRuleParentRulePropertyInfo = IsDOMCSSRule
    type AttrGetType DOMCSSRuleParentRulePropertyInfo = (Maybe DOMCSSRule)
    type AttrLabel DOMCSSRuleParentRulePropertyInfo = "parent-rule"
    type AttrOrigin DOMCSSRuleParentRulePropertyInfo = DOMCSSRule
    attrGet _ = getDOMCSSRuleParentRule
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "parent-style-sheet"
   -- Type: TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSStyleSheet"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getDOMCSSRuleParentStyleSheet :: (MonadIO m, IsDOMCSSRule o) => o -> m (Maybe WebKit2WebExtension.DOMCSSStyleSheet.DOMCSSStyleSheet)
getDOMCSSRuleParentStyleSheet obj = liftIO $ getObjectPropertyObject obj "parent-style-sheet" WebKit2WebExtension.DOMCSSStyleSheet.DOMCSSStyleSheet

data DOMCSSRuleParentStyleSheetPropertyInfo
instance AttrInfo DOMCSSRuleParentStyleSheetPropertyInfo where
    type AttrAllowedOps DOMCSSRuleParentStyleSheetPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMCSSRuleParentStyleSheetPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMCSSRuleParentStyleSheetPropertyInfo = IsDOMCSSRule
    type AttrGetType DOMCSSRuleParentStyleSheetPropertyInfo = (Maybe WebKit2WebExtension.DOMCSSStyleSheet.DOMCSSStyleSheet)
    type AttrLabel DOMCSSRuleParentStyleSheetPropertyInfo = "parent-style-sheet"
    type AttrOrigin DOMCSSRuleParentStyleSheetPropertyInfo = DOMCSSRule
    attrGet _ = getDOMCSSRuleParentStyleSheet
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "type"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getDOMCSSRuleType :: (MonadIO m, IsDOMCSSRule o) => o -> m Word32
getDOMCSSRuleType obj = liftIO $ getObjectPropertyUInt32 obj "type"

data DOMCSSRuleTypePropertyInfo
instance AttrInfo DOMCSSRuleTypePropertyInfo where
    type AttrAllowedOps DOMCSSRuleTypePropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMCSSRuleTypePropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMCSSRuleTypePropertyInfo = IsDOMCSSRule
    type AttrGetType DOMCSSRuleTypePropertyInfo = Word32
    type AttrLabel DOMCSSRuleTypePropertyInfo = "type"
    type AttrOrigin DOMCSSRuleTypePropertyInfo = DOMCSSRule
    attrGet _ = getDOMCSSRuleType
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

instance O.HasAttributeList DOMCSSRule
type instance O.AttributeList DOMCSSRule = DOMCSSRuleAttributeList
type DOMCSSRuleAttributeList = ('[ '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("cssText", DOMCSSRuleCssTextPropertyInfo), '("parentRule", DOMCSSRuleParentRulePropertyInfo), '("parentStyleSheet", DOMCSSRuleParentStyleSheetPropertyInfo), '("type", DOMCSSRuleTypePropertyInfo)] :: [(Symbol, *)])

dOMCSSRuleCssText :: AttrLabelProxy "cssText"
dOMCSSRuleCssText = AttrLabelProxy

dOMCSSRuleParentRule :: AttrLabelProxy "parentRule"
dOMCSSRuleParentRule = AttrLabelProxy

dOMCSSRuleParentStyleSheet :: AttrLabelProxy "parentStyleSheet"
dOMCSSRuleParentStyleSheet = AttrLabelProxy

dOMCSSRuleType :: AttrLabelProxy "type"
dOMCSSRuleType = AttrLabelProxy

type instance O.SignalList DOMCSSRule = DOMCSSRuleSignalList
type DOMCSSRuleSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method DOMCSSRule::get_css_text
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMCSSRule", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_css_rule_get_css_text" webkit_dom_css_rule_get_css_text :: 
    Ptr DOMCSSRule ->                       -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"})
    IO CString

{- |
/No description available in the introspection data./
-}
dOMCSSRuleGetCssText ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMCSSRule a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMCSSRule.DOMCSSRule' -}
    -> m T.Text
    {- ^ __Returns:__ A @/gchar/@ -}
dOMCSSRuleGetCssText self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_css_rule_get_css_text self'
    checkUnexpectedReturnNULL "dOMCSSRuleGetCssText" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr self
    return result'

data DOMCSSRuleGetCssTextMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMCSSRule a) => O.MethodInfo DOMCSSRuleGetCssTextMethodInfo a signature where
    overloadedMethod _ = dOMCSSRuleGetCssText

-- method DOMCSSRule::get_parent_rule
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMCSSRule", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"}))
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_css_rule_get_parent_rule" webkit_dom_css_rule_get_parent_rule :: 
    Ptr DOMCSSRule ->                       -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"})
    IO (Ptr DOMCSSRule)

{- |
/No description available in the introspection data./
-}
dOMCSSRuleGetParentRule ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMCSSRule a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMCSSRule.DOMCSSRule' -}
    -> m DOMCSSRule
    {- ^ __Returns:__ A 'GI.WebKit2WebExtension.Objects.DOMCSSRule.DOMCSSRule' -}
dOMCSSRuleGetParentRule self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_css_rule_get_parent_rule self'
    checkUnexpectedReturnNULL "dOMCSSRuleGetParentRule" result
    result' <- (wrapObject DOMCSSRule) result
    touchManagedPtr self
    return result'

data DOMCSSRuleGetParentRuleMethodInfo
instance (signature ~ (m DOMCSSRule), MonadIO m, IsDOMCSSRule a) => O.MethodInfo DOMCSSRuleGetParentRuleMethodInfo a signature where
    overloadedMethod _ = dOMCSSRuleGetParentRule

-- method DOMCSSRule::get_parent_style_sheet
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMCSSRule", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSStyleSheet"}))
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_css_rule_get_parent_style_sheet" webkit_dom_css_rule_get_parent_style_sheet :: 
    Ptr DOMCSSRule ->                       -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"})
    IO (Ptr WebKit2WebExtension.DOMCSSStyleSheet.DOMCSSStyleSheet)

{- |
/No description available in the introspection data./
-}
dOMCSSRuleGetParentStyleSheet ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMCSSRule a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMCSSRule.DOMCSSRule' -}
    -> m WebKit2WebExtension.DOMCSSStyleSheet.DOMCSSStyleSheet
    {- ^ __Returns:__ A 'GI.WebKit2WebExtension.Objects.DOMCSSStyleSheet.DOMCSSStyleSheet' -}
dOMCSSRuleGetParentStyleSheet self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_css_rule_get_parent_style_sheet self'
    checkUnexpectedReturnNULL "dOMCSSRuleGetParentStyleSheet" result
    result' <- (wrapObject WebKit2WebExtension.DOMCSSStyleSheet.DOMCSSStyleSheet) result
    touchManagedPtr self
    return result'

data DOMCSSRuleGetParentStyleSheetMethodInfo
instance (signature ~ (m WebKit2WebExtension.DOMCSSStyleSheet.DOMCSSStyleSheet), MonadIO m, IsDOMCSSRule a) => O.MethodInfo DOMCSSRuleGetParentStyleSheetMethodInfo a signature where
    overloadedMethod _ = dOMCSSRuleGetParentStyleSheet

-- method DOMCSSRule::get_rule_type
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMCSSRule", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt16)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_css_rule_get_rule_type" webkit_dom_css_rule_get_rule_type :: 
    Ptr DOMCSSRule ->                       -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"})
    IO Word16

{- |
/No description available in the introspection data./
-}
dOMCSSRuleGetRuleType ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMCSSRule a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMCSSRule.DOMCSSRule' -}
    -> m Word16
    {- ^ __Returns:__ A @/gushort/@ -}
dOMCSSRuleGetRuleType self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_css_rule_get_rule_type self'
    touchManagedPtr self
    return result

data DOMCSSRuleGetRuleTypeMethodInfo
instance (signature ~ (m Word16), MonadIO m, IsDOMCSSRule a) => O.MethodInfo DOMCSSRuleGetRuleTypeMethodInfo a signature where
    overloadedMethod _ = dOMCSSRuleGetRuleType

-- method DOMCSSRule::set_css_text
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMCSSRule", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #gchar", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : True
-- Skip return : False

foreign import ccall "webkit_dom_css_rule_set_css_text" webkit_dom_css_rule_set_css_text :: 
    Ptr DOMCSSRule ->                       -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSRule"})
    CString ->                              -- value : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO ()

{- |
/No description available in the introspection data./
-}
dOMCSSRuleSetCssText ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMCSSRule a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMCSSRule.DOMCSSRule' -}
    -> T.Text
    {- ^ /@value@/: A @/gchar/@ -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMCSSRuleSetCssText self value = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    value' <- textToCString value
    onException (do
        propagateGError $ webkit_dom_css_rule_set_css_text self' value'
        touchManagedPtr self
        freeMem value'
        return ()
     ) (do
        freeMem value'
     )

data DOMCSSRuleSetCssTextMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDOMCSSRule a) => O.MethodInfo DOMCSSRuleSetCssTextMethodInfo a signature where
    overloadedMethod _ = dOMCSSRuleSetCssText