diff options
author | Simmo Saan <simmo.saan@gmail.com> | 2017-11-06 18:32:46 +0200 |
---|---|---|
committer | Simmo Saan <simmo.saan@gmail.com> | 2017-11-06 18:32:46 +0200 |
commit | d1f530611caab0f8147d243f6dbc89f4f3bb255b (patch) | |
tree | 60e70e896131703c0c67e1052bc6e218e9a639cf /doc | |
parent | eca8bce3fde26d11ef60df2aa052d050c509268f (diff) | |
download | weechat-d1f530611caab0f8147d243f6dbc89f4f3bb255b.zip |
doc: mention weechat_plugin pointer used by plugin header
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/weechat_plugin_api.en.adoc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index f0e0c1c20..f5a28c807 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -41,6 +41,15 @@ The plugin has to include "weechat-plugin.h" file (available in WeeChat source code). This file defines structures and types used to communicate with WeeChat. +In order to call WeeChat functions in the format displayed in <<plugin_api>>, +the following global pointer must be declared and initialized in +<<_weechat_plugin_init,weechat_plugin_init>>: + +[source,C] +---- +struct t_weechat_plugin *weechat_plugin; +---- + [[macros]] === Macros @@ -83,7 +92,8 @@ int weechat_plugin_init (struct t_weechat_plugin *plugin, Arguments: -* _plugin_: pointer to WeeChat plugin structure +* _plugin_: pointer to WeeChat plugin structure, used to initialize the + convenience global pointer `weechat_plugin` * _argc_: number of arguments for plugin (given on command line by user) * _argv_: arguments for plugin |