Atk.Relation

g Atk.Relation Atk.Relation GObject.Object GObject.Object GObject.Object->Atk.Relation

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (targets, relationship)

add_target (target)

get_relation_type ()

get_target ()

remove_target (target)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

relation-type

Atk.RelationType

r/w

The type of the relation

target

GObject.ValueArray

r/w

An array of the targets for the relation

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

relationship

Atk.RelationType

r

target

[object]

r

Class Details

class Atk.Relation(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Atk.RelationClass

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

An Atk.Relation 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 Atk.RelationSet, which is a set of AtkRelations.

classmethod new(targets, relationship)[source]
Parameters:
Returns:

a pointer to a new Atk.Relation

Return type:

Atk.Relation

Create a new relation for the specified key and the specified list of targets. See also Atk.Object.add_relationship().

add_target(target)[source]
Parameters:

target (Atk.Object) – an Atk.Object

Adds the specified Atk.Object to the target for the relation, if it is not already present. See also Atk.Object.add_relationship().

New in version 1.9.

get_relation_type()[source]
Returns:

the type of self

Return type:

Atk.RelationType

Gets the type of self

get_target()[source]
Returns:

the target list of self

Return type:

[Atk.Object]

Gets the target list of self

remove_target(target)[source]
Parameters:

target (Atk.Object) – an Atk.Object

Returns:

True if the removal is successful.

Return type:

bool

Remove the specified Atk.Object from the target for the relation.

Property Details

Atk.Relation.props.relation_type
Name:

relation-type

Type:

Atk.RelationType

Default Value:

Atk.RelationType.NULL

Flags:

READABLE, WRITABLE

The type of the relation

Atk.Relation.props.target
Name:

target

Type:

GObject.ValueArray

Default Value:

None

Flags:

READABLE, WRITABLE

An array of the targets for the relation