{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.WebKit.Objects.DOMGeolocation
    ( 

-- * Exported types
    DOMGeolocation(..)                      ,
    DOMGeolocationK                         ,
    toDOMGeolocation                        ,
    noDOMGeolocation                        ,


 -- * Methods
-- ** dOMGeolocationClearWatch
    dOMGeolocationClearWatch                ,




    ) where

import Prelude ()
import Data.GI.Base.ShortPrelude

import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map

import GI.WebKit.Types
import GI.WebKit.Callbacks
import qualified GI.GObject as GObject

newtype DOMGeolocation = DOMGeolocation (ForeignPtr DOMGeolocation)
foreign import ccall "webkit_dom_geolocation_get_type"
    c_webkit_dom_geolocation_get_type :: IO GType

type instance ParentTypes DOMGeolocation = DOMGeolocationParentTypes
type DOMGeolocationParentTypes = '[DOMObject, GObject.Object]

instance GObject DOMGeolocation where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_dom_geolocation_get_type
    

class GObject o => DOMGeolocationK o
instance (GObject o, IsDescendantOf DOMGeolocation o) => DOMGeolocationK o

toDOMGeolocation :: DOMGeolocationK o => o -> IO DOMGeolocation
toDOMGeolocation = unsafeCastTo DOMGeolocation

noDOMGeolocation :: Maybe DOMGeolocation
noDOMGeolocation = Nothing

type instance AttributeList DOMGeolocation = DOMGeolocationAttributeList
type DOMGeolocationAttributeList = ('[ '("core-object", DOMObjectCoreObjectPropertyInfo)] :: [(Symbol, *)])

type instance SignalList DOMGeolocation = DOMGeolocationSignalList
type DOMGeolocationSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method DOMGeolocation::clear_watch
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMGeolocation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "watchID", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMGeolocation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "watchID", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_geolocation_clear_watch" webkit_dom_geolocation_clear_watch :: 
    Ptr DOMGeolocation ->                   -- _obj : TInterface "WebKit" "DOMGeolocation"
    Int64 ->                                -- watchID : TBasicType TInt64
    IO ()


dOMGeolocationClearWatch ::
    (MonadIO m, DOMGeolocationK a) =>
    a ->                                    -- _obj
    Int64 ->                                -- watchID
    m ()
dOMGeolocationClearWatch _obj watchID = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_dom_geolocation_clear_watch _obj' watchID
    touchManagedPtr _obj
    return ()