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

-- * Exported types
    DOMHTMLDListElement(..)                 ,
    DOMHTMLDListElementK                    ,
    toDOMHTMLDListElement                   ,
    noDOMHTMLDListElement                   ,


 -- * Methods
-- ** dOMHTMLDListElementGetCompact
    dOMHTMLDListElementGetCompact           ,


-- ** dOMHTMLDListElementSetCompact
    dOMHTMLDListElementSetCompact           ,




 -- * Properties
-- ** Compact
    DOMHTMLDListElementCompactPropertyInfo  ,
    constructDOMHTMLDListElementCompact     ,
    getDOMHTMLDListElementCompact           ,
    setDOMHTMLDListElementCompact           ,




    ) 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 DOMHTMLDListElement = DOMHTMLDListElement (ForeignPtr DOMHTMLDListElement)
foreign import ccall "webkit_dom_html_d_list_element_get_type"
    c_webkit_dom_html_d_list_element_get_type :: IO GType

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

instance GObject DOMHTMLDListElement where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_dom_html_d_list_element_get_type
    

class GObject o => DOMHTMLDListElementK o
instance (GObject o, IsDescendantOf DOMHTMLDListElement o) => DOMHTMLDListElementK o

toDOMHTMLDListElement :: DOMHTMLDListElementK o => o -> IO DOMHTMLDListElement
toDOMHTMLDListElement = unsafeCastTo DOMHTMLDListElement

noDOMHTMLDListElement :: Maybe DOMHTMLDListElement
noDOMHTMLDListElement = Nothing

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

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

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

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

data DOMHTMLDListElementCompactPropertyInfo
instance AttrInfo DOMHTMLDListElementCompactPropertyInfo where
    type AttrAllowedOps DOMHTMLDListElementCompactPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLDListElementCompactPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint DOMHTMLDListElementCompactPropertyInfo = DOMHTMLDListElementK
    type AttrGetType DOMHTMLDListElementCompactPropertyInfo = Bool
    type AttrLabel DOMHTMLDListElementCompactPropertyInfo = "DOMHTMLDListElement::compact"
    attrGet _ = getDOMHTMLDListElementCompact
    attrSet _ = setDOMHTMLDListElementCompact
    attrConstruct _ = constructDOMHTMLDListElementCompact

type instance AttributeList DOMHTMLDListElement = DOMHTMLDListElementAttributeList
type DOMHTMLDListElementAttributeList = ('[ '("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", DOMHTMLDListElementCompactPropertyInfo), '("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), '("scroll-height", DOMElementScrollHeightPropertyInfo), '("scroll-left", DOMElementScrollLeftPropertyInfo), '("scroll-top", DOMElementScrollTopPropertyInfo), '("scroll-width", DOMElementScrollWidthPropertyInfo), '("spellcheck", DOMHTMLElementSpellcheckPropertyInfo), '("style", DOMElementStylePropertyInfo), '("tab-index", DOMHTMLElementTabIndexPropertyInfo), '("tag-name", DOMElementTagNamePropertyInfo), '("text-content", DOMNodeTextContentPropertyInfo), '("title", DOMHTMLElementTitlePropertyInfo), '("translate", DOMHTMLElementTranslatePropertyInfo), '("webkit-region-overset", DOMElementWebkitRegionOversetPropertyInfo), '("webkitdropzone", DOMHTMLElementWebkitdropzonePropertyInfo)] :: [(Symbol, *)])

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

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


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

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


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