{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.WebKit2.Objects.GeolocationPermissionRequest
    ( 

-- * Exported types
    GeolocationPermissionRequest(..)        ,
    IsGeolocationPermissionRequest          ,
    toGeolocationPermissionRequest          ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveGeolocationPermissionRequestMethod,
#endif




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.WebKit2.Interfaces.PermissionRequest as WebKit2.PermissionRequest

-- | Memory-managed wrapper type.
newtype GeolocationPermissionRequest = GeolocationPermissionRequest (SP.ManagedPtr GeolocationPermissionRequest)
    deriving (GeolocationPermissionRequest
-> GeolocationPermissionRequest -> Bool
(GeolocationPermissionRequest
 -> GeolocationPermissionRequest -> Bool)
-> (GeolocationPermissionRequest
    -> GeolocationPermissionRequest -> Bool)
-> Eq GeolocationPermissionRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GeolocationPermissionRequest
-> GeolocationPermissionRequest -> Bool
$c/= :: GeolocationPermissionRequest
-> GeolocationPermissionRequest -> Bool
== :: GeolocationPermissionRequest
-> GeolocationPermissionRequest -> Bool
$c== :: GeolocationPermissionRequest
-> GeolocationPermissionRequest -> Bool
Eq)

instance SP.ManagedPtrNewtype GeolocationPermissionRequest where
    toManagedPtr :: GeolocationPermissionRequest
-> ManagedPtr GeolocationPermissionRequest
toManagedPtr (GeolocationPermissionRequest ManagedPtr GeolocationPermissionRequest
p) = ManagedPtr GeolocationPermissionRequest
p

foreign import ccall "webkit_geolocation_permission_request_get_type"
    c_webkit_geolocation_permission_request_get_type :: IO B.Types.GType

instance B.Types.TypedObject GeolocationPermissionRequest where
    glibType :: IO GType
glibType = IO GType
c_webkit_geolocation_permission_request_get_type

instance B.Types.GObject GeolocationPermissionRequest

-- | Convert 'GeolocationPermissionRequest' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue GeolocationPermissionRequest where
    toGValue :: GeolocationPermissionRequest -> IO GValue
toGValue GeolocationPermissionRequest
o = do
        GType
gtype <- IO GType
c_webkit_geolocation_permission_request_get_type
        GeolocationPermissionRequest
-> (Ptr GeolocationPermissionRequest -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr GeolocationPermissionRequest
o (GType
-> (GValue -> Ptr GeolocationPermissionRequest -> IO ())
-> Ptr GeolocationPermissionRequest
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr GeolocationPermissionRequest -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO GeolocationPermissionRequest
fromGValue GValue
gv = do
        Ptr GeolocationPermissionRequest
ptr <- GValue -> IO (Ptr GeolocationPermissionRequest)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr GeolocationPermissionRequest)
        (ManagedPtr GeolocationPermissionRequest
 -> GeolocationPermissionRequest)
-> Ptr GeolocationPermissionRequest
-> IO GeolocationPermissionRequest
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr GeolocationPermissionRequest
-> GeolocationPermissionRequest
GeolocationPermissionRequest Ptr GeolocationPermissionRequest
ptr
        
    

-- | Type class for types which can be safely cast to `GeolocationPermissionRequest`, for instance with `toGeolocationPermissionRequest`.
class (SP.GObject o, O.IsDescendantOf GeolocationPermissionRequest o) => IsGeolocationPermissionRequest o
instance (SP.GObject o, O.IsDescendantOf GeolocationPermissionRequest o) => IsGeolocationPermissionRequest o

instance O.HasParentTypes GeolocationPermissionRequest
type instance O.ParentTypes GeolocationPermissionRequest = '[GObject.Object.Object, WebKit2.PermissionRequest.PermissionRequest]

-- | Cast to `GeolocationPermissionRequest`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toGeolocationPermissionRequest :: (MonadIO m, IsGeolocationPermissionRequest o) => o -> m GeolocationPermissionRequest
toGeolocationPermissionRequest :: o -> m GeolocationPermissionRequest
toGeolocationPermissionRequest = IO GeolocationPermissionRequest -> m GeolocationPermissionRequest
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GeolocationPermissionRequest -> m GeolocationPermissionRequest)
-> (o -> IO GeolocationPermissionRequest)
-> o
-> m GeolocationPermissionRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr GeolocationPermissionRequest
 -> GeolocationPermissionRequest)
-> o -> IO GeolocationPermissionRequest
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr GeolocationPermissionRequest
-> GeolocationPermissionRequest
GeolocationPermissionRequest

#if defined(ENABLE_OVERLOADING)
type family ResolveGeolocationPermissionRequestMethod (t :: Symbol) (o :: *) :: * where
    ResolveGeolocationPermissionRequestMethod "allow" o = WebKit2.PermissionRequest.PermissionRequestAllowMethodInfo
    ResolveGeolocationPermissionRequestMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveGeolocationPermissionRequestMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveGeolocationPermissionRequestMethod "deny" o = WebKit2.PermissionRequest.PermissionRequestDenyMethodInfo
    ResolveGeolocationPermissionRequestMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveGeolocationPermissionRequestMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveGeolocationPermissionRequestMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveGeolocationPermissionRequestMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveGeolocationPermissionRequestMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveGeolocationPermissionRequestMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveGeolocationPermissionRequestMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveGeolocationPermissionRequestMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveGeolocationPermissionRequestMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveGeolocationPermissionRequestMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveGeolocationPermissionRequestMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveGeolocationPermissionRequestMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveGeolocationPermissionRequestMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveGeolocationPermissionRequestMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveGeolocationPermissionRequestMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveGeolocationPermissionRequestMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveGeolocationPermissionRequestMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveGeolocationPermissionRequestMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveGeolocationPermissionRequestMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveGeolocationPermissionRequestMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveGeolocationPermissionRequestMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveGeolocationPermissionRequestMethod t GeolocationPermissionRequest, O.MethodInfo info GeolocationPermissionRequest p) => OL.IsLabel t (GeolocationPermissionRequest -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList GeolocationPermissionRequest
type instance O.AttributeList GeolocationPermissionRequest = GeolocationPermissionRequestAttributeList
type GeolocationPermissionRequestAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList GeolocationPermissionRequest = GeolocationPermissionRequestSignalList
type GeolocationPermissionRequestSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif