ui/app: (macOS) use CFTypeRef for the view factory

The os and gl packages were separate in the past, which required
uintptr for cross-package CFTypeRefs. That's no longer needed.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-05-24 14:05:30 +02:00
parent a1c0693eeb
commit e5ddb0b903
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ type context struct {
}
func init() {
viewFactory = func() uintptr {
return uintptr(C.gio_createGLView())
viewFactory = func() C.CFTypeRef {
return C.gio_createGLView()
}
}
+2 -2
View File
@@ -43,7 +43,7 @@ var singleWindow struct {
opts *WindowOptions
}
var viewFactory func() uintptr
var viewFactory func() C.CFTypeRef
var views = make(map[C.CFTypeRef]*window)
@@ -200,7 +200,7 @@ func createWindow(opts *WindowOptions) error {
}
func Main() {
view := C.CFTypeRef(viewFactory())
view := viewFactory()
if view == 0 {
// TODO: return this error from CreateWindow.
panic(errors.New("CreateWindow: failed to create view"))