{- |
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.DOMHTMLOptionElement
    ( 

-- * Exported types
    DOMHTMLOptionElement(..)                ,
    DOMHTMLOptionElementK                   ,
    toDOMHTMLOptionElement                  ,
    noDOMHTMLOptionElement                  ,


 -- * Methods
-- ** dOMHTMLOptionElementGetDefaultSelected
    dOMHTMLOptionElementGetDefaultSelected  ,


-- ** dOMHTMLOptionElementGetDisabled
    dOMHTMLOptionElementGetDisabled         ,


-- ** dOMHTMLOptionElementGetForm
    dOMHTMLOptionElementGetForm             ,


-- ** dOMHTMLOptionElementGetIndex
    dOMHTMLOptionElementGetIndex            ,


-- ** dOMHTMLOptionElementGetLabel
    dOMHTMLOptionElementGetLabel            ,


-- ** dOMHTMLOptionElementGetSelected
    dOMHTMLOptionElementGetSelected         ,


-- ** dOMHTMLOptionElementGetText
    dOMHTMLOptionElementGetText             ,


-- ** dOMHTMLOptionElementGetValue
    dOMHTMLOptionElementGetValue            ,


-- ** dOMHTMLOptionElementSetDefaultSelected
    dOMHTMLOptionElementSetDefaultSelected  ,


-- ** dOMHTMLOptionElementSetDisabled
    dOMHTMLOptionElementSetDisabled         ,


-- ** dOMHTMLOptionElementSetLabel
    dOMHTMLOptionElementSetLabel            ,


-- ** dOMHTMLOptionElementSetSelected
    dOMHTMLOptionElementSetSelected         ,


-- ** dOMHTMLOptionElementSetValue
    dOMHTMLOptionElementSetValue            ,




 -- * Properties
-- ** DefaultSelected
    DOMHTMLOptionElementDefaultSelectedPropertyInfo,
    constructDOMHTMLOptionElementDefaultSelected,
    getDOMHTMLOptionElementDefaultSelected  ,
    setDOMHTMLOptionElementDefaultSelected  ,


-- ** Disabled
    DOMHTMLOptionElementDisabledPropertyInfo,
    constructDOMHTMLOptionElementDisabled   ,
    getDOMHTMLOptionElementDisabled         ,
    setDOMHTMLOptionElementDisabled         ,


-- ** Form
    DOMHTMLOptionElementFormPropertyInfo    ,
    getDOMHTMLOptionElementForm             ,


-- ** Index
    DOMHTMLOptionElementIndexPropertyInfo   ,
    getDOMHTMLOptionElementIndex            ,


-- ** Label
    DOMHTMLOptionElementLabelPropertyInfo   ,
    constructDOMHTMLOptionElementLabel      ,
    getDOMHTMLOptionElementLabel            ,
    setDOMHTMLOptionElementLabel            ,


-- ** Selected
    DOMHTMLOptionElementSelectedPropertyInfo,
    constructDOMHTMLOptionElementSelected   ,
    getDOMHTMLOptionElementSelected         ,
    setDOMHTMLOptionElementSelected         ,


-- ** Text
    DOMHTMLOptionElementTextPropertyInfo    ,
    getDOMHTMLOptionElementText             ,


-- ** Value
    DOMHTMLOptionElementValuePropertyInfo   ,
    constructDOMHTMLOptionElementValue      ,
    getDOMHTMLOptionElementValue            ,
    setDOMHTMLOptionElementValue            ,




    ) 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 DOMHTMLOptionElement = DOMHTMLOptionElement (ForeignPtr DOMHTMLOptionElement)
foreign import ccall "webkit_dom_html_option_element_get_type"
    c_webkit_dom_html_option_element_get_type :: IO GType

type instance ParentTypes DOMHTMLOptionElement = DOMHTMLOptionElementParentTypes
type DOMHTMLOptionElementParentTypes = '[DOMHTMLElement, DOMElement, DOMNode, DOMObject, GObject.Object, DOMEventTarget]

instance GObject DOMHTMLOptionElement where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_dom_html_option_element_get_type
    

class GObject o => DOMHTMLOptionElementK o
instance (GObject o, IsDescendantOf DOMHTMLOptionElement o) => DOMHTMLOptionElementK o

toDOMHTMLOptionElement :: DOMHTMLOptionElementK o => o -> IO DOMHTMLOptionElement
toDOMHTMLOptionElement = unsafeCastTo DOMHTMLOptionElement

noDOMHTMLOptionElement :: Maybe DOMHTMLOptionElement
noDOMHTMLOptionElement = Nothing

-- VVV Prop "default-selected"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getDOMHTMLOptionElementDefaultSelected :: (MonadIO m, DOMHTMLOptionElementK o) => o -> m Bool
getDOMHTMLOptionElementDefaultSelected obj = liftIO $ getObjectPropertyBool obj "default-selected"

setDOMHTMLOptionElementDefaultSelected :: (MonadIO m, DOMHTMLOptionElementK o) => o -> Bool -> m ()
setDOMHTMLOptionElementDefaultSelected obj val = liftIO $ setObjectPropertyBool obj "default-selected" val

constructDOMHTMLOptionElementDefaultSelected :: Bool -> IO ([Char], GValue)
constructDOMHTMLOptionElementDefaultSelected val = constructObjectPropertyBool "default-selected" val

data DOMHTMLOptionElementDefaultSelectedPropertyInfo
instance AttrInfo DOMHTMLOptionElementDefaultSelectedPropertyInfo where
    type AttrAllowedOps DOMHTMLOptionElementDefaultSelectedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOptionElementDefaultSelectedPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint DOMHTMLOptionElementDefaultSelectedPropertyInfo = DOMHTMLOptionElementK
    type AttrGetType DOMHTMLOptionElementDefaultSelectedPropertyInfo = Bool
    type AttrLabel DOMHTMLOptionElementDefaultSelectedPropertyInfo = "DOMHTMLOptionElement::default-selected"
    attrGet _ = getDOMHTMLOptionElementDefaultSelected
    attrSet _ = setDOMHTMLOptionElementDefaultSelected
    attrConstruct _ = constructDOMHTMLOptionElementDefaultSelected

-- VVV Prop "disabled"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getDOMHTMLOptionElementDisabled :: (MonadIO m, DOMHTMLOptionElementK o) => o -> m Bool
getDOMHTMLOptionElementDisabled obj = liftIO $ getObjectPropertyBool obj "disabled"

setDOMHTMLOptionElementDisabled :: (MonadIO m, DOMHTMLOptionElementK o) => o -> Bool -> m ()
setDOMHTMLOptionElementDisabled obj val = liftIO $ setObjectPropertyBool obj "disabled" val

constructDOMHTMLOptionElementDisabled :: Bool -> IO ([Char], GValue)
constructDOMHTMLOptionElementDisabled val = constructObjectPropertyBool "disabled" val

data DOMHTMLOptionElementDisabledPropertyInfo
instance AttrInfo DOMHTMLOptionElementDisabledPropertyInfo where
    type AttrAllowedOps DOMHTMLOptionElementDisabledPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOptionElementDisabledPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint DOMHTMLOptionElementDisabledPropertyInfo = DOMHTMLOptionElementK
    type AttrGetType DOMHTMLOptionElementDisabledPropertyInfo = Bool
    type AttrLabel DOMHTMLOptionElementDisabledPropertyInfo = "DOMHTMLOptionElement::disabled"
    attrGet _ = getDOMHTMLOptionElementDisabled
    attrSet _ = setDOMHTMLOptionElementDisabled
    attrConstruct _ = constructDOMHTMLOptionElementDisabled

-- VVV Prop "form"
   -- Type: TInterface "WebKit" "DOMHTMLFormElement"
   -- Flags: [PropertyReadable]

getDOMHTMLOptionElementForm :: (MonadIO m, DOMHTMLOptionElementK o) => o -> m DOMHTMLFormElement
getDOMHTMLOptionElementForm obj = liftIO $ getObjectPropertyObject obj "form" DOMHTMLFormElement

data DOMHTMLOptionElementFormPropertyInfo
instance AttrInfo DOMHTMLOptionElementFormPropertyInfo where
    type AttrAllowedOps DOMHTMLOptionElementFormPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOptionElementFormPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMHTMLOptionElementFormPropertyInfo = DOMHTMLOptionElementK
    type AttrGetType DOMHTMLOptionElementFormPropertyInfo = DOMHTMLFormElement
    type AttrLabel DOMHTMLOptionElementFormPropertyInfo = "DOMHTMLOptionElement::form"
    attrGet _ = getDOMHTMLOptionElementForm
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "index"
   -- Type: TBasicType TInt64
   -- Flags: [PropertyReadable]

getDOMHTMLOptionElementIndex :: (MonadIO m, DOMHTMLOptionElementK o) => o -> m Int64
getDOMHTMLOptionElementIndex obj = liftIO $ getObjectPropertyInt64 obj "index"

data DOMHTMLOptionElementIndexPropertyInfo
instance AttrInfo DOMHTMLOptionElementIndexPropertyInfo where
    type AttrAllowedOps DOMHTMLOptionElementIndexPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOptionElementIndexPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMHTMLOptionElementIndexPropertyInfo = DOMHTMLOptionElementK
    type AttrGetType DOMHTMLOptionElementIndexPropertyInfo = Int64
    type AttrLabel DOMHTMLOptionElementIndexPropertyInfo = "DOMHTMLOptionElement::index"
    attrGet _ = getDOMHTMLOptionElementIndex
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "label"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]

getDOMHTMLOptionElementLabel :: (MonadIO m, DOMHTMLOptionElementK o) => o -> m T.Text
getDOMHTMLOptionElementLabel obj = liftIO $ getObjectPropertyString obj "label"

setDOMHTMLOptionElementLabel :: (MonadIO m, DOMHTMLOptionElementK o) => o -> T.Text -> m ()
setDOMHTMLOptionElementLabel obj val = liftIO $ setObjectPropertyString obj "label" val

constructDOMHTMLOptionElementLabel :: T.Text -> IO ([Char], GValue)
constructDOMHTMLOptionElementLabel val = constructObjectPropertyString "label" val

data DOMHTMLOptionElementLabelPropertyInfo
instance AttrInfo DOMHTMLOptionElementLabelPropertyInfo where
    type AttrAllowedOps DOMHTMLOptionElementLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOptionElementLabelPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint DOMHTMLOptionElementLabelPropertyInfo = DOMHTMLOptionElementK
    type AttrGetType DOMHTMLOptionElementLabelPropertyInfo = T.Text
    type AttrLabel DOMHTMLOptionElementLabelPropertyInfo = "DOMHTMLOptionElement::label"
    attrGet _ = getDOMHTMLOptionElementLabel
    attrSet _ = setDOMHTMLOptionElementLabel
    attrConstruct _ = constructDOMHTMLOptionElementLabel

-- VVV Prop "selected"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getDOMHTMLOptionElementSelected :: (MonadIO m, DOMHTMLOptionElementK o) => o -> m Bool
getDOMHTMLOptionElementSelected obj = liftIO $ getObjectPropertyBool obj "selected"

setDOMHTMLOptionElementSelected :: (MonadIO m, DOMHTMLOptionElementK o) => o -> Bool -> m ()
setDOMHTMLOptionElementSelected obj val = liftIO $ setObjectPropertyBool obj "selected" val

constructDOMHTMLOptionElementSelected :: Bool -> IO ([Char], GValue)
constructDOMHTMLOptionElementSelected val = constructObjectPropertyBool "selected" val

data DOMHTMLOptionElementSelectedPropertyInfo
instance AttrInfo DOMHTMLOptionElementSelectedPropertyInfo where
    type AttrAllowedOps DOMHTMLOptionElementSelectedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOptionElementSelectedPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint DOMHTMLOptionElementSelectedPropertyInfo = DOMHTMLOptionElementK
    type AttrGetType DOMHTMLOptionElementSelectedPropertyInfo = Bool
    type AttrLabel DOMHTMLOptionElementSelectedPropertyInfo = "DOMHTMLOptionElement::selected"
    attrGet _ = getDOMHTMLOptionElementSelected
    attrSet _ = setDOMHTMLOptionElementSelected
    attrConstruct _ = constructDOMHTMLOptionElementSelected

-- VVV Prop "text"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]

getDOMHTMLOptionElementText :: (MonadIO m, DOMHTMLOptionElementK o) => o -> m T.Text
getDOMHTMLOptionElementText obj = liftIO $ getObjectPropertyString obj "text"

data DOMHTMLOptionElementTextPropertyInfo
instance AttrInfo DOMHTMLOptionElementTextPropertyInfo where
    type AttrAllowedOps DOMHTMLOptionElementTextPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOptionElementTextPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMHTMLOptionElementTextPropertyInfo = DOMHTMLOptionElementK
    type AttrGetType DOMHTMLOptionElementTextPropertyInfo = T.Text
    type AttrLabel DOMHTMLOptionElementTextPropertyInfo = "DOMHTMLOptionElement::text"
    attrGet _ = getDOMHTMLOptionElementText
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "value"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]

getDOMHTMLOptionElementValue :: (MonadIO m, DOMHTMLOptionElementK o) => o -> m T.Text
getDOMHTMLOptionElementValue obj = liftIO $ getObjectPropertyString obj "value"

setDOMHTMLOptionElementValue :: (MonadIO m, DOMHTMLOptionElementK o) => o -> T.Text -> m ()
setDOMHTMLOptionElementValue obj val = liftIO $ setObjectPropertyString obj "value" val

constructDOMHTMLOptionElementValue :: T.Text -> IO ([Char], GValue)
constructDOMHTMLOptionElementValue val = constructObjectPropertyString "value" val

data DOMHTMLOptionElementValuePropertyInfo
instance AttrInfo DOMHTMLOptionElementValuePropertyInfo where
    type AttrAllowedOps DOMHTMLOptionElementValuePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOptionElementValuePropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint DOMHTMLOptionElementValuePropertyInfo = DOMHTMLOptionElementK
    type AttrGetType DOMHTMLOptionElementValuePropertyInfo = T.Text
    type AttrLabel DOMHTMLOptionElementValuePropertyInfo = "DOMHTMLOptionElement::value"
    attrGet _ = getDOMHTMLOptionElementValue
    attrSet _ = setDOMHTMLOptionElementValue
    attrConstruct _ = constructDOMHTMLOptionElementValue

type instance AttributeList DOMHTMLOptionElement = DOMHTMLOptionElementAttributeList
type DOMHTMLOptionElementAttributeList = ('[ '("access-key", DOMHTMLElementAccessKeyPropertyInfo), '("attributes", DOMElementAttributesPropertyInfo), '("base-uri", DOMNodeBaseUriPropertyInfo), '("child-element-count", DOMElementChildElementCountPropertyInfo), '("child-nodes", DOMNodeChildNodesPropertyInfo), '("children", DOMHTMLElementChildrenPropertyInfo), '("class-list", DOMElementClassListPropertyInfo), '("class-name", DOMElementClassNamePropertyInfo), '("client-height", DOMElementClientHeightPropertyInfo), '("client-left", DOMElementClientLeftPropertyInfo), '("client-top", DOMElementClientTopPropertyInfo), '("client-width", DOMElementClientWidthPropertyInfo), '("content-editable", DOMHTMLElementContentEditablePropertyInfo), '("core-object", DOMObjectCoreObjectPropertyInfo), '("default-selected", DOMHTMLOptionElementDefaultSelectedPropertyInfo), '("dir", DOMHTMLElementDirPropertyInfo), '("disabled", DOMHTMLOptionElementDisabledPropertyInfo), '("draggable", DOMHTMLElementDraggablePropertyInfo), '("first-child", DOMNodeFirstChildPropertyInfo), '("first-element-child", DOMElementFirstElementChildPropertyInfo), '("form", DOMHTMLOptionElementFormPropertyInfo), '("hidden", DOMHTMLElementHiddenPropertyInfo), '("id", DOMElementIdPropertyInfo), '("index", DOMHTMLOptionElementIndexPropertyInfo), '("inner-html", DOMHTMLElementInnerHtmlPropertyInfo), '("inner-text", DOMHTMLElementInnerTextPropertyInfo), '("is-content-editable", DOMHTMLElementIsContentEditablePropertyInfo), '("label", DOMHTMLOptionElementLabelPropertyInfo), '("lang", DOMHTMLElementLangPropertyInfo), '("last-child", DOMNodeLastChildPropertyInfo), '("last-element-child", DOMElementLastElementChildPropertyInfo), '("local-name", DOMNodeLocalNamePropertyInfo), '("namespace-uri", DOMNodeNamespaceUriPropertyInfo), '("next-element-sibling", DOMElementNextElementSiblingPropertyInfo), '("next-sibling", DOMNodeNextSiblingPropertyInfo), '("node-name", DOMNodeNodeNamePropertyInfo), '("node-type", DOMNodeNodeTypePropertyInfo), '("node-value", DOMNodeNodeValuePropertyInfo), '("offset-height", DOMElementOffsetHeightPropertyInfo), '("offset-left", DOMElementOffsetLeftPropertyInfo), '("offset-parent", DOMElementOffsetParentPropertyInfo), '("offset-top", DOMElementOffsetTopPropertyInfo), '("offset-width", DOMElementOffsetWidthPropertyInfo), '("outer-html", DOMHTMLElementOuterHtmlPropertyInfo), '("outer-text", DOMHTMLElementOuterTextPropertyInfo), '("owner-document", DOMNodeOwnerDocumentPropertyInfo), '("parent-element", DOMNodeParentElementPropertyInfo), '("parent-node", DOMNodeParentNodePropertyInfo), '("prefix", DOMNodePrefixPropertyInfo), '("previous-element-sibling", DOMElementPreviousElementSiblingPropertyInfo), '("previous-sibling", DOMNodePreviousSiblingPropertyInfo), '("scroll-height", DOMElementScrollHeightPropertyInfo), '("scroll-left", DOMElementScrollLeftPropertyInfo), '("scroll-top", DOMElementScrollTopPropertyInfo), '("scroll-width", DOMElementScrollWidthPropertyInfo), '("selected", DOMHTMLOptionElementSelectedPropertyInfo), '("spellcheck", DOMHTMLElementSpellcheckPropertyInfo), '("style", DOMElementStylePropertyInfo), '("tab-index", DOMHTMLElementTabIndexPropertyInfo), '("tag-name", DOMElementTagNamePropertyInfo), '("text", DOMHTMLOptionElementTextPropertyInfo), '("text-content", DOMNodeTextContentPropertyInfo), '("title", DOMHTMLElementTitlePropertyInfo), '("translate", DOMHTMLElementTranslatePropertyInfo), '("value", DOMHTMLOptionElementValuePropertyInfo), '("webkit-region-overset", DOMElementWebkitRegionOversetPropertyInfo), '("webkitdropzone", DOMHTMLElementWebkitdropzonePropertyInfo)] :: [(Symbol, *)])

type instance SignalList DOMHTMLOptionElement = DOMHTMLOptionElementSignalList
type DOMHTMLOptionElementSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method DOMHTMLOptionElement::get_default_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_get_default_selected" webkit_dom_html_option_element_get_default_selected :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    IO CInt


dOMHTMLOptionElementGetDefaultSelected ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    m Bool
dOMHTMLOptionElementGetDefaultSelected _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_html_option_element_get_default_selected _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method DOMHTMLOptionElement::get_disabled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_get_disabled" webkit_dom_html_option_element_get_disabled :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    IO CInt


dOMHTMLOptionElementGetDisabled ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    m Bool
dOMHTMLOptionElementGetDisabled _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_html_option_element_get_disabled _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method DOMHTMLOptionElement::get_form
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit" "DOMHTMLFormElement"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_get_form" webkit_dom_html_option_element_get_form :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    IO (Ptr DOMHTMLFormElement)


dOMHTMLOptionElementGetForm ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    m DOMHTMLFormElement
dOMHTMLOptionElementGetForm _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_html_option_element_get_form _obj'
    checkUnexpectedReturnNULL "webkit_dom_html_option_element_get_form" result
    result' <- (newObject DOMHTMLFormElement) result
    touchManagedPtr _obj
    return result'

-- method DOMHTMLOptionElement::get_index
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_get_index" webkit_dom_html_option_element_get_index :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    IO Int64


dOMHTMLOptionElementGetIndex ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    m Int64
dOMHTMLOptionElementGetIndex _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_html_option_element_get_index _obj'
    touchManagedPtr _obj
    return result

-- method DOMHTMLOptionElement::get_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_get_label" webkit_dom_html_option_element_get_label :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    IO CString


dOMHTMLOptionElementGetLabel ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    m T.Text
dOMHTMLOptionElementGetLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_html_option_element_get_label _obj'
    checkUnexpectedReturnNULL "webkit_dom_html_option_element_get_label" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method DOMHTMLOptionElement::get_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_get_selected" webkit_dom_html_option_element_get_selected :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    IO CInt


dOMHTMLOptionElementGetSelected ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    m Bool
dOMHTMLOptionElementGetSelected _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_html_option_element_get_selected _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method DOMHTMLOptionElement::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_get_text" webkit_dom_html_option_element_get_text :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    IO CString


dOMHTMLOptionElementGetText ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    m T.Text
dOMHTMLOptionElementGetText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_html_option_element_get_text _obj'
    checkUnexpectedReturnNULL "webkit_dom_html_option_element_get_text" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method DOMHTMLOptionElement::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_get_value" webkit_dom_html_option_element_get_value :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    IO CString


dOMHTMLOptionElementGetValue ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    m T.Text
dOMHTMLOptionElementGetValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_html_option_element_get_value _obj'
    checkUnexpectedReturnNULL "webkit_dom_html_option_element_get_value" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method DOMHTMLOptionElement::set_default_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_set_default_selected" webkit_dom_html_option_element_set_default_selected :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()


dOMHTMLOptionElementSetDefaultSelected ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- value
    m ()
dOMHTMLOptionElementSetDefaultSelected _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = (fromIntegral . fromEnum) value
    webkit_dom_html_option_element_set_default_selected _obj' value'
    touchManagedPtr _obj
    return ()

-- method DOMHTMLOptionElement::set_disabled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_set_disabled" webkit_dom_html_option_element_set_disabled :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()


dOMHTMLOptionElementSetDisabled ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- value
    m ()
dOMHTMLOptionElementSetDisabled _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = (fromIntegral . fromEnum) value
    webkit_dom_html_option_element_set_disabled _obj' value'
    touchManagedPtr _obj
    return ()

-- method DOMHTMLOptionElement::set_label
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_set_label" webkit_dom_html_option_element_set_label :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    CString ->                              -- value : TBasicType TUTF8
    IO ()


dOMHTMLOptionElementSetLabel ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- value
    m ()
dOMHTMLOptionElementSetLabel _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    value' <- textToCString value
    webkit_dom_html_option_element_set_label _obj' value'
    touchManagedPtr _obj
    freeMem value'
    return ()

-- method DOMHTMLOptionElement::set_selected
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_set_selected" webkit_dom_html_option_element_set_selected :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()


dOMHTMLOptionElementSetSelected ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- value
    m ()
dOMHTMLOptionElementSetSelected _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = (fromIntegral . fromEnum) value
    webkit_dom_html_option_element_set_selected _obj' value'
    touchManagedPtr _obj
    return ()

-- method DOMHTMLOptionElement::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMHTMLOptionElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_html_option_element_set_value" webkit_dom_html_option_element_set_value :: 
    Ptr DOMHTMLOptionElement ->             -- _obj : TInterface "WebKit" "DOMHTMLOptionElement"
    CString ->                              -- value : TBasicType TUTF8
    IO ()


dOMHTMLOptionElementSetValue ::
    (MonadIO m, DOMHTMLOptionElementK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- value
    m ()
dOMHTMLOptionElementSetValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    value' <- textToCString value
    webkit_dom_html_option_element_set_value _obj' value'
    touchManagedPtr _obj
    freeMem value'
    return ()