module Graphics.UI.Gtk.WebKit.DOM.HTMLSelectElement(
item,
namedItem,
addBefore,
remove,
checkValidity,
setCustomValidity,
setAutofocus,
getAutofocus,
setDisabled,
getDisabled,
getForm,
setMultiple,
getMultiple,
setName,
getName,
setRequired,
getRequired,
setSize,
getSize,
getOptions,
setLength,
getLength,
getSelectedOptions,
setSelectedIndex,
getSelectedIndex,
setValue,
getValue,
getWillValidate,
getValidity,
getValidationMessage,
getLabels,
HTMLSelectElement,
castToHTMLSelectElement,
gTypeHTMLSelectElement,
HTMLSelectElementClass,
toHTMLSelectElement,
) 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
item ::
(MonadIO m, HTMLSelectElementClass self) =>
self -> Word -> m (Maybe Node)
item self index
= liftIO
(maybeNull (makeNewGObject mkNode)
((\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_item argPtr1 arg2)
(toHTMLSelectElement self)
(fromIntegral index)))
namedItem ::
(MonadIO m, HTMLSelectElementClass self, GlibString string) =>
self -> string -> m (Maybe Node)
namedItem self name
= liftIO
(maybeNull (makeNewGObject mkNode)
(withUTFString name $
\ namePtr ->
(\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_named_item argPtr1 arg2)
(toHTMLSelectElement self)
namePtr))
addBefore ::
(MonadIO m, HTMLSelectElementClass self, HTMLElementClass element,
HTMLElementClass before) =>
self -> Maybe element -> Maybe before -> m ()
addBefore self element before
= liftIO
(propagateGError $
\ errorPtr_ ->
(\(HTMLSelectElement arg1) (HTMLElement arg2) (HTMLElement arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg3 $ \argPtr3 ->webkit_dom_html_select_element_add argPtr1 argPtr2 argPtr3 arg4)
(toHTMLSelectElement self)
(maybe (HTMLElement nullForeignPtr) toHTMLElement element)
(maybe (HTMLElement nullForeignPtr) toHTMLElement before)
errorPtr_)
remove ::
(MonadIO m, HTMLSelectElementClass self) => self -> Int -> m ()
remove self index
= liftIO
((\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_remove argPtr1 arg2)
(toHTMLSelectElement self)
(fromIntegral index))
checkValidity ::
(MonadIO m, HTMLSelectElementClass self) => self -> m Bool
checkValidity self
= liftIO
(toBool <$>
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_check_validity argPtr1)
(toHTMLSelectElement self)))
setCustomValidity ::
(MonadIO m, HTMLSelectElementClass self, GlibString string) =>
self -> (Maybe string) -> m ()
setCustomValidity self error
= liftIO
(maybeWith withUTFString error $
\ errorPtr ->
(\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_custom_validity argPtr1 arg2)
(toHTMLSelectElement self)
errorPtr)
setAutofocus ::
(MonadIO m, HTMLSelectElementClass self) => self -> Bool -> m ()
setAutofocus self val
= liftIO
((\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_autofocus argPtr1 arg2)
(toHTMLSelectElement self)
(fromBool val))
getAutofocus ::
(MonadIO m, HTMLSelectElementClass self) => self -> m Bool
getAutofocus self
= liftIO
(toBool <$>
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_autofocus argPtr1)
(toHTMLSelectElement self)))
setDisabled ::
(MonadIO m, HTMLSelectElementClass self) => self -> Bool -> m ()
setDisabled self val
= liftIO
((\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_disabled argPtr1 arg2)
(toHTMLSelectElement self)
(fromBool val))
getDisabled ::
(MonadIO m, HTMLSelectElementClass self) => self -> m Bool
getDisabled self
= liftIO
(toBool <$>
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_disabled argPtr1)
(toHTMLSelectElement self)))
getForm ::
(MonadIO m, HTMLSelectElementClass self) =>
self -> m (Maybe HTMLFormElement)
getForm self
= liftIO
(maybeNull (makeNewGObject mkHTMLFormElement)
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_form argPtr1)
(toHTMLSelectElement self)))
setMultiple ::
(MonadIO m, HTMLSelectElementClass self) => self -> Bool -> m ()
setMultiple self val
= liftIO
((\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_multiple argPtr1 arg2)
(toHTMLSelectElement self)
(fromBool val))
getMultiple ::
(MonadIO m, HTMLSelectElementClass self) => self -> m Bool
getMultiple self
= liftIO
(toBool <$>
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_multiple argPtr1)
(toHTMLSelectElement self)))
setName ::
(MonadIO m, HTMLSelectElementClass self, GlibString string) =>
self -> string -> m ()
setName self val
= liftIO
(withUTFString val $
\ valPtr ->
(\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_name argPtr1 arg2)
(toHTMLSelectElement self)
valPtr)
getName ::
(MonadIO m, HTMLSelectElementClass self, GlibString string) =>
self -> m string
getName self
= liftIO
(((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_name argPtr1)
(toHTMLSelectElement self))
>>=
readUTFString)
setRequired ::
(MonadIO m, HTMLSelectElementClass self) => self -> Bool -> m ()
setRequired self val
= liftIO
((\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_required argPtr1 arg2)
(toHTMLSelectElement self)
(fromBool val))
getRequired ::
(MonadIO m, HTMLSelectElementClass self) => self -> m Bool
getRequired self
= liftIO
(toBool <$>
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_required argPtr1)
(toHTMLSelectElement self)))
setSize ::
(MonadIO m, HTMLSelectElementClass self) => self -> Int -> m ()
setSize self val
= liftIO
((\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_size argPtr1 arg2)
(toHTMLSelectElement self)
(fromIntegral val))
getSize ::
(MonadIO m, HTMLSelectElementClass self) => self -> m Int
getSize self
= liftIO
(fromIntegral <$>
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_size argPtr1)
(toHTMLSelectElement self)))
getOptions ::
(MonadIO m, HTMLSelectElementClass self) =>
self -> m (Maybe HTMLOptionsCollection)
getOptions self
= liftIO
(maybeNull (makeNewGObject mkHTMLOptionsCollection)
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_options argPtr1)
(toHTMLSelectElement self)))
setLength ::
(MonadIO m, HTMLSelectElementClass self) => self -> Word -> m ()
setLength self val
= liftIO
(propagateGError $
\ errorPtr_ ->
(\(HTMLSelectElement arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_length argPtr1 arg2 arg3)
(toHTMLSelectElement self)
(fromIntegral val)
errorPtr_)
getLength ::
(MonadIO m, HTMLSelectElementClass self) => self -> m Word
getLength self
= liftIO
(fromIntegral <$>
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_length argPtr1)
(toHTMLSelectElement self)))
getSelectedOptions ::
(MonadIO m, HTMLSelectElementClass self) =>
self -> m (Maybe HTMLCollection)
getSelectedOptions self
= liftIO
(maybeNull (makeNewGObject mkHTMLCollection)
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_selected_options argPtr1)
(toHTMLSelectElement self)))
setSelectedIndex ::
(MonadIO m, HTMLSelectElementClass self) => self -> Int -> m ()
setSelectedIndex self val
= liftIO
((\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_selected_index argPtr1 arg2)
(toHTMLSelectElement self)
(fromIntegral val))
getSelectedIndex ::
(MonadIO m, HTMLSelectElementClass self) => self -> m Int
getSelectedIndex self
= liftIO
(fromIntegral <$>
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_selected_index argPtr1)
(toHTMLSelectElement self)))
setValue ::
(MonadIO m, HTMLSelectElementClass self, GlibString string) =>
self -> (Maybe string) -> m ()
setValue self val
= liftIO
(maybeWith withUTFString val $
\ valPtr ->
(\(HTMLSelectElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_set_value argPtr1 arg2)
(toHTMLSelectElement self)
valPtr)
getValue ::
(MonadIO m, HTMLSelectElementClass self, GlibString string) =>
self -> m (Maybe string)
getValue self
= liftIO
(((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_value argPtr1)
(toHTMLSelectElement self))
>>=
maybePeek readUTFString)
getWillValidate ::
(MonadIO m, HTMLSelectElementClass self) => self -> m Bool
getWillValidate self
= liftIO
(toBool <$>
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_will_validate argPtr1)
(toHTMLSelectElement self)))
getValidity ::
(MonadIO m, HTMLSelectElementClass self) =>
self -> m (Maybe ValidityState)
getValidity self
= liftIO
(maybeNull (makeNewGObject mkValidityState)
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_validity argPtr1)
(toHTMLSelectElement self)))
getValidationMessage ::
(MonadIO m, HTMLSelectElementClass self, GlibString string) =>
self -> m string
getValidationMessage self
= liftIO
(((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_validation_message argPtr1)
(toHTMLSelectElement self))
>>=
readUTFString)
getLabels ::
(MonadIO m, HTMLSelectElementClass self) =>
self -> m (Maybe NodeList)
getLabels self
= liftIO
(maybeNull (makeNewGObject mkNodeList)
((\(HTMLSelectElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_select_element_get_labels argPtr1)
(toHTMLSelectElement self)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_item"
webkit_dom_html_select_element_item :: ((Ptr HTMLSelectElement) -> (CULong -> (IO (Ptr Node))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_named_item"
webkit_dom_html_select_element_named_item :: ((Ptr HTMLSelectElement) -> ((Ptr CChar) -> (IO (Ptr Node))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_add"
webkit_dom_html_select_element_add :: ((Ptr HTMLSelectElement) -> ((Ptr HTMLElement) -> ((Ptr HTMLElement) -> ((Ptr (Ptr ())) -> (IO ())))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_remove"
webkit_dom_html_select_element_remove :: ((Ptr HTMLSelectElement) -> (CLong -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_check_validity"
webkit_dom_html_select_element_check_validity :: ((Ptr HTMLSelectElement) -> (IO CInt))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_custom_validity"
webkit_dom_html_select_element_set_custom_validity :: ((Ptr HTMLSelectElement) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_autofocus"
webkit_dom_html_select_element_set_autofocus :: ((Ptr HTMLSelectElement) -> (CInt -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_autofocus"
webkit_dom_html_select_element_get_autofocus :: ((Ptr HTMLSelectElement) -> (IO CInt))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_disabled"
webkit_dom_html_select_element_set_disabled :: ((Ptr HTMLSelectElement) -> (CInt -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_disabled"
webkit_dom_html_select_element_get_disabled :: ((Ptr HTMLSelectElement) -> (IO CInt))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_form"
webkit_dom_html_select_element_get_form :: ((Ptr HTMLSelectElement) -> (IO (Ptr HTMLFormElement)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_multiple"
webkit_dom_html_select_element_set_multiple :: ((Ptr HTMLSelectElement) -> (CInt -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_multiple"
webkit_dom_html_select_element_get_multiple :: ((Ptr HTMLSelectElement) -> (IO CInt))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_name"
webkit_dom_html_select_element_set_name :: ((Ptr HTMLSelectElement) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_name"
webkit_dom_html_select_element_get_name :: ((Ptr HTMLSelectElement) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_required"
webkit_dom_html_select_element_set_required :: ((Ptr HTMLSelectElement) -> (CInt -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_required"
webkit_dom_html_select_element_get_required :: ((Ptr HTMLSelectElement) -> (IO CInt))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_size"
webkit_dom_html_select_element_set_size :: ((Ptr HTMLSelectElement) -> (CLong -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_size"
webkit_dom_html_select_element_get_size :: ((Ptr HTMLSelectElement) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_options"
webkit_dom_html_select_element_get_options :: ((Ptr HTMLSelectElement) -> (IO (Ptr HTMLOptionsCollection)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_length"
webkit_dom_html_select_element_set_length :: ((Ptr HTMLSelectElement) -> (CULong -> ((Ptr (Ptr ())) -> (IO ()))))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_length"
webkit_dom_html_select_element_get_length :: ((Ptr HTMLSelectElement) -> (IO CULong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_selected_options"
webkit_dom_html_select_element_get_selected_options :: ((Ptr HTMLSelectElement) -> (IO (Ptr HTMLCollection)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_selected_index"
webkit_dom_html_select_element_set_selected_index :: ((Ptr HTMLSelectElement) -> (CLong -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_selected_index"
webkit_dom_html_select_element_get_selected_index :: ((Ptr HTMLSelectElement) -> (IO CLong))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_set_value"
webkit_dom_html_select_element_set_value :: ((Ptr HTMLSelectElement) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_value"
webkit_dom_html_select_element_get_value :: ((Ptr HTMLSelectElement) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_will_validate"
webkit_dom_html_select_element_get_will_validate :: ((Ptr HTMLSelectElement) -> (IO CInt))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_validity"
webkit_dom_html_select_element_get_validity :: ((Ptr HTMLSelectElement) -> (IO (Ptr ValidityState)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_validation_message"
webkit_dom_html_select_element_get_validation_message :: ((Ptr HTMLSelectElement) -> (IO (Ptr CChar)))
foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/HTMLSelectElement.h webkit_dom_html_select_element_get_labels"
webkit_dom_html_select_element_get_labels :: ((Ptr HTMLSelectElement) -> (IO (Ptr NodeList)))