mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
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:
+4
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user