{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Soup.Objects.ContentDecoder
(
ContentDecoder(..) ,
IsContentDecoder ,
toContentDecoder ,
#if defined(ENABLE_OVERLOADING)
ResolveContentDecoderMethod ,
#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.Soup.Interfaces.SessionFeature as Soup.SessionFeature
newtype ContentDecoder = ContentDecoder (SP.ManagedPtr ContentDecoder)
deriving (ContentDecoder -> ContentDecoder -> Bool
(ContentDecoder -> ContentDecoder -> Bool)
-> (ContentDecoder -> ContentDecoder -> Bool) -> Eq ContentDecoder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContentDecoder -> ContentDecoder -> Bool
$c/= :: ContentDecoder -> ContentDecoder -> Bool
== :: ContentDecoder -> ContentDecoder -> Bool
$c== :: ContentDecoder -> ContentDecoder -> Bool
Eq)
instance SP.ManagedPtrNewtype ContentDecoder where
toManagedPtr :: ContentDecoder -> ManagedPtr ContentDecoder
toManagedPtr (ContentDecoder ManagedPtr ContentDecoder
p) = ManagedPtr ContentDecoder
p
foreign import ccall "soup_content_decoder_get_type"
c_soup_content_decoder_get_type :: IO B.Types.GType
instance B.Types.TypedObject ContentDecoder where
glibType :: IO GType
glibType = IO GType
c_soup_content_decoder_get_type
instance B.Types.GObject ContentDecoder
instance B.GValue.IsGValue ContentDecoder where
toGValue :: ContentDecoder -> IO GValue
toGValue ContentDecoder
o = do
GType
gtype <- IO GType
c_soup_content_decoder_get_type
ContentDecoder -> (Ptr ContentDecoder -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ContentDecoder
o (GType
-> (GValue -> Ptr ContentDecoder -> IO ())
-> Ptr ContentDecoder
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr ContentDecoder -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO ContentDecoder
fromGValue GValue
gv = do
Ptr ContentDecoder
ptr <- GValue -> IO (Ptr ContentDecoder)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr ContentDecoder)
(ManagedPtr ContentDecoder -> ContentDecoder)
-> Ptr ContentDecoder -> IO ContentDecoder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ContentDecoder -> ContentDecoder
ContentDecoder Ptr ContentDecoder
ptr
class (SP.GObject o, O.IsDescendantOf ContentDecoder o) => IsContentDecoder o
instance (SP.GObject o, O.IsDescendantOf ContentDecoder o) => IsContentDecoder o
instance O.HasParentTypes ContentDecoder
type instance O.ParentTypes ContentDecoder = '[GObject.Object.Object, Soup.SessionFeature.SessionFeature]
toContentDecoder :: (MonadIO m, IsContentDecoder o) => o -> m ContentDecoder
toContentDecoder :: o -> m ContentDecoder
toContentDecoder = IO ContentDecoder -> m ContentDecoder
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ContentDecoder -> m ContentDecoder)
-> (o -> IO ContentDecoder) -> o -> m ContentDecoder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ContentDecoder -> ContentDecoder)
-> o -> IO ContentDecoder
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr ContentDecoder -> ContentDecoder
ContentDecoder
#if defined(ENABLE_OVERLOADING)
type family ResolveContentDecoderMethod (t :: Symbol) (o :: *) :: * where
ResolveContentDecoderMethod "addFeature" o = Soup.SessionFeature.SessionFeatureAddFeatureMethodInfo
ResolveContentDecoderMethod "attach" o = Soup.SessionFeature.SessionFeatureAttachMethodInfo
ResolveContentDecoderMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveContentDecoderMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveContentDecoderMethod "detach" o = Soup.SessionFeature.SessionFeatureDetachMethodInfo
ResolveContentDecoderMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveContentDecoderMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveContentDecoderMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveContentDecoderMethod "hasFeature" o = Soup.SessionFeature.SessionFeatureHasFeatureMethodInfo
ResolveContentDecoderMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveContentDecoderMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveContentDecoderMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveContentDecoderMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveContentDecoderMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveContentDecoderMethod "removeFeature" o = Soup.SessionFeature.SessionFeatureRemoveFeatureMethodInfo
ResolveContentDecoderMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveContentDecoderMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveContentDecoderMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveContentDecoderMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveContentDecoderMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveContentDecoderMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveContentDecoderMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveContentDecoderMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveContentDecoderMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveContentDecoderMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveContentDecoderMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveContentDecoderMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveContentDecoderMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveContentDecoderMethod t ContentDecoder, O.MethodInfo info ContentDecoder p) => OL.IsLabel t (ContentDecoder -> 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 ContentDecoder
type instance O.AttributeList ContentDecoder = ContentDecoderAttributeList
type ContentDecoderAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ContentDecoder = ContentDecoderSignalList
type ContentDecoderSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif