{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)

/No description available in the introspection data./
-}

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

module GI.WebKit2.Objects.InstallMissingMediaPluginsPermissionRequest
    (

-- * Exported types
    InstallMissingMediaPluginsPermissionRequest(..),
    IsInstallMissingMediaPluginsPermissionRequest,
    toInstallMissingMediaPluginsPermissionRequest,
    noInstallMissingMediaPluginsPermissionRequest,


 -- * Methods
-- ** getDescription #method:getDescription#

#if ENABLE_OVERLOADING
    InstallMissingMediaPluginsPermissionRequestGetDescriptionMethodInfo,
#endif
    installMissingMediaPluginsPermissionRequestGetDescription,




    ) 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.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.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 InstallMissingMediaPluginsPermissionRequest = InstallMissingMediaPluginsPermissionRequest (ManagedPtr InstallMissingMediaPluginsPermissionRequest)
foreign import ccall "webkit_install_missing_media_plugins_permission_request_get_type"
    c_webkit_install_missing_media_plugins_permission_request_get_type :: IO GType

instance GObject InstallMissingMediaPluginsPermissionRequest where
    gobjectType = c_webkit_install_missing_media_plugins_permission_request_get_type


-- | Type class for types which can be safely cast to `InstallMissingMediaPluginsPermissionRequest`, for instance with `toInstallMissingMediaPluginsPermissionRequest`.
class (GObject o, O.IsDescendantOf InstallMissingMediaPluginsPermissionRequest o) => IsInstallMissingMediaPluginsPermissionRequest o
instance (GObject o, O.IsDescendantOf InstallMissingMediaPluginsPermissionRequest o) => IsInstallMissingMediaPluginsPermissionRequest o

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

-- | Cast to `InstallMissingMediaPluginsPermissionRequest`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toInstallMissingMediaPluginsPermissionRequest :: (MonadIO m, IsInstallMissingMediaPluginsPermissionRequest o) => o -> m InstallMissingMediaPluginsPermissionRequest
toInstallMissingMediaPluginsPermissionRequest = liftIO . unsafeCastTo InstallMissingMediaPluginsPermissionRequest

-- | A convenience alias for `Nothing` :: `Maybe` `InstallMissingMediaPluginsPermissionRequest`.
noInstallMissingMediaPluginsPermissionRequest :: Maybe InstallMissingMediaPluginsPermissionRequest
noInstallMissingMediaPluginsPermissionRequest = Nothing

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

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

#endif

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

#if ENABLE_OVERLOADING
#endif

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

#endif

-- method InstallMissingMediaPluginsPermissionRequest::get_description
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "request", argType = TInterface (Name {namespace = "WebKit2", name = "InstallMissingMediaPluginsPermissionRequest"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitInstallMissingMediaPluginsPermissionRequest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_install_missing_media_plugins_permission_request_get_description" webkit_install_missing_media_plugins_permission_request_get_description ::
    Ptr InstallMissingMediaPluginsPermissionRequest -> -- request : TInterface (Name {namespace = "WebKit2", name = "InstallMissingMediaPluginsPermissionRequest"})
    IO CString

{- |
Gets the description about the missing plugins provided by the media backend when a media couldn\'t be played.

/Since: 2.10/
-}
installMissingMediaPluginsPermissionRequestGetDescription ::
    (B.CallStack.HasCallStack, MonadIO m, IsInstallMissingMediaPluginsPermissionRequest a) =>
    a
    {- ^ /@request@/: a 'GI.WebKit2.Objects.InstallMissingMediaPluginsPermissionRequest.InstallMissingMediaPluginsPermissionRequest' -}
    -> m T.Text
    {- ^ __Returns:__ a string with the description provided by the media backend. -}
installMissingMediaPluginsPermissionRequestGetDescription request = liftIO $ do
    request' <- unsafeManagedPtrCastPtr request
    result <- webkit_install_missing_media_plugins_permission_request_get_description request'
    checkUnexpectedReturnNULL "installMissingMediaPluginsPermissionRequestGetDescription" result
    result' <- cstringToText result
    touchManagedPtr request
    return result'

#if ENABLE_OVERLOADING
data InstallMissingMediaPluginsPermissionRequestGetDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsInstallMissingMediaPluginsPermissionRequest a) => O.MethodInfo InstallMissingMediaPluginsPermissionRequestGetDescriptionMethodInfo a signature where
    overloadedMethod _ = installMissingMediaPluginsPermissionRequestGetDescription

#endif