func newContainer(child Control) *container { c := new(container) widget := C.newContainer(unsafe.Pointer(c)) c.layoutwidget = widget c.layoutcontainer = (*C.GtkContainer)(unsafe.Pointer(widget)) c.child = child c.child.setParent(&controlParent{c.layoutcontainer}) return c }
func newContainer(control Control) *container { c := new(container) hwnd := C.newContainer(unsafe.Pointer(c)) if hwnd != c.hwnd { panic(fmt.Errorf("inconsistency: hwnd returned by CreateWindowEx() (%p) and hwnd stored in container (%p) differ", hwnd, c.hwnd)) } c.child = control c.child.setParent(&controlParent{c}) return c }
func newContainer() *container { c := new(container) c.widget = C.newContainer(unsafe.Pointer(c)) c.container = (*C.GtkContainer)(unsafe.Pointer(c.widget)) return c }