From 3c4b7e208af45ff4a5647d372a8cbcba00315de2 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 26 Aug 2018 17:36:39 -0400 Subject: And migrated tablemodel.go back. And now we can finally build it properly! --- pkgui.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pkgui.c') diff --git a/pkgui.c b/pkgui.c index 1527fad..05fe8cd 100644 --- a/pkgui.c +++ b/pkgui.c @@ -224,3 +224,17 @@ void pkguiFreeAreaHandler(uiAreaHandler *ah) { free(ah); } + +// cgo can't generate const, so we need this trampoline +static void realDoTableModelSetCellValue(uiTableModelHandler *mh, uiTableModel *m, int row, int column, const uiTableValue *value) +{ + pkguiDoTableModelSetCellValue(mh, m, row, column, (uiTableValue *) value); +} + +const uiTableModelHandler pkguiTableModelHandler = { + .NumColumns = pkguiDoTableModelNumColumns, + .ColumnType = pkguiDoTableModelColumnType, + .NumRows = pkguiDoTableModelNumRows, + .CellValue = pkguiDoTableModelCellValue, + .SetCellValue = realDoTableModelSetCellValue, +}; -- cgit v1.2.3