gi-webkit2webextension-4.0.19: GI/WebKit2WebExtension/Objects/DOMMediaList.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
/No description available in the introspection data./
-}
#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.WebKit2WebExtension.Objects.DOMMediaList
(
-- * Exported types
DOMMediaList(..) ,
IsDOMMediaList ,
toDOMMediaList ,
noDOMMediaList ,
-- * Methods
-- ** appendMedium #method:appendMedium#
#if ENABLE_OVERLOADING
DOMMediaListAppendMediumMethodInfo ,
#endif
dOMMediaListAppendMedium ,
-- ** deleteMedium #method:deleteMedium#
#if ENABLE_OVERLOADING
DOMMediaListDeleteMediumMethodInfo ,
#endif
dOMMediaListDeleteMedium ,
-- ** getLength #method:getLength#
#if ENABLE_OVERLOADING
DOMMediaListGetLengthMethodInfo ,
#endif
dOMMediaListGetLength ,
-- ** getMediaText #method:getMediaText#
#if ENABLE_OVERLOADING
DOMMediaListGetMediaTextMethodInfo ,
#endif
dOMMediaListGetMediaText ,
-- ** item #method:item#
#if ENABLE_OVERLOADING
DOMMediaListItemMethodInfo ,
#endif
dOMMediaListItem ,
-- ** setMediaText #method:setMediaText#
#if ENABLE_OVERLOADING
DOMMediaListSetMediaTextMethodInfo ,
#endif
dOMMediaListSetMediaText ,
-- * Properties
-- ** length #attr:length#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
DOMMediaListLengthPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
dOMMediaListLength ,
#endif
getDOMMediaListLength ,
-- ** mediaText #attr:mediaText#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
DOMMediaListMediaTextPropertyInfo ,
#endif
clearDOMMediaListMediaText ,
constructDOMMediaListMediaText ,
#if ENABLE_OVERLOADING
dOMMediaListMediaText ,
#endif
getDOMMediaListMediaText ,
setDOMMediaListMediaText ,
) 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.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.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 DOMMediaList = DOMMediaList (ManagedPtr DOMMediaList)
foreign import ccall "webkit_dom_media_list_get_type"
c_webkit_dom_media_list_get_type :: IO GType
instance GObject DOMMediaList where
gobjectType = c_webkit_dom_media_list_get_type
-- | Type class for types which can be safely cast to `DOMMediaList`, for instance with `toDOMMediaList`.
class (GObject o, O.IsDescendantOf DOMMediaList o) => IsDOMMediaList o
instance (GObject o, O.IsDescendantOf DOMMediaList o) => IsDOMMediaList o
instance O.HasParentTypes DOMMediaList
type instance O.ParentTypes DOMMediaList = '[WebKit2WebExtension.DOMObject.DOMObject, GObject.Object.Object]
-- | Cast to `DOMMediaList`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toDOMMediaList :: (MonadIO m, IsDOMMediaList o) => o -> m DOMMediaList
toDOMMediaList = liftIO . unsafeCastTo DOMMediaList
-- | A convenience alias for `Nothing` :: `Maybe` `DOMMediaList`.
noDOMMediaList :: Maybe DOMMediaList
noDOMMediaList = Nothing
#if ENABLE_OVERLOADING
type family ResolveDOMMediaListMethod (t :: Symbol) (o :: *) :: * where
ResolveDOMMediaListMethod "appendMedium" o = DOMMediaListAppendMediumMethodInfo
ResolveDOMMediaListMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDOMMediaListMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDOMMediaListMethod "deleteMedium" o = DOMMediaListDeleteMediumMethodInfo
ResolveDOMMediaListMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDOMMediaListMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDOMMediaListMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDOMMediaListMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDOMMediaListMethod "item" o = DOMMediaListItemMethodInfo
ResolveDOMMediaListMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDOMMediaListMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDOMMediaListMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDOMMediaListMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDOMMediaListMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDOMMediaListMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDOMMediaListMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDOMMediaListMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDOMMediaListMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDOMMediaListMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDOMMediaListMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDOMMediaListMethod "getLength" o = DOMMediaListGetLengthMethodInfo
ResolveDOMMediaListMethod "getMediaText" o = DOMMediaListGetMediaTextMethodInfo
ResolveDOMMediaListMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDOMMediaListMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDOMMediaListMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDOMMediaListMethod "setMediaText" o = DOMMediaListSetMediaTextMethodInfo
ResolveDOMMediaListMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDOMMediaListMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDOMMediaListMethod t DOMMediaList, O.MethodInfo info DOMMediaList p) => OL.IsLabel t (DOMMediaList -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
-- VVV Prop "length"
-- Type: TBasicType TULong
-- Flags: [PropertyReadable]
-- Nullable: (Just False,Nothing)
{- |
Get the value of the “@length@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' dOMMediaList #length
@
-}
getDOMMediaListLength :: (MonadIO m, IsDOMMediaList o) => o -> m CULong
getDOMMediaListLength obj = liftIO $ B.Properties.getObjectPropertyULong obj "length"
#if ENABLE_OVERLOADING
data DOMMediaListLengthPropertyInfo
instance AttrInfo DOMMediaListLengthPropertyInfo where
type AttrAllowedOps DOMMediaListLengthPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMMediaListLengthPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMMediaListLengthPropertyInfo = IsDOMMediaList
type AttrGetType DOMMediaListLengthPropertyInfo = CULong
type AttrLabel DOMMediaListLengthPropertyInfo = "length"
type AttrOrigin DOMMediaListLengthPropertyInfo = DOMMediaList
attrGet _ = getDOMMediaListLength
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
-- VVV Prop "media-text"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable]
-- Nullable: (Nothing,Nothing)
{- |
Get the value of the “@media-text@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' dOMMediaList #mediaText
@
-}
getDOMMediaListMediaText :: (MonadIO m, IsDOMMediaList o) => o -> m (Maybe T.Text)
getDOMMediaListMediaText obj = liftIO $ B.Properties.getObjectPropertyString obj "media-text"
{- |
Set the value of the “@media-text@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' dOMMediaList [ #mediaText 'Data.GI.Base.Attributes.:=' value ]
@
-}
setDOMMediaListMediaText :: (MonadIO m, IsDOMMediaList o) => o -> T.Text -> m ()
setDOMMediaListMediaText obj val = liftIO $ B.Properties.setObjectPropertyString obj "media-text" (Just val)
{- |
Construct a `GValueConstruct` with valid value for the “@media-text@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
-}
constructDOMMediaListMediaText :: (IsDOMMediaList o) => T.Text -> IO (GValueConstruct o)
constructDOMMediaListMediaText val = B.Properties.constructObjectPropertyString "media-text" (Just val)
{- |
Set the value of the “@media-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' #mediaText
@
-}
clearDOMMediaListMediaText :: (MonadIO m, IsDOMMediaList o) => o -> m ()
clearDOMMediaListMediaText obj = liftIO $ B.Properties.setObjectPropertyString obj "media-text" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data DOMMediaListMediaTextPropertyInfo
instance AttrInfo DOMMediaListMediaTextPropertyInfo where
type AttrAllowedOps DOMMediaListMediaTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DOMMediaListMediaTextPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DOMMediaListMediaTextPropertyInfo = IsDOMMediaList
type AttrGetType DOMMediaListMediaTextPropertyInfo = (Maybe T.Text)
type AttrLabel DOMMediaListMediaTextPropertyInfo = "media-text"
type AttrOrigin DOMMediaListMediaTextPropertyInfo = DOMMediaList
attrGet _ = getDOMMediaListMediaText
attrSet _ = setDOMMediaListMediaText
attrConstruct _ = constructDOMMediaListMediaText
attrClear _ = clearDOMMediaListMediaText
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList DOMMediaList
type instance O.AttributeList DOMMediaList = DOMMediaListAttributeList
type DOMMediaListAttributeList = ('[ '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("length", DOMMediaListLengthPropertyInfo), '("mediaText", DOMMediaListMediaTextPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
dOMMediaListLength :: AttrLabelProxy "length"
dOMMediaListLength = AttrLabelProxy
dOMMediaListMediaText :: AttrLabelProxy "mediaText"
dOMMediaListMediaText = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList DOMMediaList = DOMMediaListSignalList
type DOMMediaListSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
-- method DOMMediaList::append_medium
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMMediaList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "newMedium", 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_media_list_append_medium" webkit_dom_media_list_append_medium ::
Ptr DOMMediaList -> -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"})
CString -> -- newMedium : TBasicType TUTF8
Ptr (Ptr GError) -> -- error
IO ()
{-# DEPRECATED dOMMediaListAppendMedium ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/No description available in the introspection data./
-}
dOMMediaListAppendMedium ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMMediaList a) =>
a
{- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMMediaList.DOMMediaList' -}
-> T.Text
{- ^ /@newMedium@/: A @/gchar/@ -}
-> m ()
{- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMMediaListAppendMedium self newMedium = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
newMedium' <- textToCString newMedium
onException (do
propagateGError $ webkit_dom_media_list_append_medium self' newMedium'
touchManagedPtr self
freeMem newMedium'
return ()
) (do
freeMem newMedium'
)
#if ENABLE_OVERLOADING
data DOMMediaListAppendMediumMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDOMMediaList a) => O.MethodInfo DOMMediaListAppendMediumMethodInfo a signature where
overloadedMethod _ = dOMMediaListAppendMedium
#endif
-- method DOMMediaList::delete_medium
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMMediaList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "oldMedium", 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_media_list_delete_medium" webkit_dom_media_list_delete_medium ::
Ptr DOMMediaList -> -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"})
CString -> -- oldMedium : TBasicType TUTF8
Ptr (Ptr GError) -> -- error
IO ()
{-# DEPRECATED dOMMediaListDeleteMedium ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/No description available in the introspection data./
-}
dOMMediaListDeleteMedium ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMMediaList a) =>
a
{- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMMediaList.DOMMediaList' -}
-> T.Text
{- ^ /@oldMedium@/: A @/gchar/@ -}
-> m ()
{- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMMediaListDeleteMedium self oldMedium = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
oldMedium' <- textToCString oldMedium
onException (do
propagateGError $ webkit_dom_media_list_delete_medium self' oldMedium'
touchManagedPtr self
freeMem oldMedium'
return ()
) (do
freeMem oldMedium'
)
#if ENABLE_OVERLOADING
data DOMMediaListDeleteMediumMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDOMMediaList a) => O.MethodInfo DOMMediaListDeleteMediumMethodInfo a signature where
overloadedMethod _ = dOMMediaListDeleteMedium
#endif
-- method DOMMediaList::get_length
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMMediaList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TULong)
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_media_list_get_length" webkit_dom_media_list_get_length ::
Ptr DOMMediaList -> -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"})
IO CULong
{-# DEPRECATED dOMMediaListGetLength ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/No description available in the introspection data./
-}
dOMMediaListGetLength ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMMediaList a) =>
a
{- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMMediaList.DOMMediaList' -}
-> m CULong
{- ^ __Returns:__ A @/gulong/@ -}
dOMMediaListGetLength self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_media_list_get_length self'
touchManagedPtr self
return result
#if ENABLE_OVERLOADING
data DOMMediaListGetLengthMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMMediaList a) => O.MethodInfo DOMMediaListGetLengthMethodInfo a signature where
overloadedMethod _ = dOMMediaListGetLength
#endif
-- method DOMMediaList::get_media_text
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMMediaList", 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_media_list_get_media_text" webkit_dom_media_list_get_media_text ::
Ptr DOMMediaList -> -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"})
IO CString
{-# DEPRECATED dOMMediaListGetMediaText ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/No description available in the introspection data./
-}
dOMMediaListGetMediaText ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMMediaList a) =>
a
{- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMMediaList.DOMMediaList' -}
-> m T.Text
{- ^ __Returns:__ A @/gchar/@ -}
dOMMediaListGetMediaText self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_media_list_get_media_text self'
checkUnexpectedReturnNULL "dOMMediaListGetMediaText" result
result' <- cstringToText result
freeMem result
touchManagedPtr self
return result'
#if ENABLE_OVERLOADING
data DOMMediaListGetMediaTextMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMMediaList a) => O.MethodInfo DOMMediaListGetMediaTextMethodInfo a signature where
overloadedMethod _ = dOMMediaListGetMediaText
#endif
-- method DOMMediaList::item
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMMediaList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #gulong", 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_media_list_item" webkit_dom_media_list_item ::
Ptr DOMMediaList -> -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"})
CULong -> -- index : TBasicType TULong
IO CString
{-# DEPRECATED dOMMediaListItem ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/No description available in the introspection data./
-}
dOMMediaListItem ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMMediaList a) =>
a
{- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMMediaList.DOMMediaList' -}
-> CULong
{- ^ /@index@/: A @/gulong/@ -}
-> m T.Text
{- ^ __Returns:__ A @/gchar/@ -}
dOMMediaListItem self index = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_media_list_item self' index
checkUnexpectedReturnNULL "dOMMediaListItem" result
result' <- cstringToText result
freeMem result
touchManagedPtr self
return result'
#if ENABLE_OVERLOADING
data DOMMediaListItemMethodInfo
instance (signature ~ (CULong -> m T.Text), MonadIO m, IsDOMMediaList a) => O.MethodInfo DOMMediaListItemMethodInfo a signature where
overloadedMethod _ = dOMMediaListItem
#endif
-- method DOMMediaList::set_media_text
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMMediaList", 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_media_list_set_media_text" webkit_dom_media_list_set_media_text ::
Ptr DOMMediaList -> -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMMediaList"})
CString -> -- value : TBasicType TUTF8
Ptr (Ptr GError) -> -- error
IO ()
{-# DEPRECATED dOMMediaListSetMediaText ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/No description available in the introspection data./
-}
dOMMediaListSetMediaText ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMMediaList a) =>
a
{- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMMediaList.DOMMediaList' -}
-> T.Text
{- ^ /@value@/: A @/gchar/@ -}
-> m ()
{- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMMediaListSetMediaText self value = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
value' <- textToCString value
onException (do
propagateGError $ webkit_dom_media_list_set_media_text self' value'
touchManagedPtr self
freeMem value'
return ()
) (do
freeMem value'
)
#if ENABLE_OVERLOADING
data DOMMediaListSetMediaTextMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDOMMediaList a) => O.MethodInfo DOMMediaListSetMediaTextMethodInfo a signature where
overloadedMethod _ = dOMMediaListSetMediaText
#endif