#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.DataOutputStream
(
DataOutputStream(..) ,
IsDataOutputStream ,
toDataOutputStream ,
noDataOutputStream ,
#if ENABLE_OVERLOADING
DataOutputStreamGetByteOrderMethodInfo ,
#endif
dataOutputStreamGetByteOrder ,
dataOutputStreamNew ,
#if ENABLE_OVERLOADING
DataOutputStreamPutByteMethodInfo ,
#endif
dataOutputStreamPutByte ,
#if ENABLE_OVERLOADING
DataOutputStreamPutInt16MethodInfo ,
#endif
dataOutputStreamPutInt16 ,
#if ENABLE_OVERLOADING
DataOutputStreamPutInt32MethodInfo ,
#endif
dataOutputStreamPutInt32 ,
#if ENABLE_OVERLOADING
DataOutputStreamPutInt64MethodInfo ,
#endif
dataOutputStreamPutInt64 ,
#if ENABLE_OVERLOADING
DataOutputStreamPutStringMethodInfo ,
#endif
dataOutputStreamPutString ,
#if ENABLE_OVERLOADING
DataOutputStreamPutUint16MethodInfo ,
#endif
dataOutputStreamPutUint16 ,
#if ENABLE_OVERLOADING
DataOutputStreamPutUint32MethodInfo ,
#endif
dataOutputStreamPutUint32 ,
#if ENABLE_OVERLOADING
DataOutputStreamPutUint64MethodInfo ,
#endif
dataOutputStreamPutUint64 ,
#if ENABLE_OVERLOADING
DataOutputStreamSetByteOrderMethodInfo ,
#endif
dataOutputStreamSetByteOrder ,
#if ENABLE_OVERLOADING
DataOutputStreamByteOrderPropertyInfo ,
#endif
constructDataOutputStreamByteOrder ,
#if ENABLE_OVERLOADING
dataOutputStreamByteOrder ,
#endif
getDataOutputStreamByteOrder ,
setDataOutputStreamByteOrder ,
) 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.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.Enums as Gio.Enums
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.FilterOutputStream as Gio.FilterOutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
newtype DataOutputStream = DataOutputStream (ManagedPtr DataOutputStream)
foreign import ccall "g_data_output_stream_get_type"
c_g_data_output_stream_get_type :: IO GType
instance GObject DataOutputStream where
gobjectType = c_g_data_output_stream_get_type
class (GObject o, O.IsDescendantOf DataOutputStream o) => IsDataOutputStream o
instance (GObject o, O.IsDescendantOf DataOutputStream o) => IsDataOutputStream o
instance O.HasParentTypes DataOutputStream
type instance O.ParentTypes DataOutputStream = '[Gio.FilterOutputStream.FilterOutputStream, Gio.OutputStream.OutputStream, GObject.Object.Object, Gio.Seekable.Seekable]
toDataOutputStream :: (MonadIO m, IsDataOutputStream o) => o -> m DataOutputStream
toDataOutputStream = liftIO . unsafeCastTo DataOutputStream
noDataOutputStream :: Maybe DataOutputStream
noDataOutputStream = Nothing
#if ENABLE_OVERLOADING
type family ResolveDataOutputStreamMethod (t :: Symbol) (o :: *) :: * where
ResolveDataOutputStreamMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDataOutputStreamMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDataOutputStreamMethod "canSeek" o = Gio.Seekable.SeekableCanSeekMethodInfo
ResolveDataOutputStreamMethod "canTruncate" o = Gio.Seekable.SeekableCanTruncateMethodInfo
ResolveDataOutputStreamMethod "clearPending" o = Gio.OutputStream.OutputStreamClearPendingMethodInfo
ResolveDataOutputStreamMethod "close" o = Gio.OutputStream.OutputStreamCloseMethodInfo
ResolveDataOutputStreamMethod "closeAsync" o = Gio.OutputStream.OutputStreamCloseAsyncMethodInfo
ResolveDataOutputStreamMethod "closeFinish" o = Gio.OutputStream.OutputStreamCloseFinishMethodInfo
ResolveDataOutputStreamMethod "flush" o = Gio.OutputStream.OutputStreamFlushMethodInfo
ResolveDataOutputStreamMethod "flushAsync" o = Gio.OutputStream.OutputStreamFlushAsyncMethodInfo
ResolveDataOutputStreamMethod "flushFinish" o = Gio.OutputStream.OutputStreamFlushFinishMethodInfo
ResolveDataOutputStreamMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDataOutputStreamMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDataOutputStreamMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDataOutputStreamMethod "hasPending" o = Gio.OutputStream.OutputStreamHasPendingMethodInfo
ResolveDataOutputStreamMethod "isClosed" o = Gio.OutputStream.OutputStreamIsClosedMethodInfo
ResolveDataOutputStreamMethod "isClosing" o = Gio.OutputStream.OutputStreamIsClosingMethodInfo
ResolveDataOutputStreamMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDataOutputStreamMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDataOutputStreamMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDataOutputStreamMethod "putByte" o = DataOutputStreamPutByteMethodInfo
ResolveDataOutputStreamMethod "putInt16" o = DataOutputStreamPutInt16MethodInfo
ResolveDataOutputStreamMethod "putInt32" o = DataOutputStreamPutInt32MethodInfo
ResolveDataOutputStreamMethod "putInt64" o = DataOutputStreamPutInt64MethodInfo
ResolveDataOutputStreamMethod "putString" o = DataOutputStreamPutStringMethodInfo
ResolveDataOutputStreamMethod "putUint16" o = DataOutputStreamPutUint16MethodInfo
ResolveDataOutputStreamMethod "putUint32" o = DataOutputStreamPutUint32MethodInfo
ResolveDataOutputStreamMethod "putUint64" o = DataOutputStreamPutUint64MethodInfo
ResolveDataOutputStreamMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDataOutputStreamMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDataOutputStreamMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDataOutputStreamMethod "seek" o = Gio.Seekable.SeekableSeekMethodInfo
ResolveDataOutputStreamMethod "splice" o = Gio.OutputStream.OutputStreamSpliceMethodInfo
ResolveDataOutputStreamMethod "spliceAsync" o = Gio.OutputStream.OutputStreamSpliceAsyncMethodInfo
ResolveDataOutputStreamMethod "spliceFinish" o = Gio.OutputStream.OutputStreamSpliceFinishMethodInfo
ResolveDataOutputStreamMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDataOutputStreamMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDataOutputStreamMethod "tell" o = Gio.Seekable.SeekableTellMethodInfo
ResolveDataOutputStreamMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDataOutputStreamMethod "truncate" o = Gio.Seekable.SeekableTruncateMethodInfo
ResolveDataOutputStreamMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDataOutputStreamMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDataOutputStreamMethod "write" o = Gio.OutputStream.OutputStreamWriteMethodInfo
ResolveDataOutputStreamMethod "writeAll" o = Gio.OutputStream.OutputStreamWriteAllMethodInfo
ResolveDataOutputStreamMethod "writeAllAsync" o = Gio.OutputStream.OutputStreamWriteAllAsyncMethodInfo
ResolveDataOutputStreamMethod "writeAllFinish" o = Gio.OutputStream.OutputStreamWriteAllFinishMethodInfo
ResolveDataOutputStreamMethod "writeAsync" o = Gio.OutputStream.OutputStreamWriteAsyncMethodInfo
ResolveDataOutputStreamMethod "writeBytes" o = Gio.OutputStream.OutputStreamWriteBytesMethodInfo
ResolveDataOutputStreamMethod "writeBytesAsync" o = Gio.OutputStream.OutputStreamWriteBytesAsyncMethodInfo
ResolveDataOutputStreamMethod "writeBytesFinish" o = Gio.OutputStream.OutputStreamWriteBytesFinishMethodInfo
ResolveDataOutputStreamMethod "writeFinish" o = Gio.OutputStream.OutputStreamWriteFinishMethodInfo
ResolveDataOutputStreamMethod "writev" o = Gio.OutputStream.OutputStreamWritevMethodInfo
ResolveDataOutputStreamMethod "writevAll" o = Gio.OutputStream.OutputStreamWritevAllMethodInfo
ResolveDataOutputStreamMethod "writevAllAsync" o = Gio.OutputStream.OutputStreamWritevAllAsyncMethodInfo
ResolveDataOutputStreamMethod "writevAllFinish" o = Gio.OutputStream.OutputStreamWritevAllFinishMethodInfo
ResolveDataOutputStreamMethod "writevAsync" o = Gio.OutputStream.OutputStreamWritevAsyncMethodInfo
ResolveDataOutputStreamMethod "writevFinish" o = Gio.OutputStream.OutputStreamWritevFinishMethodInfo
ResolveDataOutputStreamMethod "getBaseStream" o = Gio.FilterOutputStream.FilterOutputStreamGetBaseStreamMethodInfo
ResolveDataOutputStreamMethod "getByteOrder" o = DataOutputStreamGetByteOrderMethodInfo
ResolveDataOutputStreamMethod "getCloseBaseStream" o = Gio.FilterOutputStream.FilterOutputStreamGetCloseBaseStreamMethodInfo
ResolveDataOutputStreamMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDataOutputStreamMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDataOutputStreamMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDataOutputStreamMethod "setByteOrder" o = DataOutputStreamSetByteOrderMethodInfo
ResolveDataOutputStreamMethod "setCloseBaseStream" o = Gio.FilterOutputStream.FilterOutputStreamSetCloseBaseStreamMethodInfo
ResolveDataOutputStreamMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDataOutputStreamMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDataOutputStreamMethod "setPending" o = Gio.OutputStream.OutputStreamSetPendingMethodInfo
ResolveDataOutputStreamMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDataOutputStreamMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDataOutputStreamMethod t DataOutputStream, O.MethodInfo info DataOutputStream p) => OL.IsLabel t (DataOutputStream -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
getDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> m Gio.Enums.DataStreamByteOrder
getDataOutputStreamByteOrder obj = liftIO $ B.Properties.getObjectPropertyEnum obj "byte-order"
setDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> Gio.Enums.DataStreamByteOrder -> m ()
setDataOutputStreamByteOrder obj val = liftIO $ B.Properties.setObjectPropertyEnum obj "byte-order" val
constructDataOutputStreamByteOrder :: (IsDataOutputStream o) => Gio.Enums.DataStreamByteOrder -> IO (GValueConstruct o)
constructDataOutputStreamByteOrder val = B.Properties.constructObjectPropertyEnum "byte-order" val
#if ENABLE_OVERLOADING
data DataOutputStreamByteOrderPropertyInfo
instance AttrInfo DataOutputStreamByteOrderPropertyInfo where
type AttrAllowedOps DataOutputStreamByteOrderPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DataOutputStreamByteOrderPropertyInfo = (~) Gio.Enums.DataStreamByteOrder
type AttrBaseTypeConstraint DataOutputStreamByteOrderPropertyInfo = IsDataOutputStream
type AttrGetType DataOutputStreamByteOrderPropertyInfo = Gio.Enums.DataStreamByteOrder
type AttrLabel DataOutputStreamByteOrderPropertyInfo = "byte-order"
type AttrOrigin DataOutputStreamByteOrderPropertyInfo = DataOutputStream
attrGet _ = getDataOutputStreamByteOrder
attrSet _ = setDataOutputStreamByteOrder
attrConstruct _ = constructDataOutputStreamByteOrder
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList DataOutputStream
type instance O.AttributeList DataOutputStream = DataOutputStreamAttributeList
type DataOutputStreamAttributeList = ('[ '("baseStream", Gio.FilterOutputStream.FilterOutputStreamBaseStreamPropertyInfo), '("byteOrder", DataOutputStreamByteOrderPropertyInfo), '("closeBaseStream", Gio.FilterOutputStream.FilterOutputStreamCloseBaseStreamPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
dataOutputStreamByteOrder :: AttrLabelProxy "byteOrder"
dataOutputStreamByteOrder = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList DataOutputStream = DataOutputStreamSignalList
type DataOutputStreamSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_data_output_stream_new" g_data_output_stream_new ::
Ptr Gio.OutputStream.OutputStream ->
IO (Ptr DataOutputStream)
dataOutputStreamNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.OutputStream.IsOutputStream a) =>
a
-> m DataOutputStream
dataOutputStreamNew baseStream = liftIO $ do
baseStream' <- unsafeManagedPtrCastPtr baseStream
result <- g_data_output_stream_new baseStream'
checkUnexpectedReturnNULL "dataOutputStreamNew" result
result' <- (wrapObject DataOutputStream) result
touchManagedPtr baseStream
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_data_output_stream_get_byte_order" g_data_output_stream_get_byte_order ::
Ptr DataOutputStream ->
IO CUInt
dataOutputStreamGetByteOrder ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a) =>
a
-> m Gio.Enums.DataStreamByteOrder
dataOutputStreamGetByteOrder stream = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
result <- g_data_output_stream_get_byte_order stream'
let result' = (toEnum . fromIntegral) result
touchManagedPtr stream
return result'
#if ENABLE_OVERLOADING
data DataOutputStreamGetByteOrderMethodInfo
instance (signature ~ (m Gio.Enums.DataStreamByteOrder), MonadIO m, IsDataOutputStream a) => O.MethodInfo DataOutputStreamGetByteOrderMethodInfo a signature where
overloadedMethod _ = dataOutputStreamGetByteOrder
#endif
foreign import ccall "g_data_output_stream_put_byte" g_data_output_stream_put_byte ::
Ptr DataOutputStream ->
Word8 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dataOutputStreamPutByte ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Word8
-> Maybe (b)
-> m ()
dataOutputStreamPutByte stream data_ cancellable = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_data_output_stream_put_byte stream' data_ maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data DataOutputStreamPutByteMethodInfo
instance (signature ~ (Word8 -> Maybe (b) -> m ()), MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) => O.MethodInfo DataOutputStreamPutByteMethodInfo a signature where
overloadedMethod _ = dataOutputStreamPutByte
#endif
foreign import ccall "g_data_output_stream_put_int16" g_data_output_stream_put_int16 ::
Ptr DataOutputStream ->
Int16 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dataOutputStreamPutInt16 ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Int16
-> Maybe (b)
-> m ()
dataOutputStreamPutInt16 stream data_ cancellable = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_data_output_stream_put_int16 stream' data_ maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data DataOutputStreamPutInt16MethodInfo
instance (signature ~ (Int16 -> Maybe (b) -> m ()), MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) => O.MethodInfo DataOutputStreamPutInt16MethodInfo a signature where
overloadedMethod _ = dataOutputStreamPutInt16
#endif
foreign import ccall "g_data_output_stream_put_int32" g_data_output_stream_put_int32 ::
Ptr DataOutputStream ->
Int32 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dataOutputStreamPutInt32 ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Int32
-> Maybe (b)
-> m ()
dataOutputStreamPutInt32 stream data_ cancellable = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_data_output_stream_put_int32 stream' data_ maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data DataOutputStreamPutInt32MethodInfo
instance (signature ~ (Int32 -> Maybe (b) -> m ()), MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) => O.MethodInfo DataOutputStreamPutInt32MethodInfo a signature where
overloadedMethod _ = dataOutputStreamPutInt32
#endif
foreign import ccall "g_data_output_stream_put_int64" g_data_output_stream_put_int64 ::
Ptr DataOutputStream ->
Int64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dataOutputStreamPutInt64 ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Int64
-> Maybe (b)
-> m ()
dataOutputStreamPutInt64 stream data_ cancellable = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_data_output_stream_put_int64 stream' data_ maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data DataOutputStreamPutInt64MethodInfo
instance (signature ~ (Int64 -> Maybe (b) -> m ()), MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) => O.MethodInfo DataOutputStreamPutInt64MethodInfo a signature where
overloadedMethod _ = dataOutputStreamPutInt64
#endif
foreign import ccall "g_data_output_stream_put_string" g_data_output_stream_put_string ::
Ptr DataOutputStream ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dataOutputStreamPutString ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> m ()
dataOutputStreamPutString stream str cancellable = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
str' <- textToCString str
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_data_output_stream_put_string stream' str' maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
freeMem str'
return ()
) (do
freeMem str'
)
#if ENABLE_OVERLOADING
data DataOutputStreamPutStringMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m ()), MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) => O.MethodInfo DataOutputStreamPutStringMethodInfo a signature where
overloadedMethod _ = dataOutputStreamPutString
#endif
foreign import ccall "g_data_output_stream_put_uint16" g_data_output_stream_put_uint16 ::
Ptr DataOutputStream ->
Word16 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dataOutputStreamPutUint16 ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Word16
-> Maybe (b)
-> m ()
dataOutputStreamPutUint16 stream data_ cancellable = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_data_output_stream_put_uint16 stream' data_ maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data DataOutputStreamPutUint16MethodInfo
instance (signature ~ (Word16 -> Maybe (b) -> m ()), MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) => O.MethodInfo DataOutputStreamPutUint16MethodInfo a signature where
overloadedMethod _ = dataOutputStreamPutUint16
#endif
foreign import ccall "g_data_output_stream_put_uint32" g_data_output_stream_put_uint32 ::
Ptr DataOutputStream ->
Word32 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dataOutputStreamPutUint32 ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Word32
-> Maybe (b)
-> m ()
dataOutputStreamPutUint32 stream data_ cancellable = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_data_output_stream_put_uint32 stream' data_ maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data DataOutputStreamPutUint32MethodInfo
instance (signature ~ (Word32 -> Maybe (b) -> m ()), MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) => O.MethodInfo DataOutputStreamPutUint32MethodInfo a signature where
overloadedMethod _ = dataOutputStreamPutUint32
#endif
foreign import ccall "g_data_output_stream_put_uint64" g_data_output_stream_put_uint64 ::
Ptr DataOutputStream ->
Word64 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dataOutputStreamPutUint64 ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) =>
a
-> Word64
-> Maybe (b)
-> m ()
dataOutputStreamPutUint64 stream data_ cancellable = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
maybeCancellable <- case cancellable of
Nothing -> return nullPtr
Just jCancellable -> do
jCancellable' <- unsafeManagedPtrCastPtr jCancellable
return jCancellable'
onException (do
_ <- propagateGError $ g_data_output_stream_put_uint64 stream' data_ maybeCancellable
touchManagedPtr stream
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if ENABLE_OVERLOADING
data DataOutputStreamPutUint64MethodInfo
instance (signature ~ (Word64 -> Maybe (b) -> m ()), MonadIO m, IsDataOutputStream a, Gio.Cancellable.IsCancellable b) => O.MethodInfo DataOutputStreamPutUint64MethodInfo a signature where
overloadedMethod _ = dataOutputStreamPutUint64
#endif
foreign import ccall "g_data_output_stream_set_byte_order" g_data_output_stream_set_byte_order ::
Ptr DataOutputStream ->
CUInt ->
IO ()
dataOutputStreamSetByteOrder ::
(B.CallStack.HasCallStack, MonadIO m, IsDataOutputStream a) =>
a
-> Gio.Enums.DataStreamByteOrder
-> m ()
dataOutputStreamSetByteOrder stream order = liftIO $ do
stream' <- unsafeManagedPtrCastPtr stream
let order' = (fromIntegral . fromEnum) order
g_data_output_stream_set_byte_order stream' order'
touchManagedPtr stream
return ()
#if ENABLE_OVERLOADING
data DataOutputStreamSetByteOrderMethodInfo
instance (signature ~ (Gio.Enums.DataStreamByteOrder -> m ()), MonadIO m, IsDataOutputStream a) => O.MethodInfo DataOutputStreamSetByteOrderMethodInfo a signature where
overloadedMethod _ = dataOutputStreamSetByteOrder
#endif