Revert "ui/app,apps: unexport ChangeStage and Stage"

I found a convincing use case: stopping asynchronous activities
while paused. A follow up change will rename the stages and add
an example.

This reverts commit f9840b0963.
This commit is contained in:
Elias Naur
2019-05-12 14:47:38 +02:00
parent af7a0ad293
commit 4441a3e13e
8 changed files with 62 additions and 57 deletions
+4 -4
View File
@@ -59,7 +59,7 @@ func onCreate(view C.CFTypeRef) {
C.gio_addLayerToView(view, w.layer)
views[view] = w
windows <- ow
w.w.event(changeStage{stageInvisible})
w.w.event(ChangeStage{StageInvisible})
}
//export onDraw
@@ -72,7 +72,7 @@ func onDraw(view C.CFTypeRef, dpi, sdpi, width, height C.CGFloat, sync C.int) {
w.visible.Store(true)
C.gio_updateView(view, w.layer)
if !wasVisible {
w.w.event(changeStage{stageVisible})
w.w.event(ChangeStage{StageVisible})
}
isSync := false
if sync != 0 {
@@ -96,14 +96,14 @@ func onDraw(view C.CFTypeRef, dpi, sdpi, width, height C.CGFloat, sync C.int) {
func onStop(view C.CFTypeRef) {
w := views[view]
w.visible.Store(false)
w.w.event(changeStage{stageInvisible})
w.w.event(ChangeStage{StageInvisible})
}
//export onDestroy
func onDestroy(view C.CFTypeRef) {
w := views[view]
delete(views, view)
w.w.event(changeStage{stageDead})
w.w.event(ChangeStage{StageDead})
C.gio_removeLayer(w.layer)
C.CFRelease(w.layer)
w.layer = 0