packages feed

haskell-gi-base 0.26.2 → 0.26.3

raw patch · 4 files changed

+55/−2 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.GI.Base.GType: gtypeParam :: GType
+ Data.GI.Base.GValue: get_param :: Ptr GValue -> IO (Maybe GParamSpec)
+ Data.GI.Base.GValue: instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe Data.GI.Base.BasicTypes.GParamSpec)
+ Data.GI.Base.GValue: set_param :: Ptr GValue -> Maybe GParamSpec -> IO ()
+ Data.GI.Base.Properties: constructObjectPropertyParamSpec :: String -> Maybe GParamSpec -> IO (GValueConstruct o)
+ Data.GI.Base.Properties: getObjectPropertyParamSpec :: GObject a => a -> String -> IO (Maybe GParamSpec)
+ Data.GI.Base.Properties: setObjectPropertyParamSpec :: GObject a => a -> String -> Maybe GParamSpec -> IO ()

Files

Data/GI/Base/GType.hsc view
@@ -21,6 +21,7 @@     , gtypeVariant     , gtypeByteArray     , gtypeInvalid+    , gtypeParam      , gtypeStablePtr     ) where@@ -109,6 +110,10 @@ -- | The `GType` corresponding to 'Data.GI.Base.GError.GError'. gtypeError :: GType gtypeError = GType #const G_TYPE_ERROR++-- | The `GType` corresponding to 'Data.GI.Base.BasicTypes.GParamSpec'.+gtypeParam :: GType+gtypeParam = GType #const G_TYPE_PARAM  {- Run-time types -} 
Data/GI/Base/GValue.hs view
@@ -43,7 +43,8 @@     , set_stablePtr     , get_stablePtr     , take_stablePtr-+    , set_param+    , get_param     ) where  import Control.Monad.IO.Class (MonadIO, liftIO)@@ -252,6 +253,11 @@   gvalueSet_ = set_stablePtr   gvalueGet_ = get_stablePtr +instance IsGValue (Maybe GParamSpec) where+  gvalueGType_ = return gtypeParam+  gvalueSet_ = set_param+  gvalueGet_ = get_param+ foreign import ccall "g_value_set_string" _set_string ::     Ptr GValue -> CString -> IO () foreign import ccall "g_value_get_string" _get_string ::@@ -451,3 +457,28 @@         go n ptr = do           _ <- f ptr           go (n-1) (ptr `plusPtr` cgvalueSize)++foreign import ccall unsafe "g_value_set_param" _set_param ::+    Ptr GValue -> Ptr GParamSpec -> IO ()+foreign import ccall unsafe "g_value_get_param" _get_param ::+    Ptr GValue -> IO (Ptr GParamSpec)++-- | Set the value of `GValue` containing a `GParamSpec`+set_param :: Ptr GValue -> Maybe GParamSpec -> IO ()+set_param gv (Just ps) = withManagedPtr ps (_set_param gv)+set_param gv Nothing = _set_param gv nullPtr++foreign import ccall "g_param_spec_ref" g_param_spec_ref ::+    Ptr GParamSpec -> IO (Ptr GParamSpec)+foreign import ccall "&g_param_spec_unref" ptr_to_g_param_spec_unref ::+    FunPtr (Ptr GParamSpec -> IO ())++-- | Get the value of a `GValue` containing a `GParamSpec`+get_param :: Ptr GValue -> IO (Maybe GParamSpec)+get_param gv = do+  ptr <- _get_param gv+  if ptr == nullPtr+    then return Nothing+    else do+    fPtr <- g_param_spec_ref ptr >>= newManagedPtr' ptr_to_g_param_spec_unref+    return . Just $! GParamSpec fPtr
Data/GI/Base/Properties.hsc view
@@ -29,6 +29,7 @@     , setObjectPropertyCallback     , setObjectPropertyGError     , setObjectPropertyGValue+    , setObjectPropertyParamSpec      , getObjectPropertyIsGValueInstance     , getObjectPropertyString@@ -58,6 +59,7 @@     , getObjectPropertyCallback     , getObjectPropertyGError     , getObjectPropertyGValue+    , getObjectPropertyParamSpec      , constructObjectPropertyIsGValueInstance     , constructObjectPropertyString@@ -87,6 +89,7 @@     , constructObjectPropertyCallback     , constructObjectPropertyGError     , constructObjectPropertyGValue+    , constructObjectPropertyParamSpec     ) where  #if !MIN_VERSION_base(4,8,0)@@ -589,3 +592,17 @@                            a -> String -> IO (Maybe GValue) getObjectPropertyGValue obj propName =   getObjectPropertyBoxed obj propName GValue++-- | Construct a property of type `GParamSpec`.+constructObjectPropertyParamSpec :: String -> Maybe GParamSpec ->+                                    IO (GValueConstruct o)+constructObjectPropertyParamSpec = constructObjectPropertyIsGValueInstance++-- | Get a property of type `GParamSpec`.+getObjectPropertyParamSpec :: GObject a => a -> String -> IO (Maybe GParamSpec)+getObjectPropertyParamSpec = getObjectPropertyIsGValueInstance++-- | Set a property of type `GParamSpec`.+setObjectPropertyParamSpec :: GObject a =>+                          a -> String -> Maybe GParamSpec -> IO ()+setObjectPropertyParamSpec = setObjectPropertyIsGValueInstance
haskell-gi-base.cabal view
@@ -1,5 +1,5 @@ name:                haskell-gi-base-version:             0.26.2+version:             0.26.3 synopsis:            Foundation for libraries generated by haskell-gi description:         Foundation for libraries generated by haskell-gi homepage:            https://github.com/haskell-gi/haskell-gi