-- 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/HTMLButtonElement.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.HTMLButtonElement(
checkValidity,
setCustomValidity,
setAutofocus,
getAutofocus,
setDisabled,
getDisabled,
getForm,
setFormAction,
getFormAction,
setFormEnctype,
getFormEnctype,
setFormMethod,
getFormMethod,
setFormNoValidate,
getFormNoValidate,
setFormTarget,
getFormTarget,
setName,
getName,
setValue,
getValue,
getWillValidate,
getValidity,
getValidationMessage,
getLabels,
HTMLButtonElement,
castToHTMLButtonElement,
gTypeHTMLButtonElement,
HTMLButtonElementClass,
toHTMLButtonElement,
) 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 44 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
checkValidity ::
              (MonadIO m, HTMLButtonElementClass self) => self -> m Bool
checkValidity self
  = liftIO
      (toBool <$>
         ((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_check_validity argPtr1)
{-# LINE 53 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
            (toHTMLButtonElement self)))
 
setCustomValidity ::
                  (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                    self -> (Maybe string) -> m ()
setCustomValidity self error
  = liftIO
      (maybeWith withUTFString error $
         \ errorPtr ->
           (\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_custom_validity argPtr1 arg2)
{-# LINE 63 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
             (toHTMLButtonElement self)
             errorPtr)
 
setAutofocus ::
             (MonadIO m, HTMLButtonElementClass self) => self -> Bool -> m ()
setAutofocus self val
  = liftIO
      ((\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_autofocus argPtr1 arg2)
{-# LINE 71 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
         (toHTMLButtonElement self)
         (fromBool val))
 
getAutofocus ::
             (MonadIO m, HTMLButtonElementClass self) => self -> m Bool
getAutofocus self
  = liftIO
      (toBool <$>
         ((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_autofocus argPtr1)
{-# LINE 80 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
            (toHTMLButtonElement self)))
 
setDisabled ::
            (MonadIO m, HTMLButtonElementClass self) => self -> Bool -> m ()
setDisabled self val
  = liftIO
      ((\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_disabled argPtr1 arg2)
{-# LINE 87 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
         (toHTMLButtonElement self)
         (fromBool val))
 
getDisabled ::
            (MonadIO m, HTMLButtonElementClass self) => self -> m Bool
getDisabled self
  = liftIO
      (toBool <$>
         ((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_disabled argPtr1)
{-# LINE 96 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
            (toHTMLButtonElement self)))
 
getForm ::
        (MonadIO m, HTMLButtonElementClass self) =>
          self -> m (Maybe HTMLFormElement)
getForm self
  = liftIO
      (maybeNull (makeNewGObject mkHTMLFormElement)
         ((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_form argPtr1)
{-# LINE 105 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
            (toHTMLButtonElement self)))
 
setFormAction ::
              (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                self -> string -> m ()
setFormAction self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_form_action argPtr1 arg2)
{-# LINE 115 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
             (toHTMLButtonElement self)
             valPtr)
 
getFormAction ::
              (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                self -> m string
getFormAction self
  = liftIO
      (((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_form_action argPtr1)
{-# LINE 124 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
          (toHTMLButtonElement self))
         >>=
         readUTFString)
 
setFormEnctype ::
               (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                 self -> (Maybe string) -> m ()
setFormEnctype self val
  = liftIO
      (maybeWith withUTFString val $
         \ valPtr ->
           (\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_form_enctype argPtr1 arg2)
{-# LINE 136 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
             (toHTMLButtonElement self)
             valPtr)
 
getFormEnctype ::
               (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                 self -> m (Maybe string)
getFormEnctype self
  = liftIO
      (((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_form_enctype argPtr1)
{-# LINE 145 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
          (toHTMLButtonElement self))
         >>=
         maybePeek readUTFString)
 
setFormMethod ::
              (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                self -> (Maybe string) -> m ()
setFormMethod self val
  = liftIO
      (maybeWith withUTFString val $
         \ valPtr ->
           (\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_form_method argPtr1 arg2)
{-# LINE 157 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
             (toHTMLButtonElement self)
             valPtr)
 
getFormMethod ::
              (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                self -> m (Maybe string)
getFormMethod self
  = liftIO
      (((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_form_method argPtr1)
{-# LINE 166 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
          (toHTMLButtonElement self))
         >>=
         maybePeek readUTFString)
 
setFormNoValidate ::
                  (MonadIO m, HTMLButtonElementClass self) => self -> Bool -> m ()
setFormNoValidate self val
  = liftIO
      ((\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_form_no_validate argPtr1 arg2)
{-# LINE 175 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
         (toHTMLButtonElement self)
         (fromBool val))
 
getFormNoValidate ::
                  (MonadIO m, HTMLButtonElementClass self) => self -> m Bool
getFormNoValidate self
  = liftIO
      (toBool <$>
         ((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_form_no_validate argPtr1)
{-# LINE 184 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
            (toHTMLButtonElement self)))
 
setFormTarget ::
              (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                self -> string -> m ()
setFormTarget self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_form_target argPtr1 arg2)
{-# LINE 194 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
             (toHTMLButtonElement self)
             valPtr)
 
getFormTarget ::
              (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                self -> m string
getFormTarget self
  = liftIO
      (((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_form_target argPtr1)
{-# LINE 203 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
          (toHTMLButtonElement self))
         >>=
         readUTFString)
 
setName ::
        (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
          self -> string -> m ()
setName self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_name argPtr1 arg2)
{-# LINE 215 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
             (toHTMLButtonElement self)
             valPtr)
 
getName ::
        (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
          self -> m string
getName self
  = liftIO
      (((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_name argPtr1)
{-# LINE 224 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
          (toHTMLButtonElement self))
         >>=
         readUTFString)
 
setValue ::
         (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
           self -> string -> m ()
setValue self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLButtonElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_set_value argPtr1 arg2)
{-# LINE 236 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
             (toHTMLButtonElement self)
             valPtr)
 
getValue ::
         (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
           self -> m string
getValue self
  = liftIO
      (((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_value argPtr1)
{-# LINE 245 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
          (toHTMLButtonElement self))
         >>=
         readUTFString)
 
getWillValidate ::
                (MonadIO m, HTMLButtonElementClass self) => self -> m Bool
getWillValidate self
  = liftIO
      (toBool <$>
         ((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_will_validate argPtr1)
{-# LINE 255 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
            (toHTMLButtonElement self)))
 
getValidity ::
            (MonadIO m, HTMLButtonElementClass self) =>
              self -> m (Maybe ValidityState)
getValidity self
  = liftIO
      (maybeNull (makeNewGObject mkValidityState)
         ((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_validity argPtr1)
{-# LINE 264 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
            (toHTMLButtonElement self)))
 
getValidationMessage ::
                     (MonadIO m, HTMLButtonElementClass self, GlibString string) =>
                       self -> m string
getValidationMessage self
  = liftIO
      (((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_validation_message argPtr1)
{-# LINE 272 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
          (toHTMLButtonElement self))
         >>=
         readUTFString)
 
getLabels ::
          (MonadIO m, HTMLButtonElementClass self) =>
            self -> m (Maybe NodeList)
getLabels self
  = liftIO
      (maybeNull (makeNewGObject mkNodeList)
         ((\(HTMLButtonElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_button_element_get_labels argPtr1)
{-# LINE 283 "./Graphics/UI/Gtk/WebKit/DOM/HTMLButtonElement.chs" #-}
            (toHTMLButtonElement self)))

foreign import ccall safe "webkit_dom_html_button_element_check_validity"
  webkit_dom_html_button_element_check_validity :: ((Ptr HTMLButtonElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_button_element_set_custom_validity"
  webkit_dom_html_button_element_set_custom_validity :: ((Ptr HTMLButtonElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_set_autofocus"
  webkit_dom_html_button_element_set_autofocus :: ((Ptr HTMLButtonElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_get_autofocus"
  webkit_dom_html_button_element_get_autofocus :: ((Ptr HTMLButtonElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_button_element_set_disabled"
  webkit_dom_html_button_element_set_disabled :: ((Ptr HTMLButtonElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_get_disabled"
  webkit_dom_html_button_element_get_disabled :: ((Ptr HTMLButtonElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_button_element_get_form"
  webkit_dom_html_button_element_get_form :: ((Ptr HTMLButtonElement) -> (IO (Ptr HTMLFormElement)))

foreign import ccall safe "webkit_dom_html_button_element_set_form_action"
  webkit_dom_html_button_element_set_form_action :: ((Ptr HTMLButtonElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_get_form_action"
  webkit_dom_html_button_element_get_form_action :: ((Ptr HTMLButtonElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_button_element_set_form_enctype"
  webkit_dom_html_button_element_set_form_enctype :: ((Ptr HTMLButtonElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_get_form_enctype"
  webkit_dom_html_button_element_get_form_enctype :: ((Ptr HTMLButtonElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_button_element_set_form_method"
  webkit_dom_html_button_element_set_form_method :: ((Ptr HTMLButtonElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_get_form_method"
  webkit_dom_html_button_element_get_form_method :: ((Ptr HTMLButtonElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_button_element_set_form_no_validate"
  webkit_dom_html_button_element_set_form_no_validate :: ((Ptr HTMLButtonElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_get_form_no_validate"
  webkit_dom_html_button_element_get_form_no_validate :: ((Ptr HTMLButtonElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_button_element_set_form_target"
  webkit_dom_html_button_element_set_form_target :: ((Ptr HTMLButtonElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_get_form_target"
  webkit_dom_html_button_element_get_form_target :: ((Ptr HTMLButtonElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_button_element_set_name"
  webkit_dom_html_button_element_set_name :: ((Ptr HTMLButtonElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_get_name"
  webkit_dom_html_button_element_get_name :: ((Ptr HTMLButtonElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_button_element_set_value"
  webkit_dom_html_button_element_set_value :: ((Ptr HTMLButtonElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_button_element_get_value"
  webkit_dom_html_button_element_get_value :: ((Ptr HTMLButtonElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_button_element_get_will_validate"
  webkit_dom_html_button_element_get_will_validate :: ((Ptr HTMLButtonElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_button_element_get_validity"
  webkit_dom_html_button_element_get_validity :: ((Ptr HTMLButtonElement) -> (IO (Ptr ValidityState)))

foreign import ccall safe "webkit_dom_html_button_element_get_validation_message"
  webkit_dom_html_button_element_get_validation_message :: ((Ptr HTMLButtonElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_button_element_get_labels"
  webkit_dom_html_button_element_get_labels :: ((Ptr HTMLButtonElement) -> (IO (Ptr NodeList)))