From 570f08a49ce1099cee4feed9ae006b3f0545b7a0 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 18 Aug 2014 10:41:58 -0400 Subject: Implemented Table.Selected()/Select() on Mac OS X. Also more TODOs. --- redo/table_darwin.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'redo/table_darwin.go') diff --git a/redo/table_darwin.go b/redo/table_darwin.go index 1f889c0..bccaf1b 100644 --- a/redo/table_darwin.go +++ b/redo/table_darwin.go @@ -62,6 +62,18 @@ func (t *table) LoadImageList(i ImageList) { i.apply(&t.images) } +func (t *table) Selected() int { + t.RLock() + defer t.RUnlock() + return int(C.tableSelected(t._id)) +} + +func (t *table) Select(index int) { + t.RLock() + defer t.RUnlock() + C.tableSelect(t._id, C.intptr_t(index)) +} + //export goTableDataSource_getValue func goTableDataSource_getValue(data unsafe.Pointer, row C.intptr_t, col C.intptr_t, outtype *C.int) unsafe.Pointer { t := (*table)(data) -- cgit v1.2.3