-- GENERATED by C->Haskell Compiler, version 0.13.13 (gtk2hs branch) "Bin IO", 27 May 2012 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.HTMLKeygenElement(
checkValidity,
setCustomValidity,
setAutofocus,
getAutofocus,
setChallenge,
getChallenge,
setDisabled,
getDisabled,
getForm,
setKeytype,
getKeytype,
setName,
getName,
getWillValidate,
getValidity,
getValidationMessage,
getLabels,
HTMLKeygenElement,
castToHTMLKeygenElement,
gTypeHTMLKeygenElement,
HTMLKeygenElementClass,
toHTMLKeygenElement,
) 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
{-# LINE 36 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
checkValidity ::
              (MonadIO m, HTMLKeygenElementClass self) => self -> m Bool
checkValidity self
  = liftIO
      (toBool <$>
         ((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_check_validity argPtr1)
{-# LINE 45 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
            (toHTMLKeygenElement self)))
 
setCustomValidity ::
                  (MonadIO m, HTMLKeygenElementClass self, GlibString string) =>
                    self -> (Maybe string) -> m ()
setCustomValidity self error
  = liftIO
      (maybeWith withUTFString error $
         \ errorPtr ->
           (\(HTMLKeygenElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_set_custom_validity argPtr1 arg2)
{-# LINE 55 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
             (toHTMLKeygenElement self)
             errorPtr)
 
setAutofocus ::
             (MonadIO m, HTMLKeygenElementClass self) => self -> Bool -> m ()
setAutofocus self val
  = liftIO
      ((\(HTMLKeygenElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_set_autofocus argPtr1 arg2)
{-# LINE 63 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
         (toHTMLKeygenElement self)
         (fromBool val))
 
getAutofocus ::
             (MonadIO m, HTMLKeygenElementClass self) => self -> m Bool
getAutofocus self
  = liftIO
      (toBool <$>
         ((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_autofocus argPtr1)
{-# LINE 72 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
            (toHTMLKeygenElement self)))
 
setChallenge ::
             (MonadIO m, HTMLKeygenElementClass self, GlibString string) =>
               self -> string -> m ()
setChallenge self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLKeygenElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_set_challenge argPtr1 arg2)
{-# LINE 82 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
             (toHTMLKeygenElement self)
             valPtr)
 
getChallenge ::
             (MonadIO m, HTMLKeygenElementClass self, GlibString string) =>
               self -> m string
getChallenge self
  = liftIO
      (((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_challenge argPtr1)
{-# LINE 91 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
          (toHTMLKeygenElement self))
         >>=
         readUTFString)
 
setDisabled ::
            (MonadIO m, HTMLKeygenElementClass self) => self -> Bool -> m ()
setDisabled self val
  = liftIO
      ((\(HTMLKeygenElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_set_disabled argPtr1 arg2)
{-# LINE 100 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
         (toHTMLKeygenElement self)
         (fromBool val))
 
getDisabled ::
            (MonadIO m, HTMLKeygenElementClass self) => self -> m Bool
getDisabled self
  = liftIO
      (toBool <$>
         ((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_disabled argPtr1)
{-# LINE 109 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
            (toHTMLKeygenElement self)))
 
getForm ::
        (MonadIO m, HTMLKeygenElementClass self) =>
          self -> m (Maybe HTMLFormElement)
getForm self
  = liftIO
      (maybeNull (makeNewGObject mkHTMLFormElement)
         ((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_form argPtr1)
{-# LINE 118 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
            (toHTMLKeygenElement self)))
 
setKeytype ::
           (MonadIO m, HTMLKeygenElementClass self, GlibString string) =>
             self -> string -> m ()
setKeytype self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLKeygenElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_set_keytype argPtr1 arg2)
{-# LINE 128 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
             (toHTMLKeygenElement self)
             valPtr)
 
getKeytype ::
           (MonadIO m, HTMLKeygenElementClass self, GlibString string) =>
             self -> m string
getKeytype self
  = liftIO
      (((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_keytype argPtr1)
{-# LINE 137 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
          (toHTMLKeygenElement self))
         >>=
         readUTFString)
 
setName ::
        (MonadIO m, HTMLKeygenElementClass self, GlibString string) =>
          self -> string -> m ()
setName self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLKeygenElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_set_name argPtr1 arg2)
{-# LINE 149 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
             (toHTMLKeygenElement self)
             valPtr)
 
getName ::
        (MonadIO m, HTMLKeygenElementClass self, GlibString string) =>
          self -> m string
getName self
  = liftIO
      (((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_name argPtr1)
{-# LINE 158 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
          (toHTMLKeygenElement self))
         >>=
         readUTFString)
 
getWillValidate ::
                (MonadIO m, HTMLKeygenElementClass self) => self -> m Bool
getWillValidate self
  = liftIO
      (toBool <$>
         ((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_will_validate argPtr1)
{-# LINE 168 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
            (toHTMLKeygenElement self)))
 
getValidity ::
            (MonadIO m, HTMLKeygenElementClass self) =>
              self -> m (Maybe ValidityState)
getValidity self
  = liftIO
      (maybeNull (makeNewGObject mkValidityState)
         ((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_validity argPtr1)
{-# LINE 177 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
            (toHTMLKeygenElement self)))
 
getValidationMessage ::
                     (MonadIO m, HTMLKeygenElementClass self, GlibString string) =>
                       self -> m string
getValidationMessage self
  = liftIO
      (((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_validation_message argPtr1)
{-# LINE 185 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
          (toHTMLKeygenElement self))
         >>=
         readUTFString)
 
getLabels ::
          (MonadIO m, HTMLKeygenElementClass self) =>
            self -> m (Maybe NodeList)
getLabels self
  = liftIO
      (maybeNull (makeNewGObject mkNodeList)
         ((\(HTMLKeygenElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_keygen_element_get_labels argPtr1)
{-# LINE 196 "./Graphics/UI/Gtk/WebKit/DOM/HTMLKeygenElement.chs" #-}
            (toHTMLKeygenElement self)))

foreign import ccall safe "webkit_dom_html_keygen_element_check_validity"
  webkit_dom_html_keygen_element_check_validity :: ((Ptr HTMLKeygenElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_keygen_element_set_custom_validity"
  webkit_dom_html_keygen_element_set_custom_validity :: ((Ptr HTMLKeygenElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_keygen_element_set_autofocus"
  webkit_dom_html_keygen_element_set_autofocus :: ((Ptr HTMLKeygenElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_keygen_element_get_autofocus"
  webkit_dom_html_keygen_element_get_autofocus :: ((Ptr HTMLKeygenElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_keygen_element_set_challenge"
  webkit_dom_html_keygen_element_set_challenge :: ((Ptr HTMLKeygenElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_keygen_element_get_challenge"
  webkit_dom_html_keygen_element_get_challenge :: ((Ptr HTMLKeygenElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_keygen_element_set_disabled"
  webkit_dom_html_keygen_element_set_disabled :: ((Ptr HTMLKeygenElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_keygen_element_get_disabled"
  webkit_dom_html_keygen_element_get_disabled :: ((Ptr HTMLKeygenElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_keygen_element_get_form"
  webkit_dom_html_keygen_element_get_form :: ((Ptr HTMLKeygenElement) -> (IO (Ptr HTMLFormElement)))

foreign import ccall safe "webkit_dom_html_keygen_element_set_keytype"
  webkit_dom_html_keygen_element_set_keytype :: ((Ptr HTMLKeygenElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_keygen_element_get_keytype"
  webkit_dom_html_keygen_element_get_keytype :: ((Ptr HTMLKeygenElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_keygen_element_set_name"
  webkit_dom_html_keygen_element_set_name :: ((Ptr HTMLKeygenElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_keygen_element_get_name"
  webkit_dom_html_keygen_element_get_name :: ((Ptr HTMLKeygenElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_keygen_element_get_will_validate"
  webkit_dom_html_keygen_element_get_will_validate :: ((Ptr HTMLKeygenElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_keygen_element_get_validity"
  webkit_dom_html_keygen_element_get_validity :: ((Ptr HTMLKeygenElement) -> (IO (Ptr ValidityState)))

foreign import ccall safe "webkit_dom_html_keygen_element_get_validation_message"
  webkit_dom_html_keygen_element_get_validation_message :: ((Ptr HTMLKeygenElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_keygen_element_get_labels"
  webkit_dom_html_keygen_element_get_labels :: ((Ptr HTMLKeygenElement) -> (IO (Ptr NodeList)))