{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GES.Objects.BaseXmlFormatter
(
BaseXmlFormatter(..) ,
IsBaseXmlFormatter ,
toBaseXmlFormatter ,
#if defined(ENABLE_OVERLOADING)
ResolveBaseXmlFormatterMethod ,
#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.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
import {-# SOURCE #-} qualified GI.GES.Interfaces.Extractable as GES.Extractable
import {-# SOURCE #-} qualified GI.GES.Objects.Formatter as GES.Formatter
import qualified GI.GObject.Objects.Object as GObject.Object
newtype BaseXmlFormatter = BaseXmlFormatter (SP.ManagedPtr BaseXmlFormatter)
deriving (BaseXmlFormatter -> BaseXmlFormatter -> Bool
(BaseXmlFormatter -> BaseXmlFormatter -> Bool)
-> (BaseXmlFormatter -> BaseXmlFormatter -> Bool)
-> Eq BaseXmlFormatter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BaseXmlFormatter -> BaseXmlFormatter -> Bool
== :: BaseXmlFormatter -> BaseXmlFormatter -> Bool
$c/= :: BaseXmlFormatter -> BaseXmlFormatter -> Bool
/= :: BaseXmlFormatter -> BaseXmlFormatter -> Bool
Eq)
instance SP.ManagedPtrNewtype BaseXmlFormatter where
toManagedPtr :: BaseXmlFormatter -> ManagedPtr BaseXmlFormatter
toManagedPtr (BaseXmlFormatter ManagedPtr BaseXmlFormatter
p) = ManagedPtr BaseXmlFormatter
p
foreign import ccall "ges_base_xml_formatter_get_type"
c_ges_base_xml_formatter_get_type :: IO B.Types.GType
instance B.Types.TypedObject BaseXmlFormatter where
glibType :: IO GType
glibType = IO GType
c_ges_base_xml_formatter_get_type
instance B.Types.GObject BaseXmlFormatter
class (SP.GObject o, O.IsDescendantOf BaseXmlFormatter o) => IsBaseXmlFormatter o
instance (SP.GObject o, O.IsDescendantOf BaseXmlFormatter o) => IsBaseXmlFormatter o
instance O.HasParentTypes BaseXmlFormatter
type instance O.ParentTypes BaseXmlFormatter = '[GES.Formatter.Formatter, GObject.Object.Object, GES.Extractable.Extractable]
toBaseXmlFormatter :: (MIO.MonadIO m, IsBaseXmlFormatter o) => o -> m BaseXmlFormatter
toBaseXmlFormatter :: forall (m :: * -> *) o.
(MonadIO m, IsBaseXmlFormatter o) =>
o -> m BaseXmlFormatter
toBaseXmlFormatter = IO BaseXmlFormatter -> m BaseXmlFormatter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO BaseXmlFormatter -> m BaseXmlFormatter)
-> (o -> IO BaseXmlFormatter) -> o -> m BaseXmlFormatter
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr BaseXmlFormatter -> BaseXmlFormatter)
-> o -> IO BaseXmlFormatter
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr BaseXmlFormatter -> BaseXmlFormatter
BaseXmlFormatter
instance B.GValue.IsGValue (Maybe BaseXmlFormatter) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ges_base_xml_formatter_get_type
gvalueSet_ :: Ptr GValue -> Maybe BaseXmlFormatter -> IO ()
gvalueSet_ Ptr GValue
gv Maybe BaseXmlFormatter
P.Nothing = Ptr GValue -> Ptr BaseXmlFormatter -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr BaseXmlFormatter
forall a. Ptr a
FP.nullPtr :: FP.Ptr BaseXmlFormatter)
gvalueSet_ Ptr GValue
gv (P.Just BaseXmlFormatter
obj) = BaseXmlFormatter -> (Ptr BaseXmlFormatter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BaseXmlFormatter
obj (Ptr GValue -> Ptr BaseXmlFormatter -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe BaseXmlFormatter)
gvalueGet_ Ptr GValue
gv = do
Ptr BaseXmlFormatter
ptr <- Ptr GValue -> IO (Ptr BaseXmlFormatter)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr BaseXmlFormatter)
if Ptr BaseXmlFormatter
ptr Ptr BaseXmlFormatter -> Ptr BaseXmlFormatter -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr BaseXmlFormatter
forall a. Ptr a
FP.nullPtr
then BaseXmlFormatter -> Maybe BaseXmlFormatter
forall a. a -> Maybe a
P.Just (BaseXmlFormatter -> Maybe BaseXmlFormatter)
-> IO BaseXmlFormatter -> IO (Maybe BaseXmlFormatter)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr BaseXmlFormatter -> BaseXmlFormatter)
-> Ptr BaseXmlFormatter -> IO BaseXmlFormatter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr BaseXmlFormatter -> BaseXmlFormatter
BaseXmlFormatter Ptr BaseXmlFormatter
ptr
else Maybe BaseXmlFormatter -> IO (Maybe BaseXmlFormatter)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BaseXmlFormatter
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveBaseXmlFormatterMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveBaseXmlFormatterMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveBaseXmlFormatterMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveBaseXmlFormatterMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveBaseXmlFormatterMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveBaseXmlFormatterMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveBaseXmlFormatterMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveBaseXmlFormatterMethod "loadFromUri" o = GES.Formatter.FormatterLoadFromUriMethodInfo
ResolveBaseXmlFormatterMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveBaseXmlFormatterMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveBaseXmlFormatterMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveBaseXmlFormatterMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveBaseXmlFormatterMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveBaseXmlFormatterMethod "saveToUri" o = GES.Formatter.FormatterSaveToUriMethodInfo
ResolveBaseXmlFormatterMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveBaseXmlFormatterMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveBaseXmlFormatterMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveBaseXmlFormatterMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveBaseXmlFormatterMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveBaseXmlFormatterMethod "getAsset" o = GES.Extractable.ExtractableGetAssetMethodInfo
ResolveBaseXmlFormatterMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveBaseXmlFormatterMethod "getId" o = GES.Extractable.ExtractableGetIdMethodInfo
ResolveBaseXmlFormatterMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveBaseXmlFormatterMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveBaseXmlFormatterMethod "setAsset" o = GES.Extractable.ExtractableSetAssetMethodInfo
ResolveBaseXmlFormatterMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveBaseXmlFormatterMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveBaseXmlFormatterMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveBaseXmlFormatterMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveBaseXmlFormatterMethod t BaseXmlFormatter, O.OverloadedMethod info BaseXmlFormatter p) => OL.IsLabel t (BaseXmlFormatter -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveBaseXmlFormatterMethod t BaseXmlFormatter, O.OverloadedMethod info BaseXmlFormatter p, R.HasField t BaseXmlFormatter p) => R.HasField t BaseXmlFormatter p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveBaseXmlFormatterMethod t BaseXmlFormatter, O.OverloadedMethodInfo info BaseXmlFormatter) => OL.IsLabel t (O.MethodProxy info BaseXmlFormatter) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BaseXmlFormatter
type instance O.AttributeList BaseXmlFormatter = BaseXmlFormatterAttributeList
type BaseXmlFormatterAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList BaseXmlFormatter = BaseXmlFormatterSignalList
type BaseXmlFormatterSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif