Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.Handy.Objects.ValueObject
Description
An object representing a [structgObject
.Value].
The HdyValueObject
object represents a [structgObject
.Value], allowing it
to be used with ListModel
.
Since: 1.0
Synopsis
- newtype ValueObject = ValueObject (ManagedPtr ValueObject)
- class (GObject o, IsDescendantOf ValueObject o) => IsValueObject o
- toValueObject :: (MonadIO m, IsValueObject o) => o -> m ValueObject
- valueObjectCopyValue :: (HasCallStack, MonadIO m, IsValueObject a) => a -> GValue -> m ()
- valueObjectDupString :: (HasCallStack, MonadIO m, IsValueObject a) => a -> m Text
- valueObjectGetString :: (HasCallStack, MonadIO m, IsValueObject a) => a -> m Text
- valueObjectGetValue :: (HasCallStack, MonadIO m, IsValueObject a) => a -> m GValue
- valueObjectNew :: (HasCallStack, MonadIO m) => GValue -> m ValueObject
- constructValueObjectValue :: (IsValueObject o, MonadIO m) => GValue -> m (GValueConstruct o)
- getValueObjectValue :: (MonadIO m, IsValueObject o) => o -> m GValue
Exported types
newtype ValueObject Source #
Memory-managed wrapper type.
Constructors
ValueObject (ManagedPtr ValueObject) |
Instances
Eq ValueObject Source # | |
Defined in GI.Handy.Objects.ValueObject | |
GObject ValueObject Source # | |
Defined in GI.Handy.Objects.ValueObject | |
ManagedPtrNewtype ValueObject Source # | |
Defined in GI.Handy.Objects.ValueObject Methods toManagedPtr :: ValueObject -> ManagedPtr ValueObject | |
TypedObject ValueObject Source # | |
Defined in GI.Handy.Objects.ValueObject | |
HasParentTypes ValueObject Source # | |
Defined in GI.Handy.Objects.ValueObject | |
IsGValue (Maybe ValueObject) Source # | Convert |
Defined in GI.Handy.Objects.ValueObject Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ValueObject -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ValueObject) | |
type ParentTypes ValueObject Source # | |
Defined in GI.Handy.Objects.ValueObject type ParentTypes ValueObject = '[Object] |
class (GObject o, IsDescendantOf ValueObject o) => IsValueObject o Source #
Type class for types which can be safely cast to ValueObject
, for instance with toValueObject
.
Instances
(GObject o, IsDescendantOf ValueObject o) => IsValueObject o Source # | |
Defined in GI.Handy.Objects.ValueObject |
toValueObject :: (MonadIO m, IsValueObject o) => o -> m ValueObject Source #
Cast to ValueObject
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, copyValue, dupString, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getProperty, getQdata, getString, getValue.
Setters
copyValue
Arguments
:: (HasCallStack, MonadIO m, IsValueObject a) | |
=> a |
|
-> GValue |
|
-> m () |
Copy data from the contained [structgObject
.Value] into dest
.
Since: 1.0
dupString
Arguments
:: (HasCallStack, MonadIO m, IsValueObject a) | |
=> a |
|
-> m Text | Returns: a copy of the contained string |
Gets a copy of the contained string if the value is of type G_TYPE_STRING
.
Since: 1.0
getString
Arguments
:: (HasCallStack, MonadIO m, IsValueObject a) | |
=> a |
|
-> m Text | Returns: the contained string |
Returns the contained string if the value is of type G_TYPE_STRING
.
Since: 1.0
getValue
Arguments
:: (HasCallStack, MonadIO m, IsValueObject a) | |
=> a |
|
-> m GValue | Returns: the contained [struct |
Return the contained value.
Since: 1.0
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> GValue |
|
-> m ValueObject | Returns: a new |
Creates a new HdyValueObject
.
Since: 1.0
Properties
value
The contained value.
Since: 1.0
constructValueObjectValue :: (IsValueObject o, MonadIO m) => GValue -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “value
” property. This is rarely needed directly, but it is used by new
.
getValueObjectValue :: (MonadIO m, IsValueObject o) => o -> m GValue Source #
Get the value of the “value
” property.
When overloading is enabled, this is equivalent to
get
valueObject #value