@startuml title Show/Hide Onscreenapp Sequence actor User entity HomeScreen_Service as HSS entity App entity Onscreenapp entity WindowManagere as WM == show Onscreenapp == User->App: display Onscreenapp by user operation App->HSS: subscribe replyShowWindow event App->HSS: call showWindow() note right { "application_id": "onscreenapp", "parameter": { "file": "qml file path", "data": {...} } } end note HSS->HSS: get app's id HSS->Onscreenapp: push showWindow event note right { "application_id": "onscreenapp", "parameter": { "file": "qml file path", "data": {...}, "replyid": "app's id" } } end note Onscreenapp->WM: activateWindow("on_screen.app") alt display able WM->Onscreenapp: SyncDraw Onscreenapp->Onscreenapp: load app's qml Onscreenapp->WM: EndDraw("on_screen.app") WM->Onscreenapp: VISIBLE("on_screen.app") else display disable rnote over Onscreenapp do nothing end rnote end == hide Onscreenapp == alt touch Onscreenapp's button User->Onscreenapp: touch Onscreenapp's button Onscreenapp->WM: deactivateWindow("on_screen.app") Onscreenapp->Onscreenapp: unload qml Onscreenapp->HSS: call replyShowWindow() note right { "application_id": "app's id", "parameter": { "method": "Buttons.ButtonPress", "buttonName": "pressed button name", "buttonPressMode": "Short" } } end note WM->Onscreenapp: INVISIBLE("on_screen.app") HSS->App: push replyShowWindow event App->App: call button function else hide by App App->HSS: call hideWindow("onscreenapp") note right { "application_id": "onscreenapp"} end note HSS->Onscreenapp: push hideWindow event Onscreenapp->Onscreenapp: unload qml Onscreenapp->WM: deactivateWindow("on_screen.app") WM->Onscreenapp: INVISIBLE("on_screen.app") end @enduml