summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-12-12 15:52:43 -0500
committerPietro Gagliardi <[email protected]>2015-12-12 15:52:43 -0500
commit69cc82336897f62c25aabe6d7fdcc39e74dbe42c (patch)
treeecc9d929d8a5cce7dc8aeb94d13ba6304f8500ff /window.go
parent31ae742daf04c6bc5a79ff9fc339fa00ebc2b620 (diff)
Added Button and Checkbox.
Diffstat (limited to 'window.go')
-rw-r--r--window.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/window.go b/window.go
index 53147f2..bdd230c 100644
--- a/window.go
+++ b/window.go
@@ -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)
}