{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.WebKit2WebExtension.Objects.DOMCSSValue
    ( 

-- * Exported types
    DOMCSSValue(..)                         ,
    IsDOMCSSValue                           ,
    toDOMCSSValue                           ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveDOMCSSValueMethod                ,
#endif


-- ** getCssText #method:getCssText#

#if defined(ENABLE_OVERLOADING)
    DOMCSSValueGetCssTextMethodInfo         ,
#endif
    dOMCSSValueGetCssText                   ,


-- ** getCssValueType #method:getCssValueType#

#if defined(ENABLE_OVERLOADING)
    DOMCSSValueGetCssValueTypeMethodInfo    ,
#endif
    dOMCSSValueGetCssValueType              ,


-- ** setCssText #method:setCssText#

#if defined(ENABLE_OVERLOADING)
    DOMCSSValueSetCssTextMethodInfo         ,
#endif
    dOMCSSValueSetCssText                   ,




 -- * Properties
-- ** cssText #attr:cssText#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    DOMCSSValueCssTextPropertyInfo          ,
#endif
    clearDOMCSSValueCssText                 ,
    constructDOMCSSValueCssText             ,
#if defined(ENABLE_OVERLOADING)
    dOMCSSValueCssText                      ,
#endif
    getDOMCSSValueCssText                   ,
    setDOMCSSValueCssText                   ,


-- ** cssValueType #attr:cssValueType#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    DOMCSSValueCssValueTypePropertyInfo     ,
#endif
#if defined(ENABLE_OVERLOADING)
    dOMCSSValueCssValueType                 ,
#endif
    getDOMCSSValueCssValueType              ,




    ) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
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 GHC.OverloadedLabels as OL

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

-- | Memory-managed wrapper type.
newtype DOMCSSValue = DOMCSSValue (SP.ManagedPtr DOMCSSValue)
    deriving (DOMCSSValue -> DOMCSSValue -> Bool
(DOMCSSValue -> DOMCSSValue -> Bool)
-> (DOMCSSValue -> DOMCSSValue -> Bool) -> Eq DOMCSSValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DOMCSSValue -> DOMCSSValue -> Bool
$c/= :: DOMCSSValue -> DOMCSSValue -> Bool
== :: DOMCSSValue -> DOMCSSValue -> Bool
$c== :: DOMCSSValue -> DOMCSSValue -> Bool
Eq)

instance SP.ManagedPtrNewtype DOMCSSValue where
    toManagedPtr :: DOMCSSValue -> ManagedPtr DOMCSSValue
toManagedPtr (DOMCSSValue ManagedPtr DOMCSSValue
p) = ManagedPtr DOMCSSValue
p

foreign import ccall "webkit_dom_css_value_get_type"
    c_webkit_dom_css_value_get_type :: IO B.Types.GType

instance B.Types.TypedObject DOMCSSValue where
    glibType :: IO GType
glibType = IO GType
c_webkit_dom_css_value_get_type

instance B.Types.GObject DOMCSSValue

-- | Convert 'DOMCSSValue' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue DOMCSSValue where
    toGValue :: DOMCSSValue -> IO GValue
toGValue DOMCSSValue
o = do
        GType
gtype <- IO GType
c_webkit_dom_css_value_get_type
        DOMCSSValue -> (Ptr DOMCSSValue -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DOMCSSValue
o (GType
-> (GValue -> Ptr DOMCSSValue -> IO ())
-> Ptr DOMCSSValue
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr DOMCSSValue -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO DOMCSSValue
fromGValue GValue
gv = do
        Ptr DOMCSSValue
ptr <- GValue -> IO (Ptr DOMCSSValue)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr DOMCSSValue)
        (ManagedPtr DOMCSSValue -> DOMCSSValue)
-> Ptr DOMCSSValue -> IO DOMCSSValue
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DOMCSSValue -> DOMCSSValue
DOMCSSValue Ptr DOMCSSValue
ptr
        
    

-- | Type class for types which can be safely cast to `DOMCSSValue`, for instance with `toDOMCSSValue`.
class (SP.GObject o, O.IsDescendantOf DOMCSSValue o) => IsDOMCSSValue o
instance (SP.GObject o, O.IsDescendantOf DOMCSSValue o) => IsDOMCSSValue o

instance O.HasParentTypes DOMCSSValue
type instance O.ParentTypes DOMCSSValue = '[WebKit2WebExtension.DOMObject.DOMObject, GObject.Object.Object]

-- | Cast to `DOMCSSValue`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toDOMCSSValue :: (MonadIO m, IsDOMCSSValue o) => o -> m DOMCSSValue
toDOMCSSValue :: o -> m DOMCSSValue
toDOMCSSValue = IO DOMCSSValue -> m DOMCSSValue
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DOMCSSValue -> m DOMCSSValue)
-> (o -> IO DOMCSSValue) -> o -> m DOMCSSValue
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DOMCSSValue -> DOMCSSValue) -> o -> IO DOMCSSValue
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr DOMCSSValue -> DOMCSSValue
DOMCSSValue

#if defined(ENABLE_OVERLOADING)
type family ResolveDOMCSSValueMethod (t :: Symbol) (o :: *) :: * where
    ResolveDOMCSSValueMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDOMCSSValueMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDOMCSSValueMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDOMCSSValueMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDOMCSSValueMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveDOMCSSValueMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDOMCSSValueMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDOMCSSValueMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDOMCSSValueMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDOMCSSValueMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDOMCSSValueMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDOMCSSValueMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDOMCSSValueMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDOMCSSValueMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDOMCSSValueMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDOMCSSValueMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDOMCSSValueMethod "getCssText" o = DOMCSSValueGetCssTextMethodInfo
    ResolveDOMCSSValueMethod "getCssValueType" o = DOMCSSValueGetCssValueTypeMethodInfo
    ResolveDOMCSSValueMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDOMCSSValueMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDOMCSSValueMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDOMCSSValueMethod "setCssText" o = DOMCSSValueSetCssTextMethodInfo
    ResolveDOMCSSValueMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDOMCSSValueMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveDOMCSSValueMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDOMCSSValueMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveDOMCSSValueMethod t DOMCSSValue, O.MethodInfo info DOMCSSValue p) => OL.IsLabel t (DOMCSSValue -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

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

-- | Get the value of the “@css-text@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' dOMCSSValue #cssText
-- @
getDOMCSSValueCssText :: (MonadIO m, IsDOMCSSValue o) => o -> m (Maybe T.Text)
getDOMCSSValueCssText :: o -> m (Maybe Text)
getDOMCSSValueCssText o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"css-text"

-- | Set the value of the “@css-text@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' dOMCSSValue [ #cssText 'Data.GI.Base.Attributes.:=' value ]
-- @
setDOMCSSValueCssText :: (MonadIO m, IsDOMCSSValue o) => o -> T.Text -> m ()
setDOMCSSValueCssText :: o -> Text -> m ()
setDOMCSSValueCssText o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"css-text" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@css-text@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructDOMCSSValueCssText :: (IsDOMCSSValue o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDOMCSSValueCssText :: Text -> m (GValueConstruct o)
constructDOMCSSValueCssText Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"css-text" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

-- | Set the value of the “@css-text@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #cssText
-- @
clearDOMCSSValueCssText :: (MonadIO m, IsDOMCSSValue o) => o -> m ()
clearDOMCSSValueCssText :: o -> m ()
clearDOMCSSValueCssText o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"css-text" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data DOMCSSValueCssTextPropertyInfo
instance AttrInfo DOMCSSValueCssTextPropertyInfo where
    type AttrAllowedOps DOMCSSValueCssTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DOMCSSValueCssTextPropertyInfo = IsDOMCSSValue
    type AttrSetTypeConstraint DOMCSSValueCssTextPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint DOMCSSValueCssTextPropertyInfo = (~) T.Text
    type AttrTransferType DOMCSSValueCssTextPropertyInfo = T.Text
    type AttrGetType DOMCSSValueCssTextPropertyInfo = (Maybe T.Text)
    type AttrLabel DOMCSSValueCssTextPropertyInfo = "css-text"
    type AttrOrigin DOMCSSValueCssTextPropertyInfo = DOMCSSValue
    attrGet = getDOMCSSValueCssText
    attrSet = setDOMCSSValueCssText
    attrTransfer _ v = do
        return v
    attrConstruct = constructDOMCSSValueCssText
    attrClear = clearDOMCSSValueCssText
#endif

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

-- | Get the value of the “@css-value-type@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' dOMCSSValue #cssValueType
-- @
getDOMCSSValueCssValueType :: (MonadIO m, IsDOMCSSValue o) => o -> m Word32
getDOMCSSValueCssValueType :: o -> m Word32
getDOMCSSValueCssValueType o
obj = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"css-value-type"

#if defined(ENABLE_OVERLOADING)
data DOMCSSValueCssValueTypePropertyInfo
instance AttrInfo DOMCSSValueCssValueTypePropertyInfo where
    type AttrAllowedOps DOMCSSValueCssValueTypePropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DOMCSSValueCssValueTypePropertyInfo = IsDOMCSSValue
    type AttrSetTypeConstraint DOMCSSValueCssValueTypePropertyInfo = (~) ()
    type AttrTransferTypeConstraint DOMCSSValueCssValueTypePropertyInfo = (~) ()
    type AttrTransferType DOMCSSValueCssValueTypePropertyInfo = ()
    type AttrGetType DOMCSSValueCssValueTypePropertyInfo = Word32
    type AttrLabel DOMCSSValueCssValueTypePropertyInfo = "css-value-type"
    type AttrOrigin DOMCSSValueCssValueTypePropertyInfo = DOMCSSValue
    attrGet = getDOMCSSValueCssValueType
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DOMCSSValue
type instance O.AttributeList DOMCSSValue = DOMCSSValueAttributeList
type DOMCSSValueAttributeList = ('[ '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("cssText", DOMCSSValueCssTextPropertyInfo), '("cssValueType", DOMCSSValueCssValueTypePropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
dOMCSSValueCssText :: AttrLabelProxy "cssText"
dOMCSSValueCssText = AttrLabelProxy

dOMCSSValueCssValueType :: AttrLabelProxy "cssValueType"
dOMCSSValueCssValueType = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DOMCSSValue = DOMCSSValueSignalList
type DOMCSSValueSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method DOMCSSValue::get_css_text
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2WebExtension" , name = "DOMCSSValue" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #WebKitDOMCSSValue"
--                 , 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_value_get_css_text" webkit_dom_css_value_get_css_text :: 
    Ptr DOMCSSValue ->                      -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSValue"})
    IO CString

{-# DEPRECATED dOMCSSValueGetCssText ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
-- | /No description available in the introspection data./
dOMCSSValueGetCssText ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMCSSValue a) =>
    a
    -- ^ /@self@/: A t'GI.WebKit2WebExtension.Objects.DOMCSSValue.DOMCSSValue'
    -> m T.Text
    -- ^ __Returns:__ A @/gchar/@
dOMCSSValueGetCssText :: a -> m Text
dOMCSSValueGetCssText a
self = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr DOMCSSValue
self' <- a -> IO (Ptr DOMCSSValue)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
result <- Ptr DOMCSSValue -> IO CString
webkit_dom_css_value_get_css_text Ptr DOMCSSValue
self'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dOMCSSValueGetCssText" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DOMCSSValueGetCssTextMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMCSSValue a) => O.MethodInfo DOMCSSValueGetCssTextMethodInfo a signature where
    overloadedMethod = dOMCSSValueGetCssText

#endif

-- method DOMCSSValue::get_css_value_type
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2WebExtension" , name = "DOMCSSValue" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #WebKitDOMCSSValue"
--                 , 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_value_get_css_value_type" webkit_dom_css_value_get_css_value_type :: 
    Ptr DOMCSSValue ->                      -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSValue"})
    IO Word16

{-# DEPRECATED dOMCSSValueGetCssValueType ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
-- | /No description available in the introspection data./
dOMCSSValueGetCssValueType ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMCSSValue a) =>
    a
    -- ^ /@self@/: A t'GI.WebKit2WebExtension.Objects.DOMCSSValue.DOMCSSValue'
    -> m Word16
    -- ^ __Returns:__ A @/gushort/@
dOMCSSValueGetCssValueType :: a -> m Word16
dOMCSSValueGetCssValueType a
self = IO Word16 -> m Word16
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word16 -> m Word16) -> IO Word16 -> m Word16
forall a b. (a -> b) -> a -> b
$ do
    Ptr DOMCSSValue
self' <- a -> IO (Ptr DOMCSSValue)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Word16
result <- Ptr DOMCSSValue -> IO Word16
webkit_dom_css_value_get_css_value_type Ptr DOMCSSValue
self'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Word16 -> IO Word16
forall (m :: * -> *) a. Monad m => a -> m a
return Word16
result

#if defined(ENABLE_OVERLOADING)
data DOMCSSValueGetCssValueTypeMethodInfo
instance (signature ~ (m Word16), MonadIO m, IsDOMCSSValue a) => O.MethodInfo DOMCSSValueGetCssValueTypeMethodInfo a signature where
    overloadedMethod = dOMCSSValueGetCssValueType

#endif

-- method DOMCSSValue::set_css_text
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2WebExtension" , name = "DOMCSSValue" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #WebKitDOMCSSValue"
--                 , 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_value_set_css_text" webkit_dom_css_value_set_css_text :: 
    Ptr DOMCSSValue ->                      -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMCSSValue"})
    CString ->                              -- value : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO ()

{-# DEPRECATED dOMCSSValueSetCssText ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
-- | /No description available in the introspection data./
dOMCSSValueSetCssText ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMCSSValue a) =>
    a
    -- ^ /@self@/: A t'GI.WebKit2WebExtension.Objects.DOMCSSValue.DOMCSSValue'
    -> T.Text
    -- ^ /@value@/: A @/gchar/@
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
dOMCSSValueSetCssText :: a -> Text -> m ()
dOMCSSValueSetCssText a
self Text
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr DOMCSSValue
self' <- a -> IO (Ptr DOMCSSValue)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CString
value' <- Text -> IO CString
textToCString Text
value
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO ()) -> IO ())
-> (Ptr (Ptr GError) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DOMCSSValue -> CString -> Ptr (Ptr GError) -> IO ()
webkit_dom_css_value_set_css_text Ptr DOMCSSValue
self' CString
value'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
value'
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
value'
     )

#if defined(ENABLE_OVERLOADING)
data DOMCSSValueSetCssTextMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDOMCSSValue a) => O.MethodInfo DOMCSSValueSetCssTextMethodInfo a signature where
    overloadedMethod = dOMCSSValueSetCssText

#endif