module GI.WebKit2WebExtension.Objects.DOMFileList
(
DOMFileList(..) ,
IsDOMFileList ,
toDOMFileList ,
noDOMFileList ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
DOMFileListGetLengthMethodInfo ,
#endif
dOMFileListGetLength ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
DOMFileListItemMethodInfo ,
#endif
dOMFileListItem ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
DOMFileListLengthPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
dOMFileListLength ,
#endif
getDOMFileListLength ,
) 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 qualified GI.WebKit2WebExtension.Objects.DOMFile as WebKit2WebExtension.DOMFile
import qualified GI.WebKit2WebExtension.Objects.DOMObject as WebKit2WebExtension.DOMObject
newtype DOMFileList = DOMFileList (ManagedPtr DOMFileList)
foreign import ccall "webkit_dom_file_list_get_type"
c_webkit_dom_file_list_get_type :: IO GType
instance GObject DOMFileList where
gobjectType _ = c_webkit_dom_file_list_get_type
class GObject o => IsDOMFileList o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError DOMFileList a) =>
IsDOMFileList a
#endif
instance IsDOMFileList DOMFileList
instance WebKit2WebExtension.DOMObject.IsDOMObject DOMFileList
instance GObject.Object.IsObject DOMFileList
toDOMFileList :: (MonadIO m, IsDOMFileList o) => o -> m DOMFileList
toDOMFileList = liftIO . unsafeCastTo DOMFileList
noDOMFileList :: Maybe DOMFileList
noDOMFileList = Nothing
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type family ResolveDOMFileListMethod (t :: Symbol) (o :: *) :: * where
ResolveDOMFileListMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDOMFileListMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDOMFileListMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDOMFileListMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDOMFileListMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDOMFileListMethod "item" o = DOMFileListItemMethodInfo
ResolveDOMFileListMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDOMFileListMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDOMFileListMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDOMFileListMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDOMFileListMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveDOMFileListMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
ResolveDOMFileListMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDOMFileListMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDOMFileListMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDOMFileListMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDOMFileListMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDOMFileListMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDOMFileListMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDOMFileListMethod "getLength" o = DOMFileListGetLengthMethodInfo
ResolveDOMFileListMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDOMFileListMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDOMFileListMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDOMFileListMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDOMFileListMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDOMFileListMethod t DOMFileList, O.MethodInfo info DOMFileList p) => O.IsLabelProxy t (DOMFileList -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDOMFileListMethod t DOMFileList, O.MethodInfo info DOMFileList p) => O.IsLabel t (DOMFileList -> 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
#endif
getDOMFileListLength :: (MonadIO m, IsDOMFileList o) => o -> m CULong
getDOMFileListLength obj = liftIO $ getObjectPropertyULong obj "length"
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMFileListLengthPropertyInfo
instance AttrInfo DOMFileListLengthPropertyInfo where
type AttrAllowedOps DOMFileListLengthPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMFileListLengthPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMFileListLengthPropertyInfo = IsDOMFileList
type AttrGetType DOMFileListLengthPropertyInfo = CULong
type AttrLabel DOMFileListLengthPropertyInfo = "length"
type AttrOrigin DOMFileListLengthPropertyInfo = DOMFileList
attrGet _ = getDOMFileListLength
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
instance O.HasAttributeList DOMFileList
type instance O.AttributeList DOMFileList = DOMFileListAttributeList
type DOMFileListAttributeList = ('[ '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("length", DOMFileListLengthPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
dOMFileListLength :: AttrLabelProxy "length"
dOMFileListLength = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type instance O.SignalList DOMFileList = DOMFileListSignalList
type DOMFileListSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "webkit_dom_file_list_get_length" webkit_dom_file_list_get_length ::
Ptr DOMFileList ->
IO CULong
dOMFileListGetLength ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMFileList a) =>
a
-> m CULong
dOMFileListGetLength self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_file_list_get_length self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMFileListGetLengthMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMFileList a) => O.MethodInfo DOMFileListGetLengthMethodInfo a signature where
overloadedMethod _ = dOMFileListGetLength
#endif
foreign import ccall "webkit_dom_file_list_item" webkit_dom_file_list_item ::
Ptr DOMFileList ->
CULong ->
IO (Ptr WebKit2WebExtension.DOMFile.DOMFile)
dOMFileListItem ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMFileList a) =>
a
-> CULong
-> m WebKit2WebExtension.DOMFile.DOMFile
dOMFileListItem self index = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_file_list_item self' index
checkUnexpectedReturnNULL "dOMFileListItem" result
result' <- (wrapObject WebKit2WebExtension.DOMFile.DOMFile) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMFileListItemMethodInfo
instance (signature ~ (CULong -> m WebKit2WebExtension.DOMFile.DOMFile), MonadIO m, IsDOMFileList a) => O.MethodInfo DOMFileListItemMethodInfo a signature where
overloadedMethod _ = dOMFileListItem
#endif