module Graphics.UI.Gtk.WebKit.DOM.Element(
getAttribute,
setAttribute,
removeAttribute,
getAttributeNode,
setAttributeNode,
removeAttributeNode,
getElementsByTagName,
hasAttributes,
getAttributeNS,
setAttributeNS,
removeAttributeNS,
getElementsByTagNameNS,
getAttributeNodeNS,
setAttributeNodeNS,
hasAttribute,
hasAttributeNS,
focus,
blur,
scrollIntoView,
scrollIntoViewIfNeeded,
scrollByLines,
scrollByPages,
getElementsByClassName,
querySelector,
querySelectorAll,
webkitMatchesSelector,
webkitRequestFullScreen,
webkitRequestFullscreen,
requestPointerLock,
pattern ALLOW_KEYBOARD_INPUT,
getTagName,
getAttributes,
getStyle,
setId,
getId,
getOffsetLeft,
getOffsetTop,
getOffsetWidth,
getOffsetHeight,
getClientLeft,
getClientTop,
getClientWidth,
getClientHeight,
setScrollLeft,
getScrollLeft,
setScrollTop,
getScrollTop,
getScrollWidth,
getScrollHeight,
getOffsetParent,
setInnerHTML,
getInnerHTML,
setOuterHTML,
getOuterHTML,
setClassName,
getClassName,
getClassList,
getFirstElementChild,
getLastElementChild,
getPreviousElementSibling,
getNextElementSibling,
getChildElementCount,
getWebkitRegionOverset,
abort,
blurEvent,
change,
click,
contextMenu,
dblClick,
drag,
dragEnd,
dragEnter,
dragLeave,
dragOver,
dragStart,
drop,
error,
focusEvent,
input,
invalid,
keyDown,
keyPress,
keyUp,
load,
mouseDown,
mouseEnter,
mouseLeave,
mouseMove,
mouseOut,
mouseOver,
mouseUp,
mouseWheel,
scroll,
select,
submit,
wheel,
beforeCut,
cut,
beforeCopy,
copy,
beforePaste,
paste,
reset,
search,
selectStart,
touchStart,
touchMove,
touchEnd,
touchCancel,
webKitFullscreenChange,
webKitFullscreenError,
webKitWillRevealBottom,
webKitWillRevealLeft,
webKitWillRevealRight,
webKitWillRevealTop,
Element,
castToElement,
gTypeElement,
ElementClass,
toElement,
) where
import Prelude hiding (drop, error, print)
import Data.Typeable (Typeable)
import Foreign.Marshal (maybePeek, maybeWith)
import System.Glib.FFI (maybeNull, withForeignPtr, nullForeignPtr, Ptr, nullPtr, castPtr, Word, Int64, Word64, CChar(..), CInt(..), CUInt(..), CLong(..), CULong(..), CLLong(..), CULLong(..), CShort(..), CUShort(..), CFloat(..), CDouble(..), toBool, fromBool)
import System.Glib.UTFString (GlibString(..), readUTFString)
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Monad.IO.Class (MonadIO(..))
import System.Glib.GError
import Graphics.UI.Gtk.WebKit.DOM.EventTargetClosures
import Graphics.UI.Gtk.WebKit.DOM.EventM
import Graphics.UI.Gtk.WebKit.Types
import Graphics.UI.Gtk.WebKit.DOM.Enums
getAttribute ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m (Maybe string)
getAttribute self name
= liftIO
((withUTFString name $
\ namePtr ->
(\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_attribute argPtr1 arg2) (toElement self)
namePtr)
>>=
maybePeek readUTFString)
setAttribute ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> string -> m ()
setAttribute self name value
= liftIO
(propagateGError $
\ errorPtr_ ->
withUTFString value $
\ valuePtr ->
withUTFString name $
\ namePtr ->
(\(Element arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_set_attribute argPtr1 arg2 arg3 arg4) (toElement self)
namePtr
valuePtr
errorPtr_)
removeAttribute ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m ()
removeAttribute self name
= liftIO
(withUTFString name $
\ namePtr ->
(\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_remove_attribute argPtr1 arg2) (toElement self)
namePtr)
getAttributeNode ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m (Maybe Attr)
getAttributeNode self name
= liftIO
(maybeNull (makeNewGObject mkAttr)
(withUTFString name $
\ namePtr ->
(\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_attribute_node argPtr1 arg2) (toElement self)
namePtr))
setAttributeNode ::
(MonadIO m, ElementClass self, AttrClass newAttr) =>
self -> Maybe newAttr -> m (Maybe Attr)
setAttributeNode self newAttr
= liftIO
(maybeNull (makeNewGObject mkAttr)
(propagateGError $
\ errorPtr_ ->
(\(Element arg1) (Attr arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_dom_element_set_attribute_node argPtr1 argPtr2 arg3) (toElement self)
(maybe (Attr nullForeignPtr) toAttr newAttr)
errorPtr_))
removeAttributeNode ::
(MonadIO m, ElementClass self, AttrClass oldAttr) =>
self -> Maybe oldAttr -> m (Maybe Attr)
removeAttributeNode self oldAttr
= liftIO
(maybeNull (makeNewGObject mkAttr)
(propagateGError $
\ errorPtr_ ->
(\(Element arg1) (Attr arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_dom_element_remove_attribute_node argPtr1 argPtr2 arg3)
(toElement self)
(maybe (Attr nullForeignPtr) toAttr oldAttr)
errorPtr_))
getElementsByTagName ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m (Maybe NodeList)
getElementsByTagName self name
= liftIO
(maybeNull (makeNewGObject mkNodeList)
(withUTFString name $
\ namePtr ->
(\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_elements_by_tag_name argPtr1 arg2)
(toElement self)
namePtr))
hasAttributes :: (MonadIO m, ElementClass self) => self -> m Bool
hasAttributes self
= liftIO
(toBool <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_has_attributes argPtr1) (toElement self)))
getAttributeNS ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> (Maybe string) -> string -> m string
getAttributeNS self namespaceURI localName
= liftIO
((withUTFString localName $
\ localNamePtr ->
maybeWith withUTFString namespaceURI $
\ namespaceURIPtr ->
(\(Element arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_attribute_ns argPtr1 arg2 arg3) (toElement self)
namespaceURIPtr
localNamePtr)
>>=
readUTFString)
setAttributeNS ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> (Maybe string) -> string -> string -> m ()
setAttributeNS self namespaceURI qualifiedName value
= liftIO
(propagateGError $
\ errorPtr_ ->
withUTFString value $
\ valuePtr ->
withUTFString qualifiedName $
\ qualifiedNamePtr ->
maybeWith withUTFString namespaceURI $
\ namespaceURIPtr ->
(\(Element arg1) arg2 arg3 arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_set_attribute_ns argPtr1 arg2 arg3 arg4 arg5) (toElement self)
namespaceURIPtr
qualifiedNamePtr
valuePtr
errorPtr_)
removeAttributeNS ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> (Maybe string) -> string -> m ()
removeAttributeNS self namespaceURI localName
= liftIO
(withUTFString localName $
\ localNamePtr ->
maybeWith withUTFString namespaceURI $
\ namespaceURIPtr ->
(\(Element arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_remove_attribute_ns argPtr1 arg2 arg3) (toElement self)
namespaceURIPtr
localNamePtr)
getElementsByTagNameNS ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> (Maybe string) -> string -> m (Maybe NodeList)
getElementsByTagNameNS self namespaceURI localName
= liftIO
(maybeNull (makeNewGObject mkNodeList)
(withUTFString localName $
\ localNamePtr ->
maybeWith withUTFString namespaceURI $
\ namespaceURIPtr ->
(\(Element arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_elements_by_tag_name_ns argPtr1 arg2 arg3)
(toElement self)
namespaceURIPtr
localNamePtr))
getAttributeNodeNS ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> (Maybe string) -> string -> m (Maybe Attr)
getAttributeNodeNS self namespaceURI localName
= liftIO
(maybeNull (makeNewGObject mkAttr)
(withUTFString localName $
\ localNamePtr ->
maybeWith withUTFString namespaceURI $
\ namespaceURIPtr ->
(\(Element arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_attribute_node_ns argPtr1 arg2 arg3)
(toElement self)
namespaceURIPtr
localNamePtr))
setAttributeNodeNS ::
(MonadIO m, ElementClass self, AttrClass newAttr) =>
self -> Maybe newAttr -> m (Maybe Attr)
setAttributeNodeNS self newAttr
= liftIO
(maybeNull (makeNewGObject mkAttr)
(propagateGError $
\ errorPtr_ ->
(\(Element arg1) (Attr arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->webkit_dom_element_set_attribute_node_ns argPtr1 argPtr2 arg3)
(toElement self)
(maybe (Attr nullForeignPtr) toAttr newAttr)
errorPtr_))
hasAttribute ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m Bool
hasAttribute self name
= liftIO
(toBool <$>
(withUTFString name $
\ namePtr ->
(\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_has_attribute argPtr1 arg2) (toElement self)
namePtr))
hasAttributeNS ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> (Maybe string) -> string -> m Bool
hasAttributeNS self namespaceURI localName
= liftIO
(toBool <$>
(withUTFString localName $
\ localNamePtr ->
maybeWith withUTFString namespaceURI $
\ namespaceURIPtr ->
(\(Element arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_has_attribute_ns argPtr1 arg2 arg3) (toElement self)
namespaceURIPtr
localNamePtr))
focus :: (MonadIO m, ElementClass self) => self -> m ()
focus self
= liftIO ((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_focus argPtr1) (toElement self))
blur :: (MonadIO m, ElementClass self) => self -> m ()
blur self
= liftIO ((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_blur argPtr1) (toElement self))
scrollIntoView ::
(MonadIO m, ElementClass self) => self -> Bool -> m ()
scrollIntoView self alignWithTop
= liftIO
((\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_scroll_into_view argPtr1 arg2) (toElement self)
(fromBool alignWithTop))
scrollIntoViewIfNeeded ::
(MonadIO m, ElementClass self) => self -> Bool -> m ()
scrollIntoViewIfNeeded self centerIfNeeded
= liftIO
((\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_scroll_into_view_if_needed argPtr1 arg2)
(toElement self)
(fromBool centerIfNeeded))
scrollByLines ::
(MonadIO m, ElementClass self) => self -> Int -> m ()
scrollByLines self lines
= liftIO
((\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_scroll_by_lines argPtr1 arg2) (toElement self)
(fromIntegral lines))
scrollByPages ::
(MonadIO m, ElementClass self) => self -> Int -> m ()
scrollByPages self pages
= liftIO
((\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_scroll_by_pages argPtr1 arg2) (toElement self)
(fromIntegral pages))
getElementsByClassName ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m (Maybe NodeList)
getElementsByClassName self name
= liftIO
(maybeNull (makeNewGObject mkNodeList)
(withUTFString name $
\ namePtr ->
(\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_elements_by_class_name argPtr1 arg2)
(toElement self)
namePtr))
querySelector ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m (Maybe Element)
querySelector self selectors
= liftIO
(maybeNull (makeNewGObject mkElement)
(propagateGError $
\ errorPtr_ ->
withUTFString selectors $
\ selectorsPtr ->
(\(Element arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_query_selector argPtr1 arg2 arg3) (toElement self)
selectorsPtr
errorPtr_))
querySelectorAll ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m (Maybe NodeList)
querySelectorAll self selectors
= liftIO
(maybeNull (makeNewGObject mkNodeList)
(propagateGError $
\ errorPtr_ ->
withUTFString selectors $
\ selectorsPtr ->
(\(Element arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_query_selector_all argPtr1 arg2 arg3) (toElement self)
selectorsPtr
errorPtr_))
webkitMatchesSelector ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m Bool
webkitMatchesSelector self selectors
= liftIO
(toBool <$>
(propagateGError $
\ errorPtr_ ->
withUTFString selectors $
\ selectorsPtr ->
(\(Element arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_webkit_matches_selector argPtr1 arg2 arg3)
(toElement self)
selectorsPtr
errorPtr_))
webkitRequestFullScreen ::
(MonadIO m, ElementClass self) => self -> Word -> m ()
webkitRequestFullScreen self flags
= liftIO
((\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_webkit_request_full_screen argPtr1 arg2)
(toElement self)
(fromIntegral flags))
webkitRequestFullscreen ::
(MonadIO m, ElementClass self) => self -> m ()
webkitRequestFullscreen self
= liftIO
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_webkit_request_fullscreen argPtr1)
(toElement self))
requestPointerLock ::
(MonadIO m, ElementClass self) => self -> m ()
requestPointerLock self
= liftIO
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_webkit_request_pointer_lock argPtr1)
(toElement self))
pattern ALLOW_KEYBOARD_INPUT = 1
getTagName ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> m (Maybe string)
getTagName self
= liftIO
(((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_tag_name argPtr1) (toElement self)) >>=
maybePeek readUTFString)
getAttributes ::
(MonadIO m, ElementClass self) => self -> m (Maybe NamedNodeMap)
getAttributes self
= liftIO
(maybeNull (makeNewGObject mkNamedNodeMap)
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_attributes argPtr1) (toElement self)))
getStyle ::
(MonadIO m, ElementClass self) =>
self -> m (Maybe CSSStyleDeclaration)
getStyle self
= liftIO
(maybeNull (makeNewGObject mkCSSStyleDeclaration)
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_style argPtr1) (toElement self)))
setId ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m ()
setId self val
= liftIO
(withUTFString val $
\ valPtr ->
(\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_set_id argPtr1 arg2) (toElement self) valPtr)
getId ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> m string
getId self
= liftIO
(((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_id argPtr1) (toElement self)) >>=
readUTFString)
getOffsetLeft :: (MonadIO m, ElementClass self) => self -> m Double
getOffsetLeft self
= liftIO
(realToFrac <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_offset_left argPtr1) (toElement self)))
getOffsetTop :: (MonadIO m, ElementClass self) => self -> m Double
getOffsetTop self
= liftIO
(realToFrac <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_offset_top argPtr1) (toElement self)))
getOffsetWidth ::
(MonadIO m, ElementClass self) => self -> m Double
getOffsetWidth self
= liftIO
(realToFrac <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_offset_width argPtr1) (toElement self)))
getOffsetHeight ::
(MonadIO m, ElementClass self) => self -> m Double
getOffsetHeight self
= liftIO
(realToFrac <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_offset_height argPtr1) (toElement self)))
getClientLeft :: (MonadIO m, ElementClass self) => self -> m Double
getClientLeft self
= liftIO
(realToFrac <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_client_left argPtr1) (toElement self)))
getClientTop :: (MonadIO m, ElementClass self) => self -> m Double
getClientTop self
= liftIO
(realToFrac <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_client_top argPtr1) (toElement self)))
getClientWidth ::
(MonadIO m, ElementClass self) => self -> m Double
getClientWidth self
= liftIO
(realToFrac <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_client_width argPtr1) (toElement self)))
getClientHeight ::
(MonadIO m, ElementClass self) => self -> m Double
getClientHeight self
= liftIO
(realToFrac <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_client_height argPtr1) (toElement self)))
setScrollLeft ::
(MonadIO m, ElementClass self) => self -> Int -> m ()
setScrollLeft self val
= liftIO
((\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_set_scroll_left argPtr1 arg2) (toElement self)
(fromIntegral val))
getScrollLeft :: (MonadIO m, ElementClass self) => self -> m Int
getScrollLeft self
= liftIO
(fromIntegral <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_scroll_left argPtr1) (toElement self)))
setScrollTop ::
(MonadIO m, ElementClass self) => self -> Int -> m ()
setScrollTop self val
= liftIO
((\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_set_scroll_top argPtr1 arg2) (toElement self)
(fromIntegral val))
getScrollTop :: (MonadIO m, ElementClass self) => self -> m Int
getScrollTop self
= liftIO
(fromIntegral <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_scroll_top argPtr1) (toElement self)))
getScrollWidth :: (MonadIO m, ElementClass self) => self -> m Int
getScrollWidth self
= liftIO
(fromIntegral <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_scroll_width argPtr1) (toElement self)))
getScrollHeight :: (MonadIO m, ElementClass self) => self -> m Int
getScrollHeight self
= liftIO
(fromIntegral <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_scroll_height argPtr1) (toElement self)))
getOffsetParent ::
(MonadIO m, ElementClass self) => self -> m (Maybe Element)
getOffsetParent self
= liftIO
(maybeNull (makeNewGObject mkElement)
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_offset_parent argPtr1) (toElement self)))
setInnerHTML ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> (Maybe string) -> m ()
setInnerHTML self val
= liftIO
(propagateGError $
\ errorPtr_ ->
maybeWith withUTFString val $
\ valPtr ->
((\(HTMLElement arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_inner_html argPtr1 arg2 arg3) . castToHTMLElement) (toElement self)
valPtr
errorPtr_)
getInnerHTML ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> m (Maybe string)
getInnerHTML self
= liftIO
((((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_inner_html argPtr1) . castToHTMLElement) (toElement self))
>>=
maybePeek readUTFString)
setOuterHTML ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> (Maybe string) -> m ()
setOuterHTML self val
= liftIO
(propagateGError $
\ errorPtr_ ->
maybeWith withUTFString val $
\ valPtr ->
((\(HTMLElement arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_set_outer_html argPtr1 arg2 arg3) . castToHTMLElement) (toElement self)
valPtr
errorPtr_)
getOuterHTML ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> m (Maybe string)
getOuterHTML self
= liftIO
((((\(HTMLElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_element_get_outer_html argPtr1) . castToHTMLElement) (toElement self))
>>=
maybePeek readUTFString)
setClassName ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> string -> m ()
setClassName self val
= liftIO
(withUTFString val $
\ valPtr ->
(\(Element arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_set_class_name argPtr1 arg2) (toElement self)
valPtr)
getClassName ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> m string
getClassName self
= liftIO
(((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_class_name argPtr1) (toElement self))
>>=
readUTFString)
getClassList ::
(MonadIO m, ElementClass self) => self -> m (Maybe DOMTokenList)
getClassList self
= liftIO
(maybeNull (makeNewGObject mkDOMTokenList)
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_class_list argPtr1) (toElement self)))
getFirstElementChild ::
(MonadIO m, ElementClass self) => self -> m (Maybe Element)
getFirstElementChild self
= liftIO
(maybeNull (makeNewGObject mkElement)
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_first_element_child argPtr1)
(toElement self)))
getLastElementChild ::
(MonadIO m, ElementClass self) => self -> m (Maybe Element)
getLastElementChild self
= liftIO
(maybeNull (makeNewGObject mkElement)
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_last_element_child argPtr1)
(toElement self)))
getPreviousElementSibling ::
(MonadIO m, ElementClass self) => self -> m (Maybe Element)
getPreviousElementSibling self
= liftIO
(maybeNull (makeNewGObject mkElement)
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_previous_element_sibling argPtr1)
(toElement self)))
getNextElementSibling ::
(MonadIO m, ElementClass self) => self -> m (Maybe Element)
getNextElementSibling self
= liftIO
(maybeNull (makeNewGObject mkElement)
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_next_element_sibling argPtr1)
(toElement self)))
getChildElementCount ::
(MonadIO m, ElementClass self) => self -> m Word
getChildElementCount self
= liftIO
(fromIntegral <$>
((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_child_element_count argPtr1)
(toElement self)))
getWebkitRegionOverset ::
(MonadIO m, ElementClass self, GlibString string) =>
self -> m string
getWebkitRegionOverset self
= liftIO
(((\(Element arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_element_get_webkit_region_overset argPtr1)
(toElement self))
>>=
readUTFString)
abort :: (ElementClass self) => EventName self UIEvent
abort = EventName "abort"
blurEvent :: (ElementClass self) => EventName self UIEvent
blurEvent = EventName "blur"
change :: (ElementClass self) => EventName self Event
change = EventName "change"
click :: (ElementClass self) => EventName self MouseEvent
click = EventName "click"
contextMenu :: (ElementClass self) => EventName self MouseEvent
contextMenu = EventName "contextmenu"
dblClick :: (ElementClass self) => EventName self MouseEvent
dblClick = EventName "dblclick"
drag :: (ElementClass self) => EventName self MouseEvent
drag = EventName "drag"
dragEnd :: (ElementClass self) => EventName self MouseEvent
dragEnd = EventName "dragend"
dragEnter :: (ElementClass self) => EventName self MouseEvent
dragEnter = EventName "dragenter"
dragLeave :: (ElementClass self) => EventName self MouseEvent
dragLeave = EventName "dragleave"
dragOver :: (ElementClass self) => EventName self MouseEvent
dragOver = EventName "dragover"
dragStart :: (ElementClass self) => EventName self MouseEvent
dragStart = EventName "dragstart"
drop :: (ElementClass self) => EventName self MouseEvent
drop = EventName "drop"
error :: (ElementClass self) => EventName self UIEvent
error = EventName "error"
focusEvent :: (ElementClass self) => EventName self UIEvent
focusEvent = EventName "focus"
input :: (ElementClass self) => EventName self Event
input = EventName "input"
invalid :: (ElementClass self) => EventName self Event
invalid = EventName "invalid"
keyDown :: (ElementClass self) => EventName self KeyboardEvent
keyDown = EventName "keydown"
keyPress :: (ElementClass self) => EventName self KeyboardEvent
keyPress = EventName "keypress"
keyUp :: (ElementClass self) => EventName self KeyboardEvent
keyUp = EventName "keyup"
load :: (ElementClass self) => EventName self UIEvent
load = EventName "load"
mouseDown :: (ElementClass self) => EventName self MouseEvent
mouseDown = EventName "mousedown"
mouseEnter :: (ElementClass self) => EventName self MouseEvent
mouseEnter = EventName "mouseenter"
mouseLeave :: (ElementClass self) => EventName self MouseEvent
mouseLeave = EventName "mouseleave"
mouseMove :: (ElementClass self) => EventName self MouseEvent
mouseMove = EventName "mousemove"
mouseOut :: (ElementClass self) => EventName self MouseEvent
mouseOut = EventName "mouseout"
mouseOver :: (ElementClass self) => EventName self MouseEvent
mouseOver = EventName "mouseover"
mouseUp :: (ElementClass self) => EventName self MouseEvent
mouseUp = EventName "mouseup"
mouseWheel :: (ElementClass self) => EventName self MouseEvent
mouseWheel = EventName "mousewheel"
scroll :: (ElementClass self) => EventName self UIEvent
scroll = EventName "scroll"
select :: (ElementClass self) => EventName self UIEvent
select = EventName "select"
submit :: (ElementClass self) => EventName self Event
submit = EventName "submit"
wheel :: (ElementClass self) => EventName self WheelEvent
wheel = EventName "wheel"
beforeCut :: (ElementClass self) => EventName self Event
beforeCut = EventName "beforecut"
cut :: (ElementClass self) => EventName self Event
cut = EventName "cut"
beforeCopy :: (ElementClass self) => EventName self Event
beforeCopy = EventName "beforecopy"
copy :: (ElementClass self) => EventName self Event
copy = EventName "copy"
beforePaste :: (ElementClass self) => EventName self Event
beforePaste = EventName "beforepaste"
paste :: (ElementClass self) => EventName self Event
paste = EventName "paste"
reset :: (ElementClass self) => EventName self Event
reset = EventName "reset"
search :: (ElementClass self) => EventName self Event
search = EventName "search"
selectStart :: (ElementClass self) => EventName self Event
selectStart = EventName "selectstart"
touchStart :: (ElementClass self) => EventName self UIEvent
touchStart = EventName "touchstart"
touchMove :: (ElementClass self) => EventName self UIEvent
touchMove = EventName "touchmove"
touchEnd :: (ElementClass self) => EventName self UIEvent
touchEnd = EventName "touchend"
touchCancel :: (ElementClass self) => EventName self UIEvent
touchCancel = EventName "touchcancel"
webKitFullscreenChange ::
(ElementClass self) => EventName self Event
webKitFullscreenChange = EventName "webkitfullscreenchange"
webKitFullscreenError ::
(ElementClass self) => EventName self Event
webKitFullscreenError = EventName "webkitfullscreenerror"
webKitWillRevealBottom ::
(ElementClass self) => EventName self Event
webKitWillRevealBottom = EventName "webkitwillrevealbottom"
webKitWillRevealLeft :: (ElementClass self) => EventName self Event
webKitWillRevealLeft = EventName "webkitwillrevealleft"
webKitWillRevealRight ::
(ElementClass self) => EventName self Event
webKitWillRevealRight = EventName "webkitwillrevealright"
webKitWillRevealTop :: (ElementClass self) => EventName self Event
webKitWillRevealTop = EventName "webkitwillrevealtop"
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_attribute"
webkit_dom_element_get_attribute :: ((Ptr Element) -> ((Ptr CChar) -> (IO (Ptr CChar))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_set_attribute"
webkit_dom_element_set_attribute :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ())))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_remove_attribute"
webkit_dom_element_remove_attribute :: ((Ptr Element) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_attribute_node"
webkit_dom_element_get_attribute_node :: ((Ptr Element) -> ((Ptr CChar) -> (IO (Ptr Attr))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_set_attribute_node"
webkit_dom_element_set_attribute_node :: ((Ptr Element) -> ((Ptr Attr) -> ((Ptr (Ptr ())) -> (IO (Ptr Attr)))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_remove_attribute_node"
webkit_dom_element_remove_attribute_node :: ((Ptr Element) -> ((Ptr Attr) -> ((Ptr (Ptr ())) -> (IO (Ptr Attr)))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_elements_by_tag_name"
webkit_dom_element_get_elements_by_tag_name :: ((Ptr Element) -> ((Ptr CChar) -> (IO (Ptr NodeList))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_has_attributes"
webkit_dom_element_has_attributes :: ((Ptr Element) -> (IO CInt))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_attribute_ns"
webkit_dom_element_get_attribute_ns :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO (Ptr CChar)))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_set_attribute_ns"
webkit_dom_element_set_attribute_ns :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_remove_attribute_ns"
webkit_dom_element_remove_attribute_ns :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ()))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_elements_by_tag_name_ns"
webkit_dom_element_get_elements_by_tag_name_ns :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO (Ptr NodeList)))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_attribute_node_ns"
webkit_dom_element_get_attribute_node_ns :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO (Ptr Attr)))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_set_attribute_node_ns"
webkit_dom_element_set_attribute_node_ns :: ((Ptr Element) -> ((Ptr Attr) -> ((Ptr (Ptr ())) -> (IO (Ptr Attr)))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_has_attribute"
webkit_dom_element_has_attribute :: ((Ptr Element) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_has_attribute_ns"
webkit_dom_element_has_attribute_ns :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO CInt))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_focus"
webkit_dom_element_focus :: ((Ptr Element) -> (IO ()))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_blur"
webkit_dom_element_blur :: ((Ptr Element) -> (IO ()))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_scroll_into_view"
webkit_dom_element_scroll_into_view :: ((Ptr Element) -> (CInt -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_scroll_into_view_if_needed"
webkit_dom_element_scroll_into_view_if_needed :: ((Ptr Element) -> (CInt -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_scroll_by_lines"
webkit_dom_element_scroll_by_lines :: ((Ptr Element) -> (CLong -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_scroll_by_pages"
webkit_dom_element_scroll_by_pages :: ((Ptr Element) -> (CLong -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_elements_by_class_name"
webkit_dom_element_get_elements_by_class_name :: ((Ptr Element) -> ((Ptr CChar) -> (IO (Ptr NodeList))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_query_selector"
webkit_dom_element_query_selector :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO (Ptr Element)))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_query_selector_all"
webkit_dom_element_query_selector_all :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO (Ptr NodeList)))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_webkit_matches_selector"
webkit_dom_element_webkit_matches_selector :: ((Ptr Element) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_webkit_request_full_screen"
webkit_dom_element_webkit_request_full_screen :: ((Ptr Element) -> (CUShort -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_webkit_request_fullscreen"
webkit_dom_element_webkit_request_fullscreen :: ((Ptr Element) -> (IO ()))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_webkit_request_pointer_lock"
webkit_dom_element_webkit_request_pointer_lock :: ((Ptr Element) -> (IO ()))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_tag_name"
webkit_dom_element_get_tag_name :: ((Ptr Element) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_attributes"
webkit_dom_element_get_attributes :: ((Ptr Element) -> (IO (Ptr NamedNodeMap)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_style"
webkit_dom_element_get_style :: ((Ptr Element) -> (IO (Ptr CSSStyleDeclaration)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_set_id"
webkit_dom_element_set_id :: ((Ptr Element) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_id"
webkit_dom_element_get_id :: ((Ptr Element) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_offset_left"
webkit_dom_element_get_offset_left :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_offset_top"
webkit_dom_element_get_offset_top :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_offset_width"
webkit_dom_element_get_offset_width :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_offset_height"
webkit_dom_element_get_offset_height :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_client_left"
webkit_dom_element_get_client_left :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_client_top"
webkit_dom_element_get_client_top :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_client_width"
webkit_dom_element_get_client_width :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_client_height"
webkit_dom_element_get_client_height :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_set_scroll_left"
webkit_dom_element_set_scroll_left :: ((Ptr Element) -> (CLong -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_scroll_left"
webkit_dom_element_get_scroll_left :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_set_scroll_top"
webkit_dom_element_set_scroll_top :: ((Ptr Element) -> (CLong -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_scroll_top"
webkit_dom_element_get_scroll_top :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_scroll_width"
webkit_dom_element_get_scroll_width :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_scroll_height"
webkit_dom_element_get_scroll_height :: ((Ptr Element) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_offset_parent"
webkit_dom_element_get_offset_parent :: ((Ptr Element) -> (IO (Ptr Element)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_html_element_set_inner_html"
webkit_dom_html_element_set_inner_html :: ((Ptr HTMLElement) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_html_element_get_inner_html"
webkit_dom_html_element_get_inner_html :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_html_element_set_outer_html"
webkit_dom_html_element_set_outer_html :: ((Ptr HTMLElement) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_html_element_get_outer_html"
webkit_dom_html_element_get_outer_html :: ((Ptr HTMLElement) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_set_class_name"
webkit_dom_element_set_class_name :: ((Ptr Element) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_class_name"
webkit_dom_element_get_class_name :: ((Ptr Element) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_class_list"
webkit_dom_element_get_class_list :: ((Ptr Element) -> (IO (Ptr DOMTokenList)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_first_element_child"
webkit_dom_element_get_first_element_child :: ((Ptr Element) -> (IO (Ptr Element)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_last_element_child"
webkit_dom_element_get_last_element_child :: ((Ptr Element) -> (IO (Ptr Element)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_previous_element_sibling"
webkit_dom_element_get_previous_element_sibling :: ((Ptr Element) -> (IO (Ptr Element)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_next_element_sibling"
webkit_dom_element_get_next_element_sibling :: ((Ptr Element) -> (IO (Ptr Element)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_child_element_count"
webkit_dom_element_get_child_element_count :: ((Ptr Element) -> (IO CULong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Element.h webkit_dom_element_get_webkit_region_overset"
webkit_dom_element_get_webkit_region_overset :: ((Ptr Element) -> (IO (Ptr CChar)))