gi-gobject 0.2.46.14 → 0.2.46.15
raw patch · 51 files changed
+198/−53 lines, 51 filesdep ~gi-glibdep ~haskell-gi-basePVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: gi-glib, haskell-gi-base
API changes (from Hackage documentation)
+ GI.GObject.Structs.CClosure: instance WrappedPtr CClosure
+ GI.GObject.Structs.ClosureNotifyData: instance WrappedPtr ClosureNotifyData
+ GI.GObject.Structs.EnumClass: instance WrappedPtr EnumClass
+ GI.GObject.Structs.EnumValue: instance WrappedPtr EnumValue
+ GI.GObject.Structs.FlagsClass: instance WrappedPtr FlagsClass
+ GI.GObject.Structs.FlagsValue: instance WrappedPtr FlagsValue
+ GI.GObject.Structs.InterfaceInfo: instance WrappedPtr InterfaceInfo
+ GI.GObject.Structs.ObjectConstructParam: instance WrappedPtr ObjectConstructParam
+ GI.GObject.Structs.ParamSpecPool: instance WrappedPtr ParamSpecPool
+ GI.GObject.Structs.ParamSpecTypeInfo: instance WrappedPtr ParamSpecTypeInfo
+ GI.GObject.Structs.Parameter: instance WrappedPtr Parameter
+ GI.GObject.Structs.SignalInvocationHint: instance WrappedPtr SignalInvocationHint
+ GI.GObject.Structs.SignalQuery: instance WrappedPtr SignalQuery
+ GI.GObject.Structs.TypeClass: instance WrappedPtr TypeClass
+ GI.GObject.Structs.TypeFundamentalInfo: instance WrappedPtr TypeFundamentalInfo
+ GI.GObject.Structs.TypeInfo: instance WrappedPtr TypeInfo
+ GI.GObject.Structs.TypeInstance: instance WrappedPtr TypeInstance
+ GI.GObject.Structs.TypeInterface: instance WrappedPtr TypeInterface
+ GI.GObject.Structs.TypePluginClass: instance WrappedPtr TypePluginClass
+ GI.GObject.Structs.TypeQuery: instance WrappedPtr TypeQuery
+ GI.GObject.Structs.TypeValueTable: instance WrappedPtr TypeValueTable
+ GI.GObject.Structs.WeakRef: instance WrappedPtr WeakRef
+ GI.GObject.Unions.TypeCValue: instance WrappedPtr TypeCValue
+ GI.GObject.Unions.Value_Data_Union_: instance WrappedPtr Value_Data_Union_
Files
- GI/GObject/Callbacks.hs +6/−6
- GI/GObject/Functions.hs +9/−9
- GI/GObject/Structs/CClosure.hs +6/−1
- GI/GObject/Structs/CClosure.hs-boot +1/−0
- GI/GObject/Structs/ClosureNotifyData.hs +6/−1
- GI/GObject/Structs/ClosureNotifyData.hs-boot +1/−0
- GI/GObject/Structs/EnumClass.hs +8/−3
- GI/GObject/Structs/EnumClass.hs-boot +1/−0
- GI/GObject/Structs/EnumValue.hs +6/−1
- GI/GObject/Structs/EnumValue.hs-boot +1/−0
- GI/GObject/Structs/FlagsClass.hs +8/−3
- GI/GObject/Structs/FlagsClass.hs-boot +1/−0
- GI/GObject/Structs/FlagsValue.hs +6/−1
- GI/GObject/Structs/FlagsValue.hs-boot +1/−0
- GI/GObject/Structs/InterfaceInfo.hs +6/−1
- GI/GObject/Structs/InterfaceInfo.hs-boot +1/−0
- GI/GObject/Structs/ObjectConstructParam.hs +6/−1
- GI/GObject/Structs/ObjectConstructParam.hs-boot +1/−0
- GI/GObject/Structs/ParamSpecPool.hs +7/−2
- GI/GObject/Structs/ParamSpecPool.hs-boot +1/−0
- GI/GObject/Structs/ParamSpecTypeInfo.hs +6/−1
- GI/GObject/Structs/ParamSpecTypeInfo.hs-boot +1/−0
- GI/GObject/Structs/Parameter.hs +6/−1
- GI/GObject/Structs/Parameter.hs-boot +1/−0
- GI/GObject/Structs/SignalInvocationHint.hs +6/−1
- GI/GObject/Structs/SignalInvocationHint.hs-boot +1/−0
- GI/GObject/Structs/SignalQuery.hs +6/−1
- GI/GObject/Structs/SignalQuery.hs-boot +1/−0
- GI/GObject/Structs/TypeClass.hs +10/−5
- GI/GObject/Structs/TypeClass.hs-boot +1/−0
- GI/GObject/Structs/TypeFundamentalInfo.hs +6/−1
- GI/GObject/Structs/TypeFundamentalInfo.hs-boot +1/−0
- GI/GObject/Structs/TypeInfo.hs +7/−2
- GI/GObject/Structs/TypeInfo.hs-boot +1/−0
- GI/GObject/Structs/TypeInstance.hs +6/−1
- GI/GObject/Structs/TypeInstance.hs-boot +1/−0
- GI/GObject/Structs/TypeInterface.hs +8/−3
- GI/GObject/Structs/TypeInterface.hs-boot +1/−0
- GI/GObject/Structs/TypePluginClass.hs +6/−1
- GI/GObject/Structs/TypePluginClass.hs-boot +1/−0
- GI/GObject/Structs/TypeQuery.hs +6/−1
- GI/GObject/Structs/TypeQuery.hs-boot +1/−0
- GI/GObject/Structs/TypeValueTable.hs +6/−1
- GI/GObject/Structs/TypeValueTable.hs-boot +1/−0
- GI/GObject/Structs/WeakRef.hs +6/−0
- GI/GObject/Structs/WeakRef.hs-boot +1/−0
- GI/GObject/Unions/TypeCValue.hs +6/−1
- GI/GObject/Unions/TypeCValue.hs-boot +1/−0
- GI/GObject/Unions/Value_Data_Union_.hs +6/−1
- GI/GObject/Unions/Value_Data_Union_.hs-boot +1/−0
- gi-gobject.cabal +3/−3
GI/GObject/Callbacks.hs view
@@ -503,7 +503,7 @@ IO CString typeValueTableLcopyValueFieldCallbackWrapper funptrptr _cb value nCollectValues collectValues collectFlags = do value' <- (newBoxed GValue) value- collectValues' <- (newPtr 8 TypeCValue) collectValues+ collectValues' <- (newPtr TypeCValue) collectValues result <- _cb value' nCollectValues collectValues' collectFlags maybeReleaseFunPtr funptrptr result' <- textToCString result@@ -544,7 +544,7 @@ IO CString typeValueTableCollectValueFieldCallbackWrapper funptrptr _cb value nCollectValues collectValues collectFlags = do value' <- (newBoxed GValue) value- collectValues' <- (newPtr 8 TypeCValue) collectValues+ collectValues' <- (newPtr TypeCValue) collectValues result <- _cb value' nCollectValues collectValues' collectFlags maybeReleaseFunPtr funptrptr result' <- textToCString result@@ -621,7 +621,7 @@ Ptr TypeClass -> IO CInt typeClassCacheFuncWrapper funptrptr _cb cacheData gClass = do- gClass' <- (newPtr 8 TypeClass) gClass+ gClass' <- (newPtr TypeClass) gClass result <- _cb cacheData gClass' maybeReleaseFunPtr funptrptr let result' = (fromIntegral . fromEnum) result@@ -696,7 +696,7 @@ Ptr () -> IO CInt signalEmissionHookWrapper funptrptr _cb ihint nParamValues paramValues data_ = do- ihint' <- (newPtr 12 SignalInvocationHint) ihint+ ihint' <- (newPtr SignalInvocationHint) ihint paramValues' <- (unpackBoxedArrayWithLength 24 nParamValues) paramValues paramValues'' <- mapM (newBoxed GValue) paramValues' result <- _cb ihint' paramValues'' data_@@ -738,7 +738,7 @@ Ptr () -> IO CInt signalAccumulatorWrapper funptrptr _cb ihint returnAccu handlerReturn data_ = do- ihint' <- (newPtr 12 SignalInvocationHint) ihint+ ihint' <- (newPtr SignalInvocationHint) ihint returnAccu' <- (newBoxed GValue) returnAccu handlerReturn' <- (newBoxed GValue) handlerReturn result <- _cb ihint' returnAccu' handlerReturn' data_@@ -1109,7 +1109,7 @@ Ptr () -> IO () instanceInitFuncWrapper funptrptr _cb instance_ gClass = do- instance_' <- (newPtr 8 TypeInstance) instance_+ instance_' <- (newPtr TypeInstance) instance_ _cb instance_' gClass maybeReleaseFunPtr funptrptr
GI/GObject/Functions.hs view
@@ -1142,7 +1142,7 @@ let gType' = gtypeToCGType gType result <- g_type_default_interface_ref gType' checkUnexpectedReturnNULL "g_type_default_interface_ref" result- result' <- (newPtr 16 TypeInterface) result+ result' <- (newPtr TypeInterface) result return result' @@ -1166,7 +1166,7 @@ let gType' = gtypeToCGType gType result <- g_type_default_interface_peek gType' checkUnexpectedReturnNULL "g_type_default_interface_peek" result- result' <- (newPtr 16 TypeInterface) result+ result' <- (newPtr TypeInterface) result return result' @@ -2173,7 +2173,7 @@ let instance_' = unsafeManagedPtrCastPtr instance_ result <- g_signal_get_invocation_hint instance_' checkUnexpectedReturnNULL "g_signal_get_invocation_hint" result- result' <- (newPtr 12 SignalInvocationHint) result+ result' <- (newPtr SignalInvocationHint) result touchManagedPtr instance_ return result' @@ -3533,7 +3533,7 @@ nick' <- textToCString nick result <- g_flags_get_value_by_nick flagsClass' nick' checkUnexpectedReturnNULL "g_flags_get_value_by_nick" result- result' <- (newPtr 24 FlagsValue) result+ result' <- (newPtr FlagsValue) result touchManagedPtr flagsClass freeMem nick' return result'@@ -3562,7 +3562,7 @@ name' <- textToCString name result <- g_flags_get_value_by_name flagsClass' name' checkUnexpectedReturnNULL "g_flags_get_value_by_name" result- result' <- (newPtr 24 FlagsValue) result+ result' <- (newPtr FlagsValue) result touchManagedPtr flagsClass freeMem name' return result'@@ -3590,7 +3590,7 @@ let flagsClass' = unsafeManagedPtrGetPtr flagsClass result <- g_flags_get_first_value flagsClass' value checkUnexpectedReturnNULL "g_flags_get_first_value" result- result' <- (newPtr 24 FlagsValue) result+ result' <- (newPtr FlagsValue) result touchManagedPtr flagsClass return result' @@ -3675,7 +3675,7 @@ nick' <- textToCString nick result <- g_enum_get_value_by_nick enumClass' nick' checkUnexpectedReturnNULL "g_enum_get_value_by_nick" result- result' <- (newPtr 24 EnumValue) result+ result' <- (newPtr EnumValue) result touchManagedPtr enumClass freeMem nick' return result'@@ -3704,7 +3704,7 @@ name' <- textToCString name result <- g_enum_get_value_by_name enumClass' name' checkUnexpectedReturnNULL "g_enum_get_value_by_name" result- result' <- (newPtr 24 EnumValue) result+ result' <- (newPtr EnumValue) result touchManagedPtr enumClass freeMem name' return result'@@ -3732,7 +3732,7 @@ let enumClass' = unsafeManagedPtrGetPtr enumClass result <- g_enum_get_value enumClass' value checkUnexpectedReturnNULL "g_enum_get_value" result- result' <- (newPtr 24 EnumValue) result+ result' <- (newPtr EnumValue) result touchManagedPtr enumClass return result'
GI/GObject/Structs/CClosure.hs view
@@ -142,9 +142,14 @@ import GI.GObject.Callbacks newtype CClosure = CClosure (ForeignPtr CClosure)+instance WrappedPtr CClosure where+ wrappedPtrCalloc = callocBytes 72+ wrappedPtrCopy = copyPtr 72+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `CClosure` struct initialized to zero. newZeroCClosure :: MonadIO m => m CClosure-newZeroCClosure = liftIO $ callocBytes 72 >>= wrapPtr CClosure+newZeroCClosure = liftIO $ wrappedPtrCalloc >>= wrapPtr CClosure instance tag ~ 'AttrSet => Constructible CClosure tag where new _ attrs = do
GI/GObject/Structs/CClosure.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype CClosure = CClosure (ForeignPtr CClosure)+instance WrappedPtr CClosure where
GI/GObject/Structs/ClosureNotifyData.hs view
@@ -38,9 +38,14 @@ import GI.GObject.Callbacks newtype ClosureNotifyData = ClosureNotifyData (ForeignPtr ClosureNotifyData)+instance WrappedPtr ClosureNotifyData where+ wrappedPtrCalloc = callocBytes 16+ wrappedPtrCopy = copyPtr 16+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `ClosureNotifyData` struct initialized to zero. newZeroClosureNotifyData :: MonadIO m => m ClosureNotifyData-newZeroClosureNotifyData = liftIO $ callocBytes 16 >>= wrapPtr ClosureNotifyData+newZeroClosureNotifyData = liftIO $ wrappedPtrCalloc >>= wrapPtr ClosureNotifyData instance tag ~ 'AttrSet => Constructible ClosureNotifyData tag where new _ attrs = do
GI/GObject/Structs/ClosureNotifyData.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype ClosureNotifyData = ClosureNotifyData (ForeignPtr ClosureNotifyData)+instance WrappedPtr ClosureNotifyData where
GI/GObject/Structs/EnumClass.hs view
@@ -66,9 +66,14 @@ import GI.GObject.Callbacks newtype EnumClass = EnumClass (ForeignPtr EnumClass)+instance WrappedPtr EnumClass where+ wrappedPtrCalloc = callocBytes 32+ wrappedPtrCopy = copyPtr 32+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `EnumClass` struct initialized to zero. newZeroEnumClass :: MonadIO m => m EnumClass-newZeroEnumClass = liftIO $ callocBytes 32 >>= wrapPtr EnumClass+newZeroEnumClass = liftIO $ wrappedPtrCalloc >>= wrapPtr EnumClass instance tag ~ 'AttrSet => Constructible EnumClass tag where new _ attrs = do@@ -84,7 +89,7 @@ enumClassReadGTypeClass s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 0) :: IO (Ptr TypeClass) result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr 8 TypeClass) val'+ val'' <- (newPtr TypeClass) val' return val'' return result @@ -191,7 +196,7 @@ enumClassReadValues s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 24) :: IO (Ptr EnumValue) result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr 24 EnumValue) val'+ val'' <- (newPtr EnumValue) val' return val'' return result
GI/GObject/Structs/EnumClass.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype EnumClass = EnumClass (ForeignPtr EnumClass)+instance WrappedPtr EnumClass where
GI/GObject/Structs/EnumValue.hs view
@@ -54,9 +54,14 @@ import GI.GObject.Callbacks newtype EnumValue = EnumValue (ForeignPtr EnumValue)+instance WrappedPtr EnumValue where+ wrappedPtrCalloc = callocBytes 24+ wrappedPtrCopy = copyPtr 24+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `EnumValue` struct initialized to zero. newZeroEnumValue :: MonadIO m => m EnumValue-newZeroEnumValue = liftIO $ callocBytes 24 >>= wrapPtr EnumValue+newZeroEnumValue = liftIO $ wrappedPtrCalloc >>= wrapPtr EnumValue instance tag ~ 'AttrSet => Constructible EnumValue tag where new _ attrs = do
GI/GObject/Structs/EnumValue.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype EnumValue = EnumValue (ForeignPtr EnumValue)+instance WrappedPtr EnumValue where
GI/GObject/Structs/FlagsClass.hs view
@@ -60,9 +60,14 @@ import GI.GObject.Callbacks newtype FlagsClass = FlagsClass (ForeignPtr FlagsClass)+instance WrappedPtr FlagsClass where+ wrappedPtrCalloc = callocBytes 24+ wrappedPtrCopy = copyPtr 24+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `FlagsClass` struct initialized to zero. newZeroFlagsClass :: MonadIO m => m FlagsClass-newZeroFlagsClass = liftIO $ callocBytes 24 >>= wrapPtr FlagsClass+newZeroFlagsClass = liftIO $ wrappedPtrCalloc >>= wrapPtr FlagsClass instance tag ~ 'AttrSet => Constructible FlagsClass tag where new _ attrs = do@@ -78,7 +83,7 @@ flagsClassReadGTypeClass s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 0) :: IO (Ptr TypeClass) result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr 8 TypeClass) val'+ val'' <- (newPtr TypeClass) val' return val'' return result @@ -160,7 +165,7 @@ flagsClassReadValues s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 16) :: IO (Ptr FlagsValue) result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr 24 FlagsValue) val'+ val'' <- (newPtr FlagsValue) val' return val'' return result
GI/GObject/Structs/FlagsClass.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype FlagsClass = FlagsClass (ForeignPtr FlagsClass)+instance WrappedPtr FlagsClass where
GI/GObject/Structs/FlagsValue.hs view
@@ -54,9 +54,14 @@ import GI.GObject.Callbacks newtype FlagsValue = FlagsValue (ForeignPtr FlagsValue)+instance WrappedPtr FlagsValue where+ wrappedPtrCalloc = callocBytes 24+ wrappedPtrCopy = copyPtr 24+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `FlagsValue` struct initialized to zero. newZeroFlagsValue :: MonadIO m => m FlagsValue-newZeroFlagsValue = liftIO $ callocBytes 24 >>= wrapPtr FlagsValue+newZeroFlagsValue = liftIO $ wrappedPtrCalloc >>= wrapPtr FlagsValue instance tag ~ 'AttrSet => Constructible FlagsValue tag where new _ attrs = do
GI/GObject/Structs/FlagsValue.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype FlagsValue = FlagsValue (ForeignPtr FlagsValue)+instance WrappedPtr FlagsValue where
GI/GObject/Structs/InterfaceInfo.hs view
@@ -41,9 +41,14 @@ import GI.GObject.Callbacks newtype InterfaceInfo = InterfaceInfo (ForeignPtr InterfaceInfo)+instance WrappedPtr InterfaceInfo where+ wrappedPtrCalloc = callocBytes 24+ wrappedPtrCopy = copyPtr 24+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `InterfaceInfo` struct initialized to zero. newZeroInterfaceInfo :: MonadIO m => m InterfaceInfo-newZeroInterfaceInfo = liftIO $ callocBytes 24 >>= wrapPtr InterfaceInfo+newZeroInterfaceInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr InterfaceInfo instance tag ~ 'AttrSet => Constructible InterfaceInfo tag where new _ attrs = do
GI/GObject/Structs/InterfaceInfo.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype InterfaceInfo = InterfaceInfo (ForeignPtr InterfaceInfo)+instance WrappedPtr InterfaceInfo where
GI/GObject/Structs/ObjectConstructParam.hs view
@@ -49,9 +49,14 @@ import GI.GObject.Callbacks newtype ObjectConstructParam = ObjectConstructParam (ForeignPtr ObjectConstructParam)+instance WrappedPtr ObjectConstructParam where+ wrappedPtrCalloc = callocBytes 16+ wrappedPtrCopy = copyPtr 16+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `ObjectConstructParam` struct initialized to zero. newZeroObjectConstructParam :: MonadIO m => m ObjectConstructParam-newZeroObjectConstructParam = liftIO $ callocBytes 16 >>= wrapPtr ObjectConstructParam+newZeroObjectConstructParam = liftIO $ wrappedPtrCalloc >>= wrapPtr ObjectConstructParam instance tag ~ 'AttrSet => Constructible ObjectConstructParam tag where new _ attrs = do
GI/GObject/Structs/ObjectConstructParam.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype ObjectConstructParam = ObjectConstructParam (ForeignPtr ObjectConstructParam)+instance WrappedPtr ObjectConstructParam where
GI/GObject/Structs/ParamSpecPool.hs view
@@ -59,6 +59,12 @@ import GI.GObject.Callbacks newtype ParamSpecPool = ParamSpecPool (ForeignPtr ParamSpecPool)+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?+instance WrappedPtr ParamSpecPool where+ wrappedPtrCalloc = return nullPtr+ wrappedPtrCopy = return+ wrappedPtrFree = Nothing+ noParamSpecPool :: Maybe ParamSpecPool noParamSpecPool = Nothing @@ -224,8 +230,7 @@ let typePrefixing' = (fromIntegral . fromEnum) typePrefixing result <- g_param_spec_pool_new typePrefixing' checkUnexpectedReturnNULL "g_param_spec_pool_new" result- -- XXX Wrapping a foreign struct/union with no known destructor, leak?- result' <- (\x -> ParamSpecPool <$> newForeignPtr_ x) result+ result' <- (newPtr ParamSpecPool) result return result' type family ResolveParamSpecPoolMethod (t :: Symbol) (o :: *) :: * where
GI/GObject/Structs/ParamSpecPool.hs-boot view
@@ -8,6 +8,7 @@ import qualified Data.Map as Map newtype ParamSpecPool = ParamSpecPool (ForeignPtr ParamSpecPool)+instance WrappedPtr ParamSpecPool where data ParamSpecPoolInsertMethodInfo data ParamSpecPoolListOwnedMethodInfo data ParamSpecPoolLookupMethodInfo
GI/GObject/Structs/ParamSpecTypeInfo.hs view
@@ -57,9 +57,14 @@ import GI.GObject.Callbacks newtype ParamSpecTypeInfo = ParamSpecTypeInfo (ForeignPtr ParamSpecTypeInfo)+instance WrappedPtr ParamSpecTypeInfo where+ wrappedPtrCalloc = callocBytes 56+ wrappedPtrCopy = copyPtr 56+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `ParamSpecTypeInfo` struct initialized to zero. newZeroParamSpecTypeInfo :: MonadIO m => m ParamSpecTypeInfo-newZeroParamSpecTypeInfo = liftIO $ callocBytes 56 >>= wrapPtr ParamSpecTypeInfo+newZeroParamSpecTypeInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr ParamSpecTypeInfo instance tag ~ 'AttrSet => Constructible ParamSpecTypeInfo tag where new _ attrs = do
GI/GObject/Structs/ParamSpecTypeInfo.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype ParamSpecTypeInfo = ParamSpecTypeInfo (ForeignPtr ParamSpecTypeInfo)+instance WrappedPtr ParamSpecTypeInfo where
GI/GObject/Structs/Parameter.hs view
@@ -48,9 +48,14 @@ import GI.GObject.Callbacks newtype Parameter = Parameter (ForeignPtr Parameter)+instance WrappedPtr Parameter where+ wrappedPtrCalloc = callocBytes 32+ wrappedPtrCopy = copyPtr 32+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `Parameter` struct initialized to zero. newZeroParameter :: MonadIO m => m Parameter-newZeroParameter = liftIO $ callocBytes 32 >>= wrapPtr Parameter+newZeroParameter = liftIO $ wrappedPtrCalloc >>= wrapPtr Parameter instance tag ~ 'AttrSet => Constructible Parameter tag where new _ attrs = do
GI/GObject/Structs/Parameter.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype Parameter = Parameter (ForeignPtr Parameter)+instance WrappedPtr Parameter where
GI/GObject/Structs/SignalInvocationHint.hs view
@@ -52,9 +52,14 @@ import GI.GObject.Callbacks newtype SignalInvocationHint = SignalInvocationHint (ForeignPtr SignalInvocationHint)+instance WrappedPtr SignalInvocationHint where+ wrappedPtrCalloc = callocBytes 12+ wrappedPtrCopy = copyPtr 12+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `SignalInvocationHint` struct initialized to zero. newZeroSignalInvocationHint :: MonadIO m => m SignalInvocationHint-newZeroSignalInvocationHint = liftIO $ callocBytes 12 >>= wrapPtr SignalInvocationHint+newZeroSignalInvocationHint = liftIO $ wrappedPtrCalloc >>= wrapPtr SignalInvocationHint instance tag ~ 'AttrSet => Constructible SignalInvocationHint tag where new _ attrs = do
GI/GObject/Structs/SignalInvocationHint.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype SignalInvocationHint = SignalInvocationHint (ForeignPtr SignalInvocationHint)+instance WrappedPtr SignalInvocationHint where
GI/GObject/Structs/SignalQuery.hs view
@@ -71,9 +71,14 @@ import GI.GObject.Callbacks newtype SignalQuery = SignalQuery (ForeignPtr SignalQuery)+instance WrappedPtr SignalQuery where+ wrappedPtrCalloc = callocBytes 56+ wrappedPtrCopy = copyPtr 56+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `SignalQuery` struct initialized to zero. newZeroSignalQuery :: MonadIO m => m SignalQuery-newZeroSignalQuery = liftIO $ callocBytes 56 >>= wrapPtr SignalQuery+newZeroSignalQuery = liftIO $ wrappedPtrCalloc >>= wrapPtr SignalQuery instance tag ~ 'AttrSet => Constructible SignalQuery tag where new _ attrs = do
GI/GObject/Structs/SignalQuery.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype SignalQuery = SignalQuery (ForeignPtr SignalQuery)+instance WrappedPtr SignalQuery where
GI/GObject/Structs/TypeClass.hs view
@@ -63,9 +63,14 @@ import GI.GObject.Callbacks newtype TypeClass = TypeClass (ForeignPtr TypeClass)+instance WrappedPtr TypeClass where+ wrappedPtrCalloc = callocBytes 8+ wrappedPtrCopy = copyPtr 8+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `TypeClass` struct initialized to zero. newZeroTypeClass :: MonadIO m => m TypeClass-newZeroTypeClass = liftIO $ callocBytes 8 >>= wrapPtr TypeClass+newZeroTypeClass = liftIO $ wrappedPtrCalloc >>= wrapPtr TypeClass instance tag ~ 'AttrSet => Constructible TypeClass tag where new _ attrs = do@@ -102,7 +107,7 @@ let _obj' = unsafeManagedPtrGetPtr _obj result <- g_type_class_peek_parent _obj' checkUnexpectedReturnNULL "g_type_class_peek_parent" result- result' <- (newPtr 8 TypeClass) result+ result' <- (newPtr TypeClass) result touchManagedPtr _obj return result' @@ -204,7 +209,7 @@ let type_' = gtypeToCGType type_ result <- g_type_class_peek type_' checkUnexpectedReturnNULL "g_type_class_peek" result- result' <- (newPtr 8 TypeClass) result+ result' <- (newPtr TypeClass) result return result' -- method TypeClass::peek_static@@ -228,7 +233,7 @@ let type_' = gtypeToCGType type_ result <- g_type_class_peek_static type_' checkUnexpectedReturnNULL "g_type_class_peek_static" result- result' <- (newPtr 8 TypeClass) result+ result' <- (newPtr TypeClass) result return result' -- method TypeClass::ref@@ -252,7 +257,7 @@ let type_' = gtypeToCGType type_ result <- g_type_class_ref type_' checkUnexpectedReturnNULL "g_type_class_ref" result- result' <- (newPtr 8 TypeClass) result+ result' <- (newPtr TypeClass) result return result' type family ResolveTypeClassMethod (t :: Symbol) (o :: *) :: * where
GI/GObject/Structs/TypeClass.hs-boot view
@@ -8,5 +8,6 @@ import qualified Data.Map as Map newtype TypeClass = TypeClass (ForeignPtr TypeClass)+instance WrappedPtr TypeClass where data TypeClassPeekParentMethodInfo data TypeClassUnrefMethodInfo
GI/GObject/Structs/TypeFundamentalInfo.hs view
@@ -40,9 +40,14 @@ import GI.GObject.Callbacks newtype TypeFundamentalInfo = TypeFundamentalInfo (ForeignPtr TypeFundamentalInfo)+instance WrappedPtr TypeFundamentalInfo where+ wrappedPtrCalloc = callocBytes 4+ wrappedPtrCopy = copyPtr 4+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `TypeFundamentalInfo` struct initialized to zero. newZeroTypeFundamentalInfo :: MonadIO m => m TypeFundamentalInfo-newZeroTypeFundamentalInfo = liftIO $ callocBytes 4 >>= wrapPtr TypeFundamentalInfo+newZeroTypeFundamentalInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr TypeFundamentalInfo instance tag ~ 'AttrSet => Constructible TypeFundamentalInfo tag where new _ attrs = do
GI/GObject/Structs/TypeFundamentalInfo.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype TypeFundamentalInfo = TypeFundamentalInfo (ForeignPtr TypeFundamentalInfo)+instance WrappedPtr TypeFundamentalInfo where
GI/GObject/Structs/TypeInfo.hs view
@@ -73,9 +73,14 @@ import GI.GObject.Callbacks newtype TypeInfo = TypeInfo (ForeignPtr TypeInfo)+instance WrappedPtr TypeInfo where+ wrappedPtrCalloc = callocBytes 72+ wrappedPtrCopy = copyPtr 72+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `TypeInfo` struct initialized to zero. newZeroTypeInfo :: MonadIO m => m TypeInfo-newZeroTypeInfo = liftIO $ callocBytes 72 >>= wrapPtr TypeInfo+newZeroTypeInfo = liftIO $ wrappedPtrCalloc >>= wrapPtr TypeInfo instance tag ~ 'AttrSet => Constructible TypeInfo tag where new _ attrs = do@@ -200,7 +205,7 @@ typeInfoReadValueTable s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 64) :: IO (Ptr TypeValueTable) result <- convertIfNonNull val $ \val' -> do- val'' <- (newPtr 64 TypeValueTable) val'+ val'' <- (newPtr TypeValueTable) val' return val'' return result
GI/GObject/Structs/TypeInfo.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype TypeInfo = TypeInfo (ForeignPtr TypeInfo)+instance WrappedPtr TypeInfo where
GI/GObject/Structs/TypeInstance.hs view
@@ -30,9 +30,14 @@ import GI.GObject.Callbacks newtype TypeInstance = TypeInstance (ForeignPtr TypeInstance)+instance WrappedPtr TypeInstance where+ wrappedPtrCalloc = callocBytes 8+ wrappedPtrCopy = copyPtr 8+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `TypeInstance` struct initialized to zero. newZeroTypeInstance :: MonadIO m => m TypeInstance-newZeroTypeInstance = liftIO $ callocBytes 8 >>= wrapPtr TypeInstance+newZeroTypeInstance = liftIO $ wrappedPtrCalloc >>= wrapPtr TypeInstance instance tag ~ 'AttrSet => Constructible TypeInstance tag where new _ attrs = do
GI/GObject/Structs/TypeInstance.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype TypeInstance = TypeInstance (ForeignPtr TypeInstance)+instance WrappedPtr TypeInstance where
GI/GObject/Structs/TypeInterface.hs view
@@ -50,9 +50,14 @@ import GI.GObject.Callbacks newtype TypeInterface = TypeInterface (ForeignPtr TypeInterface)+instance WrappedPtr TypeInterface where+ wrappedPtrCalloc = callocBytes 16+ wrappedPtrCopy = copyPtr 16+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `TypeInterface` struct initialized to zero. newZeroTypeInterface :: MonadIO m => m TypeInterface-newZeroTypeInterface = liftIO $ callocBytes 16 >>= wrapPtr TypeInterface+newZeroTypeInterface = liftIO $ wrappedPtrCalloc >>= wrapPtr TypeInterface instance tag ~ 'AttrSet => Constructible TypeInterface tag where new _ attrs = do@@ -89,7 +94,7 @@ let _obj' = unsafeManagedPtrGetPtr _obj result <- g_type_interface_peek_parent _obj' checkUnexpectedReturnNULL "g_type_interface_peek_parent" result- result' <- (newPtr 16 TypeInterface) result+ result' <- (newPtr TypeInterface) result touchManagedPtr _obj return result' @@ -148,7 +153,7 @@ let ifaceType' = gtypeToCGType ifaceType result <- g_type_interface_peek instanceClass' ifaceType' checkUnexpectedReturnNULL "g_type_interface_peek" result- result' <- (newPtr 16 TypeInterface) result+ result' <- (newPtr TypeInterface) result touchManagedPtr instanceClass return result'
GI/GObject/Structs/TypeInterface.hs-boot view
@@ -8,4 +8,5 @@ import qualified Data.Map as Map newtype TypeInterface = TypeInterface (ForeignPtr TypeInterface)+instance WrappedPtr TypeInterface where data TypeInterfacePeekParentMethodInfo
GI/GObject/Structs/TypePluginClass.hs view
@@ -31,9 +31,14 @@ import GI.GObject.Callbacks newtype TypePluginClass = TypePluginClass (ForeignPtr TypePluginClass)+instance WrappedPtr TypePluginClass where+ wrappedPtrCalloc = callocBytes 48+ wrappedPtrCopy = copyPtr 48+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `TypePluginClass` struct initialized to zero. newZeroTypePluginClass :: MonadIO m => m TypePluginClass-newZeroTypePluginClass = liftIO $ callocBytes 48 >>= wrapPtr TypePluginClass+newZeroTypePluginClass = liftIO $ wrappedPtrCalloc >>= wrapPtr TypePluginClass instance tag ~ 'AttrSet => Constructible TypePluginClass tag where new _ attrs = do
GI/GObject/Structs/TypePluginClass.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype TypePluginClass = TypePluginClass (ForeignPtr TypePluginClass)+instance WrappedPtr TypePluginClass where
GI/GObject/Structs/TypeQuery.hs view
@@ -59,9 +59,14 @@ import GI.GObject.Callbacks newtype TypeQuery = TypeQuery (ForeignPtr TypeQuery)+instance WrappedPtr TypeQuery where+ wrappedPtrCalloc = callocBytes 24+ wrappedPtrCopy = copyPtr 24+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `TypeQuery` struct initialized to zero. newZeroTypeQuery :: MonadIO m => m TypeQuery-newZeroTypeQuery = liftIO $ callocBytes 24 >>= wrapPtr TypeQuery+newZeroTypeQuery = liftIO $ wrappedPtrCalloc >>= wrapPtr TypeQuery instance tag ~ 'AttrSet => Constructible TypeQuery tag where new _ attrs = do
GI/GObject/Structs/TypeQuery.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype TypeQuery = TypeQuery (ForeignPtr TypeQuery)+instance WrappedPtr TypeQuery where
GI/GObject/Structs/TypeValueTable.hs view
@@ -48,9 +48,14 @@ import GI.GObject.Callbacks newtype TypeValueTable = TypeValueTable (ForeignPtr TypeValueTable)+instance WrappedPtr TypeValueTable where+ wrappedPtrCalloc = callocBytes 64+ wrappedPtrCopy = copyPtr 64+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `TypeValueTable` struct initialized to zero. newZeroTypeValueTable :: MonadIO m => m TypeValueTable-newZeroTypeValueTable = liftIO $ callocBytes 64 >>= wrapPtr TypeValueTable+newZeroTypeValueTable = liftIO $ wrappedPtrCalloc >>= wrapPtr TypeValueTable instance tag ~ 'AttrSet => Constructible TypeValueTable tag where new _ attrs = do
GI/GObject/Structs/TypeValueTable.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype TypeValueTable = TypeValueTable (ForeignPtr TypeValueTable)+instance WrappedPtr TypeValueTable where
GI/GObject/Structs/WeakRef.hs view
@@ -48,6 +48,12 @@ import GI.GObject.Callbacks newtype WeakRef = WeakRef (ForeignPtr WeakRef)+-- XXX Wrapping a foreign struct/union with no known destructor or size, leak?+instance WrappedPtr WeakRef where+ wrappedPtrCalloc = return nullPtr+ wrappedPtrCopy = return+ wrappedPtrFree = Nothing+ noWeakRef :: Maybe WeakRef noWeakRef = Nothing
GI/GObject/Structs/WeakRef.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype WeakRef = WeakRef (ForeignPtr WeakRef)+instance WrappedPtr WeakRef where
GI/GObject/Unions/TypeCValue.hs view
@@ -62,9 +62,14 @@ import GI.GObject.Callbacks newtype TypeCValue = TypeCValue (ForeignPtr TypeCValue)+instance WrappedPtr TypeCValue where+ wrappedPtrCalloc = callocBytes 8+ wrappedPtrCopy = copyPtr 8+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `TypeCValue` struct initialized to zero. newZeroTypeCValue :: MonadIO m => m TypeCValue-newZeroTypeCValue = liftIO $ callocBytes 8 >>= wrapPtr TypeCValue+newZeroTypeCValue = liftIO $ wrappedPtrCalloc >>= wrapPtr TypeCValue instance tag ~ 'AttrSet => Constructible TypeCValue tag where new _ attrs = do
GI/GObject/Unions/TypeCValue.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype TypeCValue = TypeCValue (ForeignPtr TypeCValue)+instance WrappedPtr TypeCValue where
GI/GObject/Unions/Value_Data_Union_.hs view
@@ -86,9 +86,14 @@ import GI.GObject.Callbacks newtype Value_Data_Union_ = Value_Data_Union_ (ForeignPtr Value_Data_Union_)+instance WrappedPtr Value_Data_Union_ where+ wrappedPtrCalloc = callocBytes 8+ wrappedPtrCopy = copyPtr 8+ wrappedPtrFree = Just ptr_to_g_free+ -- | Construct a `Value_Data_Union_` struct initialized to zero. newZeroValue_Data_Union_ :: MonadIO m => m Value_Data_Union_-newZeroValue_Data_Union_ = liftIO $ callocBytes 8 >>= wrapPtr Value_Data_Union_+newZeroValue_Data_Union_ = liftIO $ wrappedPtrCalloc >>= wrapPtr Value_Data_Union_ instance tag ~ 'AttrSet => Constructible Value_Data_Union_ tag where new _ attrs = do
GI/GObject/Unions/Value_Data_Union_.hs-boot view
@@ -8,3 +8,4 @@ import qualified Data.Map as Map newtype Value_Data_Union_ = Value_Data_Union_ (ForeignPtr Value_Data_Union_)+instance WrappedPtr Value_Data_Union_ where
gi-gobject.cabal view
@@ -1,6 +1,6 @@ -- Autogenerated, do not edit. name: gi-gobject-version: 0.2.46.14+version: 0.2.46.15 synopsis: GObject bindings description: Bindings for GObject, autogenerated by haskell-gi. homepage: https://github.com/haskell-gi/haskell-gi@@ -59,8 +59,8 @@ GI.GObject.Unions.Value_Data_Union_ pkgconfig-depends: gobject-2.0 >= 2.46 build-depends: base >= 4.7 && <5,- haskell-gi-base >= 0.14 && < 1,- gi-glib >= 0.2.46.14 && < 0.2.47,+ haskell-gi-base >= 0.15 && < 1,+ gi-glib >= 0.2.46.15 && < 0.2.47, bytestring >= 0.10, containers >= 0.5, text >= 1.0,