{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.ConverterOutputStream
(
ConverterOutputStream(..) ,
IsConverterOutputStream ,
toConverterOutputStream ,
#if defined(ENABLE_OVERLOADING)
ResolveConverterOutputStreamMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ConverterOutputStreamGetConverterMethodInfo,
#endif
converterOutputStreamGetConverter ,
converterOutputStreamNew ,
#if defined(ENABLE_OVERLOADING)
ConverterOutputStreamConverterPropertyInfo,
#endif
constructConverterOutputStreamConverter ,
#if defined(ENABLE_OVERLOADING)
converterOutputStreamConverter ,
#endif
getConverterOutputStreamConverter ,
) 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 GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Converter as Gio.Converter
import {-# SOURCE #-} qualified GI.Gio.Interfaces.PollableOutputStream as Gio.PollableOutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.FilterOutputStream as Gio.FilterOutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
newtype ConverterOutputStream = ConverterOutputStream (SP.ManagedPtr ConverterOutputStream)
deriving (ConverterOutputStream -> ConverterOutputStream -> Bool
(ConverterOutputStream -> ConverterOutputStream -> Bool)
-> (ConverterOutputStream -> ConverterOutputStream -> Bool)
-> Eq ConverterOutputStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConverterOutputStream -> ConverterOutputStream -> Bool
== :: ConverterOutputStream -> ConverterOutputStream -> Bool
$c/= :: ConverterOutputStream -> ConverterOutputStream -> Bool
/= :: ConverterOutputStream -> ConverterOutputStream -> Bool
Eq)
instance SP.ManagedPtrNewtype ConverterOutputStream where
toManagedPtr :: ConverterOutputStream -> ManagedPtr ConverterOutputStream
toManagedPtr (ConverterOutputStream ManagedPtr ConverterOutputStream
p) = ManagedPtr ConverterOutputStream
p
foreign import ccall "g_converter_output_stream_get_type"
c_g_converter_output_stream_get_type :: IO B.Types.GType
instance B.Types.TypedObject ConverterOutputStream where
glibType :: IO GType
glibType = IO GType
c_g_converter_output_stream_get_type
instance B.Types.GObject ConverterOutputStream
class (SP.GObject o, O.IsDescendantOf ConverterOutputStream o) => IsConverterOutputStream o
instance (SP.GObject o, O.IsDescendantOf ConverterOutputStream o) => IsConverterOutputStream o
instance O.HasParentTypes ConverterOutputStream
type instance O.ParentTypes ConverterOutputStream = '[Gio.FilterOutputStream.FilterOutputStream, Gio.OutputStream.OutputStream, GObject.Object.Object, Gio.PollableOutputStream.PollableOutputStream]
toConverterOutputStream :: (MIO.MonadIO m, IsConverterOutputStream o) => o -> m ConverterOutputStream
toConverterOutputStream :: forall (m :: * -> *) o.
(MonadIO m, IsConverterOutputStream o) =>
o -> m ConverterOutputStream
toConverterOutputStream = IO ConverterOutputStream -> m ConverterOutputStream
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ConverterOutputStream -> m ConverterOutputStream)
-> (o -> IO ConverterOutputStream) -> o -> m ConverterOutputStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ConverterOutputStream -> ConverterOutputStream)
-> o -> IO ConverterOutputStream
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr ConverterOutputStream -> ConverterOutputStream
ConverterOutputStream
instance B.GValue.IsGValue (Maybe ConverterOutputStream) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_converter_output_stream_get_type
gvalueSet_ :: Ptr GValue -> Maybe ConverterOutputStream -> IO ()
gvalueSet_ Ptr GValue
gv Maybe ConverterOutputStream
P.Nothing = Ptr GValue -> Ptr ConverterOutputStream -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr ConverterOutputStream
forall a. Ptr a
FP.nullPtr :: FP.Ptr ConverterOutputStream)
gvalueSet_ Ptr GValue
gv (P.Just ConverterOutputStream
obj) = ConverterOutputStream
-> (Ptr ConverterOutputStream -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ConverterOutputStream
obj (Ptr GValue -> Ptr ConverterOutputStream -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe ConverterOutputStream)
gvalueGet_ Ptr GValue
gv = do
Ptr ConverterOutputStream
ptr <- Ptr GValue -> IO (Ptr ConverterOutputStream)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr ConverterOutputStream)
if Ptr ConverterOutputStream
ptr Ptr ConverterOutputStream -> Ptr ConverterOutputStream -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr ConverterOutputStream
forall a. Ptr a
FP.nullPtr
then ConverterOutputStream -> Maybe ConverterOutputStream
forall a. a -> Maybe a
P.Just (ConverterOutputStream -> Maybe ConverterOutputStream)
-> IO ConverterOutputStream -> IO (Maybe ConverterOutputStream)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr ConverterOutputStream -> ConverterOutputStream)
-> Ptr ConverterOutputStream -> IO ConverterOutputStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ConverterOutputStream -> ConverterOutputStream
ConverterOutputStream Ptr ConverterOutputStream
ptr
else Maybe ConverterOutputStream -> IO (Maybe ConverterOutputStream)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ConverterOutputStream
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveConverterOutputStreamMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveConverterOutputStreamMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveConverterOutputStreamMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveConverterOutputStreamMethod "canPoll" o = Gio.PollableOutputStream.PollableOutputStreamCanPollMethodInfo
ResolveConverterOutputStreamMethod "clearPending" o = Gio.OutputStream.OutputStreamClearPendingMethodInfo
ResolveConverterOutputStreamMethod "close" o = Gio.OutputStream.OutputStreamCloseMethodInfo
ResolveConverterOutputStreamMethod "closeAsync" o = Gio.OutputStream.OutputStreamCloseAsyncMethodInfo
ResolveConverterOutputStreamMethod "closeFinish" o = Gio.OutputStream.OutputStreamCloseFinishMethodInfo
ResolveConverterOutputStreamMethod "createSource" o = Gio.PollableOutputStream.PollableOutputStreamCreateSourceMethodInfo
ResolveConverterOutputStreamMethod "flush" o = Gio.OutputStream.OutputStreamFlushMethodInfo
ResolveConverterOutputStreamMethod "flushAsync" o = Gio.OutputStream.OutputStreamFlushAsyncMethodInfo
ResolveConverterOutputStreamMethod "flushFinish" o = Gio.OutputStream.OutputStreamFlushFinishMethodInfo
ResolveConverterOutputStreamMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveConverterOutputStreamMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveConverterOutputStreamMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveConverterOutputStreamMethod "hasPending" o = Gio.OutputStream.OutputStreamHasPendingMethodInfo
ResolveConverterOutputStreamMethod "isClosed" o = Gio.OutputStream.OutputStreamIsClosedMethodInfo
ResolveConverterOutputStreamMethod "isClosing" o = Gio.OutputStream.OutputStreamIsClosingMethodInfo
ResolveConverterOutputStreamMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveConverterOutputStreamMethod "isWritable" o = Gio.PollableOutputStream.PollableOutputStreamIsWritableMethodInfo
ResolveConverterOutputStreamMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveConverterOutputStreamMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveConverterOutputStreamMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveConverterOutputStreamMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveConverterOutputStreamMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveConverterOutputStreamMethod "splice" o = Gio.OutputStream.OutputStreamSpliceMethodInfo
ResolveConverterOutputStreamMethod "spliceAsync" o = Gio.OutputStream.OutputStreamSpliceAsyncMethodInfo
ResolveConverterOutputStreamMethod "spliceFinish" o = Gio.OutputStream.OutputStreamSpliceFinishMethodInfo
ResolveConverterOutputStreamMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveConverterOutputStreamMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveConverterOutputStreamMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveConverterOutputStreamMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveConverterOutputStreamMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveConverterOutputStreamMethod "write" o = Gio.OutputStream.OutputStreamWriteMethodInfo
ResolveConverterOutputStreamMethod "writeAll" o = Gio.OutputStream.OutputStreamWriteAllMethodInfo
ResolveConverterOutputStreamMethod "writeAllAsync" o = Gio.OutputStream.OutputStreamWriteAllAsyncMethodInfo
ResolveConverterOutputStreamMethod "writeAllFinish" o = Gio.OutputStream.OutputStreamWriteAllFinishMethodInfo
ResolveConverterOutputStreamMethod "writeAsync" o = Gio.OutputStream.OutputStreamWriteAsyncMethodInfo
ResolveConverterOutputStreamMethod "writeBytes" o = Gio.OutputStream.OutputStreamWriteBytesMethodInfo
ResolveConverterOutputStreamMethod "writeBytesAsync" o = Gio.OutputStream.OutputStreamWriteBytesAsyncMethodInfo
ResolveConverterOutputStreamMethod "writeBytesFinish" o = Gio.OutputStream.OutputStreamWriteBytesFinishMethodInfo
ResolveConverterOutputStreamMethod "writeFinish" o = Gio.OutputStream.OutputStreamWriteFinishMethodInfo
ResolveConverterOutputStreamMethod "writeNonblocking" o = Gio.PollableOutputStream.PollableOutputStreamWriteNonblockingMethodInfo
ResolveConverterOutputStreamMethod "writev" o = Gio.OutputStream.OutputStreamWritevMethodInfo
ResolveConverterOutputStreamMethod "writevAll" o = Gio.OutputStream.OutputStreamWritevAllMethodInfo
ResolveConverterOutputStreamMethod "writevAllAsync" o = Gio.OutputStream.OutputStreamWritevAllAsyncMethodInfo
ResolveConverterOutputStreamMethod "writevAllFinish" o = Gio.OutputStream.OutputStreamWritevAllFinishMethodInfo
ResolveConverterOutputStreamMethod "writevAsync" o = Gio.OutputStream.OutputStreamWritevAsyncMethodInfo
ResolveConverterOutputStreamMethod "writevFinish" o = Gio.OutputStream.OutputStreamWritevFinishMethodInfo
ResolveConverterOutputStreamMethod "writevNonblocking" o = Gio.PollableOutputStream.PollableOutputStreamWritevNonblockingMethodInfo
ResolveConverterOutputStreamMethod "getBaseStream" o = Gio.FilterOutputStream.FilterOutputStreamGetBaseStreamMethodInfo
ResolveConverterOutputStreamMethod "getCloseBaseStream" o = Gio.FilterOutputStream.FilterOutputStreamGetCloseBaseStreamMethodInfo
ResolveConverterOutputStreamMethod "getConverter" o = ConverterOutputStreamGetConverterMethodInfo
ResolveConverterOutputStreamMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveConverterOutputStreamMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveConverterOutputStreamMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveConverterOutputStreamMethod "setCloseBaseStream" o = Gio.FilterOutputStream.FilterOutputStreamSetCloseBaseStreamMethodInfo
ResolveConverterOutputStreamMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveConverterOutputStreamMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveConverterOutputStreamMethod "setPending" o = Gio.OutputStream.OutputStreamSetPendingMethodInfo
ResolveConverterOutputStreamMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveConverterOutputStreamMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveConverterOutputStreamMethod t ConverterOutputStream, O.OverloadedMethod info ConverterOutputStream p) => OL.IsLabel t (ConverterOutputStream -> 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 ~ ResolveConverterOutputStreamMethod t ConverterOutputStream, O.OverloadedMethod info ConverterOutputStream p, R.HasField t ConverterOutputStream p) => R.HasField t ConverterOutputStream p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveConverterOutputStreamMethod t ConverterOutputStream, O.OverloadedMethodInfo info ConverterOutputStream) => OL.IsLabel t (O.MethodProxy info ConverterOutputStream) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getConverterOutputStreamConverter :: (MonadIO m, IsConverterOutputStream o) => o -> m Gio.Converter.Converter
getConverterOutputStreamConverter :: forall (m :: * -> *) o.
(MonadIO m, IsConverterOutputStream o) =>
o -> m Converter
getConverterOutputStreamConverter o
obj = IO Converter -> m Converter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Converter -> m Converter) -> IO Converter -> m Converter
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Converter) -> IO Converter
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getConverterOutputStreamConverter" (IO (Maybe Converter) -> IO Converter)
-> IO (Maybe Converter) -> IO Converter
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr Converter -> Converter)
-> IO (Maybe Converter)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"converter" ManagedPtr Converter -> Converter
Gio.Converter.Converter
constructConverterOutputStreamConverter :: (IsConverterOutputStream o, MIO.MonadIO m, Gio.Converter.IsConverter a) => a -> m (GValueConstruct o)
constructConverterOutputStreamConverter :: forall o (m :: * -> *) a.
(IsConverterOutputStream o, MonadIO m, IsConverter a) =>
a -> m (GValueConstruct o)
constructConverterOutputStreamConverter a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"converter" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data ConverterOutputStreamConverterPropertyInfo
instance AttrInfo ConverterOutputStreamConverterPropertyInfo where
type AttrAllowedOps ConverterOutputStreamConverterPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ConverterOutputStreamConverterPropertyInfo = IsConverterOutputStream
type AttrSetTypeConstraint ConverterOutputStreamConverterPropertyInfo = Gio.Converter.IsConverter
type AttrTransferTypeConstraint ConverterOutputStreamConverterPropertyInfo = Gio.Converter.IsConverter
type AttrTransferType ConverterOutputStreamConverterPropertyInfo = Gio.Converter.Converter
type AttrGetType ConverterOutputStreamConverterPropertyInfo = Gio.Converter.Converter
type AttrLabel ConverterOutputStreamConverterPropertyInfo = "converter"
type AttrOrigin ConverterOutputStreamConverterPropertyInfo = ConverterOutputStream
attrGet = getConverterOutputStreamConverter
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gio.Converter.Converter v
attrConstruct = constructConverterOutputStreamConverter
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.ConverterOutputStream.converter"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Objects-ConverterOutputStream.html#g:attr:converter"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ConverterOutputStream
type instance O.AttributeList ConverterOutputStream = ConverterOutputStreamAttributeList
type ConverterOutputStreamAttributeList = ('[ '("baseStream", Gio.FilterOutputStream.FilterOutputStreamBaseStreamPropertyInfo), '("closeBaseStream", Gio.FilterOutputStream.FilterOutputStreamCloseBaseStreamPropertyInfo), '("converter", ConverterOutputStreamConverterPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
converterOutputStreamConverter :: AttrLabelProxy "converter"
converterOutputStreamConverter = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ConverterOutputStream = ConverterOutputStreamSignalList
type ConverterOutputStreamSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_converter_output_stream_new" g_converter_output_stream_new ::
Ptr Gio.OutputStream.OutputStream ->
Ptr Gio.Converter.Converter ->
IO (Ptr ConverterOutputStream)
converterOutputStreamNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.OutputStream.IsOutputStream a, Gio.Converter.IsConverter b) =>
a
-> b
-> m ConverterOutputStream
converterOutputStreamNew :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsOutputStream a, IsConverter b) =>
a -> b -> m ConverterOutputStream
converterOutputStreamNew a
baseStream b
converter = IO ConverterOutputStream -> m ConverterOutputStream
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ConverterOutputStream -> m ConverterOutputStream)
-> IO ConverterOutputStream -> m ConverterOutputStream
forall a b. (a -> b) -> a -> b
$ do
Ptr OutputStream
baseStream' <- a -> IO (Ptr OutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
baseStream
Ptr Converter
converter' <- b -> IO (Ptr Converter)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
converter
Ptr ConverterOutputStream
result <- Ptr OutputStream -> Ptr Converter -> IO (Ptr ConverterOutputStream)
g_converter_output_stream_new Ptr OutputStream
baseStream' Ptr Converter
converter'
Text -> Ptr ConverterOutputStream -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"converterOutputStreamNew" Ptr ConverterOutputStream
result
ConverterOutputStream
result' <- ((ManagedPtr ConverterOutputStream -> ConverterOutputStream)
-> Ptr ConverterOutputStream -> IO ConverterOutputStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr ConverterOutputStream -> ConverterOutputStream
ConverterOutputStream) Ptr ConverterOutputStream
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
baseStream
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
converter
ConverterOutputStream -> IO ConverterOutputStream
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ConverterOutputStream
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_converter_output_stream_get_converter" g_converter_output_stream_get_converter ::
Ptr ConverterOutputStream ->
IO (Ptr Gio.Converter.Converter)
converterOutputStreamGetConverter ::
(B.CallStack.HasCallStack, MonadIO m, IsConverterOutputStream a) =>
a
-> m Gio.Converter.Converter
converterOutputStreamGetConverter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsConverterOutputStream a) =>
a -> m Converter
converterOutputStreamGetConverter a
converterStream = IO Converter -> m Converter
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Converter -> m Converter) -> IO Converter -> m Converter
forall a b. (a -> b) -> a -> b
$ do
Ptr ConverterOutputStream
converterStream' <- a -> IO (Ptr ConverterOutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
converterStream
Ptr Converter
result <- Ptr ConverterOutputStream -> IO (Ptr Converter)
g_converter_output_stream_get_converter Ptr ConverterOutputStream
converterStream'
Text -> Ptr Converter -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"converterOutputStreamGetConverter" Ptr Converter
result
Converter
result' <- ((ManagedPtr Converter -> Converter)
-> Ptr Converter -> IO Converter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Converter -> Converter
Gio.Converter.Converter) Ptr Converter
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
converterStream
Converter -> IO Converter
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Converter
result'
#if defined(ENABLE_OVERLOADING)
data ConverterOutputStreamGetConverterMethodInfo
instance (signature ~ (m Gio.Converter.Converter), MonadIO m, IsConverterOutputStream a) => O.OverloadedMethod ConverterOutputStreamGetConverterMethodInfo a signature where
overloadedMethod = converterOutputStreamGetConverter
instance O.OverloadedMethodInfo ConverterOutputStreamGetConverterMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.ConverterOutputStream.converterOutputStreamGetConverter",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.32/docs/GI-Gio-Objects-ConverterOutputStream.html#v:converterOutputStreamGetConverter"
})
#endif