summaryrefslogtreecommitdiff
path: root/pkgui.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2018-08-26 17:36:39 -0400
committerPietro Gagliardi <[email protected]>2018-08-26 17:36:39 -0400
commit3c4b7e208af45ff4a5647d372a8cbcba00315de2 (patch)
tree1545b3a6b88664b241ac9d63f0101fc1cd0d7496 /pkgui.c
parentdd9db1c14586ecec7e9783f09cceb86fd04825ce (diff)
And migrated tablemodel.go back. And now we can finally build it properly!
Diffstat (limited to 'pkgui.c')
-rw-r--r--pkgui.c14
1 files changed, 14 insertions, 0 deletions
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,
+};