api/vim: allow guis and tests to retrieve the entire color table

This commit is contained in:
Björn Linse
2015-01-26 19:32:20 +01:00
committed by Thiago de Arruda
parent ae2b747e64
commit f468fb70cb
6 changed files with 219 additions and 192 deletions

View File

@@ -552,6 +552,18 @@ Integer vim_name_to_color(String name)
return name_to_color((uint8_t *)name.data);
}
Dictionary vim_get_color_map(void)
{
Dictionary colors = ARRAY_DICT_INIT;
for (int i = 0; color_name_table[i].name != NULL; i++) {
PUT(colors, color_name_table[i].name,
INTEGER_OBJ(color_name_table[i].color));
}
return colors;
}
Array vim_get_api_info(uint64_t channel_id)
{
Array rv = ARRAY_DICT_INIT;