diff options
| author | Pietro Gagliardi <[email protected]> | 2015-12-12 15:52:43 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-12-12 15:52:43 -0500 |
| commit | 69cc82336897f62c25aabe6d7fdcc39e74dbe42c (patch) | |
| tree | ecc9d929d8a5cce7dc8aeb94d13ba6304f8500ff /window.go | |
| parent | 31ae742daf04c6bc5a79ff9fc339fa00ebc2b620 (diff) | |
Added Button and Checkbox.
Diffstat (limited to 'window.go')
| -rw-r--r-- | window.go | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -63,6 +63,13 @@ func (w *Window) Destroy() { C.uiControlDestroy(w.c) } +// LibuiControl returns the libui uiControl pointer that backs +// the Window. This is only used by package ui itself and should +// not be called by programs. +func (w *Window) LibuiControl() uintptr { + return uintptr(unsafe.Pointer(w.c)) +} + // Handle returns the OS-level handle associated with this Window. // On Windows this is an HWND of a libui-internal class. // On GTK+ this is a pointer to a GtkWindow. @@ -134,7 +141,7 @@ func (w *Window) SetChild(child Control) { w.child = child c := (*C.uiControl)(nil) if w.child != nil { - c = touiControl(w.child.Handle()) + c = touiControl(w.child.LibuiControl()) } C.uiWindowSetChild(w.w, c) } |
