Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype GValue = GValue (ManagedPtr GValue)
- class IsGValue a where
- data GValueConstruct o = GValueConstruct String GValue
- newGValue :: GType -> IO GValue
- buildGValue :: GType -> (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 ()
- 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_string :: GValue -> Maybe Text -> IO ()
- get_string :: GValue -> IO (Maybe Text)
- set_pointer :: GValue -> Ptr a -> IO ()
- get_pointer :: GValue -> IO (Ptr b)
- set_int :: GValue -> CInt -> IO ()
- get_int :: GValue -> IO CInt
- set_uint :: GValue -> CUInt -> IO ()
- get_uint :: GValue -> IO CUInt
- set_long :: GValue -> CLong -> IO ()
- get_long :: GValue -> IO CLong
- set_ulong :: GValue -> CULong -> IO ()
- get_ulong :: GValue -> IO CULong
- set_int32 :: GValue -> Int32 -> IO ()
- get_int32 :: GValue -> IO Int32
- set_uint32 :: GValue -> Word32 -> IO ()
- get_uint32 :: GValue -> IO Word32
- set_int64 :: GValue -> Int64 -> IO ()
- get_int64 :: GValue -> IO Int64
- set_uint64 :: GValue -> Word64 -> IO ()
- get_uint64 :: GValue -> IO Word64
- set_float :: GValue -> Float -> IO ()
- get_float :: GValue -> IO Float
- set_double :: GValue -> Double -> IO ()
- get_double :: GValue -> IO Double
- set_boolean :: GValue -> Bool -> IO ()
- get_boolean :: GValue -> IO Bool
- set_gtype :: GValue -> GType -> IO ()
- get_gtype :: GValue -> IO GType
- set_object :: GObject a => GValue -> Ptr a -> IO ()
- get_object :: GObject b => GValue -> IO (Ptr b)
- set_boxed :: GValue -> Ptr a -> IO ()
- get_boxed :: GValue -> IO (Ptr b)
- set_variant :: GValue -> Ptr GVariant -> IO ()
- get_variant :: GValue -> IO (Ptr GVariant)
- set_enum :: GValue -> CUInt -> IO ()
- get_enum :: GValue -> IO CUInt
- set_flags :: GValue -> CUInt -> IO ()
- get_flags :: GValue -> IO CUInt
- set_stablePtr :: GValue -> StablePtr a -> IO ()
- get_stablePtr :: 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 #
A convenience class for marshaling back and forth between Haskell
values and GValue
s.
Instances
IsGValue Bool Source # | |
IsGValue Double Source # | |
IsGValue Float Source # | |
IsGValue Int32 Source # | |
IsGValue Int64 Source # | |
IsGValue Word32 Source # | |
IsGValue Word64 Source # | |
IsGValue CInt Source # | |
IsGValue CLong Source # | |
IsGValue CUInt Source # | |
IsGValue CULong Source # | |
IsGValue GType Source # | |
IsGValue (Maybe String) Source # | |
IsGValue (Maybe Text) Source # | |
IsGValue (StablePtr a) Source # | |
IsGValue (Ptr a) Source # | |
data GValueConstruct o Source #
A type holding a GValue
with an associated label. It is
parameterized by a phantom type encoding the target type for the
GValue
(useful when constructing properties).
GValueConstruct String GValue |
buildGValue :: GType -> (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
set_stablePtr :: GValue -> StablePtr a -> IO () Source #
Set the value of GValue
containing a StablePtr
get_stablePtr :: GValue -> IO (StablePtr a) Source #
Get the value of a GValue
containing a StablePtr
take_stablePtr :: Ptr GValue -> StablePtr a -> IO () Source #
Like set_stablePtr
, but the GValue
takes ownership of the StablePtr