{- | 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.WebKit.Objects.DOMDOMMimeTypeArray ( -- * Exported types DOMDOMMimeTypeArray(..) , DOMDOMMimeTypeArrayK , toDOMDOMMimeTypeArray , noDOMDOMMimeTypeArray , -- * Methods -- ** dOMDOMMimeTypeArrayGetLength dOMDOMMimeTypeArrayGetLength , -- ** dOMDOMMimeTypeArrayItem dOMDOMMimeTypeArrayItem , -- ** dOMDOMMimeTypeArrayNamedItem dOMDOMMimeTypeArrayNamedItem , -- * Properties -- ** Length DOMDOMMimeTypeArrayLengthPropertyInfo , getDOMDOMMimeTypeArrayLength , ) 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 DOMDOMMimeTypeArray = DOMDOMMimeTypeArray (ForeignPtr DOMDOMMimeTypeArray) foreign import ccall "webkit_dom_dom_mime_type_array_get_type" c_webkit_dom_dom_mime_type_array_get_type :: IO GType type instance ParentTypes DOMDOMMimeTypeArray = DOMDOMMimeTypeArrayParentTypes type DOMDOMMimeTypeArrayParentTypes = '[DOMObject, GObject.Object] instance GObject DOMDOMMimeTypeArray where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_webkit_dom_dom_mime_type_array_get_type class GObject o => DOMDOMMimeTypeArrayK o instance (GObject o, IsDescendantOf DOMDOMMimeTypeArray o) => DOMDOMMimeTypeArrayK o toDOMDOMMimeTypeArray :: DOMDOMMimeTypeArrayK o => o -> IO DOMDOMMimeTypeArray toDOMDOMMimeTypeArray = unsafeCastTo DOMDOMMimeTypeArray noDOMDOMMimeTypeArray :: Maybe DOMDOMMimeTypeArray noDOMDOMMimeTypeArray = Nothing -- VVV Prop "length" -- Type: TBasicType TUInt64 -- Flags: [PropertyReadable] getDOMDOMMimeTypeArrayLength :: (MonadIO m, DOMDOMMimeTypeArrayK o) => o -> m Word64 getDOMDOMMimeTypeArrayLength obj = liftIO $ getObjectPropertyUInt64 obj "length" data DOMDOMMimeTypeArrayLengthPropertyInfo instance AttrInfo DOMDOMMimeTypeArrayLengthPropertyInfo where type AttrAllowedOps DOMDOMMimeTypeArrayLengthPropertyInfo = '[ 'AttrGet] type AttrSetTypeConstraint DOMDOMMimeTypeArrayLengthPropertyInfo = (~) () type AttrBaseTypeConstraint DOMDOMMimeTypeArrayLengthPropertyInfo = DOMDOMMimeTypeArrayK type AttrGetType DOMDOMMimeTypeArrayLengthPropertyInfo = Word64 type AttrLabel DOMDOMMimeTypeArrayLengthPropertyInfo = "DOMDOMMimeTypeArray::length" attrGet _ = getDOMDOMMimeTypeArrayLength attrSet _ = undefined attrConstruct _ = undefined type instance AttributeList DOMDOMMimeTypeArray = DOMDOMMimeTypeArrayAttributeList type DOMDOMMimeTypeArrayAttributeList = ('[ '("core-object", DOMObjectCoreObjectPropertyInfo), '("length", DOMDOMMimeTypeArrayLengthPropertyInfo)] :: [(Symbol, *)]) type instance SignalList DOMDOMMimeTypeArray = DOMDOMMimeTypeArraySignalList type DOMDOMMimeTypeArraySignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method DOMDOMMimeTypeArray::get_length -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMDOMMimeTypeArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMDOMMimeTypeArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt64 -- throws : False -- Skip return : False foreign import ccall "webkit_dom_dom_mime_type_array_get_length" webkit_dom_dom_mime_type_array_get_length :: Ptr DOMDOMMimeTypeArray -> -- _obj : TInterface "WebKit" "DOMDOMMimeTypeArray" IO Word64 dOMDOMMimeTypeArrayGetLength :: (MonadIO m, DOMDOMMimeTypeArrayK a) => a -> -- _obj m Word64 dOMDOMMimeTypeArrayGetLength _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_dom_dom_mime_type_array_get_length _obj' touchManagedPtr _obj return result -- method DOMDOMMimeTypeArray::item -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMDOMMimeTypeArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMDOMMimeTypeArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "WebKit" "DOMDOMMimeType" -- throws : False -- Skip return : False foreign import ccall "webkit_dom_dom_mime_type_array_item" webkit_dom_dom_mime_type_array_item :: Ptr DOMDOMMimeTypeArray -> -- _obj : TInterface "WebKit" "DOMDOMMimeTypeArray" Word64 -> -- index : TBasicType TUInt64 IO (Ptr DOMDOMMimeType) dOMDOMMimeTypeArrayItem :: (MonadIO m, DOMDOMMimeTypeArrayK a) => a -> -- _obj Word64 -> -- index m DOMDOMMimeType dOMDOMMimeTypeArrayItem _obj index = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_dom_dom_mime_type_array_item _obj' index checkUnexpectedReturnNULL "webkit_dom_dom_mime_type_array_item" result result' <- (wrapObject DOMDOMMimeType) result touchManagedPtr _obj return result' -- method DOMDOMMimeTypeArray::named_item -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMDOMMimeTypeArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMDOMMimeTypeArray", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "WebKit" "DOMDOMMimeType" -- throws : False -- Skip return : False foreign import ccall "webkit_dom_dom_mime_type_array_named_item" webkit_dom_dom_mime_type_array_named_item :: Ptr DOMDOMMimeTypeArray -> -- _obj : TInterface "WebKit" "DOMDOMMimeTypeArray" CString -> -- name : TBasicType TUTF8 IO (Ptr DOMDOMMimeType) dOMDOMMimeTypeArrayNamedItem :: (MonadIO m, DOMDOMMimeTypeArrayK a) => a -> -- _obj T.Text -> -- name m DOMDOMMimeType dOMDOMMimeTypeArrayNamedItem _obj name = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj name' <- textToCString name result <- webkit_dom_dom_mime_type_array_named_item _obj' name' checkUnexpectedReturnNULL "webkit_dom_dom_mime_type_array_named_item" result result' <- (wrapObject DOMDOMMimeType) result touchManagedPtr _obj freeMem name' return result'