diff --git a/legacy/elm_code/lib/Elm_Code.h b/legacy/elm_code/lib/Elm_Code.h index 3ed59fb343..eadf59da44 100644 --- a/legacy/elm_code/lib/Elm_Code.h +++ b/legacy/elm_code/lib/Elm_Code.h @@ -7,6 +7,7 @@ #include #include +#include #include #ifdef EAPI diff --git a/legacy/elm_code/lib/elm_code_common.h b/legacy/elm_code/lib/elm_code_common.h index 3dc00ede53..79f5d6c12c 100644 --- a/legacy/elm_code/lib/elm_code_common.h +++ b/legacy/elm_code/lib/elm_code_common.h @@ -17,6 +17,9 @@ typedef enum { ELM_CODE_STATUS_TYPE_REMOVED, ELM_CODE_STATUS_TYPE_CHANGED, + ELM_CODE_STATUS_TYPE_PASSED, + ELM_CODE_STATUS_TYPE_FAILED, + ELM_CODE_STATUS_TYPE_COUNT } Elm_Code_Status_Type; diff --git a/legacy/elm_code/lib/elm_code_file.c b/legacy/elm_code/lib/elm_code_file.c index 07ae9e2f28..e2d9daae56 100644 --- a/legacy/elm_code/lib/elm_code_file.c +++ b/legacy/elm_code/lib/elm_code_file.c @@ -119,6 +119,21 @@ EAPI const char *elm_code_file_path_get(Elm_Code_File *file) return eina_file_filename_get(file->file); } +EAPI void elm_code_file_clear(Elm_Code_File *file) +{ + Elm_Code_Line *l; + + EINA_LIST_FREE(file->lines, l) + { + if (l->content) + free(l->content); + free(l); + } + + if (file->parent) + elm_code_callback_fire(file->parent, &ELM_CODE_EVENT_FILE_LOAD_DONE, file); +} + EAPI unsigned int elm_code_file_lines_get(Elm_Code_File *file) { return eina_list_count(file->lines); diff --git a/legacy/elm_code/lib/elm_code_file.h b/legacy/elm_code/lib/elm_code_file.h index 19a47258be..c3ebfb9893 100644 --- a/legacy/elm_code/lib/elm_code_file.h +++ b/legacy/elm_code/lib/elm_code_file.h @@ -76,6 +76,8 @@ EAPI const char *elm_code_file_path_get(Elm_Code_File *file); * */ +EAPI void elm_code_file_clear(Elm_Code_File *file); + EAPI unsigned int elm_code_file_lines_get(Elm_Code_File *file); EAPI void elm_code_file_line_append(Elm_Code_File *file, const char *line); diff --git a/legacy/elm_code/lib/elm_code_widget.c b/legacy/elm_code/lib/elm_code_widget.c index ba096e44a1..e555468c56 100644 --- a/legacy/elm_code/lib/elm_code_widget.c +++ b/legacy/elm_code/lib/elm_code_widget.c @@ -176,6 +176,11 @@ EAPI Evas_Object *elm_code_widget_add(Evas_Object *parent, Elm_Code *code) evas_object_textgrid_palette_set(o, EVAS_TEXTGRID_PALETTE_STANDARD, ELM_CODE_STATUS_TYPE_CHANGED, 36, 36, 96, 255); + evas_object_textgrid_palette_set(o, EVAS_TEXTGRID_PALETTE_STANDARD, ELM_CODE_STATUS_TYPE_PASSED, + 54, 96, 54, 255); + evas_object_textgrid_palette_set(o, EVAS_TEXTGRID_PALETTE_STANDARD, ELM_CODE_STATUS_TYPE_FAILED, + 96, 54, 54, 255); + // setup token colors evas_object_textgrid_palette_set(o, EVAS_TEXTGRID_PALETTE_STANDARD, ELM_CODE_TOKEN_TYPE_DEFAULT, 205, 205, 205, 255);