Foundry.Contextual

g Foundry.Contextual Foundry.Contextual GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

Foundry.AuthProvider, Foundry.BuildAddin, Foundry.BuildPipeline, Foundry.BuildProgress, Foundry.BuildStage, Foundry.Command, Foundry.CommandProvider, Foundry.CompletionProvider, Foundry.Config, Foundry.ConfigProvider, Foundry.Debugger, Foundry.DebuggerProvider, Foundry.Dependency, Foundry.DependencyProvider, Foundry.DeployStrategy, Foundry.Device, Foundry.DeviceProvider, Foundry.DiagnosticProvider, Foundry.DirectoryListing, Foundry.DocumentationBundle, Foundry.DocumentationProvider, Foundry.Extension, Foundry.ExtensionSet, Foundry.FileSearchProvider, Foundry.Forge, Foundry.HoverProvider, Foundry.IntentHandler, Foundry.KeyRotator, Foundry.LanguageGuesser, Foundry.LlmModel, Foundry.LlmProvider, Foundry.LlmTool, Foundry.LspClient, Foundry.LspProvider, Foundry.LspServer, Foundry.McpServer, Foundry.PtyDiagnostics, Foundry.RenameProvider, Foundry.RunTool, Foundry.Sdk, Foundry.SdkProvider, Foundry.SearchProvider, Foundry.SearchRequest, Foundry.Service, Foundry.Settings, Foundry.SymbolProvider, Foundry.Test, Foundry.TestProvider, Foundry.TextBufferProvider, Foundry.TextDocument, Foundry.TextDocumentAddin, Foundry.TextFormatter, Foundry.TextSettings, Foundry.TextSettingsProvider, Foundry.TweakProvider, Foundry.Vcs, Foundry.VcsProvider

Methods

Inherited:

GObject.Object (37), Json.Serializable (8)

Structs:

GObject.ObjectClass (5)

class

error_quark ()

acquire ()

dup_context ()

inhibit ()

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

Properties

Name

Type

Flags

Short Description

context

Foundry.Context

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Foundry.Contextual(**kwargs)
Bases:

GObject.Object, Json.Serializable

Abstract:

Yes

Structure:

Foundry.ContextualClass

Abstract base class for objects that are associated with a Foundry context.

Foundry.Contextual provides the core interface for objects that need access to the Foundry context and its services. It includes context management, serialization support, and provides a unified interface for context-aware objects throughout the development environment.

classmethod error_quark()
Return type:

int

acquire()
Raises:

GLib.Error

Returns:

a [class`Foundry`.Context] or error is set.

Return type:

Foundry.Context

This method provides a checked way to get a context for the contextual

If the resulting context is None, then the error is set to an appropriate error.

New in version 1.1.

dup_context()
Returns:

a Foundry.Context or None

Return type:

Foundry.Context or None

Gets the Foundry.Context that self is a part of while safely increasing the reference count of the resulting Foundry.Context by 1.

inhibit()
Raises:

GLib.Error

Returns:

a [class`Foundry`.Inhibitor] or None and error is set.

Return type:

Foundry.Inhibitor

Creates a new [class`Foundry`.Inhibitor] that will keep the [class`Foundry`.Context] alive and prevent shutdown until [method`Foundry`.Inhibitor.uninhibit] is called or the [class`Foundry`.Inhibitor] is finalized, whichever comes first.

If the context is already in shutdown, then None is returned and error is set.

Property Details

Foundry.Contextual.props.context
Name:

context

Type:

Foundry.Context

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY