Added theme support to plugins

This commit is contained in:
James Booth
2016-02-21 23:58:13 +00:00
parent 1654f16a2f
commit ac91e7ef85
9 changed files with 234 additions and 119 deletions

View File

@@ -65,6 +65,12 @@ c_api_cons_show(const char * const message)
return api_cons_show(message);
}
static int
c_api_cons_show_themed(const char *const group, const char *const item, const char *const def, const char *const message)
{
return api_cons_show_themed(group, item, def, message);
}
static int
c_api_cons_bad_cmd_usage(const char *const cmd)
{
@@ -144,13 +150,13 @@ c_api_log_error(const char *message)
api_log_error(message);
}
int
static int
c_api_win_exists(char *tag)
{
return api_win_exists(tag);
}
void
static void
c_api_win_create(char *tag, void(*callback)(char *tag, char *line))
{
WindowWrapper *wrapper = malloc(sizeof(WindowWrapper));
@@ -158,40 +164,22 @@ c_api_win_create(char *tag, void(*callback)(char *tag, char *line))
api_win_create(tag, wrapper, c_window_callback);
}
int
static int
c_api_win_focus(char *tag)
{
return api_win_focus(tag);
}
int
static int
c_api_win_show(char *tag, char *line)
{
return api_win_show(tag, line);
}
int
c_api_win_show_green(char *tag, char *line)
static int
c_api_win_show_themed(char *tag, char *group, char *key, char *def, char *line)
{
return api_win_show_green(tag, line);
}
int
c_api_win_show_red(char *tag, char *line)
{
return api_win_show_red(tag, line);
}
int
c_api_win_show_cyan(char *tag, char *line)
{
return api_win_show_cyan(tag, line);
}
int
c_api_win_show_yellow(char *tag, char *line)
{
return api_win_show_yellow(tag, line);
return api_win_show_themed(tag, group, key, def, line);
}
void
@@ -223,6 +211,7 @@ c_api_init(void)
{
prof_cons_alert = c_api_cons_alert;
prof_cons_show = c_api_cons_show;
prof_cons_show_themed = c_api_cons_show_themed;
prof_cons_bad_cmd_usage = c_api_cons_bad_cmd_usage;
prof_register_command = c_api_register_command;
prof_register_timed = c_api_register_timed;
@@ -239,8 +228,5 @@ c_api_init(void)
prof_win_create = c_api_win_create;
prof_win_focus = c_api_win_focus;
prof_win_show = c_api_win_show;
prof_win_show_green = c_api_win_show_green;
prof_win_show_red = c_api_win_show_red;
prof_win_show_cyan = c_api_win_show_cyan;
prof_win_show_yellow = c_api_win_show_yellow;
prof_win_show_themed = c_api_win_show_themed;
}