{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.BufferedInputStream
(
BufferedInputStream(..) ,
IsBufferedInputStream ,
toBufferedInputStream ,
#if defined(ENABLE_OVERLOADING)
ResolveBufferedInputStreamMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamFillMethodInfo ,
#endif
bufferedInputStreamFill ,
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamFillAsyncMethodInfo ,
#endif
bufferedInputStreamFillAsync ,
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamFillFinishMethodInfo ,
#endif
bufferedInputStreamFillFinish ,
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamGetAvailableMethodInfo,
#endif
bufferedInputStreamGetAvailable ,
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamGetBufferSizeMethodInfo,
#endif
bufferedInputStreamGetBufferSize ,
bufferedInputStreamNew ,
bufferedInputStreamNewSized ,
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamPeekMethodInfo ,
#endif
bufferedInputStreamPeek ,
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamPeekBufferMethodInfo ,
#endif
bufferedInputStreamPeekBuffer ,
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamReadByteMethodInfo ,
#endif
bufferedInputStreamReadByte ,
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamSetBufferSizeMethodInfo,
#endif
bufferedInputStreamSetBufferSize ,
#if defined(ENABLE_OVERLOADING)
BufferedInputStreamBufferSizePropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
bufferedInputStreamBufferSize ,
#endif
constructBufferedInputStreamBufferSize ,
getBufferedInputStreamBufferSize ,
setBufferedInputStreamBufferSize ,
) 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.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 qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Seekable as Gio.Seekable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.FilterInputStream as Gio.FilterInputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.InputStream as Gio.InputStream
newtype BufferedInputStream = BufferedInputStream (SP.ManagedPtr BufferedInputStream)
deriving (BufferedInputStream -> BufferedInputStream -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BufferedInputStream -> BufferedInputStream -> Bool
$c/= :: BufferedInputStream -> BufferedInputStream -> Bool
== :: BufferedInputStream -> BufferedInputStream -> Bool
$c== :: BufferedInputStream -> BufferedInputStream -> Bool
Eq)
instance SP.ManagedPtrNewtype BufferedInputStream where
toManagedPtr :: BufferedInputStream -> ManagedPtr BufferedInputStream
toManagedPtr (BufferedInputStream ManagedPtr BufferedInputStream
p) = ManagedPtr BufferedInputStream
p
foreign import ccall "g_buffered_input_stream_get_type"
c_g_buffered_input_stream_get_type :: IO B.Types.GType
instance B.Types.TypedObject BufferedInputStream where
glibType :: IO GType
glibType = IO GType
c_g_buffered_input_stream_get_type
instance B.Types.GObject BufferedInputStream
class (SP.GObject o, O.IsDescendantOf BufferedInputStream o) => IsBufferedInputStream o
instance (SP.GObject o, O.IsDescendantOf BufferedInputStream o) => IsBufferedInputStream o
instance O.HasParentTypes BufferedInputStream
type instance O.ParentTypes BufferedInputStream = '[Gio.FilterInputStream.FilterInputStream, Gio.InputStream.InputStream, GObject.Object.Object, Gio.Seekable.Seekable]
toBufferedInputStream :: (MIO.MonadIO m, IsBufferedInputStream o) => o -> m BufferedInputStream
toBufferedInputStream :: forall (m :: * -> *) o.
(MonadIO m, IsBufferedInputStream o) =>
o -> m BufferedInputStream
toBufferedInputStream = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr BufferedInputStream -> BufferedInputStream
BufferedInputStream
instance B.GValue.IsGValue (Maybe BufferedInputStream) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_buffered_input_stream_get_type
gvalueSet_ :: Ptr GValue -> Maybe BufferedInputStream -> IO ()
gvalueSet_ Ptr GValue
gv Maybe BufferedInputStream
P.Nothing = forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (forall a. Ptr a
FP.nullPtr :: FP.Ptr BufferedInputStream)
gvalueSet_ Ptr GValue
gv (P.Just BufferedInputStream
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BufferedInputStream
obj (forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe BufferedInputStream)
gvalueGet_ Ptr GValue
gv = do
Ptr BufferedInputStream
ptr <- forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr BufferedInputStream)
if Ptr BufferedInputStream
ptr forall a. Eq a => a -> a -> Bool
/= forall a. Ptr a
FP.nullPtr
then forall a. a -> Maybe a
P.Just forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr BufferedInputStream -> BufferedInputStream
BufferedInputStream Ptr BufferedInputStream
ptr
else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveBufferedInputStreamMethod (t :: Symbol) (o :: *) :: * where
ResolveBufferedInputStreamMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveBufferedInputStreamMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveBufferedInputStreamMethod "canSeek" o = Gio.Seekable.SeekableCanSeekMethodInfo
ResolveBufferedInputStreamMethod "canTruncate" o = Gio.Seekable.SeekableCanTruncateMethodInfo
ResolveBufferedInputStreamMethod "clearPending" o = Gio.InputStream.InputStreamClearPendingMethodInfo
ResolveBufferedInputStreamMethod "close" o = Gio.InputStream.InputStreamCloseMethodInfo
ResolveBufferedInputStreamMethod "closeAsync" o = Gio.InputStream.InputStreamCloseAsyncMethodInfo
ResolveBufferedInputStreamMethod "closeFinish" o = Gio.InputStream.InputStreamCloseFinishMethodInfo
ResolveBufferedInputStreamMethod "fill" o = BufferedInputStreamFillMethodInfo
ResolveBufferedInputStreamMethod "fillAsync" o = BufferedInputStreamFillAsyncMethodInfo
ResolveBufferedInputStreamMethod "fillFinish" o = BufferedInputStreamFillFinishMethodInfo
ResolveBufferedInputStreamMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveBufferedInputStreamMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveBufferedInputStreamMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveBufferedInputStreamMethod "hasPending" o = Gio.InputStream.InputStreamHasPendingMethodInfo
ResolveBufferedInputStreamMethod "isClosed" o = Gio.InputStream.InputStreamIsClosedMethodInfo
ResolveBufferedInputStreamMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveBufferedInputStreamMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveBufferedInputStreamMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveBufferedInputStreamMethod "peek" o = BufferedInputStreamPeekMethodInfo
ResolveBufferedInputStreamMethod "peekBuffer" o = BufferedInputStreamPeekBufferMethodInfo
ResolveBufferedInputStreamMethod "read" o = Gio.InputStream.InputStreamReadMethodInfo
ResolveBufferedInputStreamMethod "readAll" o = Gio.InputStream.InputStreamReadAllMethodInfo
ResolveBufferedInputStreamMethod "readAllAsync" o = Gio.InputStream.InputStreamReadAllAsyncMethodInfo
ResolveBufferedInputStreamMethod "readAllFinish" o = Gio.InputStream.InputStreamReadAllFinishMethodInfo
ResolveBufferedInputStreamMethod "readAsync" o = Gio.InputStream.InputStreamReadAsyncMethodInfo
ResolveBufferedInputStreamMethod "readByte" o = BufferedInputStreamReadByteMethodInfo
ResolveBufferedInputStreamMethod "readBytes" o = Gio.InputStream.InputStreamReadBytesMethodInfo
ResolveBufferedInputStreamMethod "readBytesAsync" o = Gio.InputStream.InputStreamReadBytesAsyncMethodInfo
ResolveBufferedInputStreamMethod "readBytesFinish" o = Gio.InputStream.InputStreamReadBytesFinishMethodInfo
ResolveBufferedInputStreamMethod "readFinish" o = Gio.InputStream.InputStreamReadFinishMethodInfo
ResolveBufferedInputStreamMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveBufferedInputStreamMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveBufferedInputStreamMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveBufferedInputStreamMethod "seek" o = Gio.Seekable.SeekableSeekMethodInfo
ResolveBufferedInputStreamMethod "skip" o = Gio.InputStream.InputStreamSkipMethodInfo
ResolveBufferedInputStreamMethod "skipAsync" o = Gio.InputStream.InputStreamSkipAsyncMethodInfo
ResolveBufferedInputStreamMethod "skipFinish" o = Gio.InputStream.InputStreamSkipFinishMethodInfo
ResolveBufferedInputStreamMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveBufferedInputStreamMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveBufferedInputStreamMethod "tell" o = Gio.Seekable.SeekableTellMethodInfo
ResolveBufferedInputStreamMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveBufferedInputStreamMethod "truncate" o = Gio.Seekable.SeekableTruncateMethodInfo
ResolveBufferedInputStreamMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveBufferedInputStreamMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveBufferedInputStreamMethod "getAvailable" o = BufferedInputStreamGetAvailableMethodInfo
ResolveBufferedInputStreamMethod "getBaseStream" o = Gio.FilterInputStream.FilterInputStreamGetBaseStreamMethodInfo
ResolveBufferedInputStreamMethod "getBufferSize" o = BufferedInputStreamGetBufferSizeMethodInfo
ResolveBufferedInputStreamMethod "getCloseBaseStream" o = Gio.FilterInputStream.FilterInputStreamGetCloseBaseStreamMethodInfo
ResolveBufferedInputStreamMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveBufferedInputStreamMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveBufferedInputStreamMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveBufferedInputStreamMethod "setBufferSize" o = BufferedInputStreamSetBufferSizeMethodInfo
ResolveBufferedInputStreamMethod "setCloseBaseStream" o = Gio.FilterInputStream.FilterInputStreamSetCloseBaseStreamMethodInfo
ResolveBufferedInputStreamMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveBufferedInputStreamMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveBufferedInputStreamMethod "setPending" o = Gio.InputStream.InputStreamSetPendingMethodInfo
ResolveBufferedInputStreamMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveBufferedInputStreamMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveBufferedInputStreamMethod t BufferedInputStream, O.OverloadedMethod info BufferedInputStream p) => OL.IsLabel t (BufferedInputStream -> 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 ~ ResolveBufferedInputStreamMethod t BufferedInputStream, O.OverloadedMethod info BufferedInputStream p, R.HasField t BufferedInputStream p) => R.HasField t BufferedInputStream p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveBufferedInputStreamMethod t BufferedInputStream, O.OverloadedMethodInfo info BufferedInputStream) => OL.IsLabel t (O.MethodProxy info BufferedInputStream) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getBufferedInputStreamBufferSize :: (MonadIO m, IsBufferedInputStream o) => o -> m Word32
getBufferedInputStreamBufferSize :: forall (m :: * -> *) o.
(MonadIO m, IsBufferedInputStream o) =>
o -> m Word32
getBufferedInputStreamBufferSize o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"buffer-size"
setBufferedInputStreamBufferSize :: (MonadIO m, IsBufferedInputStream o) => o -> Word32 -> m ()
setBufferedInputStreamBufferSize :: forall (m :: * -> *) o.
(MonadIO m, IsBufferedInputStream o) =>
o -> Word32 -> m ()
setBufferedInputStreamBufferSize o
obj Word32
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"buffer-size" Word32
val
constructBufferedInputStreamBufferSize :: (IsBufferedInputStream o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructBufferedInputStreamBufferSize :: forall o (m :: * -> *).
(IsBufferedInputStream o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructBufferedInputStreamBufferSize Word32
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"buffer-size" Word32
val
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamBufferSizePropertyInfo
instance AttrInfo BufferedInputStreamBufferSizePropertyInfo where
type AttrAllowedOps BufferedInputStreamBufferSizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint BufferedInputStreamBufferSizePropertyInfo = IsBufferedInputStream
type AttrSetTypeConstraint BufferedInputStreamBufferSizePropertyInfo = (~) Word32
type AttrTransferTypeConstraint BufferedInputStreamBufferSizePropertyInfo = (~) Word32
type AttrTransferType BufferedInputStreamBufferSizePropertyInfo = Word32
type AttrGetType BufferedInputStreamBufferSizePropertyInfo = Word32
type AttrLabel BufferedInputStreamBufferSizePropertyInfo = "buffer-size"
type AttrOrigin BufferedInputStreamBufferSizePropertyInfo = BufferedInputStream
attrGet = getBufferedInputStreamBufferSize
attrSet = setBufferedInputStreamBufferSize
attrTransfer _ v = do
return v
attrConstruct = constructBufferedInputStreamBufferSize
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferSize"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#g:attr:bufferSize"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BufferedInputStream
type instance O.AttributeList BufferedInputStream = BufferedInputStreamAttributeList
type BufferedInputStreamAttributeList = ('[ '("baseStream", Gio.FilterInputStream.FilterInputStreamBaseStreamPropertyInfo), '("bufferSize", BufferedInputStreamBufferSizePropertyInfo), '("closeBaseStream", Gio.FilterInputStream.FilterInputStreamCloseBaseStreamPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
bufferedInputStreamBufferSize :: AttrLabelProxy "bufferSize"
bufferedInputStreamBufferSize = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList BufferedInputStream = BufferedInputStreamSignalList
type BufferedInputStreamSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_buffered_input_stream_new" g_buffered_input_stream_new ::
Ptr Gio.InputStream.InputStream ->
IO (Ptr BufferedInputStream)
bufferedInputStreamNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.InputStream.IsInputStream a) =>
a
-> m BufferedInputStream
bufferedInputStreamNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsInputStream a) =>
a -> m BufferedInputStream
bufferedInputStreamNew a
baseStream = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr InputStream
baseStream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
baseStream
Ptr BufferedInputStream
result <- Ptr InputStream -> IO (Ptr BufferedInputStream)
g_buffered_input_stream_new Ptr InputStream
baseStream'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferedInputStreamNew" Ptr BufferedInputStream
result
BufferedInputStream
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr BufferedInputStream -> BufferedInputStream
BufferedInputStream) Ptr BufferedInputStream
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
baseStream
forall (m :: * -> *) a. Monad m => a -> m a
return BufferedInputStream
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_buffered_input_stream_new_sized" g_buffered_input_stream_new_sized ::
Ptr Gio.InputStream.InputStream ->
Word32 ->
IO (Ptr BufferedInputStream)
bufferedInputStreamNewSized ::
(B.CallStack.HasCallStack, MonadIO m, Gio.InputStream.IsInputStream a) =>
a
-> Word32
-> m BufferedInputStream
bufferedInputStreamNewSized :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsInputStream a) =>
a -> Word32 -> m BufferedInputStream
bufferedInputStreamNewSized a
baseStream Word32
size = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr InputStream
baseStream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
baseStream
Ptr BufferedInputStream
result <- Ptr InputStream -> Word32 -> IO (Ptr BufferedInputStream)
g_buffered_input_stream_new_sized Ptr InputStream
baseStream' Word32
size
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferedInputStreamNewSized" Ptr BufferedInputStream
result
BufferedInputStream
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr BufferedInputStream -> BufferedInputStream
BufferedInputStream) Ptr BufferedInputStream
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
baseStream
forall (m :: * -> *) a. Monad m => a -> m a
return BufferedInputStream
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_buffered_input_stream_fill" g_buffered_input_stream_fill ::
Ptr BufferedInputStream ->
Int32 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO Int32
bufferedInputStreamFill ::
(B.CallStack.HasCallStack, MonadIO m, IsBufferedInputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Int32
-> Maybe (b)
-> m Int32
bufferedInputStreamFill :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsBufferedInputStream a,
IsCancellable b) =>
a -> Int32 -> Maybe b -> m Int32
bufferedInputStreamFill a
stream Int32
count Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BufferedInputStream
stream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
Int32
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr BufferedInputStream
-> Int32 -> Ptr Cancellable -> Ptr (Ptr GError) -> IO Int32
g_buffered_input_stream_fill Ptr BufferedInputStream
stream' Int32
count Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamFillMethodInfo
instance (signature ~ (Int32 -> Maybe (b) -> m Int32), MonadIO m, IsBufferedInputStream a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod BufferedInputStreamFillMethodInfo a signature where
overloadedMethod = bufferedInputStreamFill
instance O.OverloadedMethodInfo BufferedInputStreamFillMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferedInputStreamFill",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#v:bufferedInputStreamFill"
})
#endif
foreign import ccall "g_buffered_input_stream_fill_async" g_buffered_input_stream_fill_async ::
Ptr BufferedInputStream ->
Int32 ->
Int32 ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
bufferedInputStreamFillAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsBufferedInputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Int32
-> Int32
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
bufferedInputStreamFillAsync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsBufferedInputStream a,
IsCancellable b) =>
a -> Int32 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
bufferedInputStreamFillAsync a
stream Int32
count Int32
ioPriority Maybe b
cancellable Maybe AsyncReadyCallback
callback = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BufferedInputStream
stream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return (forall a b. Ptr a -> FunPtr b
castPtrToFunPtr forall a. Ptr a
nullPtr)
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = forall a. Ptr a
nullPtr
Ptr BufferedInputStream
-> Int32
-> Int32
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
g_buffered_input_stream_fill_async Ptr BufferedInputStream
stream' Int32
count Int32
ioPriority Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback forall a. Ptr a
userData
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamFillAsyncMethodInfo
instance (signature ~ (Int32 -> Int32 -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsBufferedInputStream a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod BufferedInputStreamFillAsyncMethodInfo a signature where
overloadedMethod = bufferedInputStreamFillAsync
instance O.OverloadedMethodInfo BufferedInputStreamFillAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferedInputStreamFillAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#v:bufferedInputStreamFillAsync"
})
#endif
foreign import ccall "g_buffered_input_stream_fill_finish" g_buffered_input_stream_fill_finish ::
Ptr BufferedInputStream ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO Int32
bufferedInputStreamFillFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsBufferedInputStream a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m Int32
bufferedInputStreamFillFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsBufferedInputStream a,
IsAsyncResult b) =>
a -> b -> m Int32
bufferedInputStreamFillFinish a
stream b
result_ = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BufferedInputStream
stream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Ptr AsyncResult
result_' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
forall a b. IO a -> IO b -> IO a
onException (do
Int32
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr BufferedInputStream
-> Ptr AsyncResult -> Ptr (Ptr GError) -> IO Int32
g_buffered_input_stream_fill_finish Ptr BufferedInputStream
stream' Ptr AsyncResult
result_'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamFillFinishMethodInfo
instance (signature ~ (b -> m Int32), MonadIO m, IsBufferedInputStream a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod BufferedInputStreamFillFinishMethodInfo a signature where
overloadedMethod = bufferedInputStreamFillFinish
instance O.OverloadedMethodInfo BufferedInputStreamFillFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferedInputStreamFillFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#v:bufferedInputStreamFillFinish"
})
#endif
foreign import ccall "g_buffered_input_stream_get_available" g_buffered_input_stream_get_available ::
Ptr BufferedInputStream ->
IO Word32
bufferedInputStreamGetAvailable ::
(B.CallStack.HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a
-> m Word32
bufferedInputStreamGetAvailable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a -> m Word32
bufferedInputStreamGetAvailable a
stream = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BufferedInputStream
stream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Word32
result <- Ptr BufferedInputStream -> IO Word32
g_buffered_input_stream_get_available Ptr BufferedInputStream
stream'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamGetAvailableMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsBufferedInputStream a) => O.OverloadedMethod BufferedInputStreamGetAvailableMethodInfo a signature where
overloadedMethod = bufferedInputStreamGetAvailable
instance O.OverloadedMethodInfo BufferedInputStreamGetAvailableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferedInputStreamGetAvailable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#v:bufferedInputStreamGetAvailable"
})
#endif
foreign import ccall "g_buffered_input_stream_get_buffer_size" g_buffered_input_stream_get_buffer_size ::
Ptr BufferedInputStream ->
IO Word32
bufferedInputStreamGetBufferSize ::
(B.CallStack.HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a
-> m Word32
bufferedInputStreamGetBufferSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a -> m Word32
bufferedInputStreamGetBufferSize a
stream = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BufferedInputStream
stream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Word32
result <- Ptr BufferedInputStream -> IO Word32
g_buffered_input_stream_get_buffer_size Ptr BufferedInputStream
stream'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamGetBufferSizeMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsBufferedInputStream a) => O.OverloadedMethod BufferedInputStreamGetBufferSizeMethodInfo a signature where
overloadedMethod = bufferedInputStreamGetBufferSize
instance O.OverloadedMethodInfo BufferedInputStreamGetBufferSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferedInputStreamGetBufferSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#v:bufferedInputStreamGetBufferSize"
})
#endif
foreign import ccall "g_buffered_input_stream_peek" g_buffered_input_stream_peek ::
Ptr BufferedInputStream ->
Ptr Word8 ->
Word32 ->
Word32 ->
IO Word32
bufferedInputStreamPeek ::
(B.CallStack.HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a
-> ByteString
-> Word32
-> m Word32
bufferedInputStreamPeek :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a -> ByteString -> Word32 -> m Word32
bufferedInputStreamPeek a
stream ByteString
buffer Word32
offset = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let count :: Word32
count = forall a b. (Integral a, Num b) => a -> b
fromIntegral forall a b. (a -> b) -> a -> b
$ ByteString -> Int
B.length ByteString
buffer
Ptr BufferedInputStream
stream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Ptr Word8
buffer' <- ByteString -> IO (Ptr Word8)
packByteString ByteString
buffer
Word32
result <- Ptr BufferedInputStream
-> Ptr Word8 -> Word32 -> Word32 -> IO Word32
g_buffered_input_stream_peek Ptr BufferedInputStream
stream' Ptr Word8
buffer' Word32
offset Word32
count
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
forall a. Ptr a -> IO ()
freeMem Ptr Word8
buffer'
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamPeekMethodInfo
instance (signature ~ (ByteString -> Word32 -> m Word32), MonadIO m, IsBufferedInputStream a) => O.OverloadedMethod BufferedInputStreamPeekMethodInfo a signature where
overloadedMethod = bufferedInputStreamPeek
instance O.OverloadedMethodInfo BufferedInputStreamPeekMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferedInputStreamPeek",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#v:bufferedInputStreamPeek"
})
#endif
foreign import ccall "g_buffered_input_stream_peek_buffer" g_buffered_input_stream_peek_buffer ::
Ptr BufferedInputStream ->
Ptr Word32 ->
IO (Ptr Word8)
bufferedInputStreamPeekBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a
-> m ByteString
bufferedInputStreamPeekBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a -> m ByteString
bufferedInputStreamPeekBuffer a
stream = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BufferedInputStream
stream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Ptr Word32
count <- forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr Word8
result <- Ptr BufferedInputStream -> Ptr Word32 -> IO (Ptr Word8)
g_buffered_input_stream_peek_buffer Ptr BufferedInputStream
stream' Ptr Word32
count
Word32
count' <- forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
count
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bufferedInputStreamPeekBuffer" Ptr Word8
result
ByteString
result' <- (forall a. Integral a => a -> Ptr Word8 -> IO ByteString
unpackByteStringWithLength Word32
count') Ptr Word8
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
forall a. Ptr a -> IO ()
freeMem Ptr Word32
count
forall (m :: * -> *) a. Monad m => a -> m a
return ByteString
result'
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamPeekBufferMethodInfo
instance (signature ~ (m ByteString), MonadIO m, IsBufferedInputStream a) => O.OverloadedMethod BufferedInputStreamPeekBufferMethodInfo a signature where
overloadedMethod = bufferedInputStreamPeekBuffer
instance O.OverloadedMethodInfo BufferedInputStreamPeekBufferMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferedInputStreamPeekBuffer",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#v:bufferedInputStreamPeekBuffer"
})
#endif
foreign import ccall "g_buffered_input_stream_read_byte" g_buffered_input_stream_read_byte ::
Ptr BufferedInputStream ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO Int32
bufferedInputStreamReadByte ::
(B.CallStack.HasCallStack, MonadIO m, IsBufferedInputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m Int32
bufferedInputStreamReadByte :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsBufferedInputStream a,
IsCancellable b) =>
a -> Maybe b -> m Int32
bufferedInputStreamReadByte a
stream Maybe b
cancellable = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BufferedInputStream
stream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jCancellable -> do
Ptr Cancellable
jCancellable' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
forall a b. IO a -> IO b -> IO a
onException (do
Int32
result <- forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError forall a b. (a -> b) -> a -> b
$ Ptr BufferedInputStream
-> Ptr Cancellable -> Ptr (Ptr GError) -> IO Int32
g_buffered_input_stream_read_byte Ptr BufferedInputStream
stream' Ptr Cancellable
maybeCancellable
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
) (do
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamReadByteMethodInfo
instance (signature ~ (Maybe (b) -> m Int32), MonadIO m, IsBufferedInputStream a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod BufferedInputStreamReadByteMethodInfo a signature where
overloadedMethod = bufferedInputStreamReadByte
instance O.OverloadedMethodInfo BufferedInputStreamReadByteMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferedInputStreamReadByte",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#v:bufferedInputStreamReadByte"
})
#endif
foreign import ccall "g_buffered_input_stream_set_buffer_size" g_buffered_input_stream_set_buffer_size ::
Ptr BufferedInputStream ->
Word32 ->
IO ()
bufferedInputStreamSetBufferSize ::
(B.CallStack.HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a
-> Word32
-> m ()
bufferedInputStreamSetBufferSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBufferedInputStream a) =>
a -> Word32 -> m ()
bufferedInputStreamSetBufferSize a
stream Word32
size = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BufferedInputStream
stream' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Ptr BufferedInputStream -> Word32 -> IO ()
g_buffered_input_stream_set_buffer_size Ptr BufferedInputStream
stream' Word32
size
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BufferedInputStreamSetBufferSizeMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsBufferedInputStream a) => O.OverloadedMethod BufferedInputStreamSetBufferSizeMethodInfo a signature where
overloadedMethod = bufferedInputStreamSetBufferSize
instance O.OverloadedMethodInfo BufferedInputStreamSetBufferSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.BufferedInputStream.bufferedInputStreamSetBufferSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-BufferedInputStream.html#v:bufferedInputStreamSetBufferSize"
})
#endif