module GI.WebKit.Objects.DOMHTMLOptionsCollection
(
DOMHTMLOptionsCollection(..) ,
DOMHTMLOptionsCollectionK ,
toDOMHTMLOptionsCollection ,
noDOMHTMLOptionsCollection ,
dOMHTMLOptionsCollectionGetLength ,
dOMHTMLOptionsCollectionGetSelectedIndex,
dOMHTMLOptionsCollectionNamedItem ,
dOMHTMLOptionsCollectionSetSelectedIndex,
DOMHTMLOptionsCollectionLengthPropertyInfo,
getDOMHTMLOptionsCollectionLength ,
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
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 = "DOMHTMLOptionsCollection::length"
attrGet _ = getDOMHTMLOptionsCollectionLength
attrSet _ = undefined
attrConstruct _ = undefined
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 = "DOMHTMLOptionsCollection::selected-index"
attrGet _ = getDOMHTMLOptionsCollectionSelectedIndex
attrSet _ = setDOMHTMLOptionsCollectionSelectedIndex
attrConstruct _ = constructDOMHTMLOptionsCollectionSelectedIndex
type instance AttributeList DOMHTMLOptionsCollection = DOMHTMLOptionsCollectionAttributeList
type DOMHTMLOptionsCollectionAttributeList = ('[ '("core-object", DOMObjectCoreObjectPropertyInfo), '("length", DOMHTMLOptionsCollectionLengthPropertyInfo), '("selected-index", DOMHTMLOptionsCollectionSelectedIndexPropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMHTMLOptionsCollection = DOMHTMLOptionsCollectionSignalList
type DOMHTMLOptionsCollectionSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_dom_html_options_collection_get_length" webkit_dom_html_options_collection_get_length ::
Ptr DOMHTMLOptionsCollection ->
IO Word64
dOMHTMLOptionsCollectionGetLength ::
(MonadIO m, DOMHTMLOptionsCollectionK a) =>
a ->
m Word64
dOMHTMLOptionsCollectionGetLength _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_html_options_collection_get_length _obj'
touchManagedPtr _obj
return result
foreign import ccall "webkit_dom_html_options_collection_get_selected_index" webkit_dom_html_options_collection_get_selected_index ::
Ptr DOMHTMLOptionsCollection ->
IO Int64
dOMHTMLOptionsCollectionGetSelectedIndex ::
(MonadIO m, DOMHTMLOptionsCollectionK a) =>
a ->
m Int64
dOMHTMLOptionsCollectionGetSelectedIndex _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_html_options_collection_get_selected_index _obj'
touchManagedPtr _obj
return result
foreign import ccall "webkit_dom_html_options_collection_named_item" webkit_dom_html_options_collection_named_item ::
Ptr DOMHTMLOptionsCollection ->
CString ->
IO (Ptr DOMNode)
dOMHTMLOptionsCollectionNamedItem ::
(MonadIO m, DOMHTMLOptionsCollectionK a) =>
a ->
T.Text ->
m DOMNode
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'
foreign import ccall "webkit_dom_html_options_collection_set_selected_index" webkit_dom_html_options_collection_set_selected_index ::
Ptr DOMHTMLOptionsCollection ->
Int64 ->
IO ()
dOMHTMLOptionsCollectionSetSelectedIndex ::
(MonadIO m, DOMHTMLOptionsCollectionK a) =>
a ->
Int64 ->
m ()
dOMHTMLOptionsCollectionSetSelectedIndex _obj value = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
webkit_dom_html_options_collection_set_selected_index _obj' value
touchManagedPtr _obj
return ()