-- 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/HTMLStyleElement.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.HTMLStyleElement(
setDisabled,
getDisabled,
setMedia,
getMedia,
getSheet,
HTMLStyleElement,
castToHTMLStyleElement,
gTypeHTMLStyleElement,
HTMLStyleElementClass,
toHTMLStyleElement,
) 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 24 "./Graphics/UI/Gtk/WebKit/DOM/HTMLStyleElement.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
setDisabled ::
            (MonadIO m, HTMLStyleElementClass self) => self -> Bool -> m ()
setDisabled self val
  = liftIO
      ((\(HTMLStyleElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_style_element_set_disabled argPtr1 arg2)
{-# LINE 32 "./Graphics/UI/Gtk/WebKit/DOM/HTMLStyleElement.chs" #-}
         (toHTMLStyleElement self)
         (fromBool val))
 
getDisabled ::
            (MonadIO m, HTMLStyleElementClass self) => self -> m Bool
getDisabled self
  = liftIO
      (toBool <$>
         ((\(HTMLStyleElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_style_element_get_disabled argPtr1)
{-# LINE 41 "./Graphics/UI/Gtk/WebKit/DOM/HTMLStyleElement.chs" #-}
            (toHTMLStyleElement self)))
 
setMedia ::
         (MonadIO m, HTMLStyleElementClass self, GlibString string) =>
           self -> string -> m ()
setMedia self val
  = liftIO
      (withUTFString val $
         \ valPtr ->
           (\(HTMLStyleElement arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_style_element_set_media argPtr1 arg2)
{-# LINE 51 "./Graphics/UI/Gtk/WebKit/DOM/HTMLStyleElement.chs" #-}
             (toHTMLStyleElement self)
             valPtr)
 
getMedia ::
         (MonadIO m, HTMLStyleElementClass self, GlibString string) =>
           self -> m string
getMedia self
  = liftIO
      (((\(HTMLStyleElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_style_element_get_media argPtr1)
{-# LINE 60 "./Graphics/UI/Gtk/WebKit/DOM/HTMLStyleElement.chs" #-}
          (toHTMLStyleElement self))
         >>=
         readUTFString)
 
getSheet ::
         (MonadIO m, HTMLStyleElementClass self) =>
           self -> m (Maybe StyleSheet)
getSheet self
  = liftIO
      (maybeNull (makeNewGObject mkStyleSheet)
         ((\(HTMLStyleElement arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_html_style_element_get_sheet argPtr1)
{-# LINE 71 "./Graphics/UI/Gtk/WebKit/DOM/HTMLStyleElement.chs" #-}
            (toHTMLStyleElement self)))

foreign import ccall safe "webkit_dom_html_style_element_set_disabled"
  webkit_dom_html_style_element_set_disabled :: ((Ptr HTMLStyleElement) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_html_style_element_get_disabled"
  webkit_dom_html_style_element_get_disabled :: ((Ptr HTMLStyleElement) -> (IO CInt))

foreign import ccall safe "webkit_dom_html_style_element_set_media"
  webkit_dom_html_style_element_set_media :: ((Ptr HTMLStyleElement) -> ((Ptr CChar) -> (IO ())))

foreign import ccall safe "webkit_dom_html_style_element_get_media"
  webkit_dom_html_style_element_get_media :: ((Ptr HTMLStyleElement) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_html_style_element_get_sheet"
  webkit_dom_html_style_element_get_sheet :: ((Ptr HTMLStyleElement) -> (IO (Ptr StyleSheet)))