# HG changeset patch # User Olaf Wintermann # Date 1707656380 -3600 # Node ID 22dc0b739dd87a87e2c8cedf471430c036a716ed # Parent d2068517fbdd668e7e2704b3d5575c777e8fbaa6 add list remove function diff -r d2068517fbdd -r 22dc0b739dd8 ui/common/types.c --- 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); } diff -r d2068517fbdd -r 22dc0b739dd8 ui/ui/toolkit.h --- 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);