Foundry.Intent

g Foundry.Intent Foundry.Intent GObject.Object GObject.Object GObject.Object->Foundry.Intent

Subclasses:

Foundry.ActionIntent, Foundry.DocumentationIntent, Foundry.OpenFileIntent, Foundry.SymbolIntent, Foundry.TerminalIntent, Foundry.WebIntent

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

dup_attribute_object (attribute)

dup_attribute_string (attribute)

dup_attribute_strv (attribute)

get_attribute_boolean (attribute)

get_attribute_type (attribute)

get_attribute_uint (attribute, value)

get_attribute_value (attribute)

has_attribute (attribute)

set_attribute_value (attribute, value)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Foundry.Intent(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Foundry.IntentClass

Abstract base class for representing intents.

Foundry.Intent provides the core interface for representing user intents and actions within the development environment. It supports attribute storage and provides a unified interface for intent handling across different parts of the development environment.

dup_attribute_object(attribute)
Parameters:

attribute (str) – the attribute name

Returns:

the [class`GObject`.Object], or None if not found or not an object

Return type:

object or None

Gets the attribute value as a [class`GObject`.Object]. The returned object is owned by the intent and should not be unref’d.

New in version 1.1.

dup_attribute_string(attribute)
Parameters:

attribute (str) – the attribute name

Returns:

the string value, or None if not found or not a string

Return type:

str or None

Gets the attribute value as a string. The returned string is owned by the intent and should not be modified or freed.

New in version 1.1.

dup_attribute_strv(attribute)
Parameters:

attribute (str) – the attribute name

Returns:

the string value, or None if not found or not a string

Return type:

[str]

Gets the attribute value as a string. The returned string is owned by the intent and should not be modified or freed.

New in version 1.1.

get_attribute_boolean(attribute)
Parameters:

attribute (str) – the attribute name

Returns:

the boolean value, or False if not found or not a boolean

Return type:

bool

Gets the attribute value as a boolean.

New in version 1.1.

get_attribute_type(attribute)
Parameters:

attribute (str) – the attribute name

Returns:

the GObject.GType of the attribute, or GObject.TYPE_INVALID if not found

Return type:

GObject.GType

Gets the GObject.GType of the attribute value.

New in version 1.1.

get_attribute_uint(attribute, value)
Parameters:
  • attribute (str) –

  • value (int) –

Return type:

bool

get_attribute_value(attribute)
Parameters:

attribute (str) – the attribute name

Returns:

the GObject.Value, or None if not found

Return type:

GObject.Value

Gets the attribute value. The returned value is owned by the intent and should not be modified or freed.

New in version 1.1.

has_attribute(attribute)
Parameters:

attribute (str) – the attribute name to check

Returns:

True if the attribute exists, False otherwise

Return type:

bool

Checks if the intent has an attribute with the given name.

New in version 1.1.

set_attribute_value(attribute, value)
Parameters:

Sets an attribute value for the intent. The value is copied.

New in version 1.1.