{"id":"frontend.yui--PlanYuiHostSurfaceRetainedV1","name":"PlanYuiHostSurfaceRetainedV1","owner":"yeho","package":"frontend.yui","kind":"function","signature":"external PlanYuiHostSurfaceRetainedV1(yuiHostSurfaceStateV1 original surface, yuiRetainedFramePlan original plan, bool stored, text storeState, text storeSurfaceId) returns yuiHostSurfaceRetainedDecisionV1","description":"Store state and identity are passed as inert snapshots only after the early phase. This keeps resource lookup and all provider/native work after invalid, native-idle, and compositor-only returns.","context":"Turn YUI models into a working frontend and its rendering/input adapters.","parameters":[{"name":"surface","type":"yuiHostSurfaceStateV1 original","description":"Supply surface as yuiHostSurfaceStateV1 original."},{"name":"plan","type":"yuiRetainedFramePlan original","description":"Supply plan as yuiRetainedFramePlan original."},{"name":"stored","type":"bool","description":"Supply stored as bool."},{"name":"storeState","type":"text","description":"Supply store state as text."},{"name":"storeSurfaceId","type":"text","description":"Supply store surface id as text."}],"returns":"yuiHostSurfaceRetainedDecisionV1","members":[],"tags":["cpu","frontend","frontend.yui","function","source-example","yeho","yui"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/frontend/yui/host-surface-surface.yh","line":155,"sha256":"1ffac9ba53a93336086a9bedb66f35036dfa88134bea6ab6c5082c98d7b6f6bc"},"status":"source-declared","notes":["Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup."],"examples":[{"id":"usage","title":"Use PlanYuiHostSurfaceRetainedV1","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using frontend.yui\n\n// Turn YUI models into a working frontend and its rendering/input adapters.\nyuiHostSurfaceStateV1 surface = yuiHostSurfaceStateV1(1, 1)\nyuiRetainedFramePlan plan = yuiRetainedFramePlan(\"surface Id\", \"reason\")\nbool stored = true\ntext storeState = \"store State\"\ntext storeSurfaceId = \"store Surface Id\"\nyuiHostSurfaceRetainedDecisionV1 result = PlanYuiHostSurfaceRetainedV1(surface, plan, stored, storeState, storeSurfaceId)\nConsole.Log(\"Inspect result in your debugger\")\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.frontend_yui__planyuihostsurfaceretainedv1\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"frontend.yui\"\nversion = \"0.2.0\"\npath = \"../../../yeho/packages/frontend/yui\"\n\n[[dependencies]]\npackage = \"graphics.canvas\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/graphics/canvas\"\n\n[[dependencies]]\npackage = \"graphics.image\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/graphics/image\"\n\n[[dependencies]]\npackage = \"graphics.image.processing\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/graphics/image/processing\"\n\n[[dependencies]]\npackage = \"graphics.text\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/graphics/text\"\n\n[[dependencies]]\npackage = \"host.ui_services\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/host/ui_services\"\n\n[[dependencies]]\npackage = \"input.text\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/input/text\"\n\n[[dependencies]]\npackage = \"ui\"\nversion = \"0.2.0\"\npath = \"../../../yeho/packages/ui\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"b7ff6bd5bb126fa0c33062108e1e296162ad9da65116131ca83dd50acb6e7a1c","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=frontend.yui--PlanYuiHostSurfaceRetainedV1","json":"https://demonhunterlabs.com/reference/items/frontend.yui--PlanYuiHostSurfaceRetainedV1.json","markdown":"https://demonhunterlabs.com/reference/text/frontend.yui--PlanYuiHostSurfaceRetainedV1.md"}
