1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 11:13:12 +02:00

api: add functions completion_new, completion_search and completion_free (issue #1484)

This commit is contained in:
Sébastien Helleu
2020-04-27 00:14:36 +02:00
parent 0f1cee08bf
commit d3020976d5
35 changed files with 1305 additions and 81 deletions
+18 -1
View File
@@ -67,7 +67,7 @@ struct timeval;
* please change the date with current one; for a second change at same
* date, increment the 01, otherwise please keep 01.
*/
#define WEECHAT_PLUGIN_API_VERSION "20200301-03"
#define WEECHAT_PLUGIN_API_VERSION "20200426-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@@ -1009,6 +1009,13 @@ struct t_weechat_plugin
struct t_gui_buffer *buffer, const char *command,
struct t_hashtable *options);
/* completion */
struct t_gui_completion *(*completion_new) (struct t_weechat_plugin *plugin,
struct t_gui_buffer *buffer);
void (*completion_search) (struct t_gui_completion *completion,
const char *data, int position, int direction);
void (*completion_free) (struct t_gui_completion *completion);
/* network */
int (*network_pass_proxy) (const char *proxy, int sock,
const char *address, int port);
@@ -1942,6 +1949,16 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
(weechat_plugin->command_options)(weechat_plugin, __buffer, \
__command, __options)
/* completion */
#define weechat_completion_new(__buffer) \
(weechat_plugin->completion_new)(weechat_plugin, __buffer)
#define weechat_completion_search(__completion, __data, __position, \
__direction) \
(weechat_plugin->completion_search)(__completion, __data, \
__position, __direction)
#define weechat_completion_free(__completion) \
(weechat_plugin->completion_free)(__completion)
/* network */
#define weechat_network_pass_proxy(__proxy, __sock, __address, __port) \
(weechat_plugin->network_pass_proxy)(__proxy, __sock, __address, \