gi-webkit-0.2.4.13: GI/WebKit/Objects/DOMHTMLOptionsCollection.hs
{- |
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.DOMHTMLOptionsCollection
(
-- * Exported types
DOMHTMLOptionsCollection(..) ,
DOMHTMLOptionsCollectionK ,
toDOMHTMLOptionsCollection ,
noDOMHTMLOptionsCollection ,
-- * Methods
-- ** dOMHTMLOptionsCollectionGetLength
DOMHTMLOptionsCollectionGetLengthMethodInfo,
dOMHTMLOptionsCollectionGetLength ,
-- ** dOMHTMLOptionsCollectionGetSelectedIndex
DOMHTMLOptionsCollectionGetSelectedIndexMethodInfo,
dOMHTMLOptionsCollectionGetSelectedIndex,
-- ** dOMHTMLOptionsCollectionNamedItem
DOMHTMLOptionsCollectionNamedItemMethodInfo,
dOMHTMLOptionsCollectionNamedItem ,
-- ** dOMHTMLOptionsCollectionSetSelectedIndex
DOMHTMLOptionsCollectionSetSelectedIndexMethodInfo,
dOMHTMLOptionsCollectionSetSelectedIndex,
-- * Properties
-- ** Length
DOMHTMLOptionsCollectionLengthPropertyInfo,
getDOMHTMLOptionsCollectionLength ,
-- ** SelectedIndex
DOMHTMLOptionsCollectionSelectedIndexPropertyInfo,
constructDOMHTMLOptionsCollectionSelectedIndex,
getDOMHTMLOptionsCollectionSelectedIndex,
setDOMHTMLOptionsCollectionSelectedIndex,
) 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 DOMHTMLOptionsCollection = DOMHTMLOptionsCollection (ForeignPtr DOMHTMLOptionsCollection)
foreign import ccall "webkit_dom_html_options_collection_get_type"
c_webkit_dom_html_options_collection_get_type :: IO GType
type instance ParentTypes DOMHTMLOptionsCollection = DOMHTMLOptionsCollectionParentTypes
type DOMHTMLOptionsCollectionParentTypes = '[DOMHTMLCollection, DOMObject, GObject.Object]
instance GObject DOMHTMLOptionsCollection where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_html_options_collection_get_type
class GObject o => DOMHTMLOptionsCollectionK o
instance (GObject o, IsDescendantOf DOMHTMLOptionsCollection o) => DOMHTMLOptionsCollectionK o
toDOMHTMLOptionsCollection :: DOMHTMLOptionsCollectionK o => o -> IO DOMHTMLOptionsCollection
toDOMHTMLOptionsCollection = unsafeCastTo DOMHTMLOptionsCollection
noDOMHTMLOptionsCollection :: Maybe DOMHTMLOptionsCollection
noDOMHTMLOptionsCollection = Nothing
type family ResolveDOMHTMLOptionsCollectionMethod (t :: Symbol) (o :: *) :: * where
ResolveDOMHTMLOptionsCollectionMethod "bindProperty" o = GObject.ObjectBindPropertyMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "bindPropertyFull" o = GObject.ObjectBindPropertyFullMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "forceFloating" o = GObject.ObjectForceFloatingMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "freezeNotify" o = GObject.ObjectFreezeNotifyMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "isFloating" o = GObject.ObjectIsFloatingMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "item" o = DOMHTMLCollectionItemMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "notify" o = GObject.ObjectNotifyMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "notifyByPspec" o = GObject.ObjectNotifyByPspecMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "ref" o = GObject.ObjectRefMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "refSink" o = GObject.ObjectRefSinkMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "replaceData" o = GObject.ObjectReplaceDataMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "replaceQdata" o = GObject.ObjectReplaceQdataMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "runDispose" o = GObject.ObjectRunDisposeMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "stealData" o = GObject.ObjectStealDataMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "stealQdata" o = GObject.ObjectStealQdataMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "thawNotify" o = GObject.ObjectThawNotifyMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "unref" o = GObject.ObjectUnrefMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "watchClosure" o = GObject.ObjectWatchClosureMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "getData" o = GObject.ObjectGetDataMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "getProperty" o = GObject.ObjectGetPropertyMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "getQdata" o = GObject.ObjectGetQdataMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "getSelectedIndex" o = DOMHTMLOptionsCollectionGetSelectedIndexMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "setData" o = GObject.ObjectSetDataMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "setProperty" o = GObject.ObjectSetPropertyMethodInfo
ResolveDOMHTMLOptionsCollectionMethod "setSelectedIndex" o = DOMHTMLOptionsCollectionSetSelectedIndexMethodInfo
ResolveDOMHTMLOptionsCollectionMethod l o = MethodResolutionFailed l o
instance (info ~ ResolveDOMHTMLOptionsCollectionMethod t DOMHTMLOptionsCollection, MethodInfo info DOMHTMLOptionsCollection p) => IsLabelProxy t (DOMHTMLOptionsCollection -> p) where
fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDOMHTMLOptionsCollectionMethod t DOMHTMLOptionsCollection, MethodInfo info DOMHTMLOptionsCollection p) => IsLabel t (DOMHTMLOptionsCollection -> p) where
fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)
#endif
-- VVV Prop "length"
-- Type: TBasicType TUInt64
-- Flags: [PropertyReadable]
getDOMHTMLOptionsCollectionLength :: (MonadIO m, DOMHTMLOptionsCollectionK o) => o -> m Word64
getDOMHTMLOptionsCollectionLength obj = liftIO $ getObjectPropertyUInt64 obj "length"
data DOMHTMLOptionsCollectionLengthPropertyInfo
instance AttrInfo DOMHTMLOptionsCollectionLengthPropertyInfo where
type AttrAllowedOps DOMHTMLOptionsCollectionLengthPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMHTMLOptionsCollectionLengthPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMHTMLOptionsCollectionLengthPropertyInfo = DOMHTMLOptionsCollectionK
type AttrGetType DOMHTMLOptionsCollectionLengthPropertyInfo = Word64
type AttrLabel DOMHTMLOptionsCollectionLengthPropertyInfo = "length"
attrGet _ = getDOMHTMLOptionsCollectionLength
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "selected-index"
-- Type: TBasicType TInt64
-- Flags: [PropertyReadable,PropertyWritable]
getDOMHTMLOptionsCollectionSelectedIndex :: (MonadIO m, DOMHTMLOptionsCollectionK o) => o -> m Int64
getDOMHTMLOptionsCollectionSelectedIndex obj = liftIO $ getObjectPropertyInt64 obj "selected-index"
setDOMHTMLOptionsCollectionSelectedIndex :: (MonadIO m, DOMHTMLOptionsCollectionK o) => o -> Int64 -> m ()
setDOMHTMLOptionsCollectionSelectedIndex obj val = liftIO $ setObjectPropertyInt64 obj "selected-index" val
constructDOMHTMLOptionsCollectionSelectedIndex :: Int64 -> IO ([Char], GValue)
constructDOMHTMLOptionsCollectionSelectedIndex val = constructObjectPropertyInt64 "selected-index" val
data DOMHTMLOptionsCollectionSelectedIndexPropertyInfo
instance AttrInfo DOMHTMLOptionsCollectionSelectedIndexPropertyInfo where
type AttrAllowedOps DOMHTMLOptionsCollectionSelectedIndexPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DOMHTMLOptionsCollectionSelectedIndexPropertyInfo = (~) Int64
type AttrBaseTypeConstraint DOMHTMLOptionsCollectionSelectedIndexPropertyInfo = DOMHTMLOptionsCollectionK
type AttrGetType DOMHTMLOptionsCollectionSelectedIndexPropertyInfo = Int64
type AttrLabel DOMHTMLOptionsCollectionSelectedIndexPropertyInfo = "selected-index"
attrGet _ = getDOMHTMLOptionsCollectionSelectedIndex
attrSet _ = setDOMHTMLOptionsCollectionSelectedIndex
attrConstruct _ = constructDOMHTMLOptionsCollectionSelectedIndex
type instance AttributeList DOMHTMLOptionsCollection = DOMHTMLOptionsCollectionAttributeList
type DOMHTMLOptionsCollectionAttributeList = ('[ '("coreObject", DOMObjectCoreObjectPropertyInfo), '("length", DOMHTMLOptionsCollectionLengthPropertyInfo), '("selectedIndex", DOMHTMLOptionsCollectionSelectedIndexPropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMHTMLOptionsCollection = DOMHTMLOptionsCollectionSignalList
type DOMHTMLOptionsCollectionSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method DOMHTMLOptionsCollection::get_length
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionsCollection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_html_options_collection_get_length" webkit_dom_html_options_collection_get_length ::
Ptr DOMHTMLOptionsCollection -> -- _obj : TInterface "WebKit" "DOMHTMLOptionsCollection"
IO Word64
dOMHTMLOptionsCollectionGetLength ::
(MonadIO m, DOMHTMLOptionsCollectionK a) =>
a -- _obj
-> m Word64 -- result
dOMHTMLOptionsCollectionGetLength _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_html_options_collection_get_length _obj'
touchManagedPtr _obj
return result
data DOMHTMLOptionsCollectionGetLengthMethodInfo
instance (signature ~ (m Word64), MonadIO m, DOMHTMLOptionsCollectionK a) => MethodInfo DOMHTMLOptionsCollectionGetLengthMethodInfo a signature where
overloadedMethod _ = dOMHTMLOptionsCollectionGetLength
-- method DOMHTMLOptionsCollection::get_selected_index
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionsCollection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_html_options_collection_get_selected_index" webkit_dom_html_options_collection_get_selected_index ::
Ptr DOMHTMLOptionsCollection -> -- _obj : TInterface "WebKit" "DOMHTMLOptionsCollection"
IO Int64
dOMHTMLOptionsCollectionGetSelectedIndex ::
(MonadIO m, DOMHTMLOptionsCollectionK a) =>
a -- _obj
-> m Int64 -- result
dOMHTMLOptionsCollectionGetSelectedIndex _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_html_options_collection_get_selected_index _obj'
touchManagedPtr _obj
return result
data DOMHTMLOptionsCollectionGetSelectedIndexMethodInfo
instance (signature ~ (m Int64), MonadIO m, DOMHTMLOptionsCollectionK a) => MethodInfo DOMHTMLOptionsCollectionGetSelectedIndexMethodInfo a signature where
overloadedMethod _ = dOMHTMLOptionsCollectionGetSelectedIndex
-- method DOMHTMLOptionsCollection::named_item
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionsCollection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : TInterface "WebKit" "DOMNode"
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_html_options_collection_named_item" webkit_dom_html_options_collection_named_item ::
Ptr DOMHTMLOptionsCollection -> -- _obj : TInterface "WebKit" "DOMHTMLOptionsCollection"
CString -> -- name : TBasicType TUTF8
IO (Ptr DOMNode)
dOMHTMLOptionsCollectionNamedItem ::
(MonadIO m, DOMHTMLOptionsCollectionK a) =>
a -- _obj
-> T.Text -- name
-> m DOMNode -- result
dOMHTMLOptionsCollectionNamedItem _obj name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
name' <- textToCString name
result <- webkit_dom_html_options_collection_named_item _obj' name'
checkUnexpectedReturnNULL "webkit_dom_html_options_collection_named_item" result
result' <- (newObject DOMNode) result
touchManagedPtr _obj
freeMem name'
return result'
data DOMHTMLOptionsCollectionNamedItemMethodInfo
instance (signature ~ (T.Text -> m DOMNode), MonadIO m, DOMHTMLOptionsCollectionK a) => MethodInfo DOMHTMLOptionsCollectionNamedItemMethodInfo a signature where
overloadedMethod _ = dOMHTMLOptionsCollectionNamedItem
-- method DOMHTMLOptionsCollection::set_selected_index
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionsCollection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_html_options_collection_set_selected_index" webkit_dom_html_options_collection_set_selected_index ::
Ptr DOMHTMLOptionsCollection -> -- _obj : TInterface "WebKit" "DOMHTMLOptionsCollection"
Int64 -> -- value : TBasicType TInt64
IO ()
dOMHTMLOptionsCollectionSetSelectedIndex ::
(MonadIO m, DOMHTMLOptionsCollectionK a) =>
a -- _obj
-> Int64 -- value
-> m () -- result
dOMHTMLOptionsCollectionSetSelectedIndex _obj value = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
webkit_dom_html_options_collection_set_selected_index _obj' value
touchManagedPtr _obj
return ()
data DOMHTMLOptionsCollectionSetSelectedIndexMethodInfo
instance (signature ~ (Int64 -> m ()), MonadIO m, DOMHTMLOptionsCollectionK a) => MethodInfo DOMHTMLOptionsCollectionSetSelectedIndexMethodInfo a signature where
overloadedMethod _ = dOMHTMLOptionsCollectionSetSelectedIndex