{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- 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.GES.Objects.XmlFormatter
    ( 

-- * Exported types
    XmlFormatter(..)                        ,
    IsXmlFormatter                          ,
    toXmlFormatter                          ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [loadFromUri]("GI.GES.Objects.Formatter#g:method:loadFromUri"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [saveToUri]("GI.GES.Objects.Formatter#g:method:saveToUri"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAsset]("GI.GES.Interfaces.Extractable#g:method:getAsset"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getId]("GI.GES.Interfaces.Extractable#g:method:getId"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setAsset]("GI.GES.Interfaces.Extractable#g:method:setAsset"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveXmlFormatterMethod               ,
#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 qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.GES.Callbacks as GES.Callbacks
import {-# SOURCE #-} qualified GI.GES.Enums as GES.Enums
import {-# SOURCE #-} qualified GI.GES.Flags as GES.Flags
import {-# SOURCE #-} qualified GI.GES.Interfaces.Extractable as GES.Extractable
import {-# SOURCE #-} qualified GI.GES.Interfaces.MetaContainer as GES.MetaContainer
import {-# SOURCE #-} qualified GI.GES.Objects.Asset as GES.Asset
import {-# SOURCE #-} qualified GI.GES.Objects.BaseEffect as GES.BaseEffect
import {-# SOURCE #-} qualified GI.GES.Objects.BaseXmlFormatter as GES.BaseXmlFormatter
import {-# SOURCE #-} qualified GI.GES.Objects.Clip as GES.Clip
import {-# SOURCE #-} qualified GI.GES.Objects.Container as GES.Container
import {-# SOURCE #-} qualified GI.GES.Objects.Formatter as GES.Formatter
import {-# SOURCE #-} qualified GI.GES.Objects.Group as GES.Group
import {-# SOURCE #-} qualified GI.GES.Objects.Layer as GES.Layer
import {-# SOURCE #-} qualified GI.GES.Objects.Marker as GES.Marker
import {-# SOURCE #-} qualified GI.GES.Objects.MarkerList as GES.MarkerList
import {-# SOURCE #-} qualified GI.GES.Objects.Operation as GES.Operation
import {-# SOURCE #-} qualified GI.GES.Objects.Timeline as GES.Timeline
import {-# SOURCE #-} qualified GI.GES.Objects.TimelineElement as GES.TimelineElement
import {-# SOURCE #-} qualified GI.GES.Objects.Track as GES.Track
import {-# SOURCE #-} qualified GI.GES.Objects.TrackElement as GES.TrackElement
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Date as GLib.Date
import qualified GI.GObject.Objects.InitiallyUnowned as GObject.InitiallyUnowned
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gst.Interfaces.ChildProxy as Gst.ChildProxy
import qualified GI.Gst.Objects.Bin as Gst.Bin
import qualified GI.Gst.Objects.ControlBinding as Gst.ControlBinding
import qualified GI.Gst.Objects.ControlSource as Gst.ControlSource
import qualified GI.Gst.Objects.Element as Gst.Element
import qualified GI.Gst.Objects.Object as Gst.Object
import qualified GI.Gst.Objects.Pad as Gst.Pad
import qualified GI.Gst.Structs.Caps as Gst.Caps
import qualified GI.Gst.Structs.DateTime as Gst.DateTime

#else
import {-# SOURCE #-} qualified GI.GES.Interfaces.Extractable as GES.Extractable
import {-# SOURCE #-} qualified GI.GES.Objects.BaseXmlFormatter as GES.BaseXmlFormatter
import {-# SOURCE #-} qualified GI.GES.Objects.Formatter as GES.Formatter
import qualified GI.GObject.Objects.Object as GObject.Object

#endif

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

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

foreign import ccall "ges_xml_formatter_get_type"
    c_ges_xml_formatter_get_type :: IO B.Types.GType

instance B.Types.TypedObject XmlFormatter where
    glibType :: IO GType
glibType = IO GType
c_ges_xml_formatter_get_type

instance B.Types.GObject XmlFormatter

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

instance O.HasParentTypes XmlFormatter
type instance O.ParentTypes XmlFormatter = '[GES.BaseXmlFormatter.BaseXmlFormatter, GES.Formatter.Formatter, GObject.Object.Object, GES.Extractable.Extractable]

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

-- | Convert 'XmlFormatter' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe XmlFormatter) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ges_xml_formatter_get_type
    gvalueSet_ :: Ptr GValue -> Maybe XmlFormatter -> IO ()
gvalueSet_ Ptr GValue
gv Maybe XmlFormatter
P.Nothing = Ptr GValue -> Ptr XmlFormatter -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr XmlFormatter
forall a. Ptr a
FP.nullPtr :: FP.Ptr XmlFormatter)
    gvalueSet_ Ptr GValue
gv (P.Just XmlFormatter
obj) = XmlFormatter -> (Ptr XmlFormatter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr XmlFormatter
obj (Ptr GValue -> Ptr XmlFormatter -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe XmlFormatter)
gvalueGet_ Ptr GValue
gv = do
        Ptr XmlFormatter
ptr <- Ptr GValue -> IO (Ptr XmlFormatter)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr XmlFormatter)
        if Ptr XmlFormatter
ptr Ptr XmlFormatter -> Ptr XmlFormatter -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr XmlFormatter
forall a. Ptr a
FP.nullPtr
        then XmlFormatter -> Maybe XmlFormatter
forall a. a -> Maybe a
P.Just (XmlFormatter -> Maybe XmlFormatter)
-> IO XmlFormatter -> IO (Maybe XmlFormatter)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr XmlFormatter -> XmlFormatter)
-> Ptr XmlFormatter -> IO XmlFormatter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr XmlFormatter -> XmlFormatter
XmlFormatter Ptr XmlFormatter
ptr
        else Maybe XmlFormatter -> IO (Maybe XmlFormatter)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe XmlFormatter
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveXmlFormatterMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveXmlFormatterMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveXmlFormatterMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveXmlFormatterMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveXmlFormatterMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveXmlFormatterMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveXmlFormatterMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveXmlFormatterMethod "loadFromUri" o = GES.Formatter.FormatterLoadFromUriMethodInfo
    ResolveXmlFormatterMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveXmlFormatterMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveXmlFormatterMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveXmlFormatterMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveXmlFormatterMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveXmlFormatterMethod "saveToUri" o = GES.Formatter.FormatterSaveToUriMethodInfo
    ResolveXmlFormatterMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveXmlFormatterMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveXmlFormatterMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveXmlFormatterMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveXmlFormatterMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveXmlFormatterMethod "getAsset" o = GES.Extractable.ExtractableGetAssetMethodInfo
    ResolveXmlFormatterMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveXmlFormatterMethod "getId" o = GES.Extractable.ExtractableGetIdMethodInfo
    ResolveXmlFormatterMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveXmlFormatterMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveXmlFormatterMethod "setAsset" o = GES.Extractable.ExtractableSetAssetMethodInfo
    ResolveXmlFormatterMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveXmlFormatterMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveXmlFormatterMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveXmlFormatterMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveXmlFormatterMethod t XmlFormatter, O.OverloadedMethod info XmlFormatter p) => OL.IsLabel t (XmlFormatter -> 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 ~ ResolveXmlFormatterMethod t XmlFormatter, O.OverloadedMethod info XmlFormatter p, R.HasField t XmlFormatter p) => R.HasField t XmlFormatter p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveXmlFormatterMethod t XmlFormatter, O.OverloadedMethodInfo info XmlFormatter) => OL.IsLabel t (O.MethodProxy info XmlFormatter) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList XmlFormatter
type instance O.AttributeList XmlFormatter = XmlFormatterAttributeList
type XmlFormatterAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList XmlFormatter = XmlFormatterSignalList
type XmlFormatterSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

#endif