Renamed Mac OS X's container's view field to id to be in sync with the other Mac OS X data structures.
This commit is contained in:
parent
55f25afb49
commit
219132f2f1
|
@ -11,8 +11,7 @@ import "C"
|
||||||
|
|
||||||
type container struct {
|
type container struct {
|
||||||
containerbase
|
containerbase
|
||||||
// TODO rename to id
|
id C.id
|
||||||
view C.id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type sizing struct {
|
type sizing struct {
|
||||||
|
@ -27,9 +26,9 @@ type sizing struct {
|
||||||
|
|
||||||
func newContainer(child Control) *container {
|
func newContainer(child Control) *container {
|
||||||
c := new(container)
|
c := new(container)
|
||||||
c.view = C.newContainerView(unsafe.Pointer(c))
|
c.id = C.newContainerView(unsafe.Pointer(c))
|
||||||
c.child = child
|
c.child = child
|
||||||
c.child.setParent(&controlParent{c.view})
|
c.child.setParent(&controlParent{c.id})
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ func (t *tab) Append(name string, control Control) {
|
||||||
t.tabs = append(t.tabs, c)
|
t.tabs = append(t.tabs, c)
|
||||||
cname := C.CString(name)
|
cname := C.CString(name)
|
||||||
defer C.free(unsafe.Pointer(cname))
|
defer C.free(unsafe.Pointer(cname))
|
||||||
C.tabAppend(t._id, cname, c.view)
|
C.tabAppend(t._id, cname, c.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *tab) id() C.id {
|
func (t *tab) id() C.id {
|
||||||
|
|
|
@ -28,7 +28,7 @@ func newWindow(title string, width int, height int, control Control) *window {
|
||||||
container: newContainer(control),
|
container: newContainer(control),
|
||||||
}
|
}
|
||||||
C.windowSetDelegate(w.id, unsafe.Pointer(w))
|
C.windowSetDelegate(w.id, unsafe.Pointer(w))
|
||||||
C.windowSetContentView(w.id, w.container.view)
|
C.windowSetContentView(w.id, w.container.id)
|
||||||
return w
|
return w
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue