diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-08-14 08:56:05 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-08-14 08:56:05 +0200 |
commit | a702b4776b72044034dd0f4fccad1240945355ed (patch) | |
tree | a8bf3361ce2c1016cb9ae850a3faab2983866251 /weechat/weechat-plugin.h | |
parent | fe80cc79131fcff8bca77873a805858f7e98be9f (diff) |
weechat: Update plugin header
Diffstat (limited to 'weechat/weechat-plugin.h')
-rw-r--r-- | weechat/weechat-plugin.h | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/weechat/weechat-plugin.h b/weechat/weechat-plugin.h index ca9f783..44c74ea 100644 --- a/weechat/weechat-plugin.h +++ b/weechat/weechat-plugin.h @@ -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 "20200621-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -995,6 +995,7 @@ struct t_weechat_plugin const char *color_fg, const char *color_delim, const char *color_bg, + const char *color_bg_inactive, const char *separator, const char *items); int (*bar_set) (struct t_gui_bar *bar, const char *property, @@ -1009,6 +1010,19 @@ 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); + int (*completion_search) (struct t_gui_completion *completion, + const char *data, int position, int direction); + const char *(*completion_get_string) (struct t_gui_completion *completion, + const char *property); + void (*completion_list_add) (struct t_gui_completion *completion, + const char *word, + int nick_completion, + const char *where); + void (*completion_free) (struct t_gui_completion *completion); + /* network */ int (*network_pass_proxy) (const char *proxy, int sock, const char *address, int port); @@ -1920,13 +1934,14 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); __condition, __position, __filling_top_bottom, \ __filling_left_right, __size, __size_max, \ __color_fg, __color_delim, __color_bg, \ - __separator, __items) \ + __color_bg_inactive, __separator, __items) \ (weechat_plugin->bar_new)(__name, __hidden, __priority, __type, \ __condition, __position, \ __filling_top_bottom, \ __filling_left_right, \ __size, __size_max, __color_fg, \ - __color_delim, __color_bg, __separator, \ + __color_delim, __color_bg, \ + __color_bg_inactive, __separator, \ __items) #define weechat_bar_set(__bar, __property, __value) \ (weechat_plugin->bar_set)(__bar, __property, __value) @@ -1942,6 +1957,22 @@ 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_get_string(__completion, __property) \ + (weechat_plugin->completion_get_string)(__completion, __property) +#define weechat_completion_list_add(__completion, __word, \ + __nick_completion, __where) \ + (weechat_plugin->completion_list_add)(__completion, __word, \ + __nick_completion, __where) +#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, \ |