{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.MemoryOutputStream
(
MemoryOutputStream(..) ,
IsMemoryOutputStream ,
toMemoryOutputStream ,
#if defined(ENABLE_OVERLOADING)
ResolveMemoryOutputStreamMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
MemoryOutputStreamGetDataMethodInfo ,
#endif
memoryOutputStreamGetData ,
#if defined(ENABLE_OVERLOADING)
MemoryOutputStreamGetDataSizeMethodInfo ,
#endif
memoryOutputStreamGetDataSize ,
#if defined(ENABLE_OVERLOADING)
MemoryOutputStreamGetSizeMethodInfo ,
#endif
memoryOutputStreamGetSize ,
memoryOutputStreamNewResizable ,
#if defined(ENABLE_OVERLOADING)
MemoryOutputStreamStealAsBytesMethodInfo,
#endif
memoryOutputStreamStealAsBytes ,
#if defined(ENABLE_OVERLOADING)
MemoryOutputStreamStealDataMethodInfo ,
#endif
memoryOutputStreamStealData ,
#if defined(ENABLE_OVERLOADING)
MemoryOutputStreamDataPropertyInfo ,
#endif
constructMemoryOutputStreamData ,
getMemoryOutputStreamData ,
#if defined(ENABLE_OVERLOADING)
memoryOutputStreamData ,
#endif
#if defined(ENABLE_OVERLOADING)
MemoryOutputStreamDataSizePropertyInfo ,
#endif
getMemoryOutputStreamDataSize ,
#if defined(ENABLE_OVERLOADING)
memoryOutputStreamDataSize ,
#endif
#if defined(ENABLE_OVERLOADING)
MemoryOutputStreamSizePropertyInfo ,
#endif
constructMemoryOutputStreamSize ,
getMemoryOutputStreamSize ,
#if defined(ENABLE_OVERLOADING)
memoryOutputStreamSize ,
#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.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.PollableOutputStream as Gio.PollableOutputStream
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Seekable as Gio.Seekable
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
newtype MemoryOutputStream = MemoryOutputStream (SP.ManagedPtr MemoryOutputStream)
deriving (MemoryOutputStream -> MemoryOutputStream -> Bool
(MemoryOutputStream -> MemoryOutputStream -> Bool)
-> (MemoryOutputStream -> MemoryOutputStream -> Bool)
-> Eq MemoryOutputStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemoryOutputStream -> MemoryOutputStream -> Bool
$c/= :: MemoryOutputStream -> MemoryOutputStream -> Bool
== :: MemoryOutputStream -> MemoryOutputStream -> Bool
$c== :: MemoryOutputStream -> MemoryOutputStream -> Bool
Eq)
instance SP.ManagedPtrNewtype MemoryOutputStream where
toManagedPtr :: MemoryOutputStream -> ManagedPtr MemoryOutputStream
toManagedPtr (MemoryOutputStream ManagedPtr MemoryOutputStream
p) = ManagedPtr MemoryOutputStream
p
foreign import ccall "g_memory_output_stream_get_type"
c_g_memory_output_stream_get_type :: IO B.Types.GType
instance B.Types.TypedObject MemoryOutputStream where
glibType :: IO GType
glibType = IO GType
c_g_memory_output_stream_get_type
instance B.Types.GObject MemoryOutputStream
instance B.GValue.IsGValue MemoryOutputStream where
toGValue :: MemoryOutputStream -> IO GValue
toGValue MemoryOutputStream
o = do
GType
gtype <- IO GType
c_g_memory_output_stream_get_type
MemoryOutputStream
-> (Ptr MemoryOutputStream -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr MemoryOutputStream
o (GType
-> (GValue -> Ptr MemoryOutputStream -> IO ())
-> Ptr MemoryOutputStream
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr MemoryOutputStream -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO MemoryOutputStream
fromGValue GValue
gv = do
Ptr MemoryOutputStream
ptr <- GValue -> IO (Ptr MemoryOutputStream)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr MemoryOutputStream)
(ManagedPtr MemoryOutputStream -> MemoryOutputStream)
-> Ptr MemoryOutputStream -> IO MemoryOutputStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr MemoryOutputStream -> MemoryOutputStream
MemoryOutputStream Ptr MemoryOutputStream
ptr
class (SP.GObject o, O.IsDescendantOf MemoryOutputStream o) => IsMemoryOutputStream o
instance (SP.GObject o, O.IsDescendantOf MemoryOutputStream o) => IsMemoryOutputStream o
instance O.HasParentTypes MemoryOutputStream
type instance O.ParentTypes MemoryOutputStream = '[Gio.OutputStream.OutputStream, GObject.Object.Object, Gio.PollableOutputStream.PollableOutputStream, Gio.Seekable.Seekable]
toMemoryOutputStream :: (MonadIO m, IsMemoryOutputStream o) => o -> m MemoryOutputStream
toMemoryOutputStream :: o -> m MemoryOutputStream
toMemoryOutputStream = IO MemoryOutputStream -> m MemoryOutputStream
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MemoryOutputStream -> m MemoryOutputStream)
-> (o -> IO MemoryOutputStream) -> o -> m MemoryOutputStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr MemoryOutputStream -> MemoryOutputStream)
-> o -> IO MemoryOutputStream
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr MemoryOutputStream -> MemoryOutputStream
MemoryOutputStream
#if defined(ENABLE_OVERLOADING)
type family ResolveMemoryOutputStreamMethod (t :: Symbol) (o :: *) :: * where
ResolveMemoryOutputStreamMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveMemoryOutputStreamMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveMemoryOutputStreamMethod "canPoll" o = Gio.PollableOutputStream.PollableOutputStreamCanPollMethodInfo
ResolveMemoryOutputStreamMethod "canSeek" o = Gio.Seekable.SeekableCanSeekMethodInfo
ResolveMemoryOutputStreamMethod "canTruncate" o = Gio.Seekable.SeekableCanTruncateMethodInfo
ResolveMemoryOutputStreamMethod "clearPending" o = Gio.OutputStream.OutputStreamClearPendingMethodInfo
ResolveMemoryOutputStreamMethod "close" o = Gio.OutputStream.OutputStreamCloseMethodInfo
ResolveMemoryOutputStreamMethod "closeAsync" o = Gio.OutputStream.OutputStreamCloseAsyncMethodInfo
ResolveMemoryOutputStreamMethod "closeFinish" o = Gio.OutputStream.OutputStreamCloseFinishMethodInfo
ResolveMemoryOutputStreamMethod "createSource" o = Gio.PollableOutputStream.PollableOutputStreamCreateSourceMethodInfo
ResolveMemoryOutputStreamMethod "flush" o = Gio.OutputStream.OutputStreamFlushMethodInfo
ResolveMemoryOutputStreamMethod "flushAsync" o = Gio.OutputStream.OutputStreamFlushAsyncMethodInfo
ResolveMemoryOutputStreamMethod "flushFinish" o = Gio.OutputStream.OutputStreamFlushFinishMethodInfo
ResolveMemoryOutputStreamMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveMemoryOutputStreamMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveMemoryOutputStreamMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveMemoryOutputStreamMethod "hasPending" o = Gio.OutputStream.OutputStreamHasPendingMethodInfo
ResolveMemoryOutputStreamMethod "isClosed" o = Gio.OutputStream.OutputStreamIsClosedMethodInfo
ResolveMemoryOutputStreamMethod "isClosing" o = Gio.OutputStream.OutputStreamIsClosingMethodInfo
ResolveMemoryOutputStreamMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveMemoryOutputStreamMethod "isWritable" o = Gio.PollableOutputStream.PollableOutputStreamIsWritableMethodInfo
ResolveMemoryOutputStreamMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveMemoryOutputStreamMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveMemoryOutputStreamMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveMemoryOutputStreamMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveMemoryOutputStreamMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveMemoryOutputStreamMethod "seek" o = Gio.Seekable.SeekableSeekMethodInfo
ResolveMemoryOutputStreamMethod "splice" o = Gio.OutputStream.OutputStreamSpliceMethodInfo
ResolveMemoryOutputStreamMethod "spliceAsync" o = Gio.OutputStream.OutputStreamSpliceAsyncMethodInfo
ResolveMemoryOutputStreamMethod "spliceFinish" o = Gio.OutputStream.OutputStreamSpliceFinishMethodInfo
ResolveMemoryOutputStreamMethod "stealAsBytes" o = MemoryOutputStreamStealAsBytesMethodInfo
ResolveMemoryOutputStreamMethod "stealData" o = MemoryOutputStreamStealDataMethodInfo
ResolveMemoryOutputStreamMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveMemoryOutputStreamMethod "tell" o = Gio.Seekable.SeekableTellMethodInfo
ResolveMemoryOutputStreamMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveMemoryOutputStreamMethod "truncate" o = Gio.Seekable.SeekableTruncateMethodInfo
ResolveMemoryOutputStreamMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveMemoryOutputStreamMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveMemoryOutputStreamMethod "write" o = Gio.OutputStream.OutputStreamWriteMethodInfo
ResolveMemoryOutputStreamMethod "writeAll" o = Gio.OutputStream.OutputStreamWriteAllMethodInfo
ResolveMemoryOutputStreamMethod "writeAllAsync" o = Gio.OutputStream.OutputStreamWriteAllAsyncMethodInfo
ResolveMemoryOutputStreamMethod "writeAllFinish" o = Gio.OutputStream.OutputStreamWriteAllFinishMethodInfo
ResolveMemoryOutputStreamMethod "writeAsync" o = Gio.OutputStream.OutputStreamWriteAsyncMethodInfo
ResolveMemoryOutputStreamMethod "writeBytes" o = Gio.OutputStream.OutputStreamWriteBytesMethodInfo
ResolveMemoryOutputStreamMethod "writeBytesAsync" o = Gio.OutputStream.OutputStreamWriteBytesAsyncMethodInfo
ResolveMemoryOutputStreamMethod "writeBytesFinish" o = Gio.OutputStream.OutputStreamWriteBytesFinishMethodInfo
ResolveMemoryOutputStreamMethod "writeFinish" o = Gio.OutputStream.OutputStreamWriteFinishMethodInfo
ResolveMemoryOutputStreamMethod "writeNonblocking" o = Gio.PollableOutputStream.PollableOutputStreamWriteNonblockingMethodInfo
ResolveMemoryOutputStreamMethod "writev" o = Gio.OutputStream.OutputStreamWritevMethodInfo
ResolveMemoryOutputStreamMethod "writevAll" o = Gio.OutputStream.OutputStreamWritevAllMethodInfo
ResolveMemoryOutputStreamMethod "writevAllAsync" o = Gio.OutputStream.OutputStreamWritevAllAsyncMethodInfo
ResolveMemoryOutputStreamMethod "writevAllFinish" o = Gio.OutputStream.OutputStreamWritevAllFinishMethodInfo
ResolveMemoryOutputStreamMethod "writevAsync" o = Gio.OutputStream.OutputStreamWritevAsyncMethodInfo
ResolveMemoryOutputStreamMethod "writevFinish" o = Gio.OutputStream.OutputStreamWritevFinishMethodInfo
ResolveMemoryOutputStreamMethod "writevNonblocking" o = Gio.PollableOutputStream.PollableOutputStreamWritevNonblockingMethodInfo
ResolveMemoryOutputStreamMethod "getData" o = MemoryOutputStreamGetDataMethodInfo
ResolveMemoryOutputStreamMethod "getDataSize" o = MemoryOutputStreamGetDataSizeMethodInfo
ResolveMemoryOutputStreamMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveMemoryOutputStreamMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveMemoryOutputStreamMethod "getSize" o = MemoryOutputStreamGetSizeMethodInfo
ResolveMemoryOutputStreamMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveMemoryOutputStreamMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveMemoryOutputStreamMethod "setPending" o = Gio.OutputStream.OutputStreamSetPendingMethodInfo
ResolveMemoryOutputStreamMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveMemoryOutputStreamMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveMemoryOutputStreamMethod t MemoryOutputStream, O.MethodInfo info MemoryOutputStream p) => OL.IsLabel t (MemoryOutputStream -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
getMemoryOutputStreamData :: (MonadIO m, IsMemoryOutputStream o) => o -> m (Ptr ())
getMemoryOutputStreamData :: o -> m (Ptr ())
getMemoryOutputStreamData o
obj = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Ptr ())
forall a b. GObject a => a -> String -> IO (Ptr b)
B.Properties.getObjectPropertyPtr o
obj String
"data"
constructMemoryOutputStreamData :: (IsMemoryOutputStream o, MIO.MonadIO m) => Ptr () -> m (GValueConstruct o)
constructMemoryOutputStreamData :: Ptr () -> m (GValueConstruct o)
constructMemoryOutputStreamData Ptr ()
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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
$ String -> Ptr () -> IO (GValueConstruct o)
forall b o. String -> Ptr b -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyPtr String
"data" Ptr ()
val
#if defined(ENABLE_OVERLOADING)
data MemoryOutputStreamDataPropertyInfo
instance AttrInfo MemoryOutputStreamDataPropertyInfo where
type AttrAllowedOps MemoryOutputStreamDataPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MemoryOutputStreamDataPropertyInfo = IsMemoryOutputStream
type AttrSetTypeConstraint MemoryOutputStreamDataPropertyInfo = (~) (Ptr ())
type AttrTransferTypeConstraint MemoryOutputStreamDataPropertyInfo = (~) (Ptr ())
type AttrTransferType MemoryOutputStreamDataPropertyInfo = Ptr ()
type AttrGetType MemoryOutputStreamDataPropertyInfo = (Ptr ())
type AttrLabel MemoryOutputStreamDataPropertyInfo = "data"
type AttrOrigin MemoryOutputStreamDataPropertyInfo = MemoryOutputStream
attrGet = getMemoryOutputStreamData
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructMemoryOutputStreamData
attrClear = undefined
#endif
getMemoryOutputStreamDataSize :: (MonadIO m, IsMemoryOutputStream o) => o -> m CULong
getMemoryOutputStreamDataSize :: o -> m CULong
getMemoryOutputStreamDataSize o
obj = IO CULong -> m CULong
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CULong -> m CULong) -> IO CULong -> m CULong
forall a b. (a -> b) -> a -> b
$ o -> String -> IO CULong
forall a. GObject a => a -> String -> IO CULong
B.Properties.getObjectPropertyULong o
obj String
"data-size"
#if defined(ENABLE_OVERLOADING)
data MemoryOutputStreamDataSizePropertyInfo
instance AttrInfo MemoryOutputStreamDataSizePropertyInfo where
type AttrAllowedOps MemoryOutputStreamDataSizePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint MemoryOutputStreamDataSizePropertyInfo = IsMemoryOutputStream
type AttrSetTypeConstraint MemoryOutputStreamDataSizePropertyInfo = (~) ()
type AttrTransferTypeConstraint MemoryOutputStreamDataSizePropertyInfo = (~) ()
type AttrTransferType MemoryOutputStreamDataSizePropertyInfo = ()
type AttrGetType MemoryOutputStreamDataSizePropertyInfo = CULong
type AttrLabel MemoryOutputStreamDataSizePropertyInfo = "data-size"
type AttrOrigin MemoryOutputStreamDataSizePropertyInfo = MemoryOutputStream
attrGet = getMemoryOutputStreamDataSize
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getMemoryOutputStreamSize :: (MonadIO m, IsMemoryOutputStream o) => o -> m CULong
getMemoryOutputStreamSize :: o -> m CULong
getMemoryOutputStreamSize o
obj = IO CULong -> m CULong
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CULong -> m CULong) -> IO CULong -> m CULong
forall a b. (a -> b) -> a -> b
$ o -> String -> IO CULong
forall a. GObject a => a -> String -> IO CULong
B.Properties.getObjectPropertyULong o
obj String
"size"
constructMemoryOutputStreamSize :: (IsMemoryOutputStream o, MIO.MonadIO m) => CULong -> m (GValueConstruct o)
constructMemoryOutputStreamSize :: CULong -> m (GValueConstruct o)
constructMemoryOutputStreamSize CULong
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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
$ String -> CULong -> IO (GValueConstruct o)
forall o. String -> CULong -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyULong String
"size" CULong
val
#if defined(ENABLE_OVERLOADING)
data MemoryOutputStreamSizePropertyInfo
instance AttrInfo MemoryOutputStreamSizePropertyInfo where
type AttrAllowedOps MemoryOutputStreamSizePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MemoryOutputStreamSizePropertyInfo = IsMemoryOutputStream
type AttrSetTypeConstraint MemoryOutputStreamSizePropertyInfo = (~) CULong
type AttrTransferTypeConstraint MemoryOutputStreamSizePropertyInfo = (~) CULong
type AttrTransferType MemoryOutputStreamSizePropertyInfo = CULong
type AttrGetType MemoryOutputStreamSizePropertyInfo = CULong
type AttrLabel MemoryOutputStreamSizePropertyInfo = "size"
type AttrOrigin MemoryOutputStreamSizePropertyInfo = MemoryOutputStream
attrGet = getMemoryOutputStreamSize
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructMemoryOutputStreamSize
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList MemoryOutputStream
type instance O.AttributeList MemoryOutputStream = MemoryOutputStreamAttributeList
type MemoryOutputStreamAttributeList = ('[ '("data", MemoryOutputStreamDataPropertyInfo), '("dataSize", MemoryOutputStreamDataSizePropertyInfo), '("size", MemoryOutputStreamSizePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
memoryOutputStreamData :: AttrLabelProxy "data"
memoryOutputStreamData = AttrLabelProxy
memoryOutputStreamDataSize :: AttrLabelProxy "dataSize"
memoryOutputStreamDataSize = AttrLabelProxy
memoryOutputStreamSize :: AttrLabelProxy "size"
memoryOutputStreamSize = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList MemoryOutputStream = MemoryOutputStreamSignalList
type MemoryOutputStreamSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_memory_output_stream_new_resizable" g_memory_output_stream_new_resizable ::
IO (Ptr MemoryOutputStream)
memoryOutputStreamNewResizable ::
(B.CallStack.HasCallStack, MonadIO m) =>
m MemoryOutputStream
memoryOutputStreamNewResizable :: m MemoryOutputStream
memoryOutputStreamNewResizable = IO MemoryOutputStream -> m MemoryOutputStream
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MemoryOutputStream -> m MemoryOutputStream)
-> IO MemoryOutputStream -> m MemoryOutputStream
forall a b. (a -> b) -> a -> b
$ do
Ptr MemoryOutputStream
result <- IO (Ptr MemoryOutputStream)
g_memory_output_stream_new_resizable
Text -> Ptr MemoryOutputStream -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"memoryOutputStreamNewResizable" Ptr MemoryOutputStream
result
MemoryOutputStream
result' <- ((ManagedPtr MemoryOutputStream -> MemoryOutputStream)
-> Ptr MemoryOutputStream -> IO MemoryOutputStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr MemoryOutputStream -> MemoryOutputStream
MemoryOutputStream) Ptr MemoryOutputStream
result
MemoryOutputStream -> IO MemoryOutputStream
forall (m :: * -> *) a. Monad m => a -> m a
return MemoryOutputStream
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_memory_output_stream_get_data" g_memory_output_stream_get_data ::
Ptr MemoryOutputStream ->
IO (Ptr ())
memoryOutputStreamGetData ::
(B.CallStack.HasCallStack, MonadIO m, IsMemoryOutputStream a) =>
a
-> m (Ptr ())
memoryOutputStreamGetData :: a -> m (Ptr ())
memoryOutputStreamGetData a
ostream = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr MemoryOutputStream
ostream' <- a -> IO (Ptr MemoryOutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ostream
Ptr ()
result <- Ptr MemoryOutputStream -> IO (Ptr ())
g_memory_output_stream_get_data Ptr MemoryOutputStream
ostream'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ostream
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
#if defined(ENABLE_OVERLOADING)
data MemoryOutputStreamGetDataMethodInfo
instance (signature ~ (m (Ptr ())), MonadIO m, IsMemoryOutputStream a) => O.MethodInfo MemoryOutputStreamGetDataMethodInfo a signature where
overloadedMethod = memoryOutputStreamGetData
#endif
foreign import ccall "g_memory_output_stream_get_data_size" g_memory_output_stream_get_data_size ::
Ptr MemoryOutputStream ->
IO Word64
memoryOutputStreamGetDataSize ::
(B.CallStack.HasCallStack, MonadIO m, IsMemoryOutputStream a) =>
a
-> m Word64
memoryOutputStreamGetDataSize :: a -> m Word64
memoryOutputStreamGetDataSize a
ostream = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr MemoryOutputStream
ostream' <- a -> IO (Ptr MemoryOutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ostream
Word64
result <- Ptr MemoryOutputStream -> IO Word64
g_memory_output_stream_get_data_size Ptr MemoryOutputStream
ostream'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ostream
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data MemoryOutputStreamGetDataSizeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsMemoryOutputStream a) => O.MethodInfo MemoryOutputStreamGetDataSizeMethodInfo a signature where
overloadedMethod = memoryOutputStreamGetDataSize
#endif
foreign import ccall "g_memory_output_stream_get_size" g_memory_output_stream_get_size ::
Ptr MemoryOutputStream ->
IO Word64
memoryOutputStreamGetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsMemoryOutputStream a) =>
a
-> m Word64
memoryOutputStreamGetSize :: a -> m Word64
memoryOutputStreamGetSize a
ostream = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr MemoryOutputStream
ostream' <- a -> IO (Ptr MemoryOutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ostream
Word64
result <- Ptr MemoryOutputStream -> IO Word64
g_memory_output_stream_get_size Ptr MemoryOutputStream
ostream'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ostream
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data MemoryOutputStreamGetSizeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsMemoryOutputStream a) => O.MethodInfo MemoryOutputStreamGetSizeMethodInfo a signature where
overloadedMethod = memoryOutputStreamGetSize
#endif
foreign import ccall "g_memory_output_stream_steal_as_bytes" g_memory_output_stream_steal_as_bytes ::
Ptr MemoryOutputStream ->
IO (Ptr GLib.Bytes.Bytes)
memoryOutputStreamStealAsBytes ::
(B.CallStack.HasCallStack, MonadIO m, IsMemoryOutputStream a) =>
a
-> m GLib.Bytes.Bytes
memoryOutputStreamStealAsBytes :: a -> m Bytes
memoryOutputStreamStealAsBytes a
ostream = IO Bytes -> m Bytes
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bytes -> m Bytes) -> IO Bytes -> m Bytes
forall a b. (a -> b) -> a -> b
$ do
Ptr MemoryOutputStream
ostream' <- a -> IO (Ptr MemoryOutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ostream
Ptr Bytes
result <- Ptr MemoryOutputStream -> IO (Ptr Bytes)
g_memory_output_stream_steal_as_bytes Ptr MemoryOutputStream
ostream'
Text -> Ptr Bytes -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"memoryOutputStreamStealAsBytes" Ptr Bytes
result
Bytes
result' <- ((ManagedPtr Bytes -> Bytes) -> Ptr Bytes -> IO Bytes
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes) Ptr Bytes
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ostream
Bytes -> IO Bytes
forall (m :: * -> *) a. Monad m => a -> m a
return Bytes
result'
#if defined(ENABLE_OVERLOADING)
data MemoryOutputStreamStealAsBytesMethodInfo
instance (signature ~ (m GLib.Bytes.Bytes), MonadIO m, IsMemoryOutputStream a) => O.MethodInfo MemoryOutputStreamStealAsBytesMethodInfo a signature where
overloadedMethod = memoryOutputStreamStealAsBytes
#endif
foreign import ccall "g_memory_output_stream_steal_data" g_memory_output_stream_steal_data ::
Ptr MemoryOutputStream ->
IO (Ptr ())
memoryOutputStreamStealData ::
(B.CallStack.HasCallStack, MonadIO m, IsMemoryOutputStream a) =>
a
-> m (Ptr ())
memoryOutputStreamStealData :: a -> m (Ptr ())
memoryOutputStreamStealData a
ostream = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr MemoryOutputStream
ostream' <- a -> IO (Ptr MemoryOutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ostream
Ptr ()
result <- Ptr MemoryOutputStream -> IO (Ptr ())
g_memory_output_stream_steal_data Ptr MemoryOutputStream
ostream'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ostream
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
#if defined(ENABLE_OVERLOADING)
data MemoryOutputStreamStealDataMethodInfo
instance (signature ~ (m (Ptr ())), MonadIO m, IsMemoryOutputStream a) => O.MethodInfo MemoryOutputStreamStealDataMethodInfo a signature where
overloadedMethod = memoryOutputStreamStealData
#endif