-- 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/StyleSheet.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.StyleSheet(
setDisabled,
getDisabled,
getOwnerNode,
getParentStyleSheet,
getHref,
getTitle,
getMedia,
StyleSheet,
castToStyleSheet,
gTypeStyleSheet,
StyleSheetClass,
toStyleSheet,
) 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 26 "./Graphics/UI/Gtk/WebKit/DOM/StyleSheet.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
setDisabled ::
            (MonadIO m, StyleSheetClass self) => self -> Bool -> m ()
setDisabled self val
  = liftIO
      ((\(StyleSheet arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_style_sheet_set_disabled argPtr1 arg2) (toStyleSheet self)
         (fromBool val))
 
getDisabled :: (MonadIO m, StyleSheetClass self) => self -> m Bool
getDisabled self
  = liftIO
      (toBool <$>
         ((\(StyleSheet arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_style_sheet_get_disabled argPtr1)
{-# LINE 41 "./Graphics/UI/Gtk/WebKit/DOM/StyleSheet.chs" #-}
            (toStyleSheet self)))
 
getOwnerNode ::
             (MonadIO m, StyleSheetClass self) => self -> m (Maybe Node)
getOwnerNode self
  = liftIO
      (maybeNull (makeNewGObject mkNode)
         ((\(StyleSheet arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_style_sheet_get_owner_node argPtr1)
{-# LINE 49 "./Graphics/UI/Gtk/WebKit/DOM/StyleSheet.chs" #-}
            (toStyleSheet self)))
 
getParentStyleSheet ::
                    (MonadIO m, StyleSheetClass self) => self -> m (Maybe StyleSheet)
getParentStyleSheet self
  = liftIO
      (maybeNull (makeNewGObject mkStyleSheet)
         ((\(StyleSheet arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_style_sheet_get_parent_style_sheet argPtr1)
{-# LINE 57 "./Graphics/UI/Gtk/WebKit/DOM/StyleSheet.chs" #-}
            (toStyleSheet self)))
 
getHref ::
        (MonadIO m, StyleSheetClass self, GlibString string) =>
          self -> m (Maybe string)
getHref self
  = liftIO
      (((\(StyleSheet arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_style_sheet_get_href argPtr1) (toStyleSheet self))
         >>=
         maybePeek readUTFString)
 
getTitle ::
         (MonadIO m, StyleSheetClass self, GlibString string) =>
           self -> m (Maybe string)
getTitle self
  = liftIO
      (((\(StyleSheet arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_style_sheet_get_title argPtr1) (toStyleSheet self))
         >>=
         maybePeek readUTFString)
 
getMedia ::
         (MonadIO m, StyleSheetClass self) => self -> m (Maybe MediaList)
getMedia self
  = liftIO
      (maybeNull (makeNewGObject mkMediaList)
         ((\(StyleSheet arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_style_sheet_get_media argPtr1) (toStyleSheet self)))

foreign import ccall safe "webkit_dom_style_sheet_set_disabled"
  webkit_dom_style_sheet_set_disabled :: ((Ptr StyleSheet) -> (CInt -> (IO ())))

foreign import ccall safe "webkit_dom_style_sheet_get_disabled"
  webkit_dom_style_sheet_get_disabled :: ((Ptr StyleSheet) -> (IO CInt))

foreign import ccall safe "webkit_dom_style_sheet_get_owner_node"
  webkit_dom_style_sheet_get_owner_node :: ((Ptr StyleSheet) -> (IO (Ptr Node)))

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

foreign import ccall safe "webkit_dom_style_sheet_get_href"
  webkit_dom_style_sheet_get_href :: ((Ptr StyleSheet) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_style_sheet_get_title"
  webkit_dom_style_sheet_get_title :: ((Ptr StyleSheet) -> (IO (Ptr CChar)))

foreign import ccall safe "webkit_dom_style_sheet_get_media"
  webkit_dom_style_sheet_get_media :: ((Ptr StyleSheet) -> (IO (Ptr MediaList)))