{"id":"host.windows--windowsUiSessionSnapshot","name":"windowsUiSessionSnapshot","owner":"yeho","package":"host.windows","kind":"thing","signature":"external thing windowsUiSessionSnapshot","description":"A windows ui session snapshot record carrying processSessionId, connectState, acLineStatus, batteryFlag, batteryPercent, and related state.","context":"Connect Windows display, session, clipboard, and accessibility services.","parameters":[],"returns":"void","members":[{"name":"processSessionId","kind":"field","type":"int","description":"Stores process session id as int.","signature":"int processSessionId","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"connectState","kind":"field","type":"int","description":"Stores connect state as int.","signature":"int connectState","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"acLineStatus","kind":"field","type":"int","description":"Stores ac line status as int.","signature":"int acLineStatus","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"batteryFlag","kind":"field","type":"int","description":"Stores battery flag as int.","signature":"int batteryFlag","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"batteryPercent","kind":"field","type":"int","description":"Stores battery percent as int.","signature":"int batteryPercent","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"applicationForeground","kind":"field","type":"bool","description":"Stores application foreground as bool.","signature":"bool applicationForeground","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"sessionActive","kind":"field","type":"bool","description":"Stores session active as bool.","signature":"bool sessionActive","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"powerStatusAvailable","kind":"field","type":"bool","description":"Stores power status available as bool.","signature":"bool powerStatusAvailable","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"connectStateAvailable","kind":"field","type":"bool","description":"Stores connect state available as bool.","signature":"bool connectStateAvailable","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"refreshed","kind":"field","type":"bool","description":"Stores refreshed as bool.","signature":"bool refreshed","tags":["thing","field","host.windows"],"updated":"2026-09-09"},{"name":"windowsUiSessionSnapshot","kind":"constructor","parameters":[{"name":"processSessionId","type":"int","description":"Process session id."},{"name":"connectState","type":"int","description":"Connect state."},{"name":"acLineStatus","type":"int","description":"Ac line status."},{"name":"batteryFlag","type":"int","description":"Battery flag."},{"name":"batteryPercent","type":"int","description":"Battery percent."},{"name":"applicationForeground","type":"bool","description":"Application foreground."},{"name":"sessionActive","type":"bool","description":"Session active."},{"name":"powerStatusAvailable","type":"bool","description":"Power status available."},{"name":"connectStateAvailable","type":"bool","description":"Connect state available."},{"name":"refreshed","type":"bool","description":"Refreshed."}],"returns":"void","signature":"windowsUiSessionSnapshot(int processSessionId, int connectState, int acLineStatus, int batteryFlag, int batteryPercent, bool applicationForeground, bool sessionActive, bool powerStatusAvailable, bool connectStateAvailable, bool refreshed)","description":"Windows ui session snapshot.","tags":["thing","constructor","host.windows"],"updated":"2026-09-09"},{"name":"Validate","kind":"method","parameters":[],"returns":"text","signature":"Validate() returns text","description":"Validate.","tags":["thing","method","host.windows"],"exampleId":"method-Validate-11","updated":"2026-09-09"},{"name":"Describe","kind":"method","parameters":[],"returns":"text","signature":"Describe() returns text","description":"Describe.","tags":["thing","method","host.windows"],"exampleId":"method-Describe-12","updated":"2026-09-09"}],"tags":["cpu","host","host.windows","method","source-example","thing","windows","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/host/windows/session.yh","line":1,"sha256":"673746f5b58b2344b65af34c15ab40a50a673cba5730b685958191477e7dbb10"},"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 windowsUiSessionSnapshot","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using host.windows\n\n// Connect Windows display, session, clipboard, and accessibility services.\nwindowsUiSessionSnapshot sample = windowsUiSessionSnapshot(1, 1, 1, 1, 1, true, true, true, true, true)\nConsole.Log(Text.From(sample.processSessionId))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.host_windows__windowsuisessionsnapshot\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"host.ui_services\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/host/ui_services\"\n\n[[dependencies]]\npackage = \"host.windows\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/host/windows\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"5ba008a69931a470787a6c1468cb78484c154568994dea605646661975fb57b8","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-Validate-11","title":"windowsUiSessionSnapshot.Validate","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using host.windows\n\n// Validate.\nwindowsUiSessionSnapshot instance = windowsUiSessionSnapshot(1, 1, 1, 1, 1, true, true, true, true, true)\ntext result = instance.Validate()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.host_windows__windowsuisessionsnapshot\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"host.ui_services\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/host/ui_services\"\n\n[[dependencies]]\npackage = \"host.windows\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/host/windows\"\n","tags":["cpu","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"86b7a6a7a005898d37fb6541cbdafa7b62a12d8bf21df9f17301949f740ba7ab","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-Describe-12","title":"windowsUiSessionSnapshot.Describe","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using host.windows\n\n// Describe.\nwindowsUiSessionSnapshot instance = windowsUiSessionSnapshot(1, 1, 1, 1, 1, true, true, true, true, true)\ntext result = instance.Describe()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.host_windows__windowsuisessionsnapshot\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"host.ui_services\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/host/ui_services\"\n\n[[dependencies]]\npackage = \"host.windows\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/host/windows\"\n","tags":["cpu","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"bfd862e8fd299cb56b451c401263b10f7b8a61654e7e1523025185c64e6d19f9","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":["processSessionId","connectState","acLineStatus","batteryFlag","batteryPercent","applicationForeground","sessionActive","powerStatusAvailable","connectStateAvailable","refreshed","windowsUiSessionSnapshot","Validate","Describe"],"url":"https://demonhunterlabs.com/academy/api?item=host.windows--windowsUiSessionSnapshot","json":"https://demonhunterlabs.com/reference/items/host.windows--windowsUiSessionSnapshot.json","markdown":"https://demonhunterlabs.com/reference/text/host.windows--windowsUiSessionSnapshot.md"}
