{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.FilterOutputStream
(
FilterOutputStream(..) ,
IsFilterOutputStream ,
toFilterOutputStream ,
noFilterOutputStream ,
#if defined(ENABLE_OVERLOADING)
ResolveFilterOutputStreamMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FilterOutputStreamGetBaseStreamMethodInfo,
#endif
filterOutputStreamGetBaseStream ,
#if defined(ENABLE_OVERLOADING)
FilterOutputStreamGetCloseBaseStreamMethodInfo,
#endif
filterOutputStreamGetCloseBaseStream ,
#if defined(ENABLE_OVERLOADING)
FilterOutputStreamSetCloseBaseStreamMethodInfo,
#endif
filterOutputStreamSetCloseBaseStream ,
#if defined(ENABLE_OVERLOADING)
FilterOutputStreamBaseStreamPropertyInfo,
#endif
constructFilterOutputStreamBaseStream ,
#if defined(ENABLE_OVERLOADING)
filterOutputStreamBaseStream ,
#endif
getFilterOutputStreamBaseStream ,
#if defined(ENABLE_OVERLOADING)
FilterOutputStreamCloseBaseStreamPropertyInfo,
#endif
constructFilterOutputStreamCloseBaseStream,
#if defined(ENABLE_OVERLOADING)
filterOutputStreamCloseBaseStream ,
#endif
getFilterOutputStreamCloseBaseStream ,
) 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.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 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.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
newtype FilterOutputStream = FilterOutputStream (ManagedPtr FilterOutputStream)
deriving (FilterOutputStream -> FilterOutputStream -> Bool
(FilterOutputStream -> FilterOutputStream -> Bool)
-> (FilterOutputStream -> FilterOutputStream -> Bool)
-> Eq FilterOutputStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FilterOutputStream -> FilterOutputStream -> Bool
$c/= :: FilterOutputStream -> FilterOutputStream -> Bool
== :: FilterOutputStream -> FilterOutputStream -> Bool
$c== :: FilterOutputStream -> FilterOutputStream -> Bool
Eq)
foreign import ccall "g_filter_output_stream_get_type"
c_g_filter_output_stream_get_type :: IO GType
instance GObject FilterOutputStream where
gobjectType :: IO GType
gobjectType = IO GType
c_g_filter_output_stream_get_type
instance B.GValue.IsGValue FilterOutputStream where
toGValue :: FilterOutputStream -> IO GValue
toGValue o :: FilterOutputStream
o = do
GType
gtype <- IO GType
c_g_filter_output_stream_get_type
FilterOutputStream
-> (Ptr FilterOutputStream -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FilterOutputStream
o (GType
-> (GValue -> Ptr FilterOutputStream -> IO ())
-> Ptr FilterOutputStream
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr FilterOutputStream -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO FilterOutputStream
fromGValue gv :: GValue
gv = do
Ptr FilterOutputStream
ptr <- GValue -> IO (Ptr FilterOutputStream)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr FilterOutputStream)
(ManagedPtr FilterOutputStream -> FilterOutputStream)
-> Ptr FilterOutputStream -> IO FilterOutputStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr FilterOutputStream -> FilterOutputStream
FilterOutputStream Ptr FilterOutputStream
ptr
class (GObject o, O.IsDescendantOf FilterOutputStream o) => IsFilterOutputStream o
instance (GObject o, O.IsDescendantOf FilterOutputStream o) => IsFilterOutputStream o
instance O.HasParentTypes FilterOutputStream
type instance O.ParentTypes FilterOutputStream = '[Gio.OutputStream.OutputStream, GObject.Object.Object]
toFilterOutputStream :: (MonadIO m, IsFilterOutputStream o) => o -> m FilterOutputStream
toFilterOutputStream :: o -> m FilterOutputStream
toFilterOutputStream = IO FilterOutputStream -> m FilterOutputStream
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FilterOutputStream -> m FilterOutputStream)
-> (o -> IO FilterOutputStream) -> o -> m FilterOutputStream
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr FilterOutputStream -> FilterOutputStream)
-> o -> IO FilterOutputStream
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr FilterOutputStream -> FilterOutputStream
FilterOutputStream
noFilterOutputStream :: Maybe FilterOutputStream
noFilterOutputStream :: Maybe FilterOutputStream
noFilterOutputStream = Maybe FilterOutputStream
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveFilterOutputStreamMethod (t :: Symbol) (o :: *) :: * where
ResolveFilterOutputStreamMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveFilterOutputStreamMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveFilterOutputStreamMethod "clearPending" o = Gio.OutputStream.OutputStreamClearPendingMethodInfo
ResolveFilterOutputStreamMethod "close" o = Gio.OutputStream.OutputStreamCloseMethodInfo
ResolveFilterOutputStreamMethod "closeAsync" o = Gio.OutputStream.OutputStreamCloseAsyncMethodInfo
ResolveFilterOutputStreamMethod "closeFinish" o = Gio.OutputStream.OutputStreamCloseFinishMethodInfo
ResolveFilterOutputStreamMethod "flush" o = Gio.OutputStream.OutputStreamFlushMethodInfo
ResolveFilterOutputStreamMethod "flushAsync" o = Gio.OutputStream.OutputStreamFlushAsyncMethodInfo
ResolveFilterOutputStreamMethod "flushFinish" o = Gio.OutputStream.OutputStreamFlushFinishMethodInfo
ResolveFilterOutputStreamMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveFilterOutputStreamMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveFilterOutputStreamMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveFilterOutputStreamMethod "hasPending" o = Gio.OutputStream.OutputStreamHasPendingMethodInfo
ResolveFilterOutputStreamMethod "isClosed" o = Gio.OutputStream.OutputStreamIsClosedMethodInfo
ResolveFilterOutputStreamMethod "isClosing" o = Gio.OutputStream.OutputStreamIsClosingMethodInfo
ResolveFilterOutputStreamMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveFilterOutputStreamMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveFilterOutputStreamMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveFilterOutputStreamMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveFilterOutputStreamMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveFilterOutputStreamMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveFilterOutputStreamMethod "splice" o = Gio.OutputStream.OutputStreamSpliceMethodInfo
ResolveFilterOutputStreamMethod "spliceAsync" o = Gio.OutputStream.OutputStreamSpliceAsyncMethodInfo
ResolveFilterOutputStreamMethod "spliceFinish" o = Gio.OutputStream.OutputStreamSpliceFinishMethodInfo
ResolveFilterOutputStreamMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveFilterOutputStreamMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveFilterOutputStreamMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveFilterOutputStreamMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveFilterOutputStreamMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveFilterOutputStreamMethod "write" o = Gio.OutputStream.OutputStreamWriteMethodInfo
ResolveFilterOutputStreamMethod "writeAll" o = Gio.OutputStream.OutputStreamWriteAllMethodInfo
ResolveFilterOutputStreamMethod "writeAllAsync" o = Gio.OutputStream.OutputStreamWriteAllAsyncMethodInfo
ResolveFilterOutputStreamMethod "writeAllFinish" o = Gio.OutputStream.OutputStreamWriteAllFinishMethodInfo
ResolveFilterOutputStreamMethod "writeAsync" o = Gio.OutputStream.OutputStreamWriteAsyncMethodInfo
ResolveFilterOutputStreamMethod "writeBytes" o = Gio.OutputStream.OutputStreamWriteBytesMethodInfo
ResolveFilterOutputStreamMethod "writeBytesAsync" o = Gio.OutputStream.OutputStreamWriteBytesAsyncMethodInfo
ResolveFilterOutputStreamMethod "writeBytesFinish" o = Gio.OutputStream.OutputStreamWriteBytesFinishMethodInfo
ResolveFilterOutputStreamMethod "writeFinish" o = Gio.OutputStream.OutputStreamWriteFinishMethodInfo
ResolveFilterOutputStreamMethod "writev" o = Gio.OutputStream.OutputStreamWritevMethodInfo
ResolveFilterOutputStreamMethod "writevAll" o = Gio.OutputStream.OutputStreamWritevAllMethodInfo
ResolveFilterOutputStreamMethod "writevAllAsync" o = Gio.OutputStream.OutputStreamWritevAllAsyncMethodInfo
ResolveFilterOutputStreamMethod "writevAllFinish" o = Gio.OutputStream.OutputStreamWritevAllFinishMethodInfo
ResolveFilterOutputStreamMethod "writevAsync" o = Gio.OutputStream.OutputStreamWritevAsyncMethodInfo
ResolveFilterOutputStreamMethod "writevFinish" o = Gio.OutputStream.OutputStreamWritevFinishMethodInfo
ResolveFilterOutputStreamMethod "getBaseStream" o = FilterOutputStreamGetBaseStreamMethodInfo
ResolveFilterOutputStreamMethod "getCloseBaseStream" o = FilterOutputStreamGetCloseBaseStreamMethodInfo
ResolveFilterOutputStreamMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveFilterOutputStreamMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveFilterOutputStreamMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveFilterOutputStreamMethod "setCloseBaseStream" o = FilterOutputStreamSetCloseBaseStreamMethodInfo
ResolveFilterOutputStreamMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveFilterOutputStreamMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveFilterOutputStreamMethod "setPending" o = Gio.OutputStream.OutputStreamSetPendingMethodInfo
ResolveFilterOutputStreamMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveFilterOutputStreamMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFilterOutputStreamMethod t FilterOutputStream, O.MethodInfo info FilterOutputStream p) => OL.IsLabel t (FilterOutputStream -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
getFilterOutputStreamBaseStream :: (MonadIO m, IsFilterOutputStream o) => o -> m Gio.OutputStream.OutputStream
getFilterOutputStreamBaseStream :: o -> m OutputStream
getFilterOutputStreamBaseStream obj :: o
obj = IO OutputStream -> m OutputStream
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO OutputStream -> m OutputStream)
-> IO OutputStream -> m OutputStream
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe OutputStream) -> IO OutputStream
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing "getFilterOutputStreamBaseStream" (IO (Maybe OutputStream) -> IO OutputStream)
-> IO (Maybe OutputStream) -> IO OutputStream
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr OutputStream -> OutputStream)
-> IO (Maybe OutputStream)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "base-stream" ManagedPtr OutputStream -> OutputStream
Gio.OutputStream.OutputStream
constructFilterOutputStreamBaseStream :: (IsFilterOutputStream o, Gio.OutputStream.IsOutputStream a) => a -> IO (GValueConstruct o)
constructFilterOutputStreamBaseStream :: a -> IO (GValueConstruct o)
constructFilterOutputStreamBaseStream val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "base-stream" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
#if defined(ENABLE_OVERLOADING)
data FilterOutputStreamBaseStreamPropertyInfo
instance AttrInfo FilterOutputStreamBaseStreamPropertyInfo where
type AttrAllowedOps FilterOutputStreamBaseStreamPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint FilterOutputStreamBaseStreamPropertyInfo = IsFilterOutputStream
type AttrSetTypeConstraint FilterOutputStreamBaseStreamPropertyInfo = Gio.OutputStream.IsOutputStream
type AttrTransferTypeConstraint FilterOutputStreamBaseStreamPropertyInfo = Gio.OutputStream.IsOutputStream
type AttrTransferType FilterOutputStreamBaseStreamPropertyInfo = Gio.OutputStream.OutputStream
type AttrGetType FilterOutputStreamBaseStreamPropertyInfo = Gio.OutputStream.OutputStream
type AttrLabel FilterOutputStreamBaseStreamPropertyInfo = "base-stream"
type AttrOrigin FilterOutputStreamBaseStreamPropertyInfo = FilterOutputStream
attrGet = getFilterOutputStreamBaseStream
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gio.OutputStream.OutputStream v
attrConstruct = constructFilterOutputStreamBaseStream
attrClear = undefined
#endif
getFilterOutputStreamCloseBaseStream :: (MonadIO m, IsFilterOutputStream o) => o -> m Bool
getFilterOutputStreamCloseBaseStream :: o -> m Bool
getFilterOutputStreamCloseBaseStream obj :: o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "close-base-stream"
constructFilterOutputStreamCloseBaseStream :: (IsFilterOutputStream o) => Bool -> IO (GValueConstruct o)
constructFilterOutputStreamCloseBaseStream :: Bool -> IO (GValueConstruct o)
constructFilterOutputStreamCloseBaseStream val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "close-base-stream" Bool
val
#if defined(ENABLE_OVERLOADING)
data FilterOutputStreamCloseBaseStreamPropertyInfo
instance AttrInfo FilterOutputStreamCloseBaseStreamPropertyInfo where
type AttrAllowedOps FilterOutputStreamCloseBaseStreamPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FilterOutputStreamCloseBaseStreamPropertyInfo = IsFilterOutputStream
type AttrSetTypeConstraint FilterOutputStreamCloseBaseStreamPropertyInfo = (~) Bool
type AttrTransferTypeConstraint FilterOutputStreamCloseBaseStreamPropertyInfo = (~) Bool
type AttrTransferType FilterOutputStreamCloseBaseStreamPropertyInfo = Bool
type AttrGetType FilterOutputStreamCloseBaseStreamPropertyInfo = Bool
type AttrLabel FilterOutputStreamCloseBaseStreamPropertyInfo = "close-base-stream"
type AttrOrigin FilterOutputStreamCloseBaseStreamPropertyInfo = FilterOutputStream
attrGet = getFilterOutputStreamCloseBaseStream
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructFilterOutputStreamCloseBaseStream
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FilterOutputStream
type instance O.AttributeList FilterOutputStream = FilterOutputStreamAttributeList
type FilterOutputStreamAttributeList = ('[ '("baseStream", FilterOutputStreamBaseStreamPropertyInfo), '("closeBaseStream", FilterOutputStreamCloseBaseStreamPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
filterOutputStreamBaseStream :: AttrLabelProxy "baseStream"
filterOutputStreamBaseStream = AttrLabelProxy
filterOutputStreamCloseBaseStream :: AttrLabelProxy "closeBaseStream"
filterOutputStreamCloseBaseStream = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FilterOutputStream = FilterOutputStreamSignalList
type FilterOutputStreamSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_filter_output_stream_get_base_stream" g_filter_output_stream_get_base_stream ::
Ptr FilterOutputStream ->
IO (Ptr Gio.OutputStream.OutputStream)
filterOutputStreamGetBaseStream ::
(B.CallStack.HasCallStack, MonadIO m, IsFilterOutputStream a) =>
a
-> m Gio.OutputStream.OutputStream
filterOutputStreamGetBaseStream :: a -> m OutputStream
filterOutputStreamGetBaseStream stream :: a
stream = IO OutputStream -> m OutputStream
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO OutputStream -> m OutputStream)
-> IO OutputStream -> m OutputStream
forall a b. (a -> b) -> a -> b
$ do
Ptr FilterOutputStream
stream' <- a -> IO (Ptr FilterOutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
Ptr OutputStream
result <- Ptr FilterOutputStream -> IO (Ptr OutputStream)
g_filter_output_stream_get_base_stream Ptr FilterOutputStream
stream'
Text -> Ptr OutputStream -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "filterOutputStreamGetBaseStream" Ptr OutputStream
result
OutputStream
result' <- ((ManagedPtr OutputStream -> OutputStream)
-> Ptr OutputStream -> IO OutputStream
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr OutputStream -> OutputStream
Gio.OutputStream.OutputStream) Ptr OutputStream
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
OutputStream -> IO OutputStream
forall (m :: * -> *) a. Monad m => a -> m a
return OutputStream
result'
#if defined(ENABLE_OVERLOADING)
data FilterOutputStreamGetBaseStreamMethodInfo
instance (signature ~ (m Gio.OutputStream.OutputStream), MonadIO m, IsFilterOutputStream a) => O.MethodInfo FilterOutputStreamGetBaseStreamMethodInfo a signature where
overloadedMethod = filterOutputStreamGetBaseStream
#endif
foreign import ccall "g_filter_output_stream_get_close_base_stream" g_filter_output_stream_get_close_base_stream ::
Ptr FilterOutputStream ->
IO CInt
filterOutputStreamGetCloseBaseStream ::
(B.CallStack.HasCallStack, MonadIO m, IsFilterOutputStream a) =>
a
-> m Bool
filterOutputStreamGetCloseBaseStream :: a -> m Bool
filterOutputStreamGetCloseBaseStream stream :: a
stream = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FilterOutputStream
stream' <- a -> IO (Ptr FilterOutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
CInt
result <- Ptr FilterOutputStream -> IO CInt
g_filter_output_stream_get_close_base_stream Ptr FilterOutputStream
stream'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FilterOutputStreamGetCloseBaseStreamMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFilterOutputStream a) => O.MethodInfo FilterOutputStreamGetCloseBaseStreamMethodInfo a signature where
overloadedMethod = filterOutputStreamGetCloseBaseStream
#endif
foreign import ccall "g_filter_output_stream_set_close_base_stream" g_filter_output_stream_set_close_base_stream ::
Ptr FilterOutputStream ->
CInt ->
IO ()
filterOutputStreamSetCloseBaseStream ::
(B.CallStack.HasCallStack, MonadIO m, IsFilterOutputStream a) =>
a
-> Bool
-> m ()
filterOutputStreamSetCloseBaseStream :: a -> Bool -> m ()
filterOutputStreamSetCloseBaseStream stream :: a
stream closeBase :: Bool
closeBase = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FilterOutputStream
stream' <- a -> IO (Ptr FilterOutputStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
let closeBase' :: CInt
closeBase' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
closeBase
Ptr FilterOutputStream -> CInt -> IO ()
g_filter_output_stream_set_close_base_stream Ptr FilterOutputStream
stream' CInt
closeBase'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
stream
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FilterOutputStreamSetCloseBaseStreamMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFilterOutputStream a) => O.MethodInfo FilterOutputStreamSetCloseBaseStreamMethodInfo a signature where
overloadedMethod = filterOutputStreamSetCloseBaseStream
#endif