Sun, 11 Feb 2024 13:59:40 +0100
add list remove function
ui/common/types.c | file | annotate | diff | comparison | revisions | |
ui/ui/toolkit.h | file | annotate | diff | comparison | revisions |
--- a/ui/common/types.c Sun Feb 11 12:29:30 2024 +0100 +++ b/ui/common/types.c Sun Feb 11 13:59:40 2024 +0100 @@ -150,6 +150,10 @@ cxListInsert(list->data, 0, data); } +void ui_list_remove(UiList *list, int i) { + cxListRemove(list->data, i); +} + void ui_list_clear(UiList *list) { cxListClear(list->data); }
--- a/ui/ui/toolkit.h Sun Feb 11 12:29:30 2024 +0100 +++ b/ui/ui/toolkit.h Sun Feb 11 13:59:40 2024 +0100 @@ -474,6 +474,7 @@ UIEXPORT int ui_list_count(UiList *list); UIEXPORT void ui_list_append(UiList *list, void *data); UIEXPORT void ui_list_prepend(UiList *list, void *data); +UIEXPORT void ui_list_remove(UiList *list, int i); UIEXPORT void ui_list_clear(UiList *list); UIEXPORT void ui_list_addobsv(UiList *list, ui_callback f, void *data); UIEXPORT void ui_list_notify(UiList *list);