-- 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/Navigator.chs" #-}
module Graphics.UI.Gtk.WebKit.DOM.Navigator(
registerProtocolHandler,
isProtocolHandlerRegistered,
unregisterProtocolHandler,
javaEnabled,
getStorageUpdates,
getWebkitBattery,
getGeolocation,
getWebkitTemporaryStorage,
getWebkitPersistentStorage,
getAppCodeName,
getAppName,
getAppVersion,
getLanguage,
getUserAgent,
getPlatform,
getPlugins,
getMimeTypes,
getProduct,
getProductSub,
getVendor,
getVendorSub,
getCookieEnabled,
getOnLine,
Navigator,
castToNavigator,
gTypeNavigator,
NavigatorClass,
toNavigator,
) 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 48 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
import Graphics.UI.Gtk.WebKit.DOM.Enums


registerProtocolHandler ::
                        (MonadIO m, NavigatorClass self, GlibString string) =>
                          self -> string -> string -> string -> m ()
registerProtocolHandler self scheme url title
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           withUTFString title $
             \ titlePtr ->
               withUTFString url $
                 \ urlPtr ->
                   withUTFString scheme $
                     \ schemePtr ->
                       (\(Navigator arg1) arg2 arg3 arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_register_protocol_handler argPtr1 arg2 arg3 arg4 arg5)
{-# LINE 66 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
                         (toNavigator self)
                         schemePtr
                     urlPtr
                 titlePtr
             errorPtr_)
 
isProtocolHandlerRegistered ::
                            (MonadIO m, NavigatorClass self, GlibString string) =>
                              self -> string -> string -> m string
isProtocolHandlerRegistered self scheme url
  = liftIO
      ((propagateGError $
          \ errorPtr_ ->
            withUTFString url $
              \ urlPtr ->
                withUTFString scheme $
                  \ schemePtr ->
                    (\(Navigator arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_is_protocol_handler_registered argPtr1 arg2 arg3 arg4)
{-# LINE 84 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
                      (toNavigator self)
                      schemePtr
                  urlPtr
              errorPtr_)
         >>=
         readUTFString)
 
unregisterProtocolHandler ::
                          (MonadIO m, NavigatorClass self, GlibString string) =>
                            self -> string -> string -> m ()
unregisterProtocolHandler self scheme url
  = liftIO
      (propagateGError $
         \ errorPtr_ ->
           withUTFString url $
             \ urlPtr ->
               withUTFString scheme $
                 \ schemePtr ->
                   (\(Navigator arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_unregister_protocol_handler argPtr1 arg2 arg3 arg4)
{-# LINE 103 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
                     (toNavigator self)
                     schemePtr
                 urlPtr
             errorPtr_)
 
javaEnabled :: (MonadIO m, NavigatorClass self) => self -> m Bool
javaEnabled self
  = liftIO
      (toBool <$>
         ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_java_enabled argPtr1) (toNavigator self)))
 
getStorageUpdates ::
                  (MonadIO m, NavigatorClass self) => self -> m ()
getStorageUpdates self
  = liftIO
      ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_storage_updates argPtr1)
{-# LINE 120 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
         (toNavigator self))

getWebkitBattery ::
                 (MonadIO m, NavigatorClass self) =>
                   self -> m (Maybe BatteryManager)
getWebkitBattery self
  = liftIO
      (maybeNull (makeNewGObject mkBatteryManager)
         ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_webkit_battery argPtr1)
{-# LINE 130 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
            (toNavigator self)))
 
getGeolocation ::
               (MonadIO m, NavigatorClass self) => self -> m (Maybe Geolocation)
getGeolocation self
  = liftIO
      (maybeNull (makeNewGObject mkGeolocation)
         ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_geolocation argPtr1)
{-# LINE 139 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
            (toNavigator self)))

getWebkitTemporaryStorage ::
                          (MonadIO m, NavigatorClass self) => self -> m (Maybe StorageQuota)
getWebkitTemporaryStorage self
  = liftIO
      (maybeNull (makeNewGObject mkStorageQuota)
         ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_webkit_temporary_storage argPtr1)
{-# LINE 148 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
            (toNavigator self)))
 
getWebkitPersistentStorage ::
                           (MonadIO m, NavigatorClass self) => self -> m (Maybe StorageQuota)
getWebkitPersistentStorage self
  = liftIO
      (maybeNull (makeNewGObject mkStorageQuota)
         ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_webkit_persistent_storage argPtr1)
{-# LINE 156 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
            (toNavigator self)))
 
getAppCodeName ::
               (MonadIO m, NavigatorClass self, GlibString string) =>
                 self -> m string
getAppCodeName self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_app_code_name argPtr1)
{-# LINE 165 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
          (toNavigator self))
         >>=
         readUTFString)
 
getAppName ::
           (MonadIO m, NavigatorClass self, GlibString string) =>
             self -> m string
getAppName self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_app_name argPtr1) (toNavigator self))
         >>=
         readUTFString)
 
getAppVersion ::
              (MonadIO m, NavigatorClass self, GlibString string) =>
                self -> m string
getAppVersion self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_app_version argPtr1)
{-# LINE 184 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
          (toNavigator self))
         >>=
         readUTFString)
 
getLanguage ::
            (MonadIO m, NavigatorClass self, GlibString string) =>
              self -> m string
getLanguage self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_language argPtr1) (toNavigator self))
         >>=
         readUTFString)
 
getUserAgent ::
             (MonadIO m, NavigatorClass self, GlibString string) =>
               self -> m string
getUserAgent self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_user_agent argPtr1)
{-# LINE 203 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
          (toNavigator self))
         >>=
         readUTFString)
 
getPlatform ::
            (MonadIO m, NavigatorClass self, GlibString string) =>
              self -> m string
getPlatform self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_platform argPtr1) (toNavigator self))
         >>=
         readUTFString)
 
getPlugins ::
           (MonadIO m, NavigatorClass self) => self -> m (Maybe PluginArray)
getPlugins self
  = liftIO
      (maybeNull (makeNewGObject mkPluginArray)
         ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_plugins argPtr1) (toNavigator self)))
 
getMimeTypes ::
             (MonadIO m, NavigatorClass self) => self -> m (Maybe MimeTypeArray)
getMimeTypes self
  = liftIO
      (maybeNull (makeNewGObject mkMimeTypeArray)
         ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_mime_types argPtr1)
{-# LINE 229 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
            (toNavigator self)))
 
getProduct ::
           (MonadIO m, NavigatorClass self, GlibString string) =>
             self -> m string
getProduct self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_product argPtr1) (toNavigator self))
         >>=
         readUTFString)
 
getProductSub ::
              (MonadIO m, NavigatorClass self, GlibString string) =>
                self -> m string
getProductSub self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_product_sub argPtr1)
{-# LINE 246 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
          (toNavigator self))
         >>=
         readUTFString)
 
getVendor ::
          (MonadIO m, NavigatorClass self, GlibString string) =>
            self -> m string
getVendor self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_vendor argPtr1) (toNavigator self))
         >>=
         readUTFString)
 
getVendorSub ::
             (MonadIO m, NavigatorClass self, GlibString string) =>
               self -> m string
getVendorSub self
  = liftIO
      (((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_vendor_sub argPtr1)
{-# LINE 265 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
          (toNavigator self))
         >>=
         readUTFString)
 
getCookieEnabled ::
                 (MonadIO m, NavigatorClass self) => self -> m Bool
getCookieEnabled self
  = liftIO
      (toBool <$>
         ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_cookie_enabled argPtr1)
{-# LINE 275 "./Graphics/UI/Gtk/WebKit/DOM/Navigator.chs" #-}
            (toNavigator self)))
 
getOnLine :: (MonadIO m, NavigatorClass self) => self -> m Bool
getOnLine self
  = liftIO
      (toBool <$>
         ((\(Navigator arg1) -> withForeignPtr arg1 $ \argPtr1 ->webkit_dom_navigator_get_on_line argPtr1) (toNavigator self)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_register_protocol_handler"
  webkit_dom_navigator_register_protocol_handler :: ((Ptr Navigator) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ()))))))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_is_protocol_handler_registered"
  webkit_dom_navigator_is_protocol_handler_registered :: ((Ptr Navigator) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO (Ptr CChar))))))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_unregister_protocol_handler"
  webkit_dom_navigator_unregister_protocol_handler :: ((Ptr Navigator) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO ())))))

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

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

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

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_geolocation"
  webkit_dom_navigator_get_geolocation :: ((Ptr Navigator) -> (IO (Ptr Geolocation)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_webkit_temporary_storage"
  webkit_dom_navigator_get_webkit_temporary_storage :: ((Ptr Navigator) -> (IO (Ptr StorageQuota)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_webkit_persistent_storage"
  webkit_dom_navigator_get_webkit_persistent_storage :: ((Ptr Navigator) -> (IO (Ptr StorageQuota)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_app_code_name"
  webkit_dom_navigator_get_app_code_name :: ((Ptr Navigator) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_app_name"
  webkit_dom_navigator_get_app_name :: ((Ptr Navigator) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_app_version"
  webkit_dom_navigator_get_app_version :: ((Ptr Navigator) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_language"
  webkit_dom_navigator_get_language :: ((Ptr Navigator) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_user_agent"
  webkit_dom_navigator_get_user_agent :: ((Ptr Navigator) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_platform"
  webkit_dom_navigator_get_platform :: ((Ptr Navigator) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_plugins"
  webkit_dom_navigator_get_plugins :: ((Ptr Navigator) -> (IO (Ptr PluginArray)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_mime_types"
  webkit_dom_navigator_get_mime_types :: ((Ptr Navigator) -> (IO (Ptr MimeTypeArray)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_product"
  webkit_dom_navigator_get_product :: ((Ptr Navigator) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_product_sub"
  webkit_dom_navigator_get_product_sub :: ((Ptr Navigator) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_vendor"
  webkit_dom_navigator_get_vendor :: ((Ptr Navigator) -> (IO (Ptr CChar)))

foreign import ccall safe "dist/build/Graphics/UI/Gtk/WebKit/DOM/Navigator.h webkit_dom_navigator_get_vendor_sub"
  webkit_dom_navigator_get_vendor_sub :: ((Ptr Navigator) -> (IO (Ptr CChar)))

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

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