1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

Merge pull request #1099 from sim642/doc-weechat_plugin

doc: mention weechat_plugin pointer used by plugin header
This commit is contained in:
Sébastien Helleu
2017-11-25 14:15:02 +01:00
committed by GitHub
+11 -1
View File
@@ -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