mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app: [API] remove StageEvent and Stage
StageEvent served only redundant purposes: - To detect whether the window has focus. That is covered by key.FocusEvent. - To detect whether the window is currently visible. That is covered by the absence or presence of FrameEvents. - To detect when the window native handle is valid. That is covered by ViewEvent. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -138,7 +138,6 @@ func onCreate(view, controller C.CFTypeRef) {
|
||||
w.displayLink = dl
|
||||
C.gio_viewSetHandle(view, C.uintptr_t(cgo.NewHandle(w)))
|
||||
w.Configure(wopts.options)
|
||||
w.ProcessEvent(StageEvent{Stage: StageRunning})
|
||||
w.ProcessEvent(UIKitViewEvent{ViewController: uintptr(controller)})
|
||||
}
|
||||
|
||||
@@ -189,14 +188,12 @@ func (w *window) draw(sync bool) {
|
||||
func onStop(h C.uintptr_t) {
|
||||
w := viewFor(h)
|
||||
w.hidden = true
|
||||
w.ProcessEvent(StageEvent{Stage: StagePaused})
|
||||
}
|
||||
|
||||
//export onStart
|
||||
func onStart(h C.uintptr_t) {
|
||||
w := viewFor(h)
|
||||
w.hidden = false
|
||||
w.ProcessEvent(StageEvent{Stage: StageRunning})
|
||||
w.draw(true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user