diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/en/weechat_plugin_api.en.txt | 6 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.txt | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index a887c334c..3296845de 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -5755,6 +5755,7 @@ Prototype: [source,C] ---------------------------------------- struct t_hook *weechat_hook_completion (const char *completion_item, + const char *description, int (*callback)(void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -5766,6 +5767,7 @@ Arguments: * 'completion_item': name of completion item, after you can use '%(name)' in a command hooked (argument 'completion') +* 'description': description of completion * 'callback': function called when completion item is used (user is completing something using this item), artuments: ** 'void *data': pointer @@ -5801,6 +5803,7 @@ my_completion_cb (void *data, const char *completion_item, } struct t_hook *my_completion_hook = weechat_hook_completion ("plugin_item", + "my custom completion!", &my_completion_cb, NULL); ---------------------------------------- @@ -5817,7 +5820,8 @@ def my_completion_cb(data, completion_item, buffer, completion): weechat.hook_completion_list_add(completion, "test_word2", 0, weechat.WEECHAT_LIST_POS_SORT) return weechat.WEECHAT_RC_OK -hook = weechat.hook_completion("plugin_item", "my_completion_cb", "") +hook = weechat.hook_completion("plugin_item", "my custom completion!", + "my_completion_cb", "") ---------------------------------------- weechat_hook_completion_list_add diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt index 23ae5919a..e8bd20c9c 100644 --- a/doc/fr/weechat_plugin_api.fr.txt +++ b/doc/fr/weechat_plugin_api.fr.txt @@ -5832,6 +5832,7 @@ Prototype : [source,C] ---------------------------------------- struct t_hook *weechat_hook_completion (const char *completion_item, + const char *description, int (*callback)(void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -5843,6 +5844,7 @@ Paramètres : * 'completion_item' : nom de l'objet de complétion, après vous pouvez utiliser '%(nom)' dans une commande (paramètre 'completion') +* 'description': description de la complétion * 'callback' : fonction appelée lorsque la complétion est utilisée (l'utilisateur est en train de compléter quelque chose qui fait appel à cette complétion), paramètres : @@ -5879,7 +5881,8 @@ my_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_OK; } -struct t_hook *my_completion_hook = weechat_hook_completion ("xtension_item", +struct t_hook *my_completion_hook = weechat_hook_completion ("extension_item", + "ma complétion !", &my_completion_cb, NULL); ---------------------------------------- @@ -5896,7 +5899,8 @@ def my_completion_cb(data, completion_item, buffer, completion): weechat.hook_completion_list_add(completion, "test_mot2", 0, weechat.WEECHAT_LIST_POS_SORT) return weechat.WEECHAT_RC_OK -hook = weechat.hook_completion("extension_item", "my_completion_cb", "") +hook = weechat.hook_completion("extension_item", "ma complétion !", + "my_completion_cb", "") ---------------------------------------- weechat_hook_completion_list_add |