Module: cwc.plugin

C plugins lifecycle and management API.

Info:

  • Copyright: 2024
  • License: GPLv3
  • Originally authored by: Dwi Asmoro Bangun
    (Full contributors list available on our github project)

Static module functions

cwc.plugin.get () -> cwc_plugin[] Get all loaded plugin into a table.
cwc.plugin.load (path) -> boolean load C plugin
cwc.plugin.unload_byname (name) -> boolean unload C plugin filtered by name

Object properties

name string The name of the plugin. Read only
description string The description of the plugin. Read only
version string The version of the plugin. Read only
author string The author of the plugin. Read only
license string The license of the plugin. Read only
filename string The filename of the plugin. Read only

Object methods

:unload () Unload this plugin.

Signals

plugin::load Emitted when a plugin is loaded.
plugin::unload Emitted when the plugin is about to be unloaded.


Static module functions

🔗 cwc.plugin.get () -> cwc_plugin[]
Get all loaded plugin into a table.

Returns:

    cwc_plugin[]
🔗 cwc.plugin.load (path) -> boolean
load C plugin

Parameters:

Name Type(s) Description
path string File location of the C shared object

Returns:

    boolean true if loading success
🔗 cwc.plugin.unload_byname (name) -> boolean
unload C plugin filtered by name

Parameters:

Name Type(s) Description
name string Plugin name

Returns:

    boolean true if unloading success

Object properties

🔗 name string · read only
The name of the plugin.

Constraints:

Default value : ''
🔗 description string · read only
The description of the plugin.

Constraints:

Default value : ''
🔗 version string · read only
The version of the plugin.

Constraints:

Default value : ''
🔗 author string · read only
The author of the plugin.

Constraints:

Default value : ''
🔗 license string · read only
The license of the plugin.

Constraints:

Default value : ''
🔗 filename string · read only
The filename of the plugin.

Constraints:

Default value : ''

Object methods

🔗 :unload ()
Unload this plugin.

Signals

🔗 plugin::load
Emitted when a plugin is loaded.

Arguments:

Name Type(s) Description
p cwc_plugin The plugin object.
🔗 plugin::unload
Emitted when the plugin is about to be unloaded.

Arguments:

Name Type(s) Description
p cwc_plugin The plugin object.
generated by LDoc 1.5.0 based on AwesomeWM template