gui: add routine to destroy objects outside event loop.
This commit is contained in:
@@ -356,9 +356,10 @@ GuiApp_OnDestroy:
|
||||
; @clobbers any, !Y
|
||||
|
||||
GuiApp_OnTimer:
|
||||
rcall guiAppCheckTouch ; (any, !Y)
|
||||
rcall guiAppSendTimerEvents ; (any, !Y)
|
||||
rcall guiAppCheckSendGuiEvents ; (any, !Y)
|
||||
rcall guiAppCheckTouch ; (any, !Y)
|
||||
rcall guiAppSendTimerEvents ; (any, !Y)
|
||||
rcall guiAppCheckSendGuiEvents ; (any, !Y)
|
||||
rcall guiAppHandlePendingDestructions ; (any, !Y)
|
||||
sec
|
||||
ret
|
||||
; @end
|
||||
@@ -619,6 +620,7 @@ guiAppCheckSendGuiEvents:
|
||||
pop yl
|
||||
ldi r16, GUIAPP_GUITIMER
|
||||
std Y+GUIAPP_OFFS_GUITIMER, r16
|
||||
|
||||
guiAppCheckSendGuiEvents_done:
|
||||
pop yh
|
||||
pop yl
|
||||
@@ -627,6 +629,30 @@ guiAppCheckSendGuiEvents_done:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine guiAppHandlePendingDestructions
|
||||
;
|
||||
; Send GUI events to current window if timer elapsed.
|
||||
;
|
||||
; @param Y ptr to GUIAPP
|
||||
; @clobbers any, !Y
|
||||
|
||||
guiAppHandlePendingDestructions:
|
||||
push yl
|
||||
push yh
|
||||
rcall GuiApp_GetRootWindow
|
||||
brcc guiAppHandlePendingDestructions_done
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
bigcall OBJ_TreeDestroyMarked
|
||||
guiAppHandlePendingDestructions_done:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine guiAppSendTouchEvents
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user