// SendEvent sends an event to a widget. func sendEvent(dest sparta.Widget, comm sparta.CommandEvent) { dwin := dest.Window().(*window) var id w32.HWND if comm.Source != nil { id = comm.Source.Window().(*window).id } w32.PostMessage(dwin.id, w32.WM_USER, uintptr(id), uintptr(comm.Value)) }
func (this *Window) onUiThread(f func()) { this.uiTasks <- f w32.PostMessage(this.hwnd, WDEM_UI_THREAD, uintptr(0), uintptr(0)) }