module GI.WebKit.Objects.DOMDOMPluginArray
(
DOMDOMPluginArray(..) ,
DOMDOMPluginArrayK ,
toDOMDOMPluginArray ,
noDOMDOMPluginArray ,
dOMDOMPluginArrayGetLength ,
dOMDOMPluginArrayItem ,
dOMDOMPluginArrayNamedItem ,
dOMDOMPluginArrayRefresh ,
DOMDOMPluginArrayLengthPropertyInfo ,
getDOMDOMPluginArrayLength ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.WebKit.Types
import GI.WebKit.Callbacks
import qualified GI.GObject as GObject
newtype DOMDOMPluginArray = DOMDOMPluginArray (ForeignPtr DOMDOMPluginArray)
foreign import ccall "webkit_dom_dom_plugin_array_get_type"
c_webkit_dom_dom_plugin_array_get_type :: IO GType
type instance ParentTypes DOMDOMPluginArray = DOMDOMPluginArrayParentTypes
type DOMDOMPluginArrayParentTypes = '[DOMObject, GObject.Object]
instance GObject DOMDOMPluginArray where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_dom_plugin_array_get_type
class GObject o => DOMDOMPluginArrayK o
instance (GObject o, IsDescendantOf DOMDOMPluginArray o) => DOMDOMPluginArrayK o
toDOMDOMPluginArray :: DOMDOMPluginArrayK o => o -> IO DOMDOMPluginArray
toDOMDOMPluginArray = unsafeCastTo DOMDOMPluginArray
noDOMDOMPluginArray :: Maybe DOMDOMPluginArray
noDOMDOMPluginArray = Nothing
getDOMDOMPluginArrayLength :: (MonadIO m, DOMDOMPluginArrayK o) => o -> m Word64
getDOMDOMPluginArrayLength obj = liftIO $ getObjectPropertyUInt64 obj "length"
data DOMDOMPluginArrayLengthPropertyInfo
instance AttrInfo DOMDOMPluginArrayLengthPropertyInfo where
type AttrAllowedOps DOMDOMPluginArrayLengthPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDOMPluginArrayLengthPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDOMPluginArrayLengthPropertyInfo = DOMDOMPluginArrayK
type AttrGetType DOMDOMPluginArrayLengthPropertyInfo = Word64
type AttrLabel DOMDOMPluginArrayLengthPropertyInfo = "DOMDOMPluginArray::length"
attrGet _ = getDOMDOMPluginArrayLength
attrSet _ = undefined
attrConstruct _ = undefined
type instance AttributeList DOMDOMPluginArray = DOMDOMPluginArrayAttributeList
type DOMDOMPluginArrayAttributeList = ('[ '("core-object", DOMObjectCoreObjectPropertyInfo), '("length", DOMDOMPluginArrayLengthPropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMDOMPluginArray = DOMDOMPluginArraySignalList
type DOMDOMPluginArraySignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_dom_dom_plugin_array_get_length" webkit_dom_dom_plugin_array_get_length ::
Ptr DOMDOMPluginArray ->
IO Word64
dOMDOMPluginArrayGetLength ::
(MonadIO m, DOMDOMPluginArrayK a) =>
a ->
m Word64
dOMDOMPluginArrayGetLength _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_dom_plugin_array_get_length _obj'
touchManagedPtr _obj
return result
foreign import ccall "webkit_dom_dom_plugin_array_item" webkit_dom_dom_plugin_array_item ::
Ptr DOMDOMPluginArray ->
Word64 ->
IO (Ptr DOMDOMPlugin)
dOMDOMPluginArrayItem ::
(MonadIO m, DOMDOMPluginArrayK a) =>
a ->
Word64 ->
m DOMDOMPlugin
dOMDOMPluginArrayItem _obj index = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_dom_plugin_array_item _obj' index
checkUnexpectedReturnNULL "webkit_dom_dom_plugin_array_item" result
result' <- (wrapObject DOMDOMPlugin) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_dom_plugin_array_named_item" webkit_dom_dom_plugin_array_named_item ::
Ptr DOMDOMPluginArray ->
CString ->
IO (Ptr DOMDOMPlugin)
dOMDOMPluginArrayNamedItem ::
(MonadIO m, DOMDOMPluginArrayK a) =>
a ->
T.Text ->
m DOMDOMPlugin
dOMDOMPluginArrayNamedItem _obj name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
name' <- textToCString name
result <- webkit_dom_dom_plugin_array_named_item _obj' name'
checkUnexpectedReturnNULL "webkit_dom_dom_plugin_array_named_item" result
result' <- (wrapObject DOMDOMPlugin) result
touchManagedPtr _obj
freeMem name'
return result'
foreign import ccall "webkit_dom_dom_plugin_array_refresh" webkit_dom_dom_plugin_array_refresh ::
Ptr DOMDOMPluginArray ->
CInt ->
IO ()
dOMDOMPluginArrayRefresh ::
(MonadIO m, DOMDOMPluginArrayK a) =>
a ->
Bool ->
m ()
dOMDOMPluginArrayRefresh _obj reload = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let reload' = (fromIntegral . fromEnum) reload
webkit_dom_dom_plugin_array_refresh _obj' reload'
touchManagedPtr _obj
return ()