#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.ZlibDecompressor
(
ZlibDecompressor(..) ,
IsZlibDecompressor ,
toZlibDecompressor ,
noZlibDecompressor ,
#if ENABLE_OVERLOADING
ZlibDecompressorGetFileInfoMethodInfo ,
#endif
zlibDecompressorGetFileInfo ,
zlibDecompressorNew ,
#if ENABLE_OVERLOADING
ZlibDecompressorFileInfoPropertyInfo ,
#endif
getZlibDecompressorFileInfo ,
#if ENABLE_OVERLOADING
zlibDecompressorFileInfo ,
#endif
#if ENABLE_OVERLOADING
ZlibDecompressorFormatPropertyInfo ,
#endif
constructZlibDecompressorFormat ,
getZlibDecompressorFormat ,
#if ENABLE_OVERLOADING
zlibDecompressorFormat ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.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.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Converter as Gio.Converter
import {-# SOURCE #-} qualified GI.Gio.Objects.FileInfo as Gio.FileInfo
newtype ZlibDecompressor = ZlibDecompressor (ManagedPtr ZlibDecompressor)
foreign import ccall "g_zlib_decompressor_get_type"
c_g_zlib_decompressor_get_type :: IO GType
instance GObject ZlibDecompressor where
gobjectType _ = c_g_zlib_decompressor_get_type
class GObject o => IsZlibDecompressor o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError ZlibDecompressor a) =>
IsZlibDecompressor a
#endif
instance IsZlibDecompressor ZlibDecompressor
instance GObject.Object.IsObject ZlibDecompressor
instance Gio.Converter.IsConverter ZlibDecompressor
toZlibDecompressor :: (MonadIO m, IsZlibDecompressor o) => o -> m ZlibDecompressor
toZlibDecompressor = liftIO . unsafeCastTo ZlibDecompressor
noZlibDecompressor :: Maybe ZlibDecompressor
noZlibDecompressor = Nothing
#if ENABLE_OVERLOADING
type family ResolveZlibDecompressorMethod (t :: Symbol) (o :: *) :: * where
ResolveZlibDecompressorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveZlibDecompressorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveZlibDecompressorMethod "convert" o = Gio.Converter.ConverterConvertMethodInfo
ResolveZlibDecompressorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveZlibDecompressorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveZlibDecompressorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveZlibDecompressorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveZlibDecompressorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveZlibDecompressorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveZlibDecompressorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveZlibDecompressorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveZlibDecompressorMethod "reset" o = Gio.Converter.ConverterResetMethodInfo
ResolveZlibDecompressorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveZlibDecompressorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveZlibDecompressorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveZlibDecompressorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveZlibDecompressorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveZlibDecompressorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveZlibDecompressorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveZlibDecompressorMethod "getFileInfo" o = ZlibDecompressorGetFileInfoMethodInfo
ResolveZlibDecompressorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveZlibDecompressorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveZlibDecompressorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveZlibDecompressorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveZlibDecompressorMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveZlibDecompressorMethod t ZlibDecompressor, O.MethodInfo info ZlibDecompressor p) => O.IsLabelProxy t (ZlibDecompressor -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveZlibDecompressorMethod t ZlibDecompressor, O.MethodInfo info ZlibDecompressor p) => O.IsLabel t (ZlibDecompressor -> 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
getZlibDecompressorFileInfo :: (MonadIO m, IsZlibDecompressor o) => o -> m Gio.FileInfo.FileInfo
getZlibDecompressorFileInfo obj = liftIO $ checkUnexpectedNothing "getZlibDecompressorFileInfo" $ getObjectPropertyObject obj "file-info" Gio.FileInfo.FileInfo
#if ENABLE_OVERLOADING
data ZlibDecompressorFileInfoPropertyInfo
instance AttrInfo ZlibDecompressorFileInfoPropertyInfo where
type AttrAllowedOps ZlibDecompressorFileInfoPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ZlibDecompressorFileInfoPropertyInfo = (~) ()
type AttrBaseTypeConstraint ZlibDecompressorFileInfoPropertyInfo = IsZlibDecompressor
type AttrGetType ZlibDecompressorFileInfoPropertyInfo = Gio.FileInfo.FileInfo
type AttrLabel ZlibDecompressorFileInfoPropertyInfo = "file-info"
type AttrOrigin ZlibDecompressorFileInfoPropertyInfo = ZlibDecompressor
attrGet _ = getZlibDecompressorFileInfo
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getZlibDecompressorFormat :: (MonadIO m, IsZlibDecompressor o) => o -> m Gio.Enums.ZlibCompressorFormat
getZlibDecompressorFormat obj = liftIO $ getObjectPropertyEnum obj "format"
constructZlibDecompressorFormat :: (IsZlibDecompressor o) => Gio.Enums.ZlibCompressorFormat -> IO (GValueConstruct o)
constructZlibDecompressorFormat val = constructObjectPropertyEnum "format" val
#if ENABLE_OVERLOADING
data ZlibDecompressorFormatPropertyInfo
instance AttrInfo ZlibDecompressorFormatPropertyInfo where
type AttrAllowedOps ZlibDecompressorFormatPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ZlibDecompressorFormatPropertyInfo = (~) Gio.Enums.ZlibCompressorFormat
type AttrBaseTypeConstraint ZlibDecompressorFormatPropertyInfo = IsZlibDecompressor
type AttrGetType ZlibDecompressorFormatPropertyInfo = Gio.Enums.ZlibCompressorFormat
type AttrLabel ZlibDecompressorFormatPropertyInfo = "format"
type AttrOrigin ZlibDecompressorFormatPropertyInfo = ZlibDecompressor
attrGet _ = getZlibDecompressorFormat
attrSet _ = undefined
attrConstruct _ = constructZlibDecompressorFormat
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList ZlibDecompressor
type instance O.AttributeList ZlibDecompressor = ZlibDecompressorAttributeList
type ZlibDecompressorAttributeList = ('[ '("fileInfo", ZlibDecompressorFileInfoPropertyInfo), '("format", ZlibDecompressorFormatPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
zlibDecompressorFileInfo :: AttrLabelProxy "fileInfo"
zlibDecompressorFileInfo = AttrLabelProxy
zlibDecompressorFormat :: AttrLabelProxy "format"
zlibDecompressorFormat = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList ZlibDecompressor = ZlibDecompressorSignalList
type ZlibDecompressorSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_zlib_decompressor_new" g_zlib_decompressor_new ::
CUInt ->
IO (Ptr ZlibDecompressor)
zlibDecompressorNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gio.Enums.ZlibCompressorFormat
-> m ZlibDecompressor
zlibDecompressorNew format = liftIO $ do
let format' = (fromIntegral . fromEnum) format
result <- g_zlib_decompressor_new format'
checkUnexpectedReturnNULL "zlibDecompressorNew" result
result' <- (wrapObject ZlibDecompressor) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_zlib_decompressor_get_file_info" g_zlib_decompressor_get_file_info ::
Ptr ZlibDecompressor ->
IO (Ptr Gio.FileInfo.FileInfo)
zlibDecompressorGetFileInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsZlibDecompressor a) =>
a
-> m Gio.FileInfo.FileInfo
zlibDecompressorGetFileInfo decompressor = liftIO $ do
decompressor' <- unsafeManagedPtrCastPtr decompressor
result <- g_zlib_decompressor_get_file_info decompressor'
checkUnexpectedReturnNULL "zlibDecompressorGetFileInfo" result
result' <- (newObject Gio.FileInfo.FileInfo) result
touchManagedPtr decompressor
return result'
#if ENABLE_OVERLOADING
data ZlibDecompressorGetFileInfoMethodInfo
instance (signature ~ (m Gio.FileInfo.FileInfo), MonadIO m, IsZlibDecompressor a) => O.MethodInfo ZlibDecompressorGetFileInfoMethodInfo a signature where
overloadedMethod _ = zlibDecompressorGetFileInfo
#endif