-- 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/BatteryManager.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.BatteryManager(
getCharging,
getChargingTime,
getDischargingTime,
getLevel,
chargingChange,
chargingTimeChange,
dischargingTimeChange,
levelChange,
BatteryManager,
castToBatteryManager,
gTypeBatteryManager,
BatteryManagerClass,
toBatteryManager,
) 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 30 "./Graphics/UI/Gtk/WebKit/DOM/BatteryManager.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums

 
getCharging ::
            (MonadIO m, BatteryManagerClass self) => self -> m Bool
getCharging self
  = liftIO
      (toBool <$>
         ((\(BatteryManager arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_battery_manager_get_charging argPtr1)
{-# LINE 39 "./Graphics/UI/Gtk/WebKit/DOM/BatteryManager.chs" #-}
            (toBatteryManager self)))
 
getChargingTime ::
                (MonadIO m, BatteryManagerClass self) => self -> m Double
getChargingTime self
  = liftIO
      (realToFrac <$>
         ((\(BatteryManager arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_battery_manager_get_charging_time argPtr1)
{-# LINE 47 "./Graphics/UI/Gtk/WebKit/DOM/BatteryManager.chs" #-}
            (toBatteryManager self)))
 
getDischargingTime ::
                   (MonadIO m, BatteryManagerClass self) => self -> m Double
getDischargingTime self
  = liftIO
      (realToFrac <$>
         ((\(BatteryManager arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_battery_manager_get_discharging_time argPtr1)
{-# LINE 55 "./Graphics/UI/Gtk/WebKit/DOM/BatteryManager.chs" #-}
            (toBatteryManager self)))
 
getLevel ::
         (MonadIO m, BatteryManagerClass self) => self -> m Double
getLevel self
  = liftIO
      (realToFrac <$>
         ((\(BatteryManager arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_battery_manager_get_level argPtr1)
{-# LINE 63 "./Graphics/UI/Gtk/WebKit/DOM/BatteryManager.chs" #-}
            (toBatteryManager self)))
 
chargingChange ::
               (BatteryManagerClass self) => EventName self Event
chargingChange = EventName "chargingchange"
 
chargingTimeChange ::
                   (BatteryManagerClass self) => EventName self Event
chargingTimeChange = EventName "chargingtimechange"
 
dischargingTimeChange ::
                      (BatteryManagerClass self) => EventName self Event
dischargingTimeChange = EventName "dischargingtimechange"
 
levelChange :: (BatteryManagerClass self) => EventName self Event
levelChange = EventName "levelchange"

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/BatteryManager.h webkit_dom_battery_manager_get_charging"
  webkit_dom_battery_manager_get_charging :: ((Ptr BatteryManager) -> (IO CInt))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/BatteryManager.h webkit_dom_battery_manager_get_charging_time"
  webkit_dom_battery_manager_get_charging_time :: ((Ptr BatteryManager) -> (IO CDouble))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/BatteryManager.h webkit_dom_battery_manager_get_discharging_time"
  webkit_dom_battery_manager_get_discharging_time :: ((Ptr BatteryManager) -> (IO CDouble))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/BatteryManager.h webkit_dom_battery_manager_get_level"
  webkit_dom_battery_manager_get_level :: ((Ptr BatteryManager) -> (IO CDouble))