Sat, 30 Aug 2025 16:08:23 +0200
extend UiListArgs wrapper functions
| ui/common/args.c | file | annotate | diff | comparison | revisions | |
| ui/common/args.h | file | annotate | diff | comparison | revisions | |
| ui/gtk/list.h | file | annotate | diff | comparison | revisions | |
| ui/ui/toolkit.h | file | annotate | diff | comparison | revisions | |
| ui/ui/tree.h | file | annotate | diff | comparison | revisions |
--- a/ui/common/args.c Sat Aug 30 16:02:52 2025 +0200 +++ b/ui/common/args.c Sat Aug 30 16:08:23 2025 +0200 @@ -1569,6 +1569,14 @@ args->getvalue2data = userdata; } +void ui_list_args_set_getstyle_func(UiListArgs *args, ui_getstylefunc getstyle) { + args->getstyle = getstyle; +} + +void ui_list_args_set_getstyle_data(UiListArgs *args, void *userdata) { + args->getstyledata = userdata; +} + void ui_list_args_set_onactivate(UiListArgs *args, ui_callback callback) { args->onactivate = callback; }
--- a/ui/common/args.h Sat Aug 30 16:02:52 2025 +0200 +++ b/ui/common/args.h Sat Aug 30 16:08:23 2025 +0200 @@ -364,6 +364,8 @@ UIEXPORT void ui_list_args_set_getvalue_func(UiListArgs *args, ui_getvaluefunc getvalue); UIEXPORT void ui_list_args_set_getvalue_func2(UiListArgs *args, ui_getvaluefunc2 getvalue); UIEXPORT void ui_list_args_set_getvalue_data(UiListArgs *args, void *userdata); +UIEXPORT void ui_list_args_set_getstyle_func(UiListArgs *args, ui_getstylefunc getstyle); +UIEXPORT void ui_list_args_set_getstyle_data(UiListArgs *args, void *userdata); UIEXPORT void ui_list_args_set_onactivate(UiListArgs *args, ui_callback callback); UIEXPORT void ui_list_args_set_onactivatedata(UiListArgs *args, void *userdata); UIEXPORT void ui_list_args_set_onselection(UiListArgs *args, ui_callback callback);
--- a/ui/gtk/list.h Sat Aug 30 16:02:52 2025 +0200 +++ b/ui/gtk/list.h Sat Aug 30 16:08:23 2025 +0200 @@ -47,7 +47,7 @@ UiModel *model; ui_getvaluefunc2 getvalue; void *getvaluedata; - ui_stylefunc getstyle; + ui_getstylefunc getstyle; void *getstyledata; char **elements; size_t nelm;
--- a/ui/ui/toolkit.h Sat Aug 30 16:02:52 2025 +0200 +++ b/ui/ui/toolkit.h Sat Aug 30 16:08:23 2025 +0200 @@ -254,7 +254,7 @@ typedef void*(*ui_getvaluefunc)(void *elm, int col); typedef void*(*ui_getvaluefunc2)(UiList *list, void *elm, int row, int col, void *userdata, UiBool *freeResult); -typedef UiBool(*ui_stylefunc)(UiList *list, void *elm, int row, int col, void *userdata, UiTextStyle *style); +typedef UiBool(*ui_getstylefunc)(UiList *list, void *elm, int row, int col, void *userdata, UiTextStyle *style); typedef int(*ui_threadfunc)(void*);
--- a/ui/ui/tree.h Sat Aug 30 16:02:52 2025 +0200 +++ b/ui/ui/tree.h Sat Aug 30 16:08:23 2025 +0200 @@ -120,7 +120,7 @@ ui_getvaluefunc getvalue; ui_getvaluefunc2 getvalue2; void *getvalue2data; - ui_stylefunc getstyle; + ui_getstylefunc getstyle; void *getstyledata; ui_callback onactivate; void* onactivatedata;