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

-- * Exported types
    DOMHTMLDirectoryElement(..)             ,
    DOMHTMLDirectoryElementK                ,
    toDOMHTMLDirectoryElement               ,
    noDOMHTMLDirectoryElement               ,


 -- * Methods
-- ** dOMHTMLDirectoryElementGetCompact
    dOMHTMLDirectoryElementGetCompact       ,


-- ** dOMHTMLDirectoryElementSetCompact
    dOMHTMLDirectoryElementSetCompact       ,




 -- * Properties
-- ** Compact
    DOMHTMLDirectoryElementCompactPropertyInfo,
    constructDOMHTMLDirectoryElementCompact ,
    getDOMHTMLDirectoryElementCompact       ,
    setDOMHTMLDirectoryElementCompact       ,




    ) 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 DOMHTMLDirectoryElement = DOMHTMLDirectoryElement (ForeignPtr DOMHTMLDirectoryElement)
foreign import ccall "webkit_dom_html_directory_element_get_type"
    c_webkit_dom_html_directory_element_get_type :: IO GType

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

instance GObject DOMHTMLDirectoryElement where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_dom_html_directory_element_get_type
    

class GObject o => DOMHTMLDirectoryElementK o
instance (GObject o, IsDescendantOf DOMHTMLDirectoryElement o) => DOMHTMLDirectoryElementK o

toDOMHTMLDirectoryElement :: DOMHTMLDirectoryElementK o => o -> IO DOMHTMLDirectoryElement
toDOMHTMLDirectoryElement = unsafeCastTo DOMHTMLDirectoryElement

noDOMHTMLDirectoryElement :: Maybe DOMHTMLDirectoryElement
noDOMHTMLDirectoryElement = Nothing

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

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

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

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

data DOMHTMLDirectoryElementCompactPropertyInfo
instance AttrInfo DOMHTMLDirectoryElementCompactPropertyInfo where
    type AttrAllowedOps DOMHTMLDirectoryElementCompactPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMHTMLDirectoryElementCompactPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint DOMHTMLDirectoryElementCompactPropertyInfo = DOMHTMLDirectoryElementK
    type AttrGetType DOMHTMLDirectoryElementCompactPropertyInfo = Bool
    type AttrLabel DOMHTMLDirectoryElementCompactPropertyInfo = "DOMHTMLDirectoryElement::compact"
    attrGet _ = getDOMHTMLDirectoryElementCompact
    attrSet _ = setDOMHTMLDirectoryElementCompact
    attrConstruct _ = constructDOMHTMLDirectoryElementCompact

type instance AttributeList DOMHTMLDirectoryElement = DOMHTMLDirectoryElementAttributeList
type DOMHTMLDirectoryElementAttributeList = ('[ '("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), '("compact", DOMHTMLDirectoryElementCompactPropertyInfo), '("content-editable", DOMHTMLElementContentEditablePropertyInfo), '("core-object", DOMObjectCoreObjectPropertyInfo), '("dir", DOMHTMLElementDirPropertyInfo), '("draggable", DOMHTMLElementDraggablePropertyInfo), '("first-child", DOMNodeFirstChildPropertyInfo), '("first-element-child", DOMElementFirstElementChildPropertyInfo), '("hidden", DOMHTMLElementHiddenPropertyInfo), '("id", DOMElementIdPropertyInfo), '("inner-html", DOMHTMLElementInnerHtmlPropertyInfo), '("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", 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), '("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 DOMHTMLDirectoryElement = DOMHTMLDirectoryElementSignalList
type DOMHTMLDirectoryElementSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

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


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

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


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