{"id":"ui--CreateUiSurfaceSpec","name":"CreateUiSurfaceSpec","owner":"yeho","package":"ui","kind":"function","signature":"external CreateUiSurfaceSpec(text id, int width, int height, int scalePercent, text root) returns uiSurfaceSpec","description":"Create ui surface spec from the supplied values.","context":"Build YUI's reusable control, layout, interaction, text, accessibility, and retained-rendering models.","parameters":[{"name":"id","type":"text","description":"Supply id as text."},{"name":"width","type":"int","description":"Supply width as int."},{"name":"height","type":"int","description":"Supply height as int."},{"name":"scalePercent","type":"int","description":"Supply scale percent as int."},{"name":"root","type":"text","description":"Supply root as text."}],"returns":"uiSurfaceSpec","members":[],"tags":["cpu","function","source-example","ui","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/ui/surface-surface.yh","line":158,"sha256":"7bd2b644c8330e50977ce280ec0003bba995d80ea276cb1d982acc5996ab2f13"},"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 CreateUiSurfaceSpec","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using ui\n\n// Build YUI's reusable control, layout, interaction, text, accessibility, and retained-rendering models.\ntext id = \"id\"\nint width = 1\nint height = 1\nint scalePercent = 1\ntext root = \"root\"\nuiSurfaceSpec result = CreateUiSurfaceSpec(id, width, height, scalePercent, root)\nConsole.Log(\"Inspect result in your debugger\")\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.ui__createuisurfacespec\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"graphics.image\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/graphics/image\"\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 = \"ui\"\nversion = \"0.2.0\"\npath = \"../../../yeho/packages/ui\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"aee63edcd6abb73f7bab435fae14e6af375bbf2eaa4d4d3433af4810ad24d3ca","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=ui--CreateUiSurfaceSpec","json":"https://demonhunterlabs.com/reference/items/ui--CreateUiSurfaceSpec.json","markdown":"https://demonhunterlabs.com/reference/text/ui--CreateUiSurfaceSpec.md"}
