Foundry.SearchResult

g Foundry.SearchResult Foundry.SearchResult GObject.Object GObject.Object GObject.Object->Foundry.SearchResult

Subclasses:

Foundry.MenuSearchResult

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

create_intent (context)

dup_icon ()

dup_subtitle ()

dup_title ()

get_use_underline ()

load ()

Virtual Methods

Inherited:

GObject.Object (7)

do_create_intent (context)

do_dup_icon ()

do_dup_subtitle ()

do_dup_title ()

do_get_use_underline ()

do_load ()

Properties

Name

Type

Flags

Short Description

icon

Gio.Icon

r

subtitle

str

r

title

str

r

use-underline

bool

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Foundry.SearchResult(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Foundry.SearchResultClass

Abstract base class for search results.

Foundry.SearchResult provides the core interface for representing search results with common properties like title, subtitle, and icon. Concrete implementations handle specific types of search results and provide specialized functionality for different search contexts and result types.

create_intent(context)
Parameters:

context (Foundry.Context) – a [class`Foundry`.Context]

Return type:

Foundry.Intent or None

Create an intent for the search result.

For search results that support intents, this describes an action that should be handled for the user and dispatched via [method`Foundry`.IntentManager.dispatch].

New in version 1.1.

dup_icon()
Return type:

Gio.Icon or None

dup_subtitle()
Return type:

str

dup_title()
Return type:

str

get_use_underline()
Returns:

True if underline should be used, False otherwise

Return type:

bool

Gets whether the search result should use underline.

New in version 1.1.

load()
Returns:

a [class`Dex`.Future] that resolves to a [class`GObject`.Object].

Return type:

Dex.Future

Loads the contents of the search result.

The consumer of this should know how to handle the specific object type by checking it’s GType.

For example, if the result is a [class`Foundry`.Documentation] then you may want to check it’s URI property to open the documentation.

It is expected that search providers load well known object types which applications can reasonably handle.

do_create_intent(context) virtual
Parameters:

context (Foundry.Context) – a [class`Foundry`.Context]

Return type:

Foundry.Intent or None

Create an intent for the search result.

For search results that support intents, this describes an action that should be handled for the user and dispatched via [method`Foundry`.IntentManager.dispatch].

New in version 1.1.

do_dup_icon() virtual
Return type:

Gio.Icon or None

do_dup_subtitle() virtual
Return type:

str

do_dup_title() virtual
Return type:

str

do_get_use_underline() virtual
Returns:

True if underline should be used, False otherwise

Return type:

bool

Gets whether the search result should use underline.

New in version 1.1.

do_load() virtual
Returns:

a [class`Dex`.Future] that resolves to a [class`GObject`.Object].

Return type:

Dex.Future

Loads the contents of the search result.

The consumer of this should know how to handle the specific object type by checking it’s GType.

For example, if the result is a [class`Foundry`.Documentation] then you may want to check it’s URI property to open the documentation.

It is expected that search providers load well known object types which applications can reasonably handle.

Property Details

Foundry.SearchResult.props.icon
Name:

icon

Type:

Gio.Icon

Default Value:

None

Flags:

READABLE

Foundry.SearchResult.props.subtitle
Name:

subtitle

Type:

str

Default Value:

None

Flags:

READABLE

Foundry.SearchResult.props.title
Name:

title

Type:

str

Default Value:

None

Flags:

READABLE

Foundry.SearchResult.props.use_underline
Name:

use-underline

Type:

bool

Default Value:

False

Flags:

READABLE