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 :: forall a m. (IsGValue a, MonadIO m) => a -> m GValue
- fromGValue :: (IsGValue a, MonadIO m) => GValue -> m a
- data GValueConstruct o = GValueConstruct String GValue
- 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 ()
Constructing GValues
Haskell-side representation of a GValue
.
Instances
HasParentTypes GValue Source # | |
Defined in Data.GI.Base.GValue | |
GBoxed GValue Source # |
|
Defined in Data.GI.Base.GValue | |
TypedObject GValue Source # | |
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
IsGValue Bool Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue Double Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue Float Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue Int32 Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue Int64 Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue Word32 Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue Word64 Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue CInt Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue CUInt Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue CLong Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue CULong Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue GType Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue (Maybe String) Source # | |
IsGValue (Maybe Text) Source # | |
IsGValue (StablePtr a) Source # | |
Defined in Data.GI.Base.GValue | |
IsGValue (Ptr a) Source # | |
Defined in Data.GI.Base.GValue |
toGValue :: forall a m. (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