#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.WebKit2WebExtension.Objects.DOMFileList
(
DOMFileList(..) ,
IsDOMFileList ,
toDOMFileList ,
noDOMFileList ,
#if ENABLE_OVERLOADING
DOMFileListGetLengthMethodInfo ,
#endif
dOMFileListGetLength ,
#if ENABLE_OVERLOADING
DOMFileListItemMethodInfo ,
#endif
dOMFileListItem ,
#if ENABLE_OVERLOADING
DOMFileListLengthPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
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.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.DOMFile as WebKit2WebExtension.DOMFile
import {-# SOURCE #-} 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, O.IsDescendantOf DOMFileList o) => IsDOMFileList o
instance (GObject o, O.IsDescendantOf DOMFileList o) => IsDOMFileList o
instance O.HasParentTypes DOMFileList
type instance O.ParentTypes DOMFileList = '[WebKit2WebExtension.DOMObject.DOMObject, GObject.Object.Object]
toDOMFileList :: (MonadIO m, IsDOMFileList o) => o -> m DOMFileList
toDOMFileList = liftIO . unsafeCastTo DOMFileList
noDOMFileList :: Maybe DOMFileList
noDOMFileList = Nothing
#if ENABLE_OVERLOADING
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 "getv" o = GObject.Object.ObjectGetvMethodInfo
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 "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 "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDOMFileListMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDOMFileListMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDOMFileListMethod t DOMFileList, O.MethodInfo info DOMFileList p) => OL.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
getDOMFileListLength :: (MonadIO m, IsDOMFileList o) => o -> m CULong
getDOMFileListLength obj = liftIO $ B.Properties.getObjectPropertyULong obj "length"
#if ENABLE_OVERLOADING
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 ENABLE_OVERLOADING
instance O.HasAttributeList DOMFileList
type instance O.AttributeList DOMFileList = DOMFileListAttributeList
type DOMFileListAttributeList = ('[ '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("length", DOMFileListLengthPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
dOMFileListLength :: AttrLabelProxy "length"
dOMFileListLength = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
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
{-# DEPRECATED dOMFileListGetLength ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
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 ENABLE_OVERLOADING
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)
{-# DEPRECATED dOMFileListItem ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
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 ENABLE_OVERLOADING
data DOMFileListItemMethodInfo
instance (signature ~ (CULong -> m WebKit2WebExtension.DOMFile.DOMFile), MonadIO m, IsDOMFileList a) => O.MethodInfo DOMFileListItemMethodInfo a signature where
overloadedMethod _ = dOMFileListItem
#endif