Top |
gboolean | thunarx_provider_plugin_get_resident () |
void | thunarx_provider_plugin_set_resident () |
GType | thunarx_provider_plugin_register_type () |
void | thunarx_provider_plugin_add_interface () |
GType | thunarx_provider_plugin_register_enum () |
GType | thunarx_provider_plugin_register_flags () |
#define | THUNARX_DEFINE_TYPE() |
#define | THUNARX_DEFINE_TYPE_WITH_CODE() |
#define | THUNARX_DEFINE_ABSTRACT_TYPE() |
#define | THUNARX_DEFINE_ABSTRACT_TYPE_WITH_CODE() |
#define | THUNARX_DEFINE_TYPE_EXTENDED() |
#define | THUNARX_IMPLEMENT_INTERFACE() |
ThunarxProviderPlugin is the interface to the file manager's type plugin loader implementation. It
provides methods to extensions - also called provider plugins - to register dynamic
types and control certain aspects of the plugin (see thunarx_provider_plugin_set_resident()
).
gboolean
thunarx_provider_plugin_get_resident (const ThunarxProviderPlugin *plugin
);
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.
void thunarx_provider_plugin_set_resident (ThunarxProviderPlugin *plugin
,gboolean resident
);
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
.
GType thunarx_provider_plugin_register_type (ThunarxProviderPlugin *plugin
,GType type_parent
,const gchar *type_name
,const GTypeInfo *type_info
,GTypeFlags type_flags
);
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 GType identifier for the type is returned, otherwise the type is newly registered,
and the resulting 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.
void thunarx_provider_plugin_add_interface (ThunarxProviderPlugin *plugin
,GType instance_type
,GType interface_type
,const GInterfaceInfo *interface_info
);
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.
GType thunarx_provider_plugin_register_enum (ThunarxProviderPlugin *plugin
,const gchar *name
,const GEnumValue *const_static_values
);
Looks up or registers an enumeration that is implemented with a particular type plugin
. If a type
with name name
was previously registered, the GType identifier for the type is returned,
otherwise the type is newly registered, and the resulting GType identifier returned.
As long as any instances of the type exist, the type plugin
will not be unloaded.
GType thunarx_provider_plugin_register_flags (ThunarxProviderPlugin *plugin
,const gchar *name
,const GFlagsValue *const_static_values
);
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 GType identifier for the type is returned, otherwise the type is newly
registered, and the resulting GType identifier returned.
As long as any instances of the type exist, the type plugin
will not be unloaded.
#define THUNARX_DEFINE_TYPE(TN, t_n, T_P) THUNARX_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
#define THUNARX_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) THUNARX_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, _C_)
#define THUNARX_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P) THUNARX_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
#define THUNARX_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) THUNARX_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, _C_)
#define THUNARX_DEFINE_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE)
struct ThunarxProviderPluginIface { gboolean (*get_resident) (const ThunarxProviderPlugin *plugin); void (*set_resident) (ThunarxProviderPlugin *plugin, gboolean resident); GType (*register_type) (ThunarxProviderPlugin *plugin, GType type_parent, const gchar *type_name, const GTypeInfo *type_info, GTypeFlags type_flags); void (*add_interface) (ThunarxProviderPlugin *plugin, GType instance_type, GType interface_type, const GInterfaceInfo *interface_info); GType (*register_enum) (ThunarxProviderPlugin *plugin, const gchar *name, const GEnumValue *const_static_values); GType (*register_flags) (ThunarxProviderPlugin *plugin, const gchar *name, const GFlagsValue *const_static_values); };
Interface with virtual methods implemented by the file manager and accessible from the extensions.
“resident”
property “resident” gboolean
Tells whether a plugin must reside in memory once loaded for
the first time. See thunarx_provider_plugin_get_resident()
and
thunarx_provider_plugin_set_resident()
for more details.
Owner: ThunarxProviderPlugin
Flags: Read / Write
Default value: FALSE