Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GI.Atk.Objects.Relation
Contents
Description
An AtkRelation describes a relation between an object and one or more other objects. The actual relations that an object has with other objects are defined as an AtkRelationSet, which is a set of AtkRelations.
- newtype Relation = Relation (ManagedPtr Relation)
- class GObject o => IsRelation o
- toRelation :: (MonadIO m, IsRelation o) => o -> m Relation
- noRelation :: Maybe Relation
- relationAddTarget :: (HasCallStack, MonadIO m, IsRelation a, IsObject b) => a -> b -> m ()
- relationGetRelationType :: (HasCallStack, MonadIO m, IsRelation a) => a -> m RelationType
- relationGetTarget :: (HasCallStack, MonadIO m, IsRelation a) => a -> m [Object]
- relationNew :: (HasCallStack, MonadIO m) => [Object] -> RelationType -> m Relation
- relationRemoveTarget :: (HasCallStack, MonadIO m, IsRelation a, IsObject b) => a -> b -> m Bool
- constructRelationRelationType :: IsRelation o => RelationType -> IO (GValueConstruct o)
- getRelationRelationType :: (MonadIO m, IsRelation o) => o -> m RelationType
- setRelationRelationType :: (MonadIO m, IsRelation o) => o -> RelationType -> m ()
- clearRelationTarget :: (MonadIO m, IsRelation o) => o -> m ()
- constructRelationTarget :: IsRelation o => ValueArray -> IO (GValueConstruct o)
- getRelationTarget :: (MonadIO m, IsRelation o) => o -> m (Maybe ValueArray)
- setRelationTarget :: (MonadIO m, IsRelation o) => o -> ValueArray -> m ()
Exported types
Constructors
Relation (ManagedPtr Relation) |
class GObject o => IsRelation o Source #
Instances
(GObject a, UnknownAncestorError Constraint Relation a) => IsRelation a Source # | |
IsRelation Relation Source # | |
toRelation :: (MonadIO m, IsRelation o) => o -> m Relation Source #
Methods
addTarget
Arguments
:: (HasCallStack, MonadIO m, IsRelation a, IsObject b) | |
=> a |
|
-> b |
|
-> m () |
Adds the specified AtkObject to the target for the relation, if it is
not already present. See also objectAddRelationship
.
Since: 1.9
getRelationType
relationGetRelationType Source #
Arguments
:: (HasCallStack, MonadIO m, IsRelation a) | |
=> a |
|
-> m RelationType | Returns: the type of |
Gets the type of relation
getTarget
Arguments
:: (HasCallStack, MonadIO m, IsRelation a) | |
=> a |
|
-> m [Object] | Returns: the target list of |
Gets the target list of relation
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> [Object] |
|
-> RelationType |
|
-> m Relation | Returns: a pointer to a new |
Create a new relation for the specified key and the specified list
of targets. See also objectAddRelationship
.
removeTarget
Arguments
:: (HasCallStack, MonadIO m, IsRelation a, IsObject b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: TRUE if the removal is successful. |
Remove the specified AtkObject from the target for the relation.
Properties
relationType
constructRelationRelationType :: IsRelation o => RelationType -> IO (GValueConstruct o) Source #
getRelationRelationType :: (MonadIO m, IsRelation o) => o -> m RelationType Source #
setRelationRelationType :: (MonadIO m, IsRelation o) => o -> RelationType -> m () Source #
target
clearRelationTarget :: (MonadIO m, IsRelation o) => o -> m () Source #
constructRelationTarget :: IsRelation o => ValueArray -> IO (GValueConstruct o) Source #
getRelationTarget :: (MonadIO m, IsRelation o) => o -> m (Maybe ValueArray) Source #
setRelationTarget :: (MonadIO m, IsRelation o) => o -> ValueArray -> m () Source #