{- |
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.WebKit2WebExtension.Objects.DOMHTMLOListElement
    ( 

-- * Exported types
    DOMHTMLOListElement(..)                 ,
    DOMHTMLOListElementK                    ,
    toDOMHTMLOListElement                   ,
    noDOMHTMLOListElement                   ,


 -- * Methods
-- ** dOMHTMLOListElementGetCompact
    dOMHTMLOListElementGetCompact           ,


-- ** dOMHTMLOListElementGetStart
    dOMHTMLOListElementGetStart             ,


-- ** dOMHTMLOListElementGetTypeAttr
    dOMHTMLOListElementGetTypeAttr          ,


-- ** dOMHTMLOListElementSetCompact
    dOMHTMLOListElementSetCompact           ,


-- ** dOMHTMLOListElementSetStart
    dOMHTMLOListElementSetStart             ,


-- ** dOMHTMLOListElementSetTypeAttr
    dOMHTMLOListElementSetTypeAttr          ,




 -- * Properties
-- ** Compact
    DOMHTMLOListElementCompactPropertyInfo  ,
    constructDOMHTMLOListElementCompact     ,
    getDOMHTMLOListElementCompact           ,
    setDOMHTMLOListElementCompact           ,


-- ** Reversed
    DOMHTMLOListElementReversedPropertyInfo ,
    constructDOMHTMLOListElementReversed    ,
    getDOMHTMLOListElementReversed          ,
    setDOMHTMLOListElementReversed          ,


-- ** Start
    DOMHTMLOListElementStartPropertyInfo    ,
    constructDOMHTMLOListElementStart       ,
    getDOMHTMLOListElementStart             ,
    setDOMHTMLOListElementStart             ,


-- ** Type
    DOMHTMLOListElementTypePropertyInfo     ,
    constructDOMHTMLOListElementType        ,
    getDOMHTMLOListElementType              ,
    setDOMHTMLOListElementType              ,




    ) 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.WebKit2WebExtension.Types
import GI.WebKit2WebExtension.Callbacks
import qualified GI.GObject as GObject

newtype DOMHTMLOListElement = DOMHTMLOListElement (ForeignPtr DOMHTMLOListElement)
foreign import ccall "webkit_dom_html_o_list_element_get_type"
    c_webkit_dom_html_o_list_element_get_type :: IO GType

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

instance GObject DOMHTMLOListElement where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_dom_html_o_list_element_get_type
    

class GObject o => DOMHTMLOListElementK o
instance (GObject o, IsDescendantOf DOMHTMLOListElement o) => DOMHTMLOListElementK o

toDOMHTMLOListElement :: DOMHTMLOListElementK o => o -> IO DOMHTMLOListElement
toDOMHTMLOListElement = unsafeCastTo DOMHTMLOListElement

noDOMHTMLOListElement :: Maybe DOMHTMLOListElement
noDOMHTMLOListElement = Nothing

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

getDOMHTMLOListElementCompact :: (MonadIO m, DOMHTMLOListElementK o) => o -> m Bool
getDOMHTMLOListElementCompact obj = liftIO $ getObjectPropertyBool obj "compact"

setDOMHTMLOListElementCompact :: (MonadIO m, DOMHTMLOListElementK o) => o -> Bool -> m ()
setDOMHTMLOListElementCompact obj val = liftIO $ setObjectPropertyBool obj "compact" val

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

data DOMHTMLOListElementCompactPropertyInfo
instance AttrInfo DOMHTMLOListElementCompactPropertyInfo where
    type AttrAllowedOps DOMHTMLOListElementCompactPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOListElementCompactPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint DOMHTMLOListElementCompactPropertyInfo = DOMHTMLOListElementK
    type AttrGetType DOMHTMLOListElementCompactPropertyInfo = Bool
    type AttrLabel DOMHTMLOListElementCompactPropertyInfo = "DOMHTMLOListElement::compact"
    attrGet _ = getDOMHTMLOListElementCompact
    attrSet _ = setDOMHTMLOListElementCompact
    attrConstruct _ = constructDOMHTMLOListElementCompact

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

getDOMHTMLOListElementReversed :: (MonadIO m, DOMHTMLOListElementK o) => o -> m Bool
getDOMHTMLOListElementReversed obj = liftIO $ getObjectPropertyBool obj "reversed"

setDOMHTMLOListElementReversed :: (MonadIO m, DOMHTMLOListElementK o) => o -> Bool -> m ()
setDOMHTMLOListElementReversed obj val = liftIO $ setObjectPropertyBool obj "reversed" val

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

data DOMHTMLOListElementReversedPropertyInfo
instance AttrInfo DOMHTMLOListElementReversedPropertyInfo where
    type AttrAllowedOps DOMHTMLOListElementReversedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOListElementReversedPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint DOMHTMLOListElementReversedPropertyInfo = DOMHTMLOListElementK
    type AttrGetType DOMHTMLOListElementReversedPropertyInfo = Bool
    type AttrLabel DOMHTMLOListElementReversedPropertyInfo = "DOMHTMLOListElement::reversed"
    attrGet _ = getDOMHTMLOListElementReversed
    attrSet _ = setDOMHTMLOListElementReversed
    attrConstruct _ = constructDOMHTMLOListElementReversed

-- VVV Prop "start"
   -- Type: TBasicType TInt64
   -- Flags: [PropertyReadable,PropertyWritable]

getDOMHTMLOListElementStart :: (MonadIO m, DOMHTMLOListElementK o) => o -> m Int64
getDOMHTMLOListElementStart obj = liftIO $ getObjectPropertyInt64 obj "start"

setDOMHTMLOListElementStart :: (MonadIO m, DOMHTMLOListElementK o) => o -> Int64 -> m ()
setDOMHTMLOListElementStart obj val = liftIO $ setObjectPropertyInt64 obj "start" val

constructDOMHTMLOListElementStart :: Int64 -> IO ([Char], GValue)
constructDOMHTMLOListElementStart val = constructObjectPropertyInt64 "start" val

data DOMHTMLOListElementStartPropertyInfo
instance AttrInfo DOMHTMLOListElementStartPropertyInfo where
    type AttrAllowedOps DOMHTMLOListElementStartPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOListElementStartPropertyInfo = (~) Int64
    type AttrBaseTypeConstraint DOMHTMLOListElementStartPropertyInfo = DOMHTMLOListElementK
    type AttrGetType DOMHTMLOListElementStartPropertyInfo = Int64
    type AttrLabel DOMHTMLOListElementStartPropertyInfo = "DOMHTMLOListElement::start"
    attrGet _ = getDOMHTMLOListElementStart
    attrSet _ = setDOMHTMLOListElementStart
    attrConstruct _ = constructDOMHTMLOListElementStart

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

getDOMHTMLOListElementType :: (MonadIO m, DOMHTMLOListElementK o) => o -> m T.Text
getDOMHTMLOListElementType obj = liftIO $ getObjectPropertyString obj "type"

setDOMHTMLOListElementType :: (MonadIO m, DOMHTMLOListElementK o) => o -> T.Text -> m ()
setDOMHTMLOListElementType obj val = liftIO $ setObjectPropertyString obj "type" val

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

data DOMHTMLOListElementTypePropertyInfo
instance AttrInfo DOMHTMLOListElementTypePropertyInfo where
    type AttrAllowedOps DOMHTMLOListElementTypePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLOListElementTypePropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint DOMHTMLOListElementTypePropertyInfo = DOMHTMLOListElementK
    type AttrGetType DOMHTMLOListElementTypePropertyInfo = T.Text
    type AttrLabel DOMHTMLOListElementTypePropertyInfo = "DOMHTMLOListElement::type"
    attrGet _ = getDOMHTMLOListElementType
    attrSet _ = setDOMHTMLOListElementType
    attrConstruct _ = constructDOMHTMLOListElementType

type instance AttributeList DOMHTMLOListElement = DOMHTMLOListElementAttributeList
type DOMHTMLOListElementAttributeList = ('[ '("access-key", DOMHTMLElementAccessKeyPropertyInfo), '("attributes", DOMElementAttributesPropertyInfo), '("base-uri", DOMNodeBaseUriPropertyInfo), '("child-element-count", DOMElementChildElementCountPropertyInfo), '("child-nodes", DOMNodeChildNodesPropertyInfo), '("children", DOMElementChildrenPropertyInfo), '("class-name", DOMElementClassNamePropertyInfo), '("client-height", DOMElementClientHeightPropertyInfo), '("client-left", DOMElementClientLeftPropertyInfo), '("client-top", DOMElementClientTopPropertyInfo), '("client-width", DOMElementClientWidthPropertyInfo), '("compact", DOMHTMLOListElementCompactPropertyInfo), '("content-editable", DOMHTMLElementContentEditablePropertyInfo), '("core-object", DOMObjectCoreObjectPropertyInfo), '("dir", DOMHTMLElementDirPropertyInfo), '("draggable", DOMHTMLElementDraggablePropertyInfo), '("first-child", DOMNodeFirstChildPropertyInfo), '("first-element-child", DOMElementFirstElementChildPropertyInfo), '("hidden", DOMHTMLElementHiddenPropertyInfo), '("id", DOMElementIdPropertyInfo), '("inner-html", DOMElementInnerHtmlPropertyInfo), '("inner-text", DOMHTMLElementInnerTextPropertyInfo), '("is-content-editable", DOMHTMLElementIsContentEditablePropertyInfo), '("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", DOMElementOuterHtmlPropertyInfo), '("outer-text", DOMHTMLElementOuterTextPropertyInfo), '("owner-document", DOMNodeOwnerDocumentPropertyInfo), '("parent-element", DOMNodeParentElementPropertyInfo), '("parent-node", DOMNodeParentNodePropertyInfo), '("prefix", DOMNodePrefixPropertyInfo), '("previous-element-sibling", DOMElementPreviousElementSiblingPropertyInfo), '("previous-sibling", DOMNodePreviousSiblingPropertyInfo), '("reversed", DOMHTMLOListElementReversedPropertyInfo), '("scroll-height", DOMElementScrollHeightPropertyInfo), '("scroll-left", DOMElementScrollLeftPropertyInfo), '("scroll-top", DOMElementScrollTopPropertyInfo), '("scroll-width", DOMElementScrollWidthPropertyInfo), '("spellcheck", DOMHTMLElementSpellcheckPropertyInfo), '("start", DOMHTMLOListElementStartPropertyInfo), '("style", DOMElementStylePropertyInfo), '("tab-index", DOMHTMLElementTabIndexPropertyInfo), '("tag-name", DOMElementTagNamePropertyInfo), '("text-content", DOMNodeTextContentPropertyInfo), '("title", DOMHTMLElementTitlePropertyInfo), '("translate", DOMHTMLElementTranslatePropertyInfo), '("type", DOMHTMLOListElementTypePropertyInfo), '("webkit-region-overset", DOMElementWebkitRegionOversetPropertyInfo), '("webkitdropzone", DOMHTMLElementWebkitdropzonePropertyInfo)] :: [(Symbol, *)])

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

-- method DOMHTMLOListElement::get_compact
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", 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_o_list_element_get_compact" webkit_dom_html_o_list_element_get_compact :: 
    Ptr DOMHTMLOListElement ->              -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLOListElement"
    IO CInt


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

-- method DOMHTMLOListElement::get_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", 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_o_list_element_get_start" webkit_dom_html_o_list_element_get_start :: 
    Ptr DOMHTMLOListElement ->              -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLOListElement"
    IO Int64


dOMHTMLOListElementGetStart ::
    (MonadIO m, DOMHTMLOListElementK a) =>
    a ->                                    -- _obj
    m Int64
dOMHTMLOListElementGetStart _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_html_o_list_element_get_start _obj'
    touchManagedPtr _obj
    return result

-- method DOMHTMLOListElement::get_type_attr
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", 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_o_list_element_get_type_attr" webkit_dom_html_o_list_element_get_type_attr :: 
    Ptr DOMHTMLOListElement ->              -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLOListElement"
    IO CString


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

-- method DOMHTMLOListElement::set_compact
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", 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 "WebKit2WebExtension" "DOMHTMLOListElement", 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_o_list_element_set_compact" webkit_dom_html_o_list_element_set_compact :: 
    Ptr DOMHTMLOListElement ->              -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLOListElement"
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()


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

-- method DOMHTMLOListElement::set_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TInt64, 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_o_list_element_set_start" webkit_dom_html_o_list_element_set_start :: 
    Ptr DOMHTMLOListElement ->              -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLOListElement"
    Int64 ->                                -- value : TBasicType TInt64
    IO ()


dOMHTMLOListElementSetStart ::
    (MonadIO m, DOMHTMLOListElementK a) =>
    a ->                                    -- _obj
    Int64 ->                                -- value
    m ()
dOMHTMLOListElementSetStart _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_dom_html_o_list_element_set_start _obj' value
    touchManagedPtr _obj
    return ()

-- method DOMHTMLOListElement::set_type_attr
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLOListElement", 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 "WebKit2WebExtension" "DOMHTMLOListElement", 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_o_list_element_set_type_attr" webkit_dom_html_o_list_element_set_type_attr :: 
    Ptr DOMHTMLOListElement ->              -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLOListElement"
    CString ->                              -- value : TBasicType TUTF8
    IO ()


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