mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 19:23:13 +02:00
api: add functions config_{boolean|integer|string|color|enum}_inherited in scripting API
This commit is contained in:
@@ -1644,6 +1644,19 @@ API_FUNC(config_boolean_default)
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_boolean_inherited)
|
||||
{
|
||||
int result;
|
||||
|
||||
API_INIT_FUNC(1, "config_boolean_inherited", API_RETURN_INT(0));
|
||||
if (objc < 2)
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
result = weechat_config_boolean_inherited (API_STR2PTR(Tcl_GetString (objv[1]))); /* option */
|
||||
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_integer)
|
||||
{
|
||||
int result;
|
||||
@@ -1670,6 +1683,19 @@ API_FUNC(config_integer_default)
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_integer_inherited)
|
||||
{
|
||||
int result;
|
||||
|
||||
API_INIT_FUNC(1, "config_integer_inherited", API_RETURN_INT(0));
|
||||
if (objc < 2)
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
result = weechat_config_integer_inherited (API_STR2PTR(Tcl_GetString (objv[1]))); /* option */
|
||||
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_string)
|
||||
{
|
||||
const char *result;
|
||||
@@ -1696,6 +1722,19 @@ API_FUNC(config_string_default)
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_string_inherited)
|
||||
{
|
||||
const char *result;
|
||||
|
||||
API_INIT_FUNC(1, "config_string_inherited", API_RETURN_EMPTY);
|
||||
if (objc < 2)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
result = weechat_config_string_inherited (API_STR2PTR(Tcl_GetString (objv[1]))); /* option */
|
||||
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_color)
|
||||
{
|
||||
const char *result;
|
||||
@@ -1722,6 +1761,19 @@ API_FUNC(config_color_default)
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_color_inherited)
|
||||
{
|
||||
const char *result;
|
||||
|
||||
API_INIT_FUNC(1, "config_color_inherited", API_RETURN_EMPTY);
|
||||
if (objc < 2)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
result = weechat_config_color_inherited (API_STR2PTR(Tcl_GetString (objv[1]))); /* option */
|
||||
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_enum)
|
||||
{
|
||||
int result;
|
||||
@@ -1748,6 +1800,19 @@ API_FUNC(config_enum_default)
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_enum_inherited)
|
||||
{
|
||||
int result;
|
||||
|
||||
API_INIT_FUNC(1, "config_enum_inherited", API_RETURN_INT(0));
|
||||
if (objc < 2)
|
||||
API_WRONG_ARGS(API_RETURN_INT(0));
|
||||
|
||||
result = weechat_config_enum_inherited (API_STR2PTR(Tcl_GetString (objv[1]))); /* option */
|
||||
|
||||
API_RETURN_INT(result);
|
||||
}
|
||||
|
||||
API_FUNC(config_write_option)
|
||||
{
|
||||
char *config_file, *option;
|
||||
@@ -5700,13 +5765,18 @@ void weechat_tcl_api_init (Tcl_Interp *interp)
|
||||
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_inherited);
|
||||
API_DEF_FUNC(config_enum_default);
|
||||
API_DEF_FUNC(config_write_option);
|
||||
API_DEF_FUNC(config_write_line);
|
||||
|
||||
Reference in New Issue
Block a user