gi-webkit2webextension-0.2.10.12: GI/WebKit2WebExtension/Objects/DOMHTMLPreElement.hs
{- |
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.DOMHTMLPreElement
(
-- * Exported types
DOMHTMLPreElement(..) ,
DOMHTMLPreElementK ,
toDOMHTMLPreElement ,
noDOMHTMLPreElement ,
-- * Methods
-- ** dOMHTMLPreElementGetWidth
dOMHTMLPreElementGetWidth ,
-- ** dOMHTMLPreElementGetWrap
dOMHTMLPreElementGetWrap ,
-- ** dOMHTMLPreElementSetWidth
dOMHTMLPreElementSetWidth ,
-- ** dOMHTMLPreElementSetWrap
dOMHTMLPreElementSetWrap ,
-- * Properties
-- ** Width
DOMHTMLPreElementWidthPropertyInfo ,
constructDOMHTMLPreElementWidth ,
getDOMHTMLPreElementWidth ,
setDOMHTMLPreElementWidth ,
-- ** Wrap
DOMHTMLPreElementWrapPropertyInfo ,
constructDOMHTMLPreElementWrap ,
getDOMHTMLPreElementWrap ,
setDOMHTMLPreElementWrap ,
) 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 DOMHTMLPreElement = DOMHTMLPreElement (ForeignPtr DOMHTMLPreElement)
foreign import ccall "webkit_dom_html_pre_element_get_type"
c_webkit_dom_html_pre_element_get_type :: IO GType
type instance ParentTypes DOMHTMLPreElement = DOMHTMLPreElementParentTypes
type DOMHTMLPreElementParentTypes = '[DOMHTMLElement, DOMElement, DOMNode, DOMObject, GObject.Object, DOMEventTarget]
instance GObject DOMHTMLPreElement where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_html_pre_element_get_type
class GObject o => DOMHTMLPreElementK o
instance (GObject o, IsDescendantOf DOMHTMLPreElement o) => DOMHTMLPreElementK o
toDOMHTMLPreElement :: DOMHTMLPreElementK o => o -> IO DOMHTMLPreElement
toDOMHTMLPreElement = unsafeCastTo DOMHTMLPreElement
noDOMHTMLPreElement :: Maybe DOMHTMLPreElement
noDOMHTMLPreElement = Nothing
-- VVV Prop "width"
-- Type: TBasicType TInt64
-- Flags: [PropertyReadable,PropertyWritable]
getDOMHTMLPreElementWidth :: (MonadIO m, DOMHTMLPreElementK o) => o -> m Int64
getDOMHTMLPreElementWidth obj = liftIO $ getObjectPropertyInt64 obj "width"
setDOMHTMLPreElementWidth :: (MonadIO m, DOMHTMLPreElementK o) => o -> Int64 -> m ()
setDOMHTMLPreElementWidth obj val = liftIO $ setObjectPropertyInt64 obj "width" val
constructDOMHTMLPreElementWidth :: Int64 -> IO ([Char], GValue)
constructDOMHTMLPreElementWidth val = constructObjectPropertyInt64 "width" val
data DOMHTMLPreElementWidthPropertyInfo
instance AttrInfo DOMHTMLPreElementWidthPropertyInfo where
type AttrAllowedOps DOMHTMLPreElementWidthPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DOMHTMLPreElementWidthPropertyInfo = (~) Int64
type AttrBaseTypeConstraint DOMHTMLPreElementWidthPropertyInfo = DOMHTMLPreElementK
type AttrGetType DOMHTMLPreElementWidthPropertyInfo = Int64
type AttrLabel DOMHTMLPreElementWidthPropertyInfo = "DOMHTMLPreElement::width"
attrGet _ = getDOMHTMLPreElementWidth
attrSet _ = setDOMHTMLPreElementWidth
attrConstruct _ = constructDOMHTMLPreElementWidth
-- VVV Prop "wrap"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable,PropertyWritable]
getDOMHTMLPreElementWrap :: (MonadIO m, DOMHTMLPreElementK o) => o -> m Bool
getDOMHTMLPreElementWrap obj = liftIO $ getObjectPropertyBool obj "wrap"
setDOMHTMLPreElementWrap :: (MonadIO m, DOMHTMLPreElementK o) => o -> Bool -> m ()
setDOMHTMLPreElementWrap obj val = liftIO $ setObjectPropertyBool obj "wrap" val
constructDOMHTMLPreElementWrap :: Bool -> IO ([Char], GValue)
constructDOMHTMLPreElementWrap val = constructObjectPropertyBool "wrap" val
data DOMHTMLPreElementWrapPropertyInfo
instance AttrInfo DOMHTMLPreElementWrapPropertyInfo where
type AttrAllowedOps DOMHTMLPreElementWrapPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DOMHTMLPreElementWrapPropertyInfo = (~) Bool
type AttrBaseTypeConstraint DOMHTMLPreElementWrapPropertyInfo = DOMHTMLPreElementK
type AttrGetType DOMHTMLPreElementWrapPropertyInfo = Bool
type AttrLabel DOMHTMLPreElementWrapPropertyInfo = "DOMHTMLPreElement::wrap"
attrGet _ = getDOMHTMLPreElementWrap
attrSet _ = setDOMHTMLPreElementWrap
attrConstruct _ = constructDOMHTMLPreElementWrap
type instance AttributeList DOMHTMLPreElement = DOMHTMLPreElementAttributeList
type DOMHTMLPreElementAttributeList = ('[ '("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), '("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), '("width", DOMHTMLPreElementWidthPropertyInfo), '("wrap", DOMHTMLPreElementWrapPropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMHTMLPreElement = DOMHTMLPreElementSignalList
type DOMHTMLPreElementSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method DOMHTMLPreElement::get_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLPreElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLPreElement", 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_pre_element_get_width" webkit_dom_html_pre_element_get_width ::
Ptr DOMHTMLPreElement -> -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLPreElement"
IO Int64
dOMHTMLPreElementGetWidth ::
(MonadIO m, DOMHTMLPreElementK a) =>
a -> -- _obj
m Int64
dOMHTMLPreElementGetWidth _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_html_pre_element_get_width _obj'
touchManagedPtr _obj
return result
-- method DOMHTMLPreElement::get_wrap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLPreElement", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLPreElement", 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_pre_element_get_wrap" webkit_dom_html_pre_element_get_wrap ::
Ptr DOMHTMLPreElement -> -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLPreElement"
IO CInt
dOMHTMLPreElementGetWrap ::
(MonadIO m, DOMHTMLPreElementK a) =>
a -> -- _obj
m Bool
dOMHTMLPreElementGetWrap _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_html_pre_element_get_wrap _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method DOMHTMLPreElement::set_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLPreElement", 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" "DOMHTMLPreElement", 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_pre_element_set_width" webkit_dom_html_pre_element_set_width ::
Ptr DOMHTMLPreElement -> -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLPreElement"
Int64 -> -- value : TBasicType TInt64
IO ()
dOMHTMLPreElementSetWidth ::
(MonadIO m, DOMHTMLPreElementK a) =>
a -> -- _obj
Int64 -> -- value
m ()
dOMHTMLPreElementSetWidth _obj value = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
webkit_dom_html_pre_element_set_width _obj' value
touchManagedPtr _obj
return ()
-- method DOMHTMLPreElement::set_wrap
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMHTMLPreElement", 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" "DOMHTMLPreElement", 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_pre_element_set_wrap" webkit_dom_html_pre_element_set_wrap ::
Ptr DOMHTMLPreElement -> -- _obj : TInterface "WebKit2WebExtension" "DOMHTMLPreElement"
CInt -> -- value : TBasicType TBoolean
IO ()
dOMHTMLPreElementSetWrap ::
(MonadIO m, DOMHTMLPreElementK a) =>
a -> -- _obj
Bool -> -- value
m ()
dOMHTMLPreElementSetWrap _obj value = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let value' = (fromIntegral . fromEnum) value
webkit_dom_html_pre_element_set_wrap _obj' value'
touchManagedPtr _obj
return ()