diff options
| author | Pietro Gagliardi <[email protected]> | 2015-02-17 21:38:55 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-02-17 21:38:55 -0500 |
| commit | c59cbf6de7334615ebbb917a6ec3ae8e6a0639f3 (patch) | |
| tree | f586b38e06d651ed031b14137379aea18da38c74 /table_windows.go | |
| parent | 3099edb9c973d709f48b28ddceff0c67bcf0923c (diff) | |
Even more Windows Table code. Almost done with the prototype test!
Diffstat (limited to 'table_windows.go')
| -rw-r--r-- | table_windows.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/table_windows.go b/table_windows.go index 6dec90f..6c357c9 100644 --- a/table_windows.go +++ b/table_windows.go @@ -92,7 +92,9 @@ func tableGetCell(data unsafe.Pointer, item *C.LVITEMW) C.LRESULT { isText := true switch { case datum.Type() == reflect.TypeOf((*image.RGBA)(nil)): - bitmap := unsafe.Pointer(C.toBitmap(xxxxx TODO xxxx)) + i := datum.Interface().(*image.RGBA) + hbitmap := C.toBitmap(unsafe.Pointer(i), C.intptr_t(i.Dx()), C.intptr_t(i.Dy())) + bitmap := unsafe.Pointer(hbitmap) t.freeLock.Lock() t.free[bitmap] = true // bitmap freed with C.freeBitmap() t.freeLock.Unlock() @@ -124,7 +126,7 @@ func tableFreeData(gotable unsafe.Pointer, data unsafe.Pointer) { if b == false { C.free(data) } else { - // TODO + C.freeBitmap(data) } delete(t.free, data) } |
