Class

ValentApplicationPlugin

since: 1.0

Description [src]

abstract class Valent.ApplicationPlugin : Valent.Object {
  parent_instance: ValentObject
}

An abstract base class for application plugins.

ValentApplicationPlugin is a base class for plugins that operate in the scope of the application. This usually means integrating the application with the host environment (eg. XDG Autostart).

Implementation Notes

Implementations may handle application events by overriding the appropriate virtual function, including Valent.ApplicationPluginClass.activate to handle activation, Valent.ApplicationPluginClass.command_line to handle CLI options, or Valent.ApplicationPluginClass.open to handle files.

For plugin preferences see ValentPreferencesPage.

.plugin File

Application plugins have no special fields in the .plugin file.

Available since: 1.0

Hierarchy

hierarchy this ValentApplicationPlugin ancestor_0 ValentObject ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Ancestors

Instance methods

valent_application_plugin_activate

Handle activation of the application.

since: 1.0

valent_application_plugin_command_line

Handle the given command-line options.

since: 1.0

valent_application_plugin_disable

Disable the plugin.

since: 1.0

valent_application_plugin_enable

Enable the plugin.

since: 1.0

valent_application_plugin_get_application

Get the application this plugin is bound to.

since: 1.0

valent_application_plugin_get_device_manager

Get the ValentDeviceManager of the application.

since: 1.0

valent_application_plugin_open

Open the given files.

since: 1.0

Methods inherited from ValentObject (9)
valent_object_attach_cancellable

Attach the object’s cancellable another cancellable.

since: 1.0

valent_object_chain_cancellable

Chain a cancellable to the object’s cancellable.

since: 1.0

valent_object_destroy

Destroy the object.

since: 1.0

valent_object_in_destruction

Get whether the object is destroyed or in destruction.

since: 1.0

valent_object_lock

Acquire a lock on object.

since: 1.0

valent_object_notify

Emit GObject::notify on object, on the main thread.

since: 1.0

valent_object_notify_by_pspec

Emit GObject::notify on object, on the main thread.

since: 1.0

valent_object_ref_cancellable

Get a GCancellable for the object.

since: 1.0

valent_object_unlock

Release a lock on object.

since: 1.0

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Valent.ApplicationPlugin:application

The GApplication this plugin is bound to.

since: 1.0

Valent.ApplicationPlugin:device-manager

The ValentDeviceManager this plugin is bound to.

since: 1.0

Valent.ApplicationPlugin:plugin-info

The PeasPluginInfo describing this plugin.

since: 1.0

Properties inherited from ValentObject (1)
Valent.Object:cancellable

The object GCancellable.

since: 1.0

Signals

Signals inherited from ValentObject (1)
ValentObject::destroy

Emitted when the object is being destroyed.

since: 1.0

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct ValentApplicationPluginClass {
  ValentObjectClass parent_class;
  void (* disable) (
    ValentApplicationPlugin* plugin
  );
  void (* enable) (
    ValentApplicationPlugin* plugin
  );
  gboolean (* activate) (
    ValentApplicationPlugin* plugin
  );
  int (* command_line) (
    ValentApplicationPlugin* plugin,
    GApplicationCommandLine* command_line
  );
  gboolean (* open) (
    ValentApplicationPlugin* plugin,
    GFile** files,
    int n_files,
    const char* hint
  );
  
}

The virtual function table for ValentApplicationPlugin.

Class members
parent_class: ValentObjectClass
No description available.
disable: void (* disable) ( ValentApplicationPlugin* plugin )
No description available.
enable: void (* enable) ( ValentApplicationPlugin* plugin )
No description available.
activate: gboolean (* activate) ( ValentApplicationPlugin* plugin )
No description available.
command_line: int (* command_line) ( ValentApplicationPlugin* plugin, GApplicationCommandLine* command_line )
No description available.
open: gboolean (* open) ( ValentApplicationPlugin* plugin, GFile** files, int n_files, const char* hint )
No description available.

Virtual methods

Valent.ApplicationPluginClass.activate

Handle activation of the application.

since: 1.0

Valent.ApplicationPluginClass.command_line

Handle the given command-line options.

since: 1.0

Valent.ApplicationPluginClass.disable

Disable the plugin.

since: 1.0

Valent.ApplicationPluginClass.enable

Enable the plugin.

since: 1.0

Valent.ApplicationPluginClass.open

Open the given files.

since: 1.0