mirror of
https://github.com/weechat/weechat.git
synced 2026-07-08 10:43:13 +02:00
api: add functions config_{boolean|integer|string|color|enum}_inherited in scripting API
This commit is contained in:
@@ -1584,6 +1584,20 @@ API_FUNC(config_boolean_default)
|
||||
API_RETURN_INT(value);
|
||||
}
|
||||
|
||||
API_FUNC(config_boolean_inherited)
|
||||
{
|
||||
int value;
|
||||
dXSARGS;
|
||||
|
||||
API_INIT_FUNC(1, "config_boolean_inherited", API_RETURN_INT(0));
|
||||
if (items < 1)
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
value = weechat_config_boolean_inherited (API_STR2PTR(SvPV_nolen (ST (0)))); /* option */
|
||||
|
||||
API_RETURN_INT(value);
|
||||
}
|
||||
|
||||
API_FUNC(config_integer)
|
||||
{
|
||||
int value;
|
||||
@@ -1612,6 +1626,20 @@ API_FUNC(config_integer_default)
|
||||
API_RETURN_INT(value);
|
||||
}
|
||||
|
||||
API_FUNC(config_integer_inherited)
|
||||
{
|
||||
int value;
|
||||
dXSARGS;
|
||||
|
||||
API_INIT_FUNC(1, "config_integer_inherited", API_RETURN_INT(0));
|
||||
if (items < 1)
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
value = weechat_config_integer_inherited (API_STR2PTR(SvPV_nolen (ST (0)))); /* option */
|
||||
|
||||
API_RETURN_INT(value);
|
||||
}
|
||||
|
||||
API_FUNC(config_string)
|
||||
{
|
||||
const char *result;
|
||||
@@ -1640,6 +1668,20 @@ API_FUNC(config_string_default)
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_string_inherited)
|
||||
{
|
||||
const char *result;
|
||||
dXSARGS;
|
||||
|
||||
API_INIT_FUNC(1, "config_string_inherited", API_RETURN_EMPTY);
|
||||
if (items < 1)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
result = weechat_config_string_inherited (API_STR2PTR(SvPV_nolen (ST (0)))); /* option */
|
||||
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_color)
|
||||
{
|
||||
const char *result;
|
||||
@@ -1668,6 +1710,20 @@ API_FUNC(config_color_default)
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_color_inherited)
|
||||
{
|
||||
const char *result;
|
||||
dXSARGS;
|
||||
|
||||
API_INIT_FUNC(1, "config_color_inherited", API_RETURN_EMPTY);
|
||||
if (items < 1)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
result = weechat_config_color_inherited (API_STR2PTR(SvPV_nolen (ST (0)))); /* option */
|
||||
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_enum)
|
||||
{
|
||||
int value;
|
||||
@@ -1696,6 +1752,20 @@ API_FUNC(config_enum_default)
|
||||
API_RETURN_INT(value);
|
||||
}
|
||||
|
||||
API_FUNC(config_enum_inherited)
|
||||
{
|
||||
int value;
|
||||
dXSARGS;
|
||||
|
||||
API_INIT_FUNC(1, "config_enum_inherited", API_RETURN_INT(0));
|
||||
if (items < 1)
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
value = weechat_config_enum_inherited (API_STR2PTR(SvPV_nolen (ST (0)))); /* option */
|
||||
|
||||
API_RETURN_INT(value);
|
||||
}
|
||||
|
||||
API_FUNC(config_write_option)
|
||||
{
|
||||
char *config_file, *option;
|
||||
@@ -5666,14 +5736,19 @@ weechat_perl_api_init (pTHX)
|
||||
API_DEF_FUNC(config_option_default_is_null);
|
||||
API_DEF_FUNC(config_boolean);
|
||||
API_DEF_FUNC(config_boolean_default);
|
||||
API_DEF_FUNC(config_boolean_inherited);
|
||||
API_DEF_FUNC(config_integer);
|
||||
API_DEF_FUNC(config_integer_default);
|
||||
API_DEF_FUNC(config_integer_inherited);
|
||||
API_DEF_FUNC(config_string);
|
||||
API_DEF_FUNC(config_string_default);
|
||||
API_DEF_FUNC(config_string_inherited);
|
||||
API_DEF_FUNC(config_color);
|
||||
API_DEF_FUNC(config_color_default);
|
||||
API_DEF_FUNC(config_color_inherited);
|
||||
API_DEF_FUNC(config_enum);
|
||||
API_DEF_FUNC(config_enum_default);
|
||||
API_DEF_FUNC(config_enum_inherited);
|
||||
API_DEF_FUNC(config_write_option);
|
||||
API_DEF_FUNC(config_write_line);
|
||||
API_DEF_FUNC(config_write);
|
||||
|
||||
Reference in New Issue
Block a user