summaryrefslogtreecommitdiff
path: root/experiments/hscrolllistbox.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-16 06:37:25 -0400
committerPietro Gagliardi <[email protected]>2014-05-16 06:37:25 -0400
commit14b3696d960d8e9d14129c66a50aafe1bcfc8913 (patch)
tree14c0d5e8920cef0ff862aab27dcdcf745db99a4c /experiments/hscrolllistbox.go
parent8084ef53e1f64e41e35c44dac22e93635120cf46 (diff)
Cleaned up objc_darwin.h and changed all instances of int64_t in the wrapper structs to intptr_t.
Diffstat (limited to 'experiments/hscrolllistbox.go')
-rw-r--r--experiments/hscrolllistbox.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/experiments/hscrolllistbox.go b/experiments/hscrolllistbox.go
index 3975a56..7d03200 100644
--- a/experiments/hscrolllistbox.go
+++ b/experiments/hscrolllistbox.go
@@ -143,7 +143,7 @@ var (
)
func listboxPrefSize(control C.id) (width int, height int) {
- var maxwidth C.int64_t
+ var maxwidth C.intptr_t
listbox := listboxInScrollView(control)
_, height = controlPrefSize(listbox)
@@ -166,13 +166,13 @@ func (s *sysData) setRect(x int, y int, width int, height int, winheight int) er
// winheight - y because (0,0) is the bottom-left corner of the window and not the top-left corner
// (winheight - y) - height because (x, y) is the bottom-left corner of the control and not the top-left
C.objc_msgSend_rect(s.id, _setFrame,
- C.int64_t(x), C.int64_t((winheight - y) - height), C.int64_t(width), C.int64_t(height))
+ C.intptr_t(x), C.intptr_t((winheight - y) - height), C.intptr_t(width), C.intptr_t(height))
// TODO having this here is a hack; split it into a separate function in listbox_darwin.go
// the NSTableView:NSTableColumn ratio is what determines horizontal scrolling; see http://stackoverflow.com/questions/7050497/enable-scrolling-for-nstableview
if s.ctype == c_listbox {
listbox := listboxInScrollView(s.id)
C.objc_msgSend_rect(listbox, _setFrame,
- 0, 0, C.int64_t(width), C.int64_t(height))
+ 0, 0, C.intptr_t(width), C.intptr_t(height))
}
return nil
}