Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype GValue = GValue (ManagedPtr GValue)
- class IsGValue a where
- gvalueGType_ :: IO GType
- gvalueSet_ :: Ptr GValue -> a -> IO ()
- gvalueGet_ :: Ptr GValue -> IO a
- toGValue :: (IsGValue a, MonadIO m) => a -> m GValue
- fromGValue :: (IsGValue a, MonadIO m) => GValue -> m a
- data GValueConstruct o = GValueConstruct String GValue
- ptr_to_gvalue_free :: FunPtr (Ptr GValue -> IO ())
- newGValue :: GType -> IO GValue
- buildGValue :: GType -> (Ptr GValue -> a -> IO ()) -> a -> IO GValue
- disownGValue :: GValue -> IO (Ptr GValue)
- noGValue :: Maybe GValue
- newGValueFromPtr :: Ptr GValue -> IO GValue
- wrapGValuePtr :: Ptr GValue -> IO GValue
- unsetGValue :: Ptr GValue -> IO ()
- gvalueType :: GValue -> IO GType
- packGValueArray :: [GValue] -> IO (Ptr GValue)
- unpackGValueArrayWithLength :: Integral a => a -> Ptr GValue -> IO [GValue]
- mapGValueArrayWithLength :: Integral a => a -> (Ptr GValue -> IO c) -> Ptr GValue -> IO ()
- set_object :: GObject a => Ptr GValue -> Ptr a -> IO ()
- get_object :: GObject a => Ptr GValue -> IO (Ptr a)
- set_boxed :: Ptr GValue -> Ptr a -> IO ()
- get_boxed :: Ptr GValue -> IO (Ptr b)
- set_variant :: Ptr GValue -> Ptr GVariant -> IO ()
- get_variant :: Ptr GValue -> IO (Ptr GVariant)
- set_enum :: Ptr GValue -> CUInt -> IO ()
- get_enum :: Ptr GValue -> IO CUInt
- set_flags :: Ptr GValue -> CUInt -> IO ()
- get_flags :: Ptr GValue -> IO CUInt
- set_stablePtr :: Ptr GValue -> StablePtr a -> IO ()
- get_stablePtr :: Ptr GValue -> IO (StablePtr a)
- take_stablePtr :: Ptr GValue -> StablePtr a -> IO ()
- set_param :: Ptr GValue -> Maybe GParamSpec -> IO ()
- get_param :: Ptr GValue -> IO (Maybe GParamSpec)
Constructing GValues
Haskell-side representation of a GValue
.
Instances
GBoxed GValue Source # |
|
Defined in Data.GI.Base.GValue | |
TypedObject GValue Source # | |
HasParentTypes GValue Source # | |
Defined in Data.GI.Base.GValue | |
type ParentTypes GValue Source # | There are no types in the bindings that a |
Defined in Data.GI.Base.GValue |
class IsGValue a where Source #
Class for types that can be marshaled back and forth between
Haskell values and GValue
s. These are low-level methods, you
might want to use toGValue
and fromGValue
instead for a higher
level interface.
Instances
toGValue :: (IsGValue a, MonadIO m) => a -> m GValue Source #
Create a GValue
from the given Haskell value.
fromGValue :: (IsGValue a, MonadIO m) => GValue -> m a Source #
Create a Haskell object out of the given GValue
.
data GValueConstruct o Source #
buildGValue :: GType -> (Ptr GValue -> a -> IO ()) -> a -> IO GValue Source #
A convenience function for building a new GValue and setting the initial value.
disownGValue :: GValue -> IO (Ptr GValue) Source #
Disown a GValue
, i.e. do not unref the underlying object when
the Haskell object is garbage collected.
newGValueFromPtr :: Ptr GValue -> IO GValue Source #
Construct a Haskell wrapper for the given GValue
, making a
copy.
unsetGValue :: Ptr GValue -> IO () Source #
Unset the GValue
, freeing all resources associated to it.
Packing GValues into arrays
packGValueArray :: [GValue] -> IO (Ptr GValue) Source #
Pack the given list of GValues contiguously into a C array
unpackGValueArrayWithLength :: Integral a => a -> Ptr GValue -> IO [GValue] Source #
Unpack an array of contiguous GValues into a list of GValues.
mapGValueArrayWithLength :: Integral a => a -> (Ptr GValue -> IO c) -> Ptr GValue -> IO () Source #
Map over the GValue
s inside a C array.
Setters and getters
take_stablePtr :: Ptr GValue -> StablePtr a -> IO () Source #
Like set_stablePtr
, but the GValue
takes ownership of the StablePtr
set_param :: Ptr GValue -> Maybe GParamSpec -> IO () Source #
Set the value of GValue
containing a GParamSpec
get_param :: Ptr GValue -> IO (Maybe GParamSpec) Source #
Get the value of a GValue
containing a GParamSpec