summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/scripts/lua/weechat-lua-api.c27
-rw-r--r--src/plugins/scripts/perl/weechat-perl-api.c26
-rw-r--r--src/plugins/scripts/python/weechat-python-api.c20
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby-api.c29
-rw-r--r--src/plugins/weechat-plugin.h12
5 files changed, 64 insertions, 50 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c
index 2bce09a6d..2b1f2c65a 100644
--- a/src/plugins/scripts/lua/weechat-lua-api.c
+++ b/src/plugins/scripts/lua/weechat-lua-api.c
@@ -4038,8 +4038,8 @@ static int
weechat_lua_api_bar_new (lua_State *L)
{
const char *name, *hidden, *priority, *type, *conditions, *position;
- const char *filling, *size, *size_max, *color_fg, *color_delim, *color_bg;
- const char *separator, *items;
+ const char *filling_top_bottom, *filling_left_right, *size, *size_max;
+ const char *color_fg, *color_delim, *color_bg, *separator, *items;
char *result;
int n;
@@ -4058,7 +4058,8 @@ weechat_lua_api_bar_new (lua_State *L)
type = NULL;
conditions = NULL;
position = NULL;
- filling = NULL;
+ filling_top_bottom = NULL;
+ filling_left_right = NULL;
size = NULL;
size_max = NULL;
color_fg = NULL;
@@ -4069,19 +4070,20 @@ weechat_lua_api_bar_new (lua_State *L)
n = lua_gettop (lua_current_interpreter);
- if (n < 14)
+ if (n < 15)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("bar_new");
LUA_RETURN_EMPTY;
}
- name = lua_tostring (lua_current_interpreter, -14);
- hidden = lua_tostring (lua_current_interpreter, -13);
- priority = lua_tostring (lua_current_interpreter, -12);
- type = lua_tostring (lua_current_interpreter, -11);
- conditions = lua_tostring (lua_current_interpreter, -10);
- position = lua_tostring (lua_current_interpreter, -9);
- filling = lua_tostring (lua_current_interpreter, -8);
+ name = lua_tostring (lua_current_interpreter, -15);
+ hidden = lua_tostring (lua_current_interpreter, -14);
+ priority = lua_tostring (lua_current_interpreter, -13);
+ type = lua_tostring (lua_current_interpreter, -12);
+ conditions = lua_tostring (lua_current_interpreter, -11);
+ position = lua_tostring (lua_current_interpreter, -10);
+ filling_top_bottom = lua_tostring (lua_current_interpreter, -9);
+ filling_left_right = lua_tostring (lua_current_interpreter, -8);
size = lua_tostring (lua_current_interpreter, -7);
size_max = lua_tostring (lua_current_interpreter, -6);
color_fg = lua_tostring (lua_current_interpreter, -5);
@@ -4096,7 +4098,8 @@ weechat_lua_api_bar_new (lua_State *L)
type,
conditions,
position,
- filling,
+ filling_top_bottom,
+ filling_left_right,
size,
size_max,
color_fg,
diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c
index aa0a6e0b6..bcee5ce30 100644
--- a/src/plugins/scripts/perl/weechat-perl-api.c
+++ b/src/plugins/scripts/perl/weechat-perl-api.c
@@ -3354,8 +3354,8 @@ static XS (XS_weechat_bar_search)
static XS (XS_weechat_bar_new)
{
char *result, *name, *hidden, *priority, *type, *conditions, *position;
- char *filling, *size, *size_max, *color_fg, *color_delim, *color_bg;
- char *separator, *bar_items;
+ char *filling_top_bottom, *filling_left_right, *size, *size_max, *color_fg;
+ char *color_delim, *color_bg, *separator, *bar_items;
dXSARGS;
/* make C compiler happy */
@@ -3367,7 +3367,7 @@ static XS (XS_weechat_bar_new)
PERL_RETURN_EMPTY;
}
- if (items < 14)
+ if (items < 15)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("bar_new");
PERL_RETURN_EMPTY;
@@ -3379,21 +3379,23 @@ static XS (XS_weechat_bar_new)
type = SvPV (ST (3), PL_na);
conditions = SvPV (ST (4), PL_na);
position = SvPV (ST (5), PL_na);
- filling = SvPV (ST (6), PL_na);
- size = SvPV (ST (7), PL_na);
- size_max = SvPV (ST (8), PL_na);
- color_fg = SvPV (ST (9), PL_na);
- color_delim = SvPV (ST (10), PL_na);
- color_bg = SvPV (ST (11), PL_na);
- separator = SvPV (ST (12), PL_na);
- bar_items = SvPV (ST (13), PL_na);
+ filling_top_bottom = SvPV (ST (6), PL_na);
+ filling_left_right = SvPV (ST (7), PL_na);
+ size = SvPV (ST (8), PL_na);
+ size_max = SvPV (ST (9), PL_na);
+ color_fg = SvPV (ST (10), PL_na);
+ color_delim = SvPV (ST (11), PL_na);
+ color_bg = SvPV (ST (12), PL_na);
+ separator = SvPV (ST (13), PL_na);
+ bar_items = SvPV (ST (14), PL_na);
result = script_ptr2str (weechat_bar_new (name,
hidden,
priority,
type,
conditions,
position,
- filling,
+ filling_top_bottom,
+ filling_left_right,
size,
size_max,
color_fg,
diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c
index acff1681e..755e16300 100644
--- a/src/plugins/scripts/python/weechat-python-api.c
+++ b/src/plugins/scripts/python/weechat-python-api.c
@@ -3565,9 +3565,9 @@ weechat_python_api_bar_search (PyObject *self, PyObject *args)
static PyObject *
weechat_python_api_bar_new (PyObject *self, PyObject *args)
{
- char *name, *hidden, *priority, *type, *conditions, *position, *filling;
- char *size, *size_max, *color_fg, *color_delim, *color_bg, *separator;
- char *items, *result;
+ char *name, *hidden, *priority, *type, *conditions, *position;
+ char *filling_top_bottom, *filling_left_right, *size, *size_max;
+ char *color_fg, *color_delim, *color_bg, *separator, *items, *result;
PyObject *object;
/* make C compiler happy */
@@ -3585,7 +3585,8 @@ weechat_python_api_bar_new (PyObject *self, PyObject *args)
type = NULL;
conditions = NULL;
position = NULL;
- filling = NULL;
+ filling_top_bottom = NULL;
+ filling_left_right = NULL;
size = NULL;
size_max = NULL;
color_fg = NULL;
@@ -3594,10 +3595,10 @@ weechat_python_api_bar_new (PyObject *self, PyObject *args)
separator = NULL;
items = NULL;
- if (!PyArg_ParseTuple (args, "ssssssssssssss", &name, &hidden, &priority,
- &conditions, &type, &position, &filling, &size,
- &size_max, &color_fg, &color_delim, &color_bg,
- &separator, &items))
+ if (!PyArg_ParseTuple (args, "sssssssssssssss", &name, &hidden, &priority,
+ &conditions, &type, &position, &filling_top_bottom,
+ &filling_left_right, &size, &size_max, &color_fg,
+ &color_delim, &color_bg, &separator, &items))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("bar_new");
PYTHON_RETURN_EMPTY;
@@ -3609,7 +3610,8 @@ weechat_python_api_bar_new (PyObject *self, PyObject *args)
type,
conditions,
position,
- filling,
+ filling_top_bottom,
+ filling_left_right,
size,
size_max,
color_fg,
diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c
index 72d61b803..c41010fd6 100644
--- a/src/plugins/scripts/ruby/weechat-ruby-api.c
+++ b/src/plugins/scripts/ruby/weechat-ruby-api.c
@@ -4095,13 +4095,14 @@ weechat_ruby_api_bar_search (VALUE class, VALUE name)
static VALUE
weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
VALUE priority, VALUE type, VALUE conditions,
- VALUE position, VALUE filling, VALUE size,
+ VALUE position, VALUE filling_top_bottom,
+ VALUE filling_left_right, VALUE size,
VALUE size_max, VALUE color_fg, VALUE color_delim,
VALUE color_bg, VALUE separator, VALUE items)
{
char *c_name, *c_hidden, *c_priority, *c_type, *c_conditions, *c_position;
- char *c_filling, *c_size, *c_size_max, *c_color_fg, *c_color_delim;
- char *c_color_bg, *c_separator, *c_items;
+ char *c_filling_top_bottom, *c_filling_left_right, *c_size, *c_size_max;
+ char *c_color_fg, *c_color_delim, *c_color_bg, *c_separator, *c_items;
char *result;
VALUE return_value;
@@ -4120,7 +4121,8 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
c_type = NULL;
c_conditions = NULL;
c_position = NULL;
- c_filling = NULL;
+ c_filling_top_bottom = NULL;
+ c_filling_left_right = NULL;
c_size = NULL;
c_size_max = NULL;
c_color_fg = NULL;
@@ -4130,10 +4132,10 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
c_items = NULL;
if (NIL_P (name) || NIL_P (hidden) || NIL_P (priority) || NIL_P (type)
- || NIL_P (conditions) || NIL_P (position) || NIL_P (filling)
- || NIL_P (size) || NIL_P (size_max) || NIL_P (color_fg)
- || NIL_P (color_delim) || NIL_P (color_bg) || NIL_P (separator)
- || NIL_P (items))
+ || NIL_P (conditions) || NIL_P (position) || NIL_P (filling_top_bottom)
+ || NIL_P (filling_left_right) || NIL_P (size) || NIL_P (size_max)
+ || NIL_P (color_fg) || NIL_P (color_delim) || NIL_P (color_bg)
+ || NIL_P (separator) || NIL_P (items))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("bar_new");
RUBY_RETURN_EMPTY;
@@ -4145,7 +4147,8 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
Check_Type (type, T_STRING);
Check_Type (conditions, T_STRING);
Check_Type (position, T_STRING);
- Check_Type (filling, T_STRING);
+ Check_Type (filling_top_bottom, T_STRING);
+ Check_Type (filling_left_right, T_STRING);
Check_Type (size, T_STRING);
Check_Type (size_max, T_STRING);
Check_Type (color_fg, T_STRING);
@@ -4160,7 +4163,8 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
c_type = STR2CSTR (type);
c_conditions = STR2CSTR (conditions);
c_position = STR2CSTR (position);
- c_filling = STR2CSTR (filling);
+ c_filling_top_bottom = STR2CSTR (filling_top_bottom);
+ c_filling_left_right = STR2CSTR (filling_left_right);
c_size = STR2CSTR (size);
c_size_max = STR2CSTR (size_max);
c_color_fg = STR2CSTR (color_fg);
@@ -4175,7 +4179,8 @@ weechat_ruby_api_bar_new (VALUE class, VALUE name, VALUE hidden,
c_type,
c_conditions,
c_position,
- c_filling,
+ c_filling_top_bottom,
+ c_filling_left_right,
c_size,
c_size_max,
c_color_fg,
@@ -4803,7 +4808,7 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
rb_define_module_function (ruby_mWeechat, "bar_item_update", &weechat_ruby_api_bar_item_update, 1);
rb_define_module_function (ruby_mWeechat, "bar_item_remove", &weechat_ruby_api_bar_item_remove, 1);
rb_define_module_function (ruby_mWeechat, "bar_search", &weechat_ruby_api_bar_search, 1);
- rb_define_module_function (ruby_mWeechat, "bar_new", &weechat_ruby_api_bar_new, 14);
+ rb_define_module_function (ruby_mWeechat, "bar_new", &weechat_ruby_api_bar_new, 15);
rb_define_module_function (ruby_mWeechat, "bar_set", &weechat_ruby_api_bar_set, 3);
rb_define_module_function (ruby_mWeechat, "bar_update", &weechat_ruby_api_bar_update, 1);
rb_define_module_function (ruby_mWeechat, "bar_remove", &weechat_ruby_api_bar_remove, 1);
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 149affa1b..e88fedd3b 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -429,7 +429,8 @@ struct t_weechat_plugin
const char *type,
const char *condition,
const char *position,
- const char *filling,
+ const char *filling_top_bottom,
+ const char *filling_left_right,
const char *size,
const char *size_max,
const char *color_fg,
@@ -862,13 +863,14 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
#define weechat_bar_search(__name) \
weechat_plugin->bar_search(__name)
#define weechat_bar_new(__name, __hidden, __priority, __type, \
- __condition, __position, __filling, __size, \
- __size_max, __color_fg, __color_delim, \
- __color_bg, \
+ __condition, __position, __filling_top_bottom, \
+ __filling_left_right, __size, __size_max, \
+ __color_fg, __color_delim, __color_bg, \
__separator, __items) \
weechat_plugin->bar_new(weechat_plugin, __name, __hidden, \
__priority, __type, __condition, \
- __position, __filling, __size, __size_max, \
+ __position, __filling_top_bottom, \
+ __filling_left_right, __size, __size_max, \
__color_fg, __color_delim, __color_bg, \
__separator, __items)
#define weechat_bar_set(__bar, __property, __value) \