예제 #1
0
//export tableSetHot
func tableSetHot(data unsafe.Pointer, row C.int, col C.int) {
	t := (*table)(data)
	redraw := (row != t.hotrow || col != t.hotcol)
	t.hotrow = row
	t.hotcol = col
	if redraw {
		C.tableUpdate(t._hwnd, C.int(reflect.Indirect(reflect.ValueOf(t.data)).Len()))
	}
}
예제 #2
0
파일: table_darwin.go 프로젝트: sjn1978/ui
func (t *table) Unlock() {
	t.unlock()
	// there's a possibility that user actions can happen at this point, before the view is updated
	// alas, this is something we have to deal with, because Unlock() can be called from any thread
	go func() {
		Do(func() {
			t.RLock()
			defer t.RUnlock()
			C.tableUpdate(t.id)
		})
	}()
}
예제 #3
0
func (t *table) Unlock() {
	t.unlock()
	// there's a possibility that user actions can happen at this point, before the view is updated
	// alas, this is something we have to deal with, because Unlock() can be called from any thread
	go func() {
		Do(func() {
			t.RLock()
			defer t.RUnlock()
			C.tableUpdate(t._hwnd, C.int(reflect.Indirect(reflect.ValueOf(t.data)).Len()))
		})
	}()
}
예제 #4
0
//export tablePushed
func tablePushed(data unsafe.Pointer, row C.int, col C.int) {
	t := (*table)(data)
	t.pushedrow = row
	t.pushedcol = col
	C.tableUpdate(t._hwnd, C.int(reflect.Indirect(reflect.ValueOf(t.data)).Len()))
}