# HG changeset patch # User Olaf Wintermann # Date 1759174483 -7200 # Node ID a72d7509d2920fe248cadaec83c0a76ca4655118 # Parent b15ada8bdd8f7e86234d4c16c0e9995df88374d3 add UiCellValue wrapper diff -r b15ada8bdd8f -r a72d7509d292 ui/common/wrapper.c --- a/ui/common/wrapper.c Mon Sep 29 21:31:49 2025 +0200 +++ b/ui/common/wrapper.c Mon Sep 29 21:34:43 2025 +0200 @@ -299,3 +299,22 @@ void ui_textstyle_enable_color(UiTextStyle *style, UiBool enable) { style->fg_set = enable; } + + +/* ---------------------------- UiTextStyle ---------------------------- */ + +UiBool ui_cell_value_is_string(UiCellValue *value) { + return value->type == UI_STRING_EDITABLE; +} + +UiBool ui_cell_value_is_int(UiCellValue *value) { + return FALSE; // TODO +} + +const char* ui_cell_value_get_string(UiCellValue *value) { + return value->string; +} + +int64_t ui_cell_value_get_int(UiCellValue *value) { + return value->i; +} diff -r b15ada8bdd8f -r a72d7509d292 ui/common/wrapper.h --- a/ui/common/wrapper.h Mon Sep 29 21:31:49 2025 +0200 +++ b/ui/common/wrapper.h Mon Sep 29 21:34:43 2025 +0200 @@ -89,6 +89,11 @@ UIEXPORT void ui_textstyle_set_color(UiTextStyle *style, int r, int g, int b); UIEXPORT void ui_textstyle_enable_color(UiTextStyle *style, UiBool enable); +UIEXPORT UiBool ui_cell_value_is_string(UiCellValue *value); +UIEXPORT UiBool ui_cell_value_is_int(UiCellValue *value); +UIEXPORT const char* ui_cell_value_get_string(UiCellValue *value); +UIEXPORT int64_t ui_cell_value_get_int(UiCellValue *value); + #ifdef __cplusplus }