#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.ConverterOutputStream
(
ConverterOutputStream(..) ,
IsConverterOutputStream ,
toConverterOutputStream ,
noConverterOutputStream ,
#if ENABLE_OVERLOADING
ConverterOutputStreamGetConverterMethodInfo,
#endif
converterOutputStreamGetConverter ,
converterOutputStreamNew ,
#if ENABLE_OVERLOADING
ConverterOutputStreamConverterPropertyInfo,
#endif
constructConverterOutputStreamConverter ,
#if ENABLE_OVERLOADING
converterOutputStreamConverter ,
#endif
getConverterOutputStreamConverter ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Converter as Gio.Converter
import {-# SOURCE #-} qualified GI.Gio.Interfaces.PollableOutputStream as Gio.PollableOutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.FilterOutputStream as Gio.FilterOutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
newtype ConverterOutputStream = ConverterOutputStream (ManagedPtr ConverterOutputStream)
foreign import ccall "g_converter_output_stream_get_type"
c_g_converter_output_stream_get_type :: IO GType
instance GObject ConverterOutputStream where
gobjectType _ = c_g_converter_output_stream_get_type
class GObject o => IsConverterOutputStream o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError ConverterOutputStream a) =>
IsConverterOutputStream a
#endif
instance IsConverterOutputStream ConverterOutputStream
instance Gio.FilterOutputStream.IsFilterOutputStream ConverterOutputStream
instance Gio.OutputStream.IsOutputStream ConverterOutputStream
instance GObject.Object.IsObject ConverterOutputStream
instance Gio.PollableOutputStream.IsPollableOutputStream ConverterOutputStream
toConverterOutputStream :: (MonadIO m, IsConverterOutputStream o) => o -> m ConverterOutputStream
toConverterOutputStream = liftIO . unsafeCastTo ConverterOutputStream
noConverterOutputStream :: Maybe ConverterOutputStream
noConverterOutputStream = Nothing
#if ENABLE_OVERLOADING
type family ResolveConverterOutputStreamMethod (t :: Symbol) (o :: *) :: * where
ResolveConverterOutputStreamMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveConverterOutputStreamMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveConverterOutputStreamMethod "canPoll" o = Gio.PollableOutputStream.PollableOutputStreamCanPollMethodInfo
ResolveConverterOutputStreamMethod "clearPending" o = Gio.OutputStream.OutputStreamClearPendingMethodInfo
ResolveConverterOutputStreamMethod "close" o = Gio.OutputStream.OutputStreamCloseMethodInfo
ResolveConverterOutputStreamMethod "closeAsync" o = Gio.OutputStream.OutputStreamCloseAsyncMethodInfo
ResolveConverterOutputStreamMethod "closeFinish" o = Gio.OutputStream.OutputStreamCloseFinishMethodInfo
ResolveConverterOutputStreamMethod "createSource" o = Gio.PollableOutputStream.PollableOutputStreamCreateSourceMethodInfo
ResolveConverterOutputStreamMethod "flush" o = Gio.OutputStream.OutputStreamFlushMethodInfo
ResolveConverterOutputStreamMethod "flushAsync" o = Gio.OutputStream.OutputStreamFlushAsyncMethodInfo
ResolveConverterOutputStreamMethod "flushFinish" o = Gio.OutputStream.OutputStreamFlushFinishMethodInfo
ResolveConverterOutputStreamMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveConverterOutputStreamMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveConverterOutputStreamMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveConverterOutputStreamMethod "hasPending" o = Gio.OutputStream.OutputStreamHasPendingMethodInfo
ResolveConverterOutputStreamMethod "isClosed" o = Gio.OutputStream.OutputStreamIsClosedMethodInfo
ResolveConverterOutputStreamMethod "isClosing" o = Gio.OutputStream.OutputStreamIsClosingMethodInfo
ResolveConverterOutputStreamMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveConverterOutputStreamMethod "isWritable" o = Gio.PollableOutputStream.PollableOutputStreamIsWritableMethodInfo
ResolveConverterOutputStreamMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveConverterOutputStreamMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveConverterOutputStreamMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveConverterOutputStreamMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveConverterOutputStreamMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveConverterOutputStreamMethod "splice" o = Gio.OutputStream.OutputStreamSpliceMethodInfo
ResolveConverterOutputStreamMethod "spliceAsync" o = Gio.OutputStream.OutputStreamSpliceAsyncMethodInfo
ResolveConverterOutputStreamMethod "spliceFinish" o = Gio.OutputStream.OutputStreamSpliceFinishMethodInfo
ResolveConverterOutputStreamMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveConverterOutputStreamMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveConverterOutputStreamMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveConverterOutputStreamMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveConverterOutputStreamMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveConverterOutputStreamMethod "write" o = Gio.OutputStream.OutputStreamWriteMethodInfo
ResolveConverterOutputStreamMethod "writeAll" o = Gio.OutputStream.OutputStreamWriteAllMethodInfo
ResolveConverterOutputStreamMethod "writeAllAsync" o = Gio.OutputStream.OutputStreamWriteAllAsyncMethodInfo
ResolveConverterOutputStreamMethod "writeAllFinish" o = Gio.OutputStream.OutputStreamWriteAllFinishMethodInfo
ResolveConverterOutputStreamMethod "writeAsync" o = Gio.OutputStream.OutputStreamWriteAsyncMethodInfo
ResolveConverterOutputStreamMethod "writeBytes" o = Gio.OutputStream.OutputStreamWriteBytesMethodInfo
ResolveConverterOutputStreamMethod "writeBytesAsync" o = Gio.OutputStream.OutputStreamWriteBytesAsyncMethodInfo
ResolveConverterOutputStreamMethod "writeBytesFinish" o = Gio.OutputStream.OutputStreamWriteBytesFinishMethodInfo
ResolveConverterOutputStreamMethod "writeFinish" o = Gio.OutputStream.OutputStreamWriteFinishMethodInfo
ResolveConverterOutputStreamMethod "writeNonblocking" o = Gio.PollableOutputStream.PollableOutputStreamWriteNonblockingMethodInfo
ResolveConverterOutputStreamMethod "getBaseStream" o = Gio.FilterOutputStream.FilterOutputStreamGetBaseStreamMethodInfo
ResolveConverterOutputStreamMethod "getCloseBaseStream" o = Gio.FilterOutputStream.FilterOutputStreamGetCloseBaseStreamMethodInfo
ResolveConverterOutputStreamMethod "getConverter" o = ConverterOutputStreamGetConverterMethodInfo
ResolveConverterOutputStreamMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveConverterOutputStreamMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveConverterOutputStreamMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveConverterOutputStreamMethod "setCloseBaseStream" o = Gio.FilterOutputStream.FilterOutputStreamSetCloseBaseStreamMethodInfo
ResolveConverterOutputStreamMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveConverterOutputStreamMethod "setPending" o = Gio.OutputStream.OutputStreamSetPendingMethodInfo
ResolveConverterOutputStreamMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveConverterOutputStreamMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveConverterOutputStreamMethod t ConverterOutputStream, O.MethodInfo info ConverterOutputStream p) => O.IsLabelProxy t (ConverterOutputStream -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveConverterOutputStreamMethod t ConverterOutputStream, O.MethodInfo info ConverterOutputStream p) => O.IsLabel t (ConverterOutputStream -> 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
#endif
getConverterOutputStreamConverter :: (MonadIO m, IsConverterOutputStream o) => o -> m Gio.Converter.Converter
getConverterOutputStreamConverter obj = liftIO $ checkUnexpectedNothing "getConverterOutputStreamConverter" $ getObjectPropertyObject obj "converter" Gio.Converter.Converter
constructConverterOutputStreamConverter :: (IsConverterOutputStream o, Gio.Converter.IsConverter a) => a -> IO (GValueConstruct o)
constructConverterOutputStreamConverter val = constructObjectPropertyObject "converter" (Just val)
#if ENABLE_OVERLOADING
data ConverterOutputStreamConverterPropertyInfo
instance AttrInfo ConverterOutputStreamConverterPropertyInfo where
type AttrAllowedOps ConverterOutputStreamConverterPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ConverterOutputStreamConverterPropertyInfo = Gio.Converter.IsConverter
type AttrBaseTypeConstraint ConverterOutputStreamConverterPropertyInfo = IsConverterOutputStream
type AttrGetType ConverterOutputStreamConverterPropertyInfo = Gio.Converter.Converter
type AttrLabel ConverterOutputStreamConverterPropertyInfo = "converter"
type AttrOrigin ConverterOutputStreamConverterPropertyInfo = ConverterOutputStream
attrGet _ = getConverterOutputStreamConverter
attrSet _ = undefined
attrConstruct _ = constructConverterOutputStreamConverter
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList ConverterOutputStream
type instance O.AttributeList ConverterOutputStream = ConverterOutputStreamAttributeList
type ConverterOutputStreamAttributeList = ('[ '("baseStream", Gio.FilterOutputStream.FilterOutputStreamBaseStreamPropertyInfo), '("closeBaseStream", Gio.FilterOutputStream.FilterOutputStreamCloseBaseStreamPropertyInfo), '("converter", ConverterOutputStreamConverterPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
converterOutputStreamConverter :: AttrLabelProxy "converter"
converterOutputStreamConverter = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList ConverterOutputStream = ConverterOutputStreamSignalList
type ConverterOutputStreamSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_converter_output_stream_new" g_converter_output_stream_new ::
Ptr Gio.OutputStream.OutputStream ->
Ptr Gio.Converter.Converter ->
IO (Ptr ConverterOutputStream)
converterOutputStreamNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.OutputStream.IsOutputStream a, Gio.Converter.IsConverter b) =>
a
-> b
-> m ConverterOutputStream
converterOutputStreamNew baseStream converter = liftIO $ do
baseStream' <- unsafeManagedPtrCastPtr baseStream
converter' <- unsafeManagedPtrCastPtr converter
result <- g_converter_output_stream_new baseStream' converter'
checkUnexpectedReturnNULL "converterOutputStreamNew" result
result' <- (wrapObject ConverterOutputStream) result
touchManagedPtr baseStream
touchManagedPtr converter
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_converter_output_stream_get_converter" g_converter_output_stream_get_converter ::
Ptr ConverterOutputStream ->
IO (Ptr Gio.Converter.Converter)
converterOutputStreamGetConverter ::
(B.CallStack.HasCallStack, MonadIO m, IsConverterOutputStream a) =>
a
-> m Gio.Converter.Converter
converterOutputStreamGetConverter converterStream = liftIO $ do
converterStream' <- unsafeManagedPtrCastPtr converterStream
result <- g_converter_output_stream_get_converter converterStream'
checkUnexpectedReturnNULL "converterOutputStreamGetConverter" result
result' <- (newObject Gio.Converter.Converter) result
touchManagedPtr converterStream
return result'
#if ENABLE_OVERLOADING
data ConverterOutputStreamGetConverterMethodInfo
instance (signature ~ (m Gio.Converter.Converter), MonadIO m, IsConverterOutputStream a) => O.MethodInfo ConverterOutputStreamGetConverterMethodInfo a signature where
overloadedMethod _ = converterOutputStreamGetConverter
#endif