{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.WebKit2WebExtension.Objects.DOMFileList
(
DOMFileList(..) ,
IsDOMFileList ,
toDOMFileList ,
noDOMFileList ,
#if defined(ENABLE_OVERLOADING)
ResolveDOMFileListMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DOMFileListGetLengthMethodInfo ,
#endif
dOMFileListGetLength ,
#if defined(ENABLE_OVERLOADING)
DOMFileListItemMethodInfo ,
#endif
dOMFileListItem ,
#if defined(ENABLE_OVERLOADING)
DOMFileListLengthPropertyInfo ,
#endif
#if defined(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.GI.Base.Signals as B.Signals
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)
deriving (DOMFileList -> DOMFileList -> Bool
(DOMFileList -> DOMFileList -> Bool)
-> (DOMFileList -> DOMFileList -> Bool) -> Eq DOMFileList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DOMFileList -> DOMFileList -> Bool
$c/= :: DOMFileList -> DOMFileList -> Bool
== :: DOMFileList -> DOMFileList -> Bool
$c== :: DOMFileList -> DOMFileList -> Bool
Eq)
foreign import ccall "webkit_dom_file_list_get_type"
c_webkit_dom_file_list_get_type :: IO GType
instance GObject DOMFileList where
gobjectType :: IO GType
gobjectType = IO GType
c_webkit_dom_file_list_get_type
instance B.GValue.IsGValue DOMFileList where
toGValue :: DOMFileList -> IO GValue
toGValue o :: DOMFileList
o = do
GType
gtype <- IO GType
c_webkit_dom_file_list_get_type
DOMFileList -> (Ptr DOMFileList -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DOMFileList
o (GType
-> (GValue -> Ptr DOMFileList -> IO ())
-> Ptr DOMFileList
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr DOMFileList -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO DOMFileList
fromGValue gv :: GValue
gv = do
Ptr DOMFileList
ptr <- GValue -> IO (Ptr DOMFileList)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr DOMFileList)
(ManagedPtr DOMFileList -> DOMFileList)
-> Ptr DOMFileList -> IO DOMFileList
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DOMFileList -> DOMFileList
DOMFileList Ptr DOMFileList
ptr
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 :: o -> m DOMFileList
toDOMFileList = IO DOMFileList -> m DOMFileList
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DOMFileList -> m DOMFileList)
-> (o -> IO DOMFileList) -> o -> m DOMFileList
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DOMFileList -> DOMFileList) -> o -> IO DOMFileList
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr DOMFileList -> DOMFileList
DOMFileList
noDOMFileList :: Maybe DOMFileList
noDOMFileList :: Maybe DOMFileList
noDOMFileList = Maybe DOMFileList
forall a. Maybe a
Nothing
#if defined(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 @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
getDOMFileListLength :: (MonadIO m, IsDOMFileList o) => o -> m CULong
getDOMFileListLength :: o -> m CULong
getDOMFileListLength obj :: o
obj = IO CULong -> m CULong
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CULong -> m CULong) -> IO CULong -> m CULong
forall a b. (a -> b) -> a -> b
$ o -> String -> IO CULong
forall a. GObject a => a -> String -> IO CULong
B.Properties.getObjectPropertyULong o
obj "length"
#if defined(ENABLE_OVERLOADING)
data DOMFileListLengthPropertyInfo
instance AttrInfo DOMFileListLengthPropertyInfo where
type AttrAllowedOps DOMFileListLengthPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DOMFileListLengthPropertyInfo = IsDOMFileList
type AttrSetTypeConstraint DOMFileListLengthPropertyInfo = (~) ()
type AttrTransferTypeConstraint DOMFileListLengthPropertyInfo = (~) ()
type AttrTransferType DOMFileListLengthPropertyInfo = ()
type AttrGetType DOMFileListLengthPropertyInfo = CULong
type AttrLabel DOMFileListLengthPropertyInfo = "length"
type AttrOrigin DOMFileListLengthPropertyInfo = DOMFileList
attrGet = getDOMFileListLength
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DOMFileList
type instance O.AttributeList DOMFileList = DOMFileListAttributeList
type DOMFileListAttributeList = ('[ '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("length", DOMFileListLengthPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
dOMFileListLength :: AttrLabelProxy "length"
dOMFileListLength = AttrLabelProxy
#endif
#if defined(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 :: a -> m CULong
dOMFileListGetLength self :: a
self = IO CULong -> m CULong
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CULong -> m CULong) -> IO CULong -> m CULong
forall a b. (a -> b) -> a -> b
$ do
Ptr DOMFileList
self' <- a -> IO (Ptr DOMFileList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CULong
result <- Ptr DOMFileList -> IO CULong
webkit_dom_file_list_get_length Ptr DOMFileList
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CULong -> IO CULong
forall (m :: * -> *) a. Monad m => a -> m a
return CULong
result
#if defined(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 :: a -> CULong -> m DOMFile
dOMFileListItem self :: a
self index :: CULong
index = IO DOMFile -> m DOMFile
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DOMFile -> m DOMFile) -> IO DOMFile -> m DOMFile
forall a b. (a -> b) -> a -> b
$ do
Ptr DOMFileList
self' <- a -> IO (Ptr DOMFileList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr DOMFile
result <- Ptr DOMFileList -> CULong -> IO (Ptr DOMFile)
webkit_dom_file_list_item Ptr DOMFileList
self' CULong
index
Text -> Ptr DOMFile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "dOMFileListItem" Ptr DOMFile
result
DOMFile
result' <- ((ManagedPtr DOMFile -> DOMFile) -> Ptr DOMFile -> IO DOMFile
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DOMFile -> DOMFile
WebKit2WebExtension.DOMFile.DOMFile) Ptr DOMFile
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
DOMFile -> IO DOMFile
forall (m :: * -> *) a. Monad m => a -> m a
return DOMFile
result'
#if defined(ENABLE_OVERLOADING)
data DOMFileListItemMethodInfo
instance (signature ~ (CULong -> m WebKit2WebExtension.DOMFile.DOMFile), MonadIO m, IsDOMFileList a) => O.MethodInfo DOMFileListItemMethodInfo a signature where
overloadedMethod = dOMFileListItem
#endif