Next: , Previous: AtkRegistry, Up: Top


17 AtkRelation

An object used to describe a relation between a object and one or more other objects.

17.1 Overview

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.

17.2 Usage

— Class: <atk-relation>

Derives from <gobject>.

This class defines the following slots:

relation-type
The type of the relation
target
An array of the targets for the relation
— Function: atk-relation-type-register (name mchars) ⇒  (ret <atk-relation-type>)

Associate name with a new <atk-relation-type>

name
a name string
ret
an <atk-relation-type> associated with name
— Function: atk-relation-type-get-name (type <atk-relation-type>) ⇒  (ret mchars)

Gets the description string describing the <atk-relation-type>type.

type
The <atk-relation-type> whose name is required
ret
the string describing the AtkRelationType
— Function: atk-relation-type-for-name (name mchars) ⇒  (ret <atk-relation-type>)

Get the <atk-relation-type> type corresponding to a relation name.

name
a string which is the (non-localized) name of an ATK relation type.
ret
the <atk-relation-type> enumerated type corresponding to the specified name, or <atk-relation-null> if no matching relation type is found.
— Function: atk-relation-get-relation-type (self <atk-relation>) ⇒  (ret <atk-relation-type>)
— Method: get-relation-type

Gets the type of relation

relation
an <atk-relation>
ret
the type of relation
— Function: atk-relation-add-target (self <atk-relation>) (target <atk-object>)
— Method: add-target

Adds the specified AtkObject to the target for the relation, if it is not already present.

relation
an <atk-relation>
target
an <atk-object>

Since ATK 1.9