Thunarx.ProviderPlugin

g GObject.GInterface GObject.GInterface Thunarx.ProviderPlugin Thunarx.ProviderPlugin GObject.GInterface->Thunarx.ProviderPlugin

Implementations:

Thunarx.ProviderModule

Methods

add_interface (instance_type, interface_type, interface_info)

get_resident ()

register_enum (name, const_static_values)

register_flags (name, const_static_values)

register_type (type_parent, type_name, type_info, type_flags)

set_resident (resident)

Virtual Methods

do_add_interface (instance_type, interface_type, interface_info)

do_get_resident ()

do_register_enum (name, const_static_values)

do_register_flags (name, const_static_values)

do_register_type (type_parent, type_name, type_info, type_flags)

do_set_resident (resident)

Properties

Name

Type

Flags

Short Description

resident

bool

r/w

Don’t unload the plugin from memory

Signals

None

Fields

None

Class Details

class Thunarx.ProviderPlugin
Bases:

GObject.GInterface

Structure:

Thunarx.ProviderPluginIface

add_interface(instance_type, interface_type, interface_info)
Parameters:

Registers an additional interface for a type, whose interface lives in the given type self. If the interface was already registered for the type in this self, nothing will be done.

As long as any instances of the type exist, the type self will not be unloaded.

get_resident()
Returns:

True if self will be kept in memory once loaded for the first time.

Return type:

bool

Determines whether the application is allowed to unload self from memory when no longer needed and reload it on demand. If False is returned, then the application may unload self, else if True is returned the application will take care that self is never unloaded from memory during the lifetime of the application.

register_enum(name, const_static_values)
Parameters:
  • name (str) – the name for the type.

  • const_static_values (GObject.EnumValue) – an array of GObject.EnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being %0.

Returns:

the new or existing type id.

Return type:

GObject.GType

Looks up or registers an enumeration that is implemented with a particular type self. If a type with name name was previously registered, the GObject.GType identifier for the type is returned, otherwise the type is newly registered, and the resulting GObject.GType identifier returned.

As long as any instances of the type exist, the type self will not be unloaded.

register_flags(name, const_static_values)
Parameters:
  • name (str) – name for the type.

  • const_static_values (GObject.FlagsValue) – an array of GObject.FlagsValue structs for the possible flags values. The array is terminated by a struct with all members being %0.

Returns:

the new or existing type id.

Return type:

GObject.GType

Looks up or registers a flags type that is implemented with a particular type self. If a type with name qname was previously registered, the GObject.GType identifier for the type is returned, otherwise the type is newly registered, and the resulting GObject.GType identifier returned.

As long as any instances of the type exist, the type self will not be unloaded.

register_type(type_parent, type_name, type_info, type_flags)
Parameters:
  • type_parent (GObject.GType) – the type for the parent class.

  • type_name (str) – name for the type.

  • type_info (GObject.TypeInfo) – type information structure.

  • type_flags (GObject.TypeFlags) – flags field providing details about the type.

Returns:

the new or existing type id.

Return type:

GObject.GType

Looks up or registers a type that is implemented with a particular type self. If a type with name type_name was previously registered, the GObject.GType identifier for the type is returned, otherwise the type is newly registered, and the resulting GObject.GType identifier returned.

When reregistering a type (typically because a module is unloaded then reloaded, and reinitialized), module and type_parent must be the same as they were previously.

set_resident(resident)
Parameters:

resident (bool) – True to make self resident in memory.

This method is used to instruct the application that self must be kept in memory during the lifetime of the application. The default is to allow the application to unload self from the memory when no longer needed. If this method is invoked with a resident value of True then the application will never try to unload self.

This method has no effect unless called from the %thunar_extension_initialize method of the self.

do_add_interface(instance_type, interface_type, interface_info) virtual
Parameters:

Registers an additional interface for a type, whose interface lives in the given type plugin. If the interface was already registered for the type in this plugin, nothing will be done.

As long as any instances of the type exist, the type plugin will not be unloaded.

do_get_resident() virtual
Returns:

True if plugin will be kept in memory once loaded for the first time.

Return type:

bool

Determines whether the application is allowed to unload plugin from memory when no longer needed and reload it on demand. If False is returned, then the application may unload plugin, else if True is returned the application will take care that plugin is never unloaded from memory during the lifetime of the application.

do_register_enum(name, const_static_values) virtual
Parameters:
  • name (str) – the name for the type.

  • const_static_values (GObject.EnumValue) – an array of GObject.EnumValue structs for the possible enumeration values. The array is terminated by a struct with all members being %0.

Returns:

the new or existing type id.

Return type:

GObject.GType

Looks up or registers an enumeration that is implemented with a particular type plugin. If a type with name name was previously registered, the GObject.GType identifier for the type is returned, otherwise the type is newly registered, and the resulting GObject.GType identifier returned.

As long as any instances of the type exist, the type plugin will not be unloaded.

do_register_flags(name, const_static_values) virtual
Parameters:
  • name (str) – name for the type.

  • const_static_values (GObject.FlagsValue) – an array of GObject.FlagsValue structs for the possible flags values. The array is terminated by a struct with all members being %0.

Returns:

the new or existing type id.

Return type:

GObject.GType

Looks up or registers a flags type that is implemented with a particular type plugin. If a type with name qname was previously registered, the GObject.GType identifier for the type is returned, otherwise the type is newly registered, and the resulting GObject.GType identifier returned.

As long as any instances of the type exist, the type plugin will not be unloaded.

do_register_type(type_parent, type_name, type_info, type_flags) virtual
Parameters:
  • type_parent (GObject.GType) – the type for the parent class.

  • type_name (str) – name for the type.

  • type_info (GObject.TypeInfo) – type information structure.

  • type_flags (GObject.TypeFlags) – flags field providing details about the type.

Returns:

the new or existing type id.

Return type:

GObject.GType

Looks up or registers a type that is implemented with a particular type plugin. If a type with name type_name was previously registered, the GObject.GType identifier for the type is returned, otherwise the type is newly registered, and the resulting GObject.GType identifier returned.

When reregistering a type (typically because a module is unloaded then reloaded, and reinitialized), module and type_parent must be the same as they were previously.

do_set_resident(resident) virtual
Parameters:

resident (bool) – True to make plugin resident in memory.

This method is used to instruct the application that plugin must be kept in memory during the lifetime of the application. The default is to allow the application to unload plugin from the memory when no longer needed. If this method is invoked with a resident value of True then the application will never try to unload plugin.

This method has no effect unless called from the %thunar_extension_initialize method of the plugin.

Property Details

Thunarx.ProviderPlugin.props.resident
Name:

resident

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Tells whether a plugin must reside in memory once loaded for the first time. See Thunarx.ProviderPlugin.get_resident() and Thunarx.ProviderPlugin.set_resident() for more details.